Tuesday, June 14, 2005

HOWTO - Setup a Serial Connection to a Bluetooth Phone

I am running Fedora Core 3 - FC3 with a kensington usb bluetooth adapter. FC3 comes with the bluez software so I didn't need to install anything for bluetooth to work.

0) # service bluetooth status; service bluetooth stop; service bluetooth start; service bluetooth status
1) unplug the usb bluetooth adapter then plug it back in
2) # hcifconfig hci0 down
3) # hcifconfig hci0 up
4) # hcifconfig -a

hci0: Type: USB
BD Address: 00:0C:55:F8:5E:73 ACL MTU: 377:10 SCO MTU: 16:0
UP RUNNING PSCAN ISCAN
RX bytes:378 acl:0 sco:0 events:16 errors:0
TX bytes:325 acl:0 sco:0 commands:17 errors:0
Features: 0xff 0xfe 0x0d 0x38 0x08 0x08 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'a1a-0'
Class: 0x120104
Service Classes: Networking, Object Transfer
Device Class: Computer, Desktop workstation
HCI Ver: 1.2 (0x2) HCI Rev: 0x0 LMP Ver: 1.2 (0x2) LMP Subver: 0x6965
Manufacturer: Broadcom Corporation (15)


5) #hcitool scan
Scanning ...
99:66:55:44:D1:35 Nokia3650

6) rfcomm bind /dev/rfcomm1 99:66:55:44:D1:35 1
7) You should now be able to use the serial connection to communicate with your bluetooth phone.

If you get the following error:

# cat /dev/rfcomm1
cat: /dev/rfcomm1: Connection refused

1) Then turn the phone off and back on.
2) hcitool scan
Scanning ...
99:66:55:44:D1:35 Nokia3650
3)cat /dev/rfcomm1
Waiting with no error

This usually fixes the problem.
Post a Comment