Conflicts with neighbour's gateways ?
-
Hi,
A neighbour is about to build its own MySensors network.. and I already have mine.. Reading the main documenttation, I can't understand if there's a risk of conflict between sensors.
For instance, I read that on one network, there can be only one gateway. However, I also read that if you use NRF24 sensors, you can use different radio channels.
So, how should we manage the various MySensors networks appearing with neighbours ? For instance, during "presentation" phase, the sensor gets a unique nodeID, but is there a risk it asks the gateway from neighbour and get an ID already existing in my own network ?
Later on, how a sensor can send info to a specific gateway ? (here, my guess is that unless we introduce the security options, then all gateways coul read the sensors).
On the opposite, if a sensor is requesting info from controller (requesting time or any other setting), how do we make sure that it asks from correct gateway ? Is it only by setting up different radio channels (and thus ask your neighbour to use a differetnh channel than yours?)br,
Ricorico94 -
Besides channel, you can also change the MY_RF24_BASE_RADIO_ID for nrf24. This will give you the possibility of a huge number of networks on the same frequency if the traffic is low.
https://github.com/mysensors/MySensors/blob/development/MyConfig.h#L418
-
You can also use the security features of mysensors so that your node doesn't connect to your neighbors gateway even if it uses the same channel. Using a different channel would be easier though i guess.
-
Hi,
Thanks for these hints.
Changing the frequency is probably easy, but does it prevent a new Node to ask for a NodeID from another gateway ?Regarding the solution with base Node ID, I don't understand how to use that setting. Documentation states :
/** * @def MY_RF24_BASE_RADIO_ID * @brief RF24 radio network identifier. * * This acts as base value for sensor nodeId addresses. Change this (or channel) if you have more * than one sensor network. */ #ifndef MY_RF24_BASE_RADIO_ID #define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8but I don't understand how to use that.. I searched the forum and the internet, but I could not find examples. What mean "0x00,0xFC,0xE1,0xA8,0xA8" ? Are they random values I can decide by myself (and then use the same for each of my sensors) ? Like I could state:
#define MY_RF24_BASE_RADIO_ID 0x01,0x02,0x03,0x04,0xFF
??Is there a downside of using that setting compared to changing radio frequency ? (it still looks much more simple than using the security.. I couldn't find a tutorial that I can understand.. but I admit I didn't spend hours on investigating security yet. That's on my mid-term to-do-list)
br,
Ricorico94 -
I understand everyone prefers using different radio channels, but no one knows how to use the MY_RF24_BASE_RADIO_ID setting and what are the pros/cons ?
-
From the NRF24 datasheet:

So, you should probably choose address a bit careful.
To change base address just add a define in your sketch like this (before including MySensors.h):
#define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login