LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 08-02-2009, 09:25 AM   #1
bonaire
Member
 
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Rep: Reputation: 19
Problems with Bluetooth on slackware-current


Hello,


i'd like to use my mobile (Nokia E61) for dialup connections and to send and receive files between my mobile and my netbook (Asus EeePc 901).
My problem is, that i am not able to do that
Using the mobile for a dial up connection pushes the mobile to enter the pin and returns
Code:
user@host[~] rfcomm connect 0
Can't connect RFCOMM socket: Connection refused
Sending files via obexftp pushes the mobile to enter the pin and returns
Code:
user@host[~] obexftp -b -p abc.txt
Scanning for (null) ...
Found: 00:12:D2:11:87:29
Browsing 00:12:D2:11:87:29 ...
Connecting...failed: connect
Tried to connect for 1008ms
The user may have rejected the transfer: Connection refused
And a simple ping fails, too
Code:
root@host[~] 
 l2ping 00:12:D2:11:87:29
Ping: 00:12:D2:11:87:29 from 00:22:43:AE:81:4F (data size 44) ...
0 bytes from 00:12:D2:11:87:29 id 0 time 123.42ms
0 bytes from 00:12:D2:11:87:29 id 1 time 24.85ms
0 bytes from 00:12:D2:11:87:29 id 2 time 21.84ms
0 bytes from 00:12:D2:11:87:29 id 3 time 18.85ms
0 bytes from 00:12:D2:11:87:29 id 4 time 36.88ms
Recv failed: Connection reset by peer

My configuration looks as follows.

Code:
user@host[~] cat /etc/bluetooth/hidc.conf
options {
        autoinit yes;
        security auto;
        pairing multi;
        passkey "1234";
}

device {
        name "BlueZ at %h (%d)";
        class 0x080100; # Modified in respect to $(hciconfig --all), 0x000100 does not work, too
        iscan enable; pscan enable;
        lm accept;
        lp rswitch,hold,sniff,park;
}
Code:
user@host[~] cat /etc/bluetooth/rfcomm.conf
rfcomm0 {
        bind no;
        device 00:12:D2:11:87:29;
        channel 1;
        comment "Nokia E61 mobile device";
}
Code:
user@host[~] cd /etc/bluetooth/passkeys/ && for i in $( ls ); do echo -en $i"\t"; cat $i; echo ''; done;
00:12:D2:11:87:29       1234
There is no \n within the passkey file.

Here is some more information of the system
Code:
user@host[~] hcitool dev
Devices:
        hci0    00:22:43:AE:81:4F
Code:
user@host[~] hcitool inq
Inquiring ...
        00:12:D2:11:87:29       clock offset: 0x4277    class: 0x50020c
Code:
user@host[~]  hciconfig --all
hci0:   Type: USB
        BD Address: 00:22:43:AE:81:4F ACL MTU: 1021:8 SCO MTU: 64:1
        UP RUNNING PSCAN ISCAN
        RX bytes:3211 acl:34 sco:0 events:105 errors:0
        TX bytes:1728 acl:39 sco:0 commands:49 errors:0
        Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x83
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'BlueZ at darkstar (0)'
        Class: 0x080100
        Service Classes: Capturing
        Device Class: Computer, Uncategorized
        HCI Ver: 2.1 (0x4) HCI Rev: 0x50f1 LMP Ver: 2.1 (0x4) LMP Subver: 0x420e
        Manufacturer: Broadcom Corporation (15)
/var/log/syslog says the following relevant:
Code:
Aug  2 12:44:59 localhost hcid[6031]: Parsing /etc/bluetooth/main.conf failed: No such file or directory
Aug  2 12:44:59 localhost hcid[3492]: register_passkey_agent called without any adapter info!
Aug  2 12:44:59 localhost hcid[6031]: Unable to get on D-Bus
Aug  2 12:44:59 localhost hcid[3492]: register_passkey_agent called without any adapter info!
/var/log/messages says the following relevant:
Code:
Aug  2 15:56:10 localhost hcid[3311]: pin_code_request (sba=00:22:43:AE:81:4F, dba=00:12:D2:11:87:29)
Aug  2 15:59:33 localhost hcid[3311]: pin_code_request (sba=00:22:43:AE:81:4F, dba=00:12:D2:11:87:29)

So what can i do or try now?
Thanks for feedback!


cu
 
Old 08-03-2009, 06:11 PM   #2
Einars
LQ Newbie
 
Registered: May 2009
Location: Latvia
Distribution: Slackware 13.37
Posts: 15

Rep: Reputation: 0
I have this problem too, and with exactly the same symptoms (Sony Ericcson phone, slack 12.2).
Couldn't find any solution, unfortunately.
 
Old 08-03-2009, 07:07 PM   #3
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 960

Rep: Reputation: 208Reputation: 208Reputation: 208
When setting up a bluetooth PAN I had to delete some of the plugins in /usr/lib/bluetooth/plugins (actually just renamed the directory) before I could get things to work properly.

Might be somewhere for you to start looking.
 
Old 08-04-2009, 05:46 AM   #4
bonaire
Member
 
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Original Poster
Rep: Reputation: 19
Hello and thanks for response

I try to play a bit with the /usr/lib/bluetooth thing.

Since the opening post, i tried with another older phone, a Nokia 6600.
I added the relevant things to the passkeys directory and rfcomm.conf file.
Code:
root@host[/etc/bluetooth/passkeys]: for i in $( ls ); do echo -e $i"\t"$(cat $i); done
00:0E:6D:12:04:36       1234
00:12:D2:11:87:29       1234
Code:
root@host[/etc/bluetooth]: cat rfcomm.conf
rfcomm0 {
        bind yes;
        device 00:12:D2:11:87:29;
        channel 1;
        comment "Nokia E61 mobile device";
}

rfcomm1 {
        bind yes;
        device 00:0E:6D:12:04:36;
        channel 1;
        comment "Nokia 6600 mobile device";
}
I cleaned all relevant log files and did a restart to get better information.
My success was'nt much greater.

On start up and without any interaction of mine, only /var/log/syslog and /var/log/messages say interesting things.
/var/log/messages says, that everything is looking pretty well.
Code:
...
Aug  4 11:40:57 localhost kernel: usb 5-1: new full speed USB device using uhci_hcd and address 2
Aug  4 11:40:57 localhost kernel: usb 5-1: New USB device found, idVendor=0b05, idProduct=b700
Aug  4 11:40:57 localhost kernel: usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug  4 11:40:57 localhost kernel: usb 5-1: Product: BT-253
Aug  4 11:40:57 localhost kernel: usb 5-1: Manufacturer: Broadcom Corp
Aug  4 11:40:57 localhost kernel: usb 5-1: SerialNumber: 002243AE814F
Aug  4 11:40:57 localhost kernel: usb 5-1: configuration #1 chosen from 1 choice
...
Aug  4 11:40:57 localhost kernel: Bluetooth: Core ver 2.15
Aug  4 11:40:57 localhost kernel: NET: Registered protocol family 31
Aug  4 11:40:57 localhost kernel: Bluetooth: HCI device and connection manager initialized
Aug  4 11:40:57 localhost kernel: Bluetooth: HCI socket layer initialized
Aug  4 11:40:57 localhost kernel: Bluetooth: Generic Bluetooth USB driver ver 0.5
Aug  4 11:40:57 localhost kernel: usbcore: registered new interface driver btusb
...
Aug  4 11:41:24 localhost hcid[3354]: Bluetooth HCI daemon
Aug  4 11:41:24 localhost kernel: Bluetooth: L2CAP ver 2.13
Aug  4 11:41:24 localhost kernel: Bluetooth: L2CAP socket layer initialized
Aug  4 11:41:24 localhost kernel: Bluetooth: RFCOMM socket layer initialized
Aug  4 11:41:24 localhost kernel: Bluetooth: RFCOMM TTY layer initialized
Aug  4 11:41:24 localhost kernel: Bluetooth: RFCOMM ver 1.11
Aug  4 11:41:24 localhost hcid[3354]: Starting SDP server
Aug  4 11:41:26 localhost hcid[3354]: Registered manager path:/org/bluez/serial
Aug  4 11:41:27 localhost kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Aug  4 11:41:27 localhost kernel: Bluetooth: BNEP filters: protocol multicast
Aug  4 11:41:28 localhost hcid[3354]: bridge pan0 created
Aug  4 11:41:28 localhost hcid[3354]: Registered manager path:/org/bluez/network
Aug  4 11:41:28 localhost hcid[3354]: Registered server path:/org/bluez/network/nap
Aug  4 11:41:28 localhost hcid[3354]: Registered server path:/org/bluez/network/gn
Aug  4 11:41:28 localhost hcid[3354]: Registered server path:/org/bluez/network/panu
Aug  4 11:41:29 localhost hcid[3354]: Registered input manager path:/org/bluez/input
Aug  4 11:41:29 localhost hcid[3354]: Unix socket created: 17
Aug  4 11:41:29 localhost hcid[3354]: Registered manager path:/org/bluez/audio
Aug  4 11:41:29 localhost hcid[3354]: HCI dev 0 registered
but /var/log/syslog says
Code:
Aug  4 11:41:24 localhost hcid[3354]: Parsing /etc/bluetooth/main.conf failed: No such file or directory
Aug  4 11:41:29 localhost hcid[3354]: register_passkey_agent called without any adapter info!
Aug  4 11:42:00 localhost last message repeated 407833 times
Aug  4 11:42:01 localhost last message repeated 8596 times
Aug  4 11:42:01 localhost hcid[3354]: register_passkey_agent called without any adapter info!
Aug  4 11:42:32 localhost last message repeated 411787 times
Aug  4 11:43:33 localhost last message repeated 860372 times
Aug  4 11:44:34 localhost last message repeated 811646 times
Aug  4 11:45:22 localhost last message repeated 491678 times
Aug  4 11:45:22 localhost hcid[3354]: register_passkey_agent called without any adapter info!
Aug  4 11:45:53 localhost last message repeated 341810 times
Aug  4 11:46:54 localhost last message repeated 803968 times
Aug  4 11:47:55 localhost last message repeated 823301 times
Is this register_passkey_agent called without any adapter info! my fault or not, is this normal, is this a bug?

If i try to connect via rfcomm i get the following. There is no message in any log file. The mobile shows very shortly, that the netbook tries to connect, but after that the connection closes.
Code:
user@host[~]: rfcomm connect 1
Can't connect RFCOMM socket: Connection reset by peer
If i try to connect via obexftp i get the following. The mobiles behaviour is the same as via rfcomm.
Code:
user@host[~]: obexftp -b -p 123.txt
Scanning for (null) ...
Found: 00:0E:6D:12:04:36
Browsing 00:0E:6D:12:04:36 ...
Connecting...failed: connect
Tried to connect for 639ms
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
Tried to connect for 641ms
error on connect(): Invalid argument
Still trying to connect
Connecting...failed: connect
Tried to connect for 642ms
error on connect(): Invalid argument
Still trying to connect
If i try to connect the netbook via the mobile, all what happens, is some output in /var/log/messages
Code:
Aug  4 12:28:52 localhost kernel: btusb_intr_complete: hci0 urb f6132480 failed to resubmit (19)
Aug  4 12:28:52 localhost kernel: btusb_bulk_complete: hci0 urb f6132f00 failed to resubmit (19)
Aug  4 12:28:52 localhost kernel: btusb_bulk_complete: hci0 urb f6132e00 failed to resubmit (19)
Aug  4 12:28:52 localhost kernel: btusb_send_frame: hci0 urb f3bb1600 submission failed
hcitool and hciconfig do not show any error messages.

I have some questions to the system defaults, in which i am not sure, if they are correct.
The user privileges of /etc/rc.d/rc.bluetooth are 755. Is it correct, that a user is allowed to shutdown the bluetooth subsystem?
Hcid is still running if I shutdown the bluetooth subsystem via /etc/rc.d/rc.bluetooth stop.
Code:
user@host[/var/log]: ps axjf | egrep "hcid|sdp"
    1  3354  3354  3354 ?           -1 Rs       0  16:39 /usr/sbin/hcid -s -f /etc/bluetooth/hcid.conf
 3354  3387  3354  3354 ?           -1 Z        0   0:00  \_ [hcid] <defunct>
I don't think, this is okay. Am i right?
There is no sdp-daemon running. Is this correct? The file /etc/rc.d/rc.bluetooth.conf says
Code:
SDPD_ENABLE=true
HIDD_ENABLE=false
HIDD_OPTIONS="--server"
HID2HCI_ENABLE=false
RFCOMM_ENABLE=true
DUND_ENABLE=false
DUND_OPTIONS="--listen --persist --msdun call dun"
PAND_ENABLE=false
PAND_OPTIONS="--listen --role NAP"
I ask again. What can i try. I'd like to write a bug report, but i don't know, who is responsible for that?


cu
 
Old 08-04-2009, 06:04 AM   #5
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Rep: Reputation: 16
Hi,

I have an EeePc 901 too and I used Bluetooth before to send Pictures and Music to my Mobile (Sony Ericsson c702). I never managed to receive data from the phone though, but that wasn't so important anyway.

My config looks exactly the same as yours (I have no passkey files because I don't need them if I have no incoming connections).

The only difference is, that I paired my phone with the eee BEFORE I tried to send data. (scanned with the phone for devices, added my eee, entered pin, voila).

I used obexftp to send data after pairing with the pc.

obexftp -b -p "/tmp/blabla.txt"

Maybe that helps you. I couldn't send data to my phone neither when I wasn't already paired with it.
 
Old 08-04-2009, 07:02 AM   #6
bonaire
Member
 
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Original Poster
Rep: Reputation: 19
Hello,


are you using slackware-current? I moved the passkey of the Nokia E61, restarted rc.bluetooth and hcid. Now the Nokia E61 wants that I enter the passkey, but if i do that, the result is still the same The phone refuses to connect to the netbook.

I also moved the plugins from /usr/lib/bluetooth but no success, too.

The log files do not show any error message except of the "Unable to get on D-Bus", i mentioned above. This appears after starting hcid manually.

Ugly thing...


cu

Last edited by bonaire; 08-04-2009 at 07:07 AM.
 
Old 08-04-2009, 07:14 AM   #7
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Rep: Reputation: 16
Have you activated DBus? I don't really know if it's neccessary, but it's running here ...
Yeah I'm using -current.

You tr to pair your Mobile with your PC right? So you search with your phone? For me, connection only works in one way.
Sending Data only works from PC -> Phone.
Authentication/Pairing only works from Phone -> PC.
 
Old 08-04-2009, 07:29 AM   #8
bonaire
Member
 
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Original Poster
Rep: Reputation: 19
Yes, dbus is running and the system is fully updated. Yes, i search with my phone and pairing does not work.
 
Old 08-04-2009, 08:09 AM   #9
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Rep: Reputation: 16
Very strange ... hmmm.
Maybe it's a problem with your phone? Have you checked if there are any options regarding bluetooth?
 
Old 08-04-2009, 08:55 AM   #10
bonaire
Member
 
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Original Poster
Rep: Reputation: 19
I did two steps forward.

In file /etc/rc.d/rc.bluetooth the
Code:
killall $HCID_NAME > /dev/null 2>&1 || true
does definitely not stop hcid. This is a bug maybe in hcid.
Code:
killall -s9 $HCID_NAME > /dev/null 2>&1 || true
Is so far the only way to stop the hci-daemon.

The dbus thing was my fault. Starting the hcid is not very useful if it is already running :/

The more important thing to know is: If i totally clear the /etc/bluetooth/passkeys directory, pairing succeeds with the Nokia E61! No default or mac-address file is now in the directory.

So far so good, l2ping now works with both the Nokia E61 and the Nokia 6600.
rfcomm connect 0 works (with the Nokia E61). Obexftp still does not with both devices, but the error message with Nokia E61 changed.
Code:
user@host [~]: obexftp -b -p 123.txt
Scanning for (null) ...
Found: 00:12:D2:11:87:29
Browsing 00:12:D2:11:87:29 ...
Connecting...done
Tried to connect for 16ms
Sending "123.txt"... failed: 123.txt
The operation failed with return code 68
Disconnecting...done
Does anybody know what this return code means?

The Nokia 6600 refuses pairing. While pairing hcidump says
Code:
Connection refused - PSM not supported
But the Nokia 6600 is not that important.
 
Old 08-04-2009, 09:05 AM   #11
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Rep: Reputation: 16
The only thing I checked in my mobile was an option called "always allow connection" in my bluetooth devices, which allowed me to send file to it ... maybe there is such an option in your mobile too? I don't use my mobile as modem or stuff like that, so I don't know anything about that (but would be interested how it works, because it sounds nice).
 
Old 08-04-2009, 09:37 AM   #12
bonaire
Member
 
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Original Poster
Rep: Reputation: 19
The corresponding option is already activated. I'll try to get an answer in sourceforge's openObex forum.

Thanks for feedback and the passkey tip.

Edit:

I got it:

I needed to add the channel info used by my phone for obex transactions.
Code:
sdptool browse 00:11:22:33:44:55
Is the command to get all channels and there functions. In my case it is channel 11.
Code:
user@host [~]: obexftp -b 00:12:D2:11:87:29 -B 11 -p 123.txt
Works excellent.

Last edited by bonaire; 08-04-2009 at 09:53 AM. Reason: solution obexftp
 
Old 08-04-2009, 10:21 AM   #13
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Rep: Reputation: 16
Glad to hear you figured it out
 
Old 08-05-2009, 06:01 PM   #14
bonaire
Member
 
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Original Poster
Rep: Reputation: 19
I got the bluetooth dial-up connection working, too.

I had a failure in my configuration of /etc/bluetooth/rfcomm.conf.
My mobile uses channel 2 for dial-up connections and not channel 1 as written here. The result was, that every AT command send to to phone broke the whole rfcomm connection.

Another point is, that there is no udev-rule to handle rfcomm* devices.
I created /etc/udev/rules.d/61-bluetooth.rules, added
Code:
KERNEL=="rfcomm*", NAME="%k", GROUP="uucp", MODE="0660", OPTIONS="resmgr"
and added my default user to group uucp.

cu
 
Old 08-06-2009, 01:30 AM   #15
ap0calypse
Member
 
Registered: Jul 2009
Location: Austria
Distribution: Slackware
Posts: 38

Rep: Reputation: 16
Thanks for the info bonaire. Because of your information I managed to create a internet connection via bluetooth to
I used rfcomm to connect and wvdial for the rest.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware Current Problems with K3b staus Slackware 4 10-18-2009 08:23 PM
Problems with Slackware-current gmartin Slackware 7 06-30-2009 11:53 PM
fglrx problems with Slackware-Current MoridinBG Slackware 1 03-30-2007 01:53 PM
Problems with glibc on Slackware current? MS3FGX Slackware 2 03-30-2006 09:57 PM
COmpiling problems on slackware-current Anibal Slackware 5 04-09-2004 08:12 AM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration