Shop OBEX P1 Docs P2 Docs Learn Events
Bluetooth two propellers — Parallax Forums

Bluetooth two propellers

I am working on a project to Bluetooth two propellers through UART serial communication. I purchased two cheap HC-06 modules, however, I did not realize this would not work. The HC-06 modules are slave devices. It looks like I could purchase RN-42 Bluetooth Module for one propeller (master) and then use the one of the HC-06 modules as a slave on the other propeller…is that correct? Because the RN42 module cost so much I thought I should check before I waste more money.

Also, are there extra steps needed to get the RN42 module into master mode and recognize the HC06 device…or is it just plug and play?

Comments

  • HC-05 modules can be either master or slave. These generally don't cost more than HC-06 modules.

  • Duane

    Thank you for your response...so looking at the HC05 modules...I will need to set one of them as a master. I have a FTDI USB TTL module. I should be able to hookup the HC05 module to my PC through the FTDI USB module and program the HC05 by pulling the Key pin high and sending "AT+ROLE=1\r\n" correct?? After that it should communicate with the slave HC05 device..is there any thing else that is needed
  • I don't recall all the commands off the top of my head but I put some code in my GitHub which makes it easier to issue commands to a HC-05 module.

    https://github.com/ddegn/BluetoothTest

    It looks like "BluetoothBridgeHC_05_150817b.spin" was my latest version.

    When you're ready to use the HC-05, let me know if you have trouble and I'll plug one of mine into a Propeller board to see if I can help figure out what you need to do.

    BTW, I don't think the HC-06 code in my GitHub is usable.
  • Duane

    Thanks again for our help…so if I understand your code correctly…the BluetoothBridge program is used to program (AT MODE) HC05 through the propeller with Pins 14 through 16. By running a terminal program on the side PC…I should be able to program the HC05 through the propeller…correct? But I do have one question…the program appears to set the HC05 baud to 115_200, however, in AT mode shouldn’t the baud be 38_400 or am I missing something…once again thank you for your help
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-10-15 00:04
    dr hydra wrote: »
    But I do have one question…the program appears to set the HC05 baud to 115_200, however, in AT mode shouldn’t the baud be 38_400 or am I missing something…once again thank you for your help

    Reasonable question. The AT mode uses 38,400 baud unless the KEY pin is set high before power up. There are two different ways to enter AT mode and the baud depends on which method is used.

    Take a look at this thread for more details.

    http://forums.parallax.com/discussion/comment/1342593

    Edit: I was reminded from the other thread ElectroDragon sells another Bluetooth module which can be used as either a master or a slave. I like this other module and the HC-05 module.


Sign In or Register to comment.