I have been fighting the HC-06 module for a bit longer than I am usually comfortable with and decided to put it all together here.
The instructions should be the same on all Linux distributions with thebluez
package installed. I have verified it on Ubuntu 15.10 with all the updates and it doesn't work. It does however work on Linux Mint 17.2...
- Configure the HC06 module to connect at 115200bps - best done with Arduino IDE and a USB-to-TTL converter
AT+BAUD8
- Using a USBAsp programmer (or another Arduino) burn the Arduino Mini bootloader (Pro Mini didn't work at all in my case!)
- Find out the MAC address of module you want to use:
hcitool scan
- Connect the module (replace xx:xx:xx with actual MAC of your module)
sudo rfcomm connect /dev/rfcomm0 98:D3:32:xx:xx:xx 1
The red LED on the HC-06 should go solid at this point
- Reset the board using on-board reset switch or short-circut the
RST
pin to the ground - Validate the connection with
AVRDUDE
avrdude -c arduino -p m328p -P /dev/rfcomm0
You should see something like this:
user@host:~$ avrdude -c arduino -p m328p -P /dev/rfcomm0 avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.07s avrdude: Device signature = 0x1e950f avrdude: safemode: Fuses OK (H:00, E:00, L:00) avrdude done. Thank you.
No comments:
Post a Comment