Samsung SGH-D840 won't Bluetooth pair to server?
I'm quite new to using bluetooth in Linux and need some help.
My problem is, I can send image files to my old phones (Sony, Nokia) using ussp-push from the CLI without being prompted for a pin, but not my Samsung SGH-D840. It wants to pair with a pin before the copy can take place. I'm not able to pair even after following all the advice of others with a similar problem. Because I'm scripting this, I want to be able to do this from the CLI rather than from an X desktop.
I've had a good look around the phone config and it seems its not possible to turn this pairing request off. It does have a 'secure mode' option, but it doesn't actually change anything if its off or not, even after a phone power cycle.
OK, so this is what I've doing...
# sdptool search --bdaddr 00:11:12:13:14:15 OPUSH
Searching for OPUSH on 00:11:12:13:14:15 ...
Service Name: OPP
Service RecHandle: 0x10007
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 3
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100
So the Samsung's OBEX channel is 3.
I run the following ussp-push command to push the file, shortly after running it the Samsung asks for a pin to pair with the PC. I enter 0000 and nothing else happens apart from the phone returning 'Invalid pin. Unable to connect'.
# ussp-push -dev 0 --debug 00:11:12:13:14:15@3 image.gif image.gif
pushing file ../data/test1.gif
name=../data/test1.gif, size=1128
__obex_connect: client_context_t = 0x99584a8
Registered transport
Set user data
Created new objext
cobex_write
Local device 00:16:15:14:13:12
Remote device 00:11:12:13:14:15 (3)
Write error: Connection refused
obex_event: client_context_t = 0x99584a8
cobex_disconnect
Link broken!
Started a new request
cobex_close
__obex_connect: error=-2
Unable to connect to the server
Error
As you can see from the /var/log/messages file below, I don't get past the 'pin_code_request'.
/var/log/messages
Jan 18 23:53:53 dora hcid[8815]: Bluetooth HCI daemon
Jan 18 23:53:53 dora hcid[8815]: Register path:/org/bluez fallback:1
Jan 18 23:53:53 dora hcid[8815]: HCI dev 0 registered
Jan 18 23:53:53 dora hcid[8815]: Register path:/org/bluez/hci0 fallback:0
Jan 18 23:53:53 dora hcid[8815]: HCI dev 0 already up
Jan 18 23:53:53 dora hcid[8815]: Device hci0 has been added
Jan 18 23:53:53 dora sdpd[8821]: Bluetooth SDP daemon
Jan 18 23:53:53 dora hcid[8815]: Starting security manager 0
Jan 18 23:53:53 dora hcid[8815]: Device hci0 has been activated
Jan 18 23:54:48 dora hcid[8815]: pin_code_request (sba=00:16:15:14:13:12, dba=00:11:12:13:14:15)
My bluez config is this:-
I'm using CentOS 5 with BlueZ:-
bluez-libs-3.7-1
bluez-utils-3.7-2.el5.centos
bluez-hcidump-1.32-1
bluez-gnome-0.5-5.fc6
# hciconfig hci0 revision
hci0: Type: USB
BD Address: 00:16:15:14:13:12 ACL MTU: 384:8 SCO MTU: 64:8
HCI 19.2
Chip version: BlueCore4-ROM
Max key size: 128 bit
SCO mapping: HCI
/etc/bluetooth/hcid.conf
options {
autoinit yes;
security auto;
pairing multi;
passkey "0000";
)
device {
name "Test";
class 0x120104;
iscan enable; pscan enable;
lm accecpt;
lp rswitch,hold,sniff,park;
}
I have also created /etc/bluetooth/passkeys/default which contains only 0000
I've seen others mention passkey-agent, but I don't have this with my version of bluez-utils.
I've also seen people in the past adding pin_helper to hcid.conf but I believe this has now been replaced by the passkey option.
Lastly I've seen people talking about dbus, but this is an area I'm unfamiliar with and have only found /etc/dbus-1/system.d/bluez-hcid.conf which isn't very clear.
Can someone point me in the right direction please as it doing my head in now!
Thanks in advance...
|