HC-05 Changing roles

Hello people

I had an HC-06 slave only Bluetooth receiver in my project. Receiving fine and all is well.

I changed that for a HC-05 yesterday, as I would like to be able to transmit data when it's not busy receiving.
But... I appear to have got that wrong.

I know that you enter AT mode by pressing the button and you can then set the modules role as master or slave. I set the new one to Master.

From what I can see, I cannot actually use that module as a transmitter and receiver at the same time (obviously not transmitting and receiving at the same time).

I believe the EN pin does the same as the button? Therefore i could put the module into AT mode, change it's role, and then transmit. Then enter AT again and put it back to receive once I am done.

But, that will slow my routine up unacceptably.

Am I right here? I have not found any way to switch between transmit and receive by software command. Or... in master mode, should it still be able to receive? (because mine doesn't)

So, it looks like either add a second Bluetooth module (but they are noisy power hungry chaps), or bin Bluetooth altogether.

The problem with 2 Bluetooth modules is I cannot connect to my Android phone with 2 Bluetooth modules at the same time.

OR... am I totally wrong. Advice? Thanks

Yo should not have to change roles to be able to both transmit and receive with a HC05.

I have not found any way to switch between transmit and receive by software command

There is no command to switch. Just use print() to send and available() and read() to receive.

OK. So I am clearly not doing something right.

If the HC-05 is set as a slave (Role:0), then it is available on my phone to pair over Bluetooth.
I can connect, and then send data to my project fine.

If I change the HC-05 to master (Role:1), then the HC-05 no longer becomes available to pair to my phone (which would make sense.... it's the master)

I have written a short routine to allow me to program the HC-05 out of my project, and I can quiz it to make sure the flags are set correctly (E.G. AT+ROLE? returns it's current status).

Do I not set it to master?

If I have it set to slave, then it doesn't seem to send any data out.


OK. Just tested the HC-05. The TX pin isn't showing continuity to the onboard IC pin.
Dud module may be the issue

I just checked my HC05 project that sends and receives from my tablet using the Serial Bluetooth terminal app from the play store. I checked and the mode is set to slave (mode 0). The HC05 pairs with the tablet with no problem and works fine sending and receiving.

Bad solder on the HC-05.
That's an annoying waste of a few hours!

Thanks for your help

from what you describe, the HC-06 would have sufficed.