• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bluetooth HC-05 and HC-06 interference .

granddad

Active Member
Thread starter #1
Any Bluetooth gurus out there please ? My project will have 4 x HC-05 Master Bluetooth modules in close proximity ( 100mm) , and will be communicating to 'paired' HC-06 slaves , I am wondering if I can expect some wireless interference .
 

Nigel Goodwin

Super Moderator
Most Helpful Member
#3
Nothing like been hopeful :D

I'm not a great BT lover!.

But certainly the way to go is to simply try it, and see what happens - I'd like to believe that they will indeed 'sort themselves out'.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
#6
I am a bit dubious myself , care to expand ?
....I'm not saying all is OK yet ! .. but two HC-05s seem to be 'happy' , I have 3000 lines of code and used 3% of flash ... Mmmm
Just try it and see - I've not done any programming with BT, but with phones, TV's, computers etc. it always seems rather overcomplicated and tends not to do what you'd like.
 

granddad

Active Member
Thread starter #7
Progress ,Mmm well as with some 'modern' modules the documentation for HC-05 and HC-06 is not well documented. ! my units are version 3 FW . i have them individually communicating with both PIC and terminal .. , but not yet 'paired'... the 05 can see 06 ... but command mode(s) confusing.. to say the least...
 

JonSea

Well-Known Member
Most Helpful Member
#9
I'm not a great BT lover!.
I remember when Bluetooth was the new thing, it was horrible. Special drivers that were difficult to find and install. Devices that would only connect with certain versions of the driver with the moon in the right phase.

Fortunately, Bluetooth has become much more seamless and mostly works without any trouble.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
#10
Fortunately, Bluetooth has become much more seamless and mostly works without any trouble.
Well I went for a test drive in a new car a couple of weeks ago, which I've ordered and am waiting for, and as part of the demonstration he talking me through linking my phone to the 'infotainment' system - something that went incredibly easily and flawlessly.

However, one short trial doesn't mean everything is perfect - where I used to work we had a modern Ford Transit van, with a mobile phone connected via BlueTooth, and it needed re-pairing every few weeks.
 

granddad

Active Member
Thread starter #11
Thanks MJ This is probably the best i have (Ver 1 ) issues revolve around the getting into AT mode. and command names too ! seems to be different with versions , OK , I have Ver 3 .. got as far as (05) AT+STATE it should go find slaves , It does on PC /USB FTDI , but I cannot stop it ! on PIC it just ignores my bytes .. there are baud changes and power downs and EN pin changes just to confuse an old techie !...
edit , This was some hep ,,, https://stackoverflow.com/questions/47010342/bluetooth-hc-05-sending-error-1f-for-inq-command-only

Found some more info... perhaps tomorrow ...

There are many kind of hc-05 module, they are almost the same. The only make a big different are from the break board, they EN pin and the micro button. Although some break board do nothing with EN pin.
EN pin almost equal with key pin (pin 34) but not always.

Hc-05 have 2 AT mode;

First is AT mode that you can't do pairing nor inquiring (you'll get error 1F). Indicated by slow flashing led.

And how to get there?

- With micro button. Before connecting vcc, push and hold the button. Then connect vcc and release
button. Now you can input AT command.

- With EN pin. Before connecting vcc, connect EN pin with 3v. Then connect vcc and release EN pin.
Now you can input AT command.

- With pin 34. Same like EN but before that you need to soldering or clamping or some short.


Second mode is AT mode for communicating. Indicated by fast flashing led.

- With micro button. After connecting vcc, push and hold the button. Then connect vcc and but don't
release button. Now you can input AT command with your other hand



- With EN pin. After connecting vcc, connect EN pin with 3v. Then connect vcc and don't release EN
pin. Now you can input AT command.

- With pin 34. Same like EN but before that you need to soldering or clamping or some short.

-I tested with hc-05 ver 2 2010 and 3 2017 and some horrible clone.
-Be aware, some at command will causing to exit AT Mode.
-EN pin not always working
-key pin (pin 34) is the best (tested with all hc-05)
-Some hc-05 module no need to be initialized (at init) they always initialized

-Do AT+ROLE=1, AT+CMODE, and the most AT+CLASS=0
 

Attachments

Last edited:

granddad

Active Member
Thread starter #13
MJ .. Think that is Version 1 .. My 05 V3 has button and resistor on EN ( CMD p34 pin ) .. my last edit blue text above may hold the 'key' it all seems to revolve around the way pin 34 is handled . I have relay between HC and Vcc power and the EN pin on a I/O so can do any combination...
 

granddad

Active Member
Thread starter #14
Progress .. The way i believe HC 05 - HC 06 (version 3) 'works' is the first AT mode (EN (pin34) 3.3v on power up ) communicates with the SSP (http://www.fte.com/docs/ssp.pdf) and the basic functions section of the master so some AT commands will return ERROR(0) .. As I required 4 Master / slave pairs, I had to find the Slave's <addr> first and then set it's 'master' what slave to pair with ( PAIR / BIND/ LINK ) I wrongly assumed AT+PAIR meant go find slaves ... after these settings all 'OK' .(SPP is always INITIALIZED ?) Power off Master drop EN pin (0v) and power up Master again. Master assumes SPP mode ( Slave has been powered all this time ) , now wait ! .... for them to PAIR. each modules leds flash rapidly at first until linked then just two flashes and a gap . BAUD For the next AT mode has to be 9600,( message SOCKET 2 9600 ..so I knew ) Now enter master's second AT mode by making EN=3.3v .. send AT+STATUS now shows CONNECTED ! It was late so have not had time to send data over the link yet .. RNAME also says FAIL , but i changed the Slave name I think it only reports OK to HC-06 remote name ? so more testing required .. as i was running this from the PIC , various delays were required between commands 20msec to 1 second ? ...
hc05.jpg
 
Last edited:

granddad

Active Member
Thread starter #15
I Now have 4(06) slaves powered up but one master , to see what 'linked'... low and behold first slave connected , and passed data ( loop on slave RX/TX ) others still flashing rapidly so HC06's waiting for a master ? next stage 4 masters and 4 slaves ... they have to connect to their own master ...

proto.jpg BT06.jpg
 
Last edited:

granddad

Active Member
Thread starter #16
They should all sort themselves out.
How is it the simple mistakes cause the longest head scratching ? , my screen shot above shows slave addr = 9803, 21 , F49046 .. it should have been ! 98D3, 21 , F49046 :banghead: but this master it did link to the correct slave ! even with the wrong address ! but it took 10 sec not 200 msec .. anyway.. pommie you were right , they sort themselves out 4 masters 4 slaves PAIRED and serial loops work fine.. :cool:
 

granddad

Active Member
Thread starter #17
Designing on the 'fly' not always straight forward.. my 4 x bluetooth project , began to run out I/O pins ( PIC has 35 ) so decided to multiplex some signals.. so I split the development on to two boards.. ( may eventually be 3 ) I found this little dry marker board great to sketch out ideas..
drybd.jpg
 

granddad

Active Member
Thread starter #19
My hobby seems to be disappearing ! I decided to replace the one relay , with 4 x P logic MOSFET. ( Si2301 CDS) so I can power the HC-05's individually .. my choice of device ordered and arrived , ...they are 3mm x 1.2mm ... had to buy 5 , good job I lost one somewhere in my mess ! quickly put the other 4 on a ssop breakout board.. .. happily tested and working...

gone.jpg
 
Last edited:

Latest threads

EE World Online Articles

Loading

 
Top