Setting up RN42 Bluetooth on Linux

From Bitchin100 DocGarden
Revision as of 10:31, 5 September 2012 by Jhoger (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Open a terminal prompt
jhoger@hegemon:~$ hcitool scan
Scanning ...
	00:06:66:43:02:81	RN42-0281

Get the "Channel" using the sdptool program:

jhoger@hegemon:~$ sdptool records 00:06:66:43:02:81
Service Name: SPP
Service RecHandle: 0x10000
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100

jhoger@hegemon:~$

Edit /etc/bluetooth/rfcomm.conf

#
# RFCOMM configuration file.
#

rfcomm0 {
        # Automatically bind the device at startup
        bind no;

        # Bluetooth address of the device
        device 00:06:66:43:02:81;

        # RFCOMM channel for the connection
        channel 1;

        # Description of the connection
        comment "Model T Bluetooth";
}


jhoger@hegemon:~$ rfcomm bind rfcomm0

jhoger@hegemon:~$ minicom -b 38400 -D /dev/rfcomm0

Light should come on red, and you should be able to communicate with the BT radio via HTERM.

Or, you can run with LaddieAlpha:
Use HTERM to set the baud rate to 19200bps:
$$$
su,19200
---

mono LaddieAlpha.exe /dev/rfcomm0 6