HC-05 connection to ROS using Arduino?
Hello, guys.
I've been trying to get my HC-05 bluetooth module working with ROS through an Arduino, but I haven't got success so far. In order to just establish the connection between the module and my computer, I have followed this tutorial (link text), which uses bluez bluez-tools. Here are the exactly steps I've taken:
$ hcitool scan
Scanning ...
20:15:07:27:76:81 HC-05
$ bluez-simple-agent hci0 20:15:07:27:76:81
RequestPinCode (/org/bluez/731/hci0/dev_20_15_07_27_76_81)
Enter PIN Code: 1234
Release
New device (/org/bluez/731/hci0/dev_20_15_07_27_76_81)
Then, I've made my /etc/bluetooth/rfcomm.conf file as follows:
rfcomm0 {
bind no;
device 20:15:07:27:76:81;
channel 1;
comment "Arduino";
}
Then, back to terminal:
$ sudo rfcomm connect 0
Connected /dev/rfcomm0 to 20:15:07:27:76:81 on channel 1
Press CTRL-C for hangup
Then I start ROS by using
$ roscore
And finally, I try and fail to establish the connection.
$ rosrun rosserial_python serial_node.py /dev/rfcomm0 _baud:=9600
[INFO] [WallTime: 1470448881.996747] ROS Serial Python Node
[INFO] [WallTime: 1470448882.001542] Connecting to /dev/rfcomm0 at 9600 baud
[ERROR] [WallTime: 1470448899.106085] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino.
The problem isn't in my arduino code, because when I use the USB cable, the topics are successfully created and I'm able to see what's going on inside them.
I'm using
- Ubuntu 14.04
- ROS Indigo
- ros-indigo-rosserial-arduino
- ros-indigo-rosserial
Can anyone help me, please?
Thank you.