hc05 BLUETOOTH with multi slaves

hi

is there a way to communicate with multi hc05 slaves (one at a time) with a hc05master.

one master and a slave no problem but i didn't find any flowchart to explain the way to do that

if someone could give help it would be kind.

THANKS

My understanding is that HC-05 master only connects with a slave by using a hard-coded address. A good source is here:

It might be simpler to use several masters, each dedicated to its exclusive slave.

Dear Nick thanks for answering;

but I've yet read phillipecantin blogs and others . I wanna know the way to the master be connected to one slave and to a second one and so on in order to have a piconet;

In all examples there is only a master joining a slave

May be I'm wrong?

thanks

Hello and welcome :slight_smile:

I have never tried, but I think it is possible, but as you said, with only one slave at a time.

Here is the manual of the HC-05, read it carefully, it's not very detailed but at least you know all commands :slight_smile:

I have a HC-05 as master and 2 HC-07 slaves. I will do some tests tomorrow and will post a demo sketch if I can get it working.

HI

I found out the way to have a HC05 master communicate with HC05 slaves

first set the master first set the slaves

AT+ROLE=1 // MASTER AT+ROLE=0 // SLAVE

AT+MODE =1 // link any address AT+MODE =1 // link any address

at+uart=38400 at+uart=38400

at+init //init spp at+init //init spp

in my case I've got 2slaves

at+inqm=0,2,48 //0=inquiry mode standard,2= slave number to find,timeout=1,28S*48

in my case 2 slaves found

addr slave1 2014,10,170790

addr slave2 2014,10,170304

then I've done

at+pair=2014,10,170790,20 // ADDR SLAVE1 followed by time out here 20seconds

at+link=2014,10,170790

then send your datas

for joining slave2

HARDWARE RESET MASTER

at+init

at+pair=2014,10,170304,20 // ADDR SLAVE2 followed by time out here 20seconds

at+link=2014,10,170304,20

then send your datas

THATS ALL if that could help someone

ps each command could be upper or lower case and have to end with \n\r

if you question the master or slave no nedd to type ?

Remy,
i have a project with the same requirements and i only have a problem with how to disconnect slave1 from the master then i connect it with slave2 when i used the command AT+DISC no respond as when the master connected to slave 1 both of them don't respond to AT commands

remy_A59330:
HI

I found out the way to have a HC05 master communicate with HC05 slaves

first set the master first set the slaves

AT+ROLE=1 // MASTER AT+ROLE=0 // SLAVE

AT+MODE =1 // link any address AT+MODE =1 // link any address

at+uart=38400 at+uart=38400

at+init //init spp at+init //init spp

in my case I've got 2slaves

at+inqm=0,2,48 //0=inquiry mode standard,2= slave number to find,timeout=1,28S*48

in my case 2 slaves found

addr slave1 2014,10,170790

addr slave2 2014,10,170304

then I've done

at+pair=2014,10,170790,20 // ADDR SLAVE1 followed by time out here 20seconds

at+link=2014,10,170790

then send your datas

for joining slave2

HARDWARE RESET MASTER

at+init

at+pair=2014,10,170304,20 // ADDR SLAVE2 followed by time out here 20seconds

at+link=2014,10,170304,20

then send your datas

THATS ALL if that could help someone

ps each command could be upper or lower case and have to end with \n\r

if you question the master or slave no nedd to type ?

I did it according to your code. However, after I connect the first bluetooth, the led on hc05 turned on blink every 2 seconds, and it doesn't connect the second bluetooth. How should I do?

He is how I manage to have one master with two slaves, code and video at: https://www.saibatudomt.com.br/2018/01/conectando-3-dispositivos-arduino-utilizando-o-modulo-bluetooth-hc-05.html

Hope it helps

remy_A59330:
hi

is there a way to communicate with multi hc05 slaves (one at a time) with a hc05master.

one master and a slave no problem but i didn't find any flowchart to explain the way to do that

if someone could give help it would be kind.

THANKS

remy_A59330:
HI

I found out the way to have a HC05 master communicate with HC05 slaves

first set the master first set the slaves

AT+ROLE=1 // MASTER AT+ROLE=0 // SLAVE

AT+MODE =1 // link any address AT+MODE =1 // link any address

at+uart=38400 at+uart=38400

at+init //init spp at+init //init spp

in my case I've got 2slaves

at+inqm=0,2,48 //0=inquiry mode standard,2= slave number to find,timeout=1,28S*48

in my case 2 slaves found

addr slave1 2014,10,170790

addr slave2 2014,10,170304

then I've done

at+pair=2014,10,170790,20 // ADDR SLAVE1 followed by time out here 20seconds

at+link=2014,10,170790

then send your datas

for joining slave2

HARDWARE RESET MASTER

at+init

at+pair=2014,10,170304,20 // ADDR SLAVE2 followed by time out here 20seconds

at+link=2014,10,170304,20

then send your datas

THATS ALL if that could help someone

ps each command could be upper or lower case and have to end with \n\r

if you question the master or slave no nedd to type ?

I was reviewing this. My first blunder was that it did not enter AT + INIT mode, I was investigating and described that I had to hold down the button on the HC-05 module that would be master. This is how it works correctly. The problem arises in that after entering AT + PAIR and AT + LINK of the first slave, I cannot give "RESET BY HARDWARE" since I have pressed. Then I give it AT + RESET, to enter AT + PAIR and AT + LINK of the second slave, then at the end it only links to the second slave. I do this, from HYPERTERMINAL. Help. Thank you.