I installed BlueZ and paired to a Nokia 6310i mobile a while ago. I didn't have any problem with the Bluetooth part of the setup - in fact the pairing was so easy I can't remember exactly what I did. I do remember putting the pin into the phone then into the little window put up by the pin helper - and it was done. My problems were all to do with PPP - which was another thread here.
Anyway I had it all working but needed to change to another, identical, Nokia (the original wasn't mine). Since then I've failed to pair the Z with the new phone despite trying every which way. I always get:
Can't connect RFCOMM socket: Connection refusedGoogling on this error I find that others have had this problem and there doesn't seem to be a common cause. Some seem never to have solved it. In my case I
know that this Z will attach to an identical phone.
The session below is typical
[eject/insert BT card]
root@zaurus:/etc/bluetooth> tail /var/log/messages
Jul 5 21:56:06 cardmgr[138]: executing: './bluetooth stop ttyS3 2>&1'
Jul 5 21:56:06 cardmgr[138]: + Shutting down Bluetooth... Done.
Jul 5 21:56:06 hcid[1034]: HCI dev 0 down
Jul 5 21:56:06 hcid[1034]: Stoping security manager 0
Jul 5 21:56:06 hcid[1034]: HCI dev 0 unregistered
Jul 5 21:56:06 /sbin/hotplug: no runnable /etc/hotplug/bluetooth.agent is installed
Jul 5 21:56:33 cardmgr[138]: socket 0: Compaq iPAQ Bluetooth Sleeve
Jul 5 21:56:34 cardmgr[138]: executing: './bluetooth start ttyS3 2>&1'
Jul 5 21:56:34 cardmgr[138]: + Starting Bluetooth... Done.
root@zaurus:/etc/bluetooth> hciattach ttyS3 bcsp
root@zaurus:/etc/bluetooth> hciconfig -a
hci0: Type: UART
BD Address: 00:05:4E:00:D9:D7 ACL MTU: 128:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:264 acl:0 sco:0 events:13 errors:0
TX bytes:446 acl:0 sco:0 commands:12 errors:0
Features: 0xff 0xff 0x05 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'BlueZ (0)'
Class: 0x120114
Service Classes: Networking, Object Transfer
Device Class: Computer, Palm
HCI Ver: 1.1 (0x1) HCI Rev: 0x73 LMP Ver: 1.1 (0x1) LMP Subver: 0x73
Manufacturer: Cambridge Silicon Radio (10)
root@zaurus:/etc/bluetooth> hcitool scan
Scanning ...
00:60:57:80:E0:05 DR Nok 6310i
root@zaurus:/etc/bluetooth> rfcomm connect hci0 00:60:57:80:E0:05 1
[Phone: Connect with BlueZ(0)? (Accept) Password? - (I provide PIN) - Connecting... Failed...Disconnected]
Can't connect RFCOMM socket: Connection refused
root@zaurus:/etc/bluetooth> tail /var/log/messages
Jul 5 21:56:34 cardmgr[138]: + Starting Bluetooth... Done.
Jul 5 21:57:56 hcid[1034]: HCI dev 0 registered
Jul 5 21:57:56 /sbin/hotplug: no runnable /etc/hotplug/bluetooth.agent is installed
Jul 5 21:57:56 hcid[1034]: HCI dev 0 up
Jul 5 21:57:56 hcid[1034]: Starting security manager 0
Jul 5 21:59:13 hcid[1034]: pin_code_request (sba=00:05:4E:00:D9:D7, dba=00:60:57:80:E0:05)
root@zaurus:/etc/bluetooth> rfcomm show
rfcomm0: 00:60:57:80:E0:05 channel 1 clean
root@zaurus:/etc/bluetooth> ls -al /dev/rfcomm0
crw-rw-rw- 1 root root 216, 0 Jul 5 21:44 /dev/rfcomm0
[something I noticed that might be relevant:]
root@zaurus:/etc/bluetooth> cat /dev/rfcomm0
[asks for pin on phone - same sequence as above]
cat: /dev/rfcomm0: Connection refused
If I just run the PPP dialler which worked before (rfcomm0 is now pointing to the new phone) I get a similar error:
Jul 5 17:17:17 pppd[1301]: Failed to open /dev/rfcomm0: Connection refusedThings I've tried:
- With and without a pin file. When I paired the first phone I got a window to put the pin in, but I've failed ever to get that window again. I think this is significant - I get the error message before I'm asked for my pin on the Z. /bin/bluepin is still the pin-helper and does work.
- PIN files with and without newlines. Some posts claim this is significant. I'm not sure it ever gets to read this though - see above.
- Deleting the old link-key file.
- With and without a rfcomm.conf file, and with a default one (bind no) and one set up for the new phone. (The hcid.conf and bt-uart.conf files are as installed.)
- Just about every hcitool and rfcomm command I can find
- Installed bluez-spd and checked that channel 1 is correct for DUN
- Deleting a lock file var/lock/subsys/bluetooth
- Uninstalling and reinstalling the bluez packages - trying to revert to the original situation.
- Checked that the Nokia firmware is the same on both phones. The new one is secondhand & BT works with a headset.
Not only can I not pair this new phone I now can't talk to the old one - I get the same error message now. The devices should still be paired (the Nokia thinks it is and I've put back the link-key file, though I might have damaged it since - I didn't take a backup of it before I started all this.)
I'm not sure that it's the
pairing process that's at fault - without a pin file I'm not even asked for my pin on the Z. Something to do with /dev/rfcomm0.
Any ideas?
Dave