Author Topic: how is the HC-05 (or hc06) bluetooth SPP serial module, for reliability?  (Read 4816 times)

0 Members and 1 Guest are viewing this topic.

Offline linux-worksTopic starter

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
I am thinking of using pairs of hc05 bt modules as wireless serial links on test gear (from the rs232 ports on the backs of fluke dmms, for example).  of course I'll convert rs232 to ttl serial for the bluetooth module.

I bought a pair and they seem to work.  they find each other and once you put one into master mode, they will pair easily.

has anyone used these for SCPI automation?  I might have to post this in the test equip section; but I plan to have a controller or rasp pi poll the data from the DMM, so I'm going to start this question in the controllers forum, first.

I wonder how many you can have 'flying' in the air at once?  suppose I have a table of 10 meters or scpi devices and I want to have those 2 ports remoted to a pc across the room.  anyone run lots and lots of connections with pairs of the hc05 modules?  anything good or bad from that experience?

its only 9600 (maybe you can set it higher); so I can't imagine its a big problem to have, say, 10 of these pairs in the same room, all 'going' at the same time with meter traffic going on as constant streams at each box.

would like to know your experience in using this as transparent ascii wireless links.

Offline amorgant

  • Newbie
  • Posts: 3
  • Country: us
Hello,

I have the HC-06 Slave module in about 15 products and have no issues for over 6 months now. Keep in mind this device in not Bluetooth 4.0 and will not work with iPhone, but works great with android. I got Bluetooth Android code working very easily with MIT app inventor. I would recommend the HM-10 or HM-11 if you want Bluetooth 4.0 support. BLE 4.0 is not compatible with MIT app inventor but is still easy to get working!  Let me know if you need help!

Regards,
Albert
 

Offline linux-worksTopic starter

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
thanks.

photo of my project that is using a pair of these:



so far, though, I can't give these names or change anything other than mode (master vs slave) and the PIN code for them.   the only way I can get pairs of these working and not connecting to the wrong peer is to set private PIN codes for the 2 in the pair and use diff codes for other pairs.  no other link or bind or similar command works.  wonder if the firmware is upgradable and if the ones I got from amazon are dumbed down, somehow?

Offline amorgant

  • Newbie
  • Posts: 3
  • Country: us
Looks like a neat project! Nice prototyping setup too, with with all the modules on the perforated board! I can only speak for communicating with these devices via an android app, not peer to peer. I do believe that if you want peer to peer you need 2 HC-05's one set as master one set as slave. or possibly and Hc-05 set as master and the Hc-06 being the slave. If you are not going to have a smart phone in this mesh then I wouldn't recommend Bluetooth for peer to peer. I would recommend the nRF24L01+ 2.4GHz Wireless Transceiver (easily available amazon prime). Lots of great Arduino sample code too! Also greater range!

~Albert
 

Offline linux-worksTopic starter

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
lots of choices, but I'm playing with BT to see how well this serial transparent stuff works.

$10 a radio is a great price.  easier to use than nrf.  nrf can run much higher power (I use a LNA and PA version on my hobby RC remote control and the nrf protocol is used by lots of quadcopters these days).

I used to use tons of xbees and those are $30 per radio once you add in the breakout boards that most people need.

the cool part about this bt dongle is that you can run peer to peer on a pair of the dongles OR talk serial in a stream of bytes to a phone or any bt classic (not ble) system.  I was able to connect to my win7 system and android just fine (blue-term on android, or equiv).

I tried following this guide but my firmware won't take the extended AT commands that they talk about.  none are taken.  I can only set the password PIN and that is the only way, right now, I can set up pairs of them as ships in the night.

https://arduino-info.wikispaces.com/BlueTooth-HC05-HC06-Modules-How-To

thanks for comments on the build ;)  the project is a lipo battery charger and I'm using lots of breakout boards to try the concept out, at first.  a digipot to control the charge current on a TP4056 charger board; arduino for control, sd-card to save log data of the charge process and a 4ch a/d board that lets me measure differential voltage for the batt and diff current (across a .1ohm series R).

Offline linux-worksTopic starter

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
I threw together a diagram to show exactly what the wiring is, in order to get an end-to-end radio link going between, say, a SCPI device using rs232/db9 and a PC using usb:




fwiw

Offline linux-worksTopic starter

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
some missing info finally is now coming to light and a lot more finally makes sense.

it appears that there are TWO AT command modes; a so-called mini and a full version.  a blogger found this out and that really helps explain what was going on.

for the hc05 modules that you can commonly buy on ebay and amazon, the trick is to press AND HOLD that button before you power it on and KEEP IT PRESSED the whole time while you are configuring it.  I have some tweezers that are spring loaded and will hold that button pressed while I configure the module.

when you do it that way, you can configure the full set of AT commands and you can create a static link binding, give the module a name, etc.

the KEY or ENA wire is not really working on the module; but the button acts like the KEY feature as long as you keep it pressed.

this makes auto configuring it under software control impossible unless you run your own wire from pin34 (I think that's the pin; the top/right pin on the module) to the key or enable line.

at least this now finally makes sense.  that one bit of missing info made all the diff.

again, bloggers save us from the dreadful state of vendor docs; or the lack of vendor docs.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf