Monday, September 29, 2014

Bluetooth serial



module HC-06 (aitendo EGBT-046S-P)


hcitool scan


and get the mac address of the module


then edit /etc/bluetooth/rfcomm.conf as follows


rfcomm0 {

# Automatically bind the device at startup

bind no;

# Bluetooth address of the device

device 11:22:33:44:55:66;


# RFCOMM channel for the connection

channel 1;


# Description of the connection

comment "any description you like";

}


to create the serial /dev/rfcomm0
sudo rfcomm bind rfcomm0

to pair
bluetooth-agent 1234 &
(or when asked for the pin, default is 1234)

to destroy it
sudo rfcomm release rfcomm0

if not in the  dialout group (serial access)
sudo adduser fabio dialout

sources:
http://embeddedprogrammer.blogspot.jp/2012/06/ubuntu-hacking-hc-06-bluetooth-module.html
http://www.exp-tech.de/service/datasheet/HC-Serial-Bluetooth-Products.pdf

No comments:

Post a Comment