One bluetooth will only talk to one other bluetooth at a time. That is what "pairing' means. If you actually want to bring another 100 into the game, you will surely be better off considering another means of communication before you buy them.
if I have a bag of 100 devices, I should have the ability to take two of them and do a transmission.
As I said before, it's a point to point communication between TWO device. My example goal was to counter the "set one device to slave and the other to master" solution.
I suspect a principal reason for this is that it is easier to use NRF24, if only because there is plenty of information about that, so that is what everybody does.
Thanks for the solution but Bluetooth is what I need (mobile compatibility on the balance).
OTOH the principal reason for using peer-to-peer bluetooth is likely to be that it uses less memory, which doesn't amount to much if you are already obliged to use a Mega.
Not here. What I looking for is a quick serial communication between two devices with the same code on both of them, that's all.
I found on:
Auto-connect ANY Mode (SM,5)
This mode must be set by command. This mode operates like Auto-connect DTR mode, except that
each time the Switch/PIO is set, an inquiry is performed and the first device found is connected.
The stored address is NOT used, and the found address is never stored.
That is something that can do the trick ! (but I have to recreate it on HC-05)
The main question remains: can a master device detect a master device, and can a slave device detect a slave device ?
The same PDF point the fact that a slave device CAN BE detected.
If so, the schematic would be:
- Each module start as slave.
- Each module start an research
- If a module found the other, it saves its MAC address (on Arduino)
- The module restart at master
- The module initiate a connection with the MAC address it saves.
I haven't tested it yet but according to the bluetooth documentation provided by Sparkfun, that would probably works. The only problem is how to select which module gonna restart as Master and initiate the connection ? If we use the "first to discover" rule, the risk is that due to lag, the modules both restarts as master.