LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-28-2007, 01:09 PM   #31
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30

Unfortunately didn't work out.

bluetoothd has following options:
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/bluetoothd --help
bluetoothd - Bluetooth daemon ver 3.9

Usage:
        bluetoothd [options]

Options:
        --help        Display help
        --debug       Enable debug information
        --nodaemon    Run daemon in foreground
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/bluetoothd --debug --nodaemon
bluetoothd[2179]: Bluetooth daemon ver 3.9
bluetoothd[2179]: Enabling debug information
bluetoothd[2179]: Could not become the primary owner of org.bluez
and
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# man -k bluetooth
bluetooth: nothing appropriate
also
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/bluetoothd /usr/src/bluez-utils-3.9/daemon/bluetooth.conf
That just run it without any difference. passkey-agent still gives the same error.

I'll see what else I can try.
 
Old 03-28-2007, 02:16 PM   #32
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
I guess you have already tried the option 'passkey "0000";' in the hcid.conf. This was default in my hcid.conf. This is my hcid.conf.

Code:
options {
        autoinit yes;
        security user;
        pairing multi;
        # passkey "1234";
}
device {
        name "tequila";
        class 0x100100;
        iscan enable; pscan enable;
        lm accept;
        lp hold,sniff,park;
        discovto 0;
}
If this also doesn't work I'd recommend that you subscribe to the bluez-users mailinglist and ask there, how pairing is supposed to work with no desktop environment installed.
I'm running out of ideas.
 
Old 03-28-2007, 02:22 PM   #33
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Yeah, my hcid is basically identical to yours:
Code:
root@SERVER:~# cat /etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#

# HCId options
options {
        # Automatically initialize new devices
        autoinit yes;

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        security user;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # Default PIN code for incoming connections
        passkey "0000";
        #pin_helper /etc/bluetooth/pin.sh
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "SERVER";

        # Local device class
        class 0x3e0100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park;
}
I'll try some more random stuff and then turn to the mailing list. Thanks a lot for all your help. Seriously appreciated.

edit: Also desktopless isn't really a problem. All was same on the other computer with kde installed. It's eighter some incompability in current slackware/kernel/bluez or I'm doing something very wrong.

Last edited by kummiliim; 03-28-2007 at 02:23 PM.
 
Old 04-06-2007, 08:55 AM   #34
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
It's been 6 days now without a response from the mailing list, so I figured I'll go for another bump. More specifically, I was comparing my actions with drkstr's howto. It might be a little outdated but I was wondering about the existance of rc.bluetooth. I didn't have anything like that in my system. From where exactly is it installed and is it also necessary in the current bluez version?

Also, when I get a little free time today or in couple of next days, I'll do a full system reinstall again documenting every single thing I do. Hopefully someone will have a little time to look over it and see, if anything's wrong there. Maybe even better, try to duplicate the problem.
 
Old 04-21-2007, 04:56 PM   #35
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
So here goes, every single step:

I make sata.i, install.1, install.2 and network.dsk disks on this desktop computer, all downloaded from the local linux ftp and up to date.

Reboot server, insert disk, slack starts booting. I don't give any boot options just press enter, also through the two install disks. When I can finally log in as root, I do that and run
Code:
fdisk /dev/hda
I check the partition table with
Code:
p
and since I don't want to change anything, I leave it like that and use
Code:
w
to write the table.

It's as follows:
primary partitions:
hda1- /- 1GB
hda2- extended- 9GB
rest are logical inside hda2
hda5- swap- 512MB
hda6- /usr- 3GB
hda7- /home- 5.5GB

then I start configuring network since I'm going to use NFS install:
Code:
network
enter,enter and it finds eepro100
so
Code:
setup
I choose the keyboard layout, format hda5 as swap, hda1 as /, hda6 as /usr and /hda7 as /home
start installing from NFS
all the slackware packages are on this desktop computer, checked to be up to date
I select everything exept KDE related stuff, X window things and games.
Installs...
I use the 2.4.33.3 kernel from bootdisk, configure lilo to boot from /dev/hda1, disable most services exept ssh, CUPS, and some defaults, change root's password and complete the install, I don't remember if there was anything more intresting, I guess not.
So I reboot and take the monitor and keyboard back to my desktop computer. The server now runs only with power, network and printer connections + bluetooth dongle.

I ssh to server from my computer:

first, new kernel.
Code:
root@SERVER:~#wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.7.tar.gz
root@SERVER:~# mkdir /usr/src/tar
root@SERVER:~# mv linux-2.6.20.7.tar.gz /usr/src/tar
root@SERVER:~# cd /usr/src/tar
root@SERVER:/usr/src/tar# tar -xzf linux-2.6.20.7.tar.gz
root@SERVER:/usr/src/tar# mv linux-2.6.20.7 ..
root@SERVER:/usr/src/tar# cd ..
root@SERVER:/usr/src# rm linux
root@SERVER:/usr/src# ln -s linux-2.6.20.7/ linux
root@SERVER:/usr/src# cd linux
I'm using the config from the previous install. I can't codequote it here, cause the message is too long to post then, if needed I'll post it later in two posts.

Code:
make oldconfig
make menuconfig
just to check that it's correct

good to go:
I modify lilo.conf to use old kernel too
Code:
root@SERVER:/usr/src/linux# cat /etc/lilo.conf
# Start LILO global section
boot = /dev/hda
prompt
timeout = 5
vga = normal
# End LILO global section

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda1
label = Slack-2.6.20.7
read-only
# Linux bootable partition config ends

# Linux bootable partition config begins
image = /boot/vmlinuz.old
root = /dev/hda1
label = Slack-2.4.33.3
read-only
# Linux bootable partition config ends
Code:
make
make modules_install
make install
I fix all the links and stuff in /boot
Code:
root@SERVER:/boot# ls -l
total 4592
lrwxrwxrwx 1 root root      37 2007-04-21 20:36 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx 1 root root      23 2007-04-21 21:23 System.map -> System.map-ide-2.6.20.7
-rw-r--r-- 1 root root  629105 2006-09-01 09:51 System.map-ide-2.4.33.3
-rw-r--r-- 1 root root  764029 2007-04-21 21:20 System.map-ide-2.6.20.7
lrwxrwxrwx 1 root root      23 2007-04-21 21:24 System.old -> System.map-ide-2.4.33.3
-rw-r--r-- 1 root root     512 2007-04-21 21:02 boot.0300
lrwxrwxrwx 1 root root      19 2007-04-21 21:24 config -> config-ide-2.6.20.7
-rw-r--r-- 1 root root   41810 2006-09-01 09:51 config-ide-2.4.33.3
-rw-r--r-- 1 root root   34939 2007-04-21 21:23 config-ide-2.6.20.7
lrwxrwxrwx 1 root root      19 2007-04-21 21:24 config.old -> config-ide-2.4.33.3
-rw-r--r-- 1 root root    5032 2006-08-08 08:34 diag1.img
-rw------- 1 root root   51712 2007-04-21 21:20 map
lrwxrwxrwx 1 root root      20 2007-04-21 21:24 vmlinuz -> vmlinuz-ide-2.6.20.7
-rw-r--r-- 1 root root 1313255 2006-09-01 09:51 vmlinuz-ide-2.4.33.3
-rw-r--r-- 1 root root 1818824 2007-04-21 21:20 vmlinuz-ide-2.6.20.7
lrwxrwxrwx 1 root root      20 2007-04-21 21:24 vmlinuz.old -> vmlinuz-ide-2.4.33.3
and reboot.
Code:
root@SERVER:/boot# reboot

Broadcast message from root (pts/0) (Sat Apr 21 21:28:39 2007):

The system is going down for reboot NOW!
root@SERVER:/boot# Connection to 192.168.1.2 closed by remote host.
Connection to 192.168.1.2 closed.
sander@SANDER:~$ ssh root@192.168.1.2
root@192.168.1.2's password:
Last login: Sat Apr 21 19:08:43 2007 from 192.168.1.3
Linux 2.6.20.7.
root@SERVER:~#
beautiful. So now the not so pretty part, I'll install bluez.

I use lynx to get latest dbus, bluez-utils and bluez-libs from their respective sites. That's dbus-1.0.2, bluez-libs-3.9 and bluez-utils-3.9. Alrighty:
Code:
root@SERVER:~# ls *.tar.gz
bluez-libs-3.9.tar.gz  bluez-utils-3.9.tar.gz  dbus-1.0.2.tar.gz
root@SERVER:~# mv *.tar.gz /usr/src/tar
root@SERVER:~# cd /usr/src/tar
root@SERVER:/usr/src/tar# tar -xzf dbus-1.0.2.tar.gz
root@SERVER:/usr/src/tar# tar -xzf bluez-libs-3.9.tar.gz
root@SERVER:/usr/src/tar# tar -xzf bluez-utils-3.9.tar.gz
root@SERVER:/usr/src/tar# mv dbus-1.0.2 ..
root@SERVER:/usr/src/tar# mv bluez-libs-3.9 ..
root@SERVER:/usr/src/tar# mv bluez-utils-3.9 ..
root@SERVER:/usr/src/tar# cd ../dbus-1.0.2/
root@SERVER:/usr/src/dbus-1.0.2#
I won't post all the ./configure,make and make install output but what I did was
Code:
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
Code:
D-Bus 1.0.2
                  ==============

        prefix:                   /usr
        exec_prefix:              ${prefix}
        libdir:                   /usr/lib
        bindir:                   /usr/bin
        sysconfdir:               /etc
        localstatedir:            /var
        datadir:                  /usr/share
        source code location:     .
        compiler:                 gcc
        cflags:                   -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wfloat-equal -Wsign-compare -Wdeclaration-after-statement -fno-common -fPIC
        cppflags:
        cxxflags:                 -g -O2
        64-bit int:               long long
        32-bit int:               int
        16-bit int:               short
        Doxygen:                  /usr/bin/doxygen
        xmlto:                    no

        Maintainer mode:          no
        gcc coverage profiling:   no
        Building unit tests:      no
        Building verbose mode:    no
        Building assertions:      no
        Building checks:          yes
        Building SELinux support: no
        Building dnotify support: yes
        Building X11 code:        no
        Building Doxygen docs:    yes
        Building XML docs:        no
        Gettext libs (empty OK):
        Using XML parser:         expat
        Init scripts style:       slackware
        Abstract socket names:    yes
        System bus socket:        /var/run/dbus/system_bus_socket
        System bus address:       unix:path=/var/run/dbus/system_bus_socket
        System bus PID file:      /var/run/dbus/pid
        Session bus socket dir:   /tmp
        Console auth dir:         /var/run/console/
        Console owner file:       no
        Console owner file path:
        System bus user:          messagebus
        Session bus services dir: /usr/share/dbus-1/services
        'make check' socket dir:  /tmp
make make install ldconfig
next, bluez libraries:
Code:
root@SERVER:/usr/src/dbus-1.0.2# cd ../bluez-libs-3.9/
./configure --prefix=/usr
make
make install
ldconfig
and finally
Code:
root@SERVER:/usr/src/bluez-libs-3.9# cd ../bluez-utils-3.9/
./configure --prefix=/usr --mandir=/usr/share/man  --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
make
make install
ldconfig
updatedb
Done, let's get to it:

I configure hcid.conf like this:
Code:
root@SERVER:/etc/bluetooth# cat /etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#

# HCId options
options {
        # Automatically initialize new devices
        autoinit yes;

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        security auto;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # Default PIN code for incoming connections
        passkey "2486";
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "SERVER";

        # Local device class
        class 0x3e0100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park;
}
I'm really not sure of this step but I create a "messagebus" user for dbus with adduser
Code:
adduser messagebus
enter to everything else
I also give all rights of /var/run/dbus to it
Code:
root@SERVER:~# chown messagebus:users /var/run/dbus
root@SERVER:~# chmod u+rwx /var/run/dbus
No idea if that's even used.
so let's bring up the dongle
Code:
root@SERVER:~# hciconfig hci0 up
root@SERVER:~# hciconfig
hci0:   Type: USB
        BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
        UP RUNNING
        RX bytes:79 acl:0 sco:0 events:8 errors:0
        TX bytes:30 acl:0 sco:0 commands:8 errors:0
All the extra stuff isn't enabled for some reason so:
Code:
root@SERVER:~# hciconfig hci0 piscan auth secmgr encrypt
root@SERVER:~# hciconfig
hci0:   Type: USB
        BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
        UP RUNNING PSCAN ISCAN AUTH ENCRYPT SECMGR
        RX bytes:97 acl:0 sco:0 events:11 errors:0
        TX bytes:42 acl:0 sco:0 commands:11 errors:0
Looks better.
I use my cell now to look for available bluetooth devices. It finds BCM2045. Ah right, forgot to restart hcid:
Code:
hcid -f /etc/bluetooth/hcid.conf
Checking again with the cell. Still the same name. Oh yeah, I had to start dbus and stuff before. For checking I run:
Code:
root@SERVER:~# hcid -nsd
hcid[6314]: Bluetooth HCI daemon
hcid[6314]: Enabling debug information
hcid[6314]: Can't connect to system message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
hcid[6314]: Unable to get on D-Bus
Yeah, that's it.
Code:
root@SERVER:~# /etc/rc.d/rc.messagebus start
Starting system message bus
root@SERVER:~# hcid -nsd
hcid[6320]: Bluetooth HCI daemon
hcid[6320]: Enabling debug information
hcid[6320]: HCI dev 0 registered
hcid[6320]: HCI dev 0 already up
hcid[6320]: Device hci0 has been added
hcid[6320]: Starting security manager 0
hcid[6320]: Device hci0 has been activated
hcid[6320]: Starting SDP server
hcid[6320]: Adding rec : 0x807e9e0
hcid[6320]: with handle : 0x1
hcid[6320]: Adding rec : 0x807ec68
hcid[6320]: with handle : 0x0
Way better. I repeat the
Code:
hcid -f /etc/bluetooth/hcid.conf
Third time is the charm, retrying with the cell. Oh great, now it doesn't find anything. Something's messed up.
Code:
root@SERVER:~# hcitool scan
Scanning ...
        00:16:B8:23:A8:51       W810i
hmm.
Code:
root@SERVER:~# hciconfig hci0 down
root@SERVER:~# hciconfig
hci0:   Type: USB
        BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
        DOWN
        RX bytes:1149 acl:0 sco:0 events:42 errors:0
        TX bytes:640 acl:0 sco:0 commands:32 errors:0

root@SERVER:~# hciconfig hci0 up
root@SERVER:~# hciconfig
hci0:   Type: USB
        BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
        UP RUNNING PSCAN
        RX bytes:1547 acl:0 sco:0 events:59 errors:0
        TX bytes:957 acl:0 sco:0 commands:49 errors:0

root@SERVER:~# hciconfig hci0 piscan secmgr auth encrypt
root@SERVER:~# hciconfig
hci0:   Type: USB
        BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
        UP RUNNING PSCAN ISCAN AUTH ENCRYPT SECMGR
        RX bytes:1572 acl:0 sco:0 events:63 errors:0
        TX bytes:972 acl:0 sco:0 commands:53 errors:0
Fourth time with the cell and it finds SERVER. Delicious.
Just for kicks I try to pair from cell once. The cell waits for about half a minute and asks to enter the pin. I enter 2486 as in hcid.conf, cell waits for another half a minute and reports pairing failed. Sounds familiar.

So what's next, let's mess with passkey agent a little.
Code:
root@SERVER:~# slocate passkey
/usr/src/bluez-utils-3.9/daemon/passkey-agent.c
/usr/src/bluez-utils-3.9/daemon/.deps/passkey-agent.Po
/usr/src/bluez-utils-3.9/daemon/passkey-agent.o
/usr/src/bluez-utils-3.9/daemon/passkey-agent
root@SERVER:~# cd /usr/src/bluez-utils-3.9/daemon/
so first
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/passkey-agent --default 2486
Weird, it just stays running. That didn't happen before. Anyway now the cell can't find PC anymore.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hciconfig hci0 down;hciconfig hci0 up piscan auth encrypt secmgr
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hciconfig
hci0:   Type: USB
        BD Address: 00:02:72:02:27:63 ACL MTU: 1017:8 SCO MTU: 64:0
        UP RUNNING PSCAN AUTH ENCRYPT SECMGR
        RX bytes:2100 acl:0 sco:0 events:96 errors:0
        TX bytes:1334 acl:0 sco:0 commands:79 errors:0
Didn't fix it, now I'm worried.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hcid -nsd
hcid[6372]: Bluetooth HCI daemon
hcid[6372]: Enabling debug information
hcid[6372]: Could not become the primary owner of org.bluez
hcid[6372]: Unable to get on D-Bus
Hmm, is it because it's already using dbus or is something wrong with it.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /etc/rc.d/rc.messagebus restart
Stopping system message bus
Starting system message bus
Failed to start message bus: The pid file "/var/run/dbus/pid" exists, if the message bus is not running, remove this file
Yah, forgot
Wait it isn't there. It had to delete it itself somehow, whatever.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /etc/rc.d/rc.messagebus restart
Stopping system message bus
dbus-daemon: no process killed
Starting system message bus
And only after
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hcid -nsdf /etc/bluetooth/hcid.conf
hcid[6394]: Bluetooth HCI daemon
hcid[6394]: Enabling debug information
hcid[6394]: HCI dev 0 registered
hcid[6394]: HCI dev 0 already up
hcid[6394]: Device hci0 has been added
hcid[6394]: Starting security manager 0
hcid[6394]: Device hci0 has been activated
hcid[6394]: Starting SDP server
hcid[6394]: Adding rec : 0x807a290
hcid[6394]: with handle : 0x1
hcid[6394]: Adding rec : 0x807ec60
hcid[6394]: with handle : 0x0
hcid[6394]: Stopping SDP server
hcid[6394]: release_services
hcid[6394]: Unregister path: /org/bluez/hci0
hcid[6394]: Unregister path: /org/bluez
hcid[6394]: Exit
root@SERVER:/usr/src/bluez-utils-3.9/daemon# hciconfig hci0 down;hciconfig hci0 up piscan auth encrypt secmgr
the cell can see the pc again.
Whew, that was fun, why not try that again:
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/passkey-agent --default 2486
Can't register passkey agent
The name org.bluez was not provided by any .service files
Hmm, that I remember. Wonder what made it remain working the previous time.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/bluetoothd --debug --nodaemon
bluetoothd[6408]: Bluetooth daemon ver 3.9
bluetoothd[6408]: Enabling debug information
bluetoothd[6408]: Could not become the primary owner of org.bluez
And that I remember too.
Code:
root@SERVER:/usr/src/bluez-utils-3.9/daemon# /usr/src/bluez-utils-3.9/daemon/passkey-agent --default 2486
Can't register passkey agent
Method "RegisterDefaultPasskeyAgent" with signature "s" on interface "org.bluez.Security" doesn't exist
Been there, haven't got out yet.

I lurk around the system for some time and find
Code:
root@SERVER:~# cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core service to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez.Manager"/>
    <allow receive_sender="org.bluez.Manager"/>

    <allow send_path="/org/bluez"/>

    <allow send_destination="org.bluez.Adapter"/>
    <allow receive_sender="org.bluez.Adapter"/>

    <allow send_destination="org.bluez.Service"/>
    <allow receive_sender="org.bluez.Service"/>

    <allow send_destination="org.bluez.Database"/>
    <allow receive_sender="org.bluez.Database"/>

    <allow send_destination="org.bluez.Security"/>
    <allow receive_sender="org.bluez.Security"/>
  </policy>

</busconfig>
It has cool words like org.bluez and security in it, other then that I have no idea how it works. By now I'm also having serious trouble keeping my eyes open and I'm out of coffee. To be continued tomorrow...
 
Old 04-21-2007, 05:20 PM   #36
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
this is some long posting

I didn't see anything wrong in your steps, at least nothing obvious. However, instead of doing the same over and over again I'd suggest changing something, so you at least come closer to what the problem is.
Did you notice that slackware-current uses bluez 3.8 ? Maybe try their packages for a change (for dbus also) if you can't get forward anymore.
http://slackware-current.net/package.php?id=196
 
Old 04-22-2007, 02:00 AM   #37
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
That actually sounds pretty reasonable. Before I try though, a question about uninstalling. If I go to /usr/src/<src> and do
Code:
make uninstall
Does it really remove all traces of program from the system, or should I delete something manually?
I intend to start using slackware package management system soon when I finally have the time to understand how to make packages from source. Until then, I want to make sure I don't leave any garbage on my system.
 
Old 05-03-2007, 04:54 PM   #38
zdavid
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
I had the very same problem (uid/gid) and passkey-agent missing,
but I manage to solve it !!!

add this to /etc/passwd
messagebus:x:81:81:User for D-BUS:/var/run/dbus:/bin/false
and add to /etc/group
messagebus:x:81:

from slackware-current download dbus, bluez-packages and do ./slackbuild
you will found packages in /tmp
#installpgk /tmp/*.tgz

now you should have dbus and all bluez packages installed:

then do
#sh /etc//rc.d/rc.messagebus start

then in some console do
#hcid -ndsf /etc/bluetooth/hcid.conf

You will see:
--------------------------------------
hcid[2404]: Bluetooth HCI daemon
hcid[2404]: Enabling debug information
hcid[2404]: HCI dev 0 registered
hcid[2404]: HCI dev 0 already up
hcid[2404]: Device hci0 has been added
hcid[2404]: Starting security manager 0
hcid[2404]: Device hci0 has been activated
hcid[2404]: Starting SDP server
hcid[2404]: Adding rec : 0x807a238
hcid[2404]: with handle : 0x1
hcid[2404]: Adding rec : 0x807ebc0
hcid[2404]: with handle : 0x0
hcid[2404]: binding L2CAP socket: Address already in use
hcid[2404]: Server initialization failed
hcid[2404]: pin_code_request (sba=00:02:72:D1:71:B5, dba=00:04:3E:65:9A:CA)
hcid[2404]: call_passkey_agent(): no agent available
hcid[2404]: pin_code_request (sba=00:02:72:D1:71:B5, dba=00:04:3E:65:9A:CA)
hcid[2404]: call_passkey_agent(): no agent available
------------------------------------------------------

then do
# cd /tmp/bluez-utils-3.9/daemon/
# cp passkey-agent /usr/local/sbin/
# passkey-agent --default 4321

You will see:
-------------------------------------
hcid[2404]: Default passkey agent (:1.7, /org/bluez/passkey_agent_13560) registered
hcid[2404]: pin_code_request (sba=00:02:72:D1:71:B5, dba=00:04:3E:65:9A:CA)
hcid[2404]: Calling PasskeyAgent.Request: name=:1.7, path=/org/bluez/passkey_agent_13560
hcid[2404]: link_key_notify (sba=00:02:72:D1:71:B5, dba=00:04:3E:65:9A:CA)
hcid[2404]: pin_code_request (sba=00:02:72:D1:71:B5, dba=00:1A:77:65:73:1D)
hcid[2404]: Calling PasskeyAgent.Request: name=:1.7, path=/org/bluez/passkey_agent_13560
hcid[2404]: link_key_notify (sba=00:02:72:D1:71:B5, dba=00:1A:77:65:73:1D)
hcid[2404]: link_key_request (sba=00:02:72:D1:71:B5, dba=00:1A:77:65:73:1D)
hcid[2404]: link_key_request (sba=00:02:72:D1:71:B5, dba=00:04:3E:65:9A:CA)
hcid[2404]: link_key_request (sba=00:02:72:D1:71:B5, dba=00:1A:77:65:73:1D)
hcid[2404]: link_key_request (sba=00:02:72:D1:71:B5, dba=00:1A:77:65:73:1D)
hcid[2404]: link_key_request (sba=00:02:72:D1:71:B5, dba=00:1A:77:65:73:1D)
hcid[2404]: :1.7 exited without unregistering the default passkey agent
hcid[2404]: name_listener_add(:1.8)
hcid[2404]: Default passkey agent (:1.8, /org/bluez/passkey_agent_13645) registered
hcid[2404]: name_listener_remove(:1.8)
hcid[2404]: Default passkey agent (:1.8, /org/bluez/passkey_agent_13645) unregistered
hcid[2404]: name_listener_add(:1.9)
hcid[2404]: Default passkey agent (:1.9, /org/bluez/passkey_agent_13647) registered
-----------------------------------------------------------------------------------

now everything works :)

Have fun .
 
Old 05-06-2007, 01:29 AM   #39
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Wow, thanks dude, I'm on it.
 
Old 05-06-2007, 09:05 AM   #40
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Wow it's terrible. I used Slackware packages this time.

dbus 1.0.2
bluez-libs-3.8
bluez-utils-3.8

And I can't even get the messagebus to work. rc.messagebus start says it works but it doesn't
Code:
root@SERVER:~# /etc/rc.d/rc.messagebus start
Starting system message bus:  /usr/bin/dbus-uuidgen --ensure ; /usr/bin/dbus-daemon --system
root@SERVER:~# hcid -nf /etc/bluetooth/hcid.conf
hcid[3193]: Bluetooth HCI daemon
hcid[3193]: Can't connect to system message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
hcid[3193]: Unable to get on D-Bus
I'm looking into this but it's really making me a bit pissed now.

edit: hcid can't even use -d and -s flags. zdavid, maybe I should use the versions I used before?

Last edited by kummiliim; 05-06-2007 at 09:12 AM.
 
Old 05-09-2007, 03:49 PM   #41
zdavid
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by kummiliim
Wow it's terrible. I used Slackware packages this time.

dbus 1.0.2
bluez-libs-3.8
bluez-utils-3.8

And I can't even get the messagebus to work. rc.messagebus start says it works but it doesn't
Code:
root@SERVER:~# /etc/rc.d/rc.messagebus start
Starting system message bus:  /usr/bin/dbus-uuidgen --ensure ; /usr/bin/dbus-daemon --system
root@SERVER:~# hcid -nf /etc/bluetooth/hcid.conf
hcid[3193]: Bluetooth HCI daemon
hcid[3193]: Can't connect to system message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
hcid[3193]: Unable to get on D-Bus
I'm looking into this but it's really making me a bit pissed now.

edit: hcid can't even use -d and -s flags. zdavid, maybe I should use the versions I used before?

again did you add ???
- /etc/passwd
messagebus:x:81:81:User for D-BUS:/var/run/dbus:/bin/false
- and add to /etc/group
messagebus:x:81:

next thing

# ps aufwx |grep `cat /var/run/dbus/dbus.pid`
81 2094 0.0 0.0 2172 772 ? Ss 20:57 0:00 /usr/bin/dbus-daemon --system

I've sent you a packages for slack 11 on your email...
 
Old 05-10-2007, 10:40 AM   #42
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
I did everything as you said and I've currently got to the point where all's as before, everything works but pairing.

passkey-agent gives me
Code:
root@SERVER:~# passkey-agent --default 2486
passkey-agent: /lib/tls/libc.so.6: version `GLIBC_2.0' not found (required by passkey-agent)
So I'll try to find this glibc thing.

edit: pkgtool says I have it already.

edit2: The user was added too, yes.

Last edited by kummiliim; 05-10-2007 at 12:15 PM.
 
Old 05-24-2007, 04:59 AM   #43
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Bump, could somone explain me the glibc 2.0 error, I don't get it.
 
Old 07-19-2007, 05:04 AM   #44
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Original Poster
Rep: Reputation: 30
Just wanted to say that I'm currently using Slackware 12.0 which has perfect bluetooth support. Thanks again.
 
Old 10-03-2007, 02:53 AM   #45
Tijn
LQ Newbie
 
Registered: Aug 2006
Distribution: Various versions of Redhat, CentOS, Fedora, Debian, Mint, *buntu
Posts: 18

Rep: Reputation: 0
Hey people, you definitely need passkey-agent.

I have spent many hours with useless fiddling with bluez on Fedora Core 6 (FC6) but there is no passkey-agent included in the regular bluez RPM packages (utils & lib 3.7).
I had to install dev packages

Code:
# yum --enablerepo development update bluez*
# rpm -qa | grep bluez
bluez-hcidump-1.40-1.fc8
bluez-utils-cups-3.19-1.fc8
bluez-gnome-0.14-5.fc8
bluez-libs-3.19-1.fc8
bluez-utils-3.19-1.fc8
and then I did

Code:
passkey-agent --default 4321
...and voila - everything was fine.

Hope this helps someone...
Tijn
 
  


Reply

Tags
bluetooth, bluetoothd, bluez, dbus, fc6, fedora, hcid


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
k750i mobile + bluetooth Zlipknott Linux - Hardware 6 12-21-2006 08:36 AM
Problem using bluetooth mobile as modem/rfcomm connection refused. pingu Linux - Networking 7 07-15-2006 02:13 AM
OpenGL problem, suspecting HW flaw Hiper Linux - Hardware 1 12-17-2005 06:08 PM
mobile + bluetooth seaeye Linux - Networking 0 10-31-2004 06:05 PM
Mobile Bluetooth Calender Sync startail Linux - Software 10 09-16-2004 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration