# hcitool scan Scanning ... C8:97:9F:E3:28:44 Nokia N900 # export N900='C8:97:9F:E3:28:44'
# hcitool scan Scanning ... 88:9F:FA:F3:F5:0A BlueZ (1) # export LAPTOP='88:9F:FA:F3:F5:0A'
# sdptool add --channel=10 SP Serial Port service registered
# sdptool records $N900 ... Service Name: Serial Port Service Description: COM Port Service Provider: BlueZ Service RecHandle: 0x10005 Service Class ID List: "Serial Port" (0x1101) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 10 Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100 Profile Descriptor List: "Serial Port" (0x1101) Version: 0x0100 ...
# sdptool records $LAPTOP ... Service Name: Serial Port Service Description: COM Port Service Provider: BlueZ Service RecHandle: 0x10006 Service Class ID List: "Serial Port" (0x1101) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 10 Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100 Profile Descriptor List: "Serial Port" (0x1101) Version: 0x0100 ...
# cat /etc/bluetooth/rfcomm.conf # # RFCOMM configuration file. # rfcomm0 { # # Automatically bind the device at startup bind yes; # # # Bluetooth address of the device device C8:97:9F:E3:28:44; # # # RFCOMM channel for the connection channel 10; # # # Description of the connection comment "Example Bluetooth device"; }
# cat /etc/bluetooth/rfcomm.conf # # RFCOMM configuration file. # rfcomm0 { # # Automatically bind the device at startup bind yes; # # # Bluetooth address of the device device 88:9F:FA:F3:F5:0A; # # RFCOMM channel for the connection channel 10; # # Description of the connection comment "BT COM TEST"; }
mknod /dev/rfcomm0 c 216 1 chmod 666 /dev/rfcomm0
rfcomm -f /etc/bluetooth/rfcomm.conf
# rfcomm connect /dev/rfcomm0 Can't connect RFCOMM socket: Connection refused
# hcitool cc C8:97:9F:E3:28:44 root@maemo-desktop:/etc/bluetooth# hcitool con Connections: < ACL C8:97:9F:E3:28:44 handle 12 state 1 lm SLAVE root@maemo-desktop:/etc/bluetooth# hcitool con Connections:
# l2ping C8:97:9F:E3:28:44 Ping: C8:97:9F:E3:28:44 from 88:9F:FA:F3:F5:0A (data size 44) ... 44 bytes from C8:97:9F:E3:28:44 id 0 time 18.97ms 44 bytes from C8:97:9F:E3:28:44 id 1 time 15.46ms 44 bytes from C8:97:9F:E3:28:44 id 2 time 27.80ms 44 bytes from C8:97:9F:E3:28:44 id 3 time 20.50ms 44 bytes from C8:97:9F:E3:28:44 id 4 time 20.78ms 44 bytes from C8:97:9F:E3:28:44 id 5 time 29.30ms 44 bytes from C8:97:9F:E3:28:44 id 6 time 8.01ms 44 bytes from C8:97:9F:E3:28:44 id 7 time 19.67ms Send failed: Connection reset by peer