Difference between revisions of "Setting up RN42 Bluetooth on Linux"

From Bitchin100 DocGarden
Jump to: navigation, search
(New page: 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...)
 
Line 1: Line 1:
 +
<pre>
 
Open a terminal prompt
 
Open a terminal prompt
 
jhoger@hegemon:~$ hcitool scan
 
jhoger@hegemon:~$ hcitool scan
Line 41: Line 42:
 
         comment "Model T Bluetooth";
 
         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:
 +
 +
mono LaddieAlpha.exe /dev/rfcomm0 6
 +
</pre>

Revision as of 10:28, 5 September 2012

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:

mono LaddieAlpha.exe /dev/rfcomm0 6