Can 1 bluetooth master have multiple slaves?

Hello guys,

My question is: Can 1 bluetooth master have multiple slaves?
I've done some research but most of them are 4 years ago and all the answers are different, some say that you can but only with special modules (no idea which one..) and others says only 1:1 connection is possible. Is there really no way to connect multiple bluetooth slaves to 1 master?

Thanks for the help!

While I believe it is possible with some exotic modules, nobody seems to come forth with a sensible procedure, or even identification. There could be good reasons for this, one being that there are better options outside the bluetooth arena.

I’m also sure it is possible using the HC-05 module we all know and love, but the path is somewhat convoluted, and I have never heard of it being done, possibly for the same reason as above.

Bluetooth can be configured to auto-connect for Arduino<>Arduiono communication. This is common enough. The key to what you want would be to have the power to the master under Arduino control, rather than simply use the 5v pin, and also have Arduino control the KEY pin. This rather implies you would need the master HC-05 on a JY-MCU board, instead of the more modern boards with a button switch.

With this setup, you could break communications with one slave by cutting off power, restore power and go into AT mode to configure for the next slave, cut off power, and finally auto-connect with the other slave, all in a trip round the loop. Sequential polling.

Nick_Pyner:
While I believe it is possible with some exotic modules, nobody seems to come forth with a sensible procedure, or even identification. There could be good reasons for this, one being that there are better options outside the bluetooth arena.

I’m also sure it is possible using the HC-05 module we all know and love, but the path is somewhat convoluted, and I have never heard of it being done, possibly for the same reason as above.

Bluetooth can be configured to auto-connect for Arduino<>Arduiono communication. This is common enough. The key to what you want would be to have the power to the master under Arduino control, rather than simply use the 5v pin, and also have Arduino control the KEY pin. This rather implies you would need the master HC-05 on a JY-MCU board, instead of the more modern boards with a button switch.

With this setup, you could break communications with one slave by cutting off power, restore power and go into AT mode to configure for the next slave, cut off power, and finally auto-connect with the other slave, all in a trip round the loop. Sequential polling.

Thanks for the answer, I wanted to use these bluetooth modules to let like 3-4 arduino’s work together in the same room because there aren’t such long wires to go through the whole room, do you maybe have a better solution for this so I can maybe even do it with 1 arduino?

akatchi:
like 3-4 arduino’s work together in the same room because there aren’t such long wires to go through the whole room

I certainly don’t have a better solution, as I don’t really know what you want to do. Your proposal sounds entirely reasonable, and I think doing it with bluetooth is not entirely unreasonable, indeed I would try using bluetooth first if faced with the same situation, but you may find using an NRF24 network more appropriate.

NRF24s have about the same performance and price as the typical bluetooth, and are made with this sort of thing in mind.

The reason why I would choose bluetooth first is simply that I already own several and am used to them. I believe the communication aspect of the software is a lot simpler than that with NRF24.

Only you can determined whether or not to go wired or wireless. It appears that you have already made that decision.

Thanks will check NRF24 out!

Nick_Pyner:
I believe the communication aspect of the software is a lot simpler than that with NRF24.

Only you can determined whether or not to go wired or wireless. It appears that you have already made that decision.

Wait, 1 more question, can I connect multiple NRF24's together, or just 2.

Well I'd love to go wired but I can't find like 1 meter wires anywhere or longer, so I guess wireless is my only option for now.

Nick_Pyner:
With this setup, you could break communications with one slave by cutting off power, restore power and go into AT mode to configure for the next slave, cut off power, and finally auto-connect with the other slave, all in a trip round the loop. Sequential polling.

I think this is a good solution - it should definitely work.

Something else came into my mind: since the HC-05 and similar are very cheap, why not having for each slave one master? E.g. if you have 2 slaves, why not having 2 masters on your main arduino board, each communicating with it's own slave?
I want to realize a temperatur sensor in my living room (as the master), one external outside and 3rd temp. sensor in another room. This would mean 2 Masters on my main arduino board and each slave with one.

I'm not sure how your credibility would fare with this approach. Having one poll many is much more elegant, and the sort of thing you could tell your mother about. Then there is the matter of serial ports. If you have a Mega, then you have four proper serial ports and devoting them to four blueteeth is a possibility. If you have a Uno etc. you will be obliged to use software serial. This is never a good idea, and I imagine having more than one bluetooth on software serial doesn't bear thinking about.

I recently bought 3x NRF24 modules on AliExpress, thanks for all the help :smiley: let's see how it's going to work out.

Nick_Pyner:
I’m not sure how your credibility would fare with this approach. Having one poll many is much more elegant, and the sort of thing you could tell your mother about. Then there is the matter of serial ports. If you have a Mega, then you have four proper serial ports and devoting them to four blueteeth is a possibility. If you have a Uno etc. you will be obliged to use software serial. This is never a good idea, and I imagine having more than one bluetooth on software serial doesn’t bear thinking about.

It just came into my mind - out of the blue. Of course your solution is definitely more elegant - completely agreed.