nodeid required. random nodeid. no nodeid. duplicate nodeid

Started by mpinner, January 13, 2020, 02:34:47 AM

mpinner

hi lpl forum folks.

i was curious about how the system deals with duplicate nodeid.  is that a real big problem?

i was hoping to implement a system whereby i have one sort of master device broadcasting mode changes to a largish (~100) slave devices. the thing is i don't really want to have to flash unique code on all the slave devices. 

can they all have the same id?

just curious.  thanks!

-matt

Uncle Buzz

To my mind, it's possible... But apart using another id sent inside the data, you won't be able to know which node is sending a message.
The major issue would be if you ask a reply from nodes since if they will try to reply at the same time and you will have some collision problem.

When a transmission is done on a network, all node's radio will receive it, and depending on the networkID, the radio will send the received data to the microcontroller, the RFM69 library will reject any message with wrong nodeid.

With the same nodeid, all the nodes will do the same thing depending of other parameters (sensor's values...), it could work... But don't ask them for a reply.

TomWS

The technique I've seen used successfully is to have each of your node's SW configured:
1. To have the same starting node id that is relatively isolated from 'normal' node ids, eg 240...
2. Save the node id and any node configuration data in EEPROM with a signature and checksum so that your node 'knows' that the configuration data has been set (not random values after programming).
3. When a node first checks in with the master, with node id 240, the master immediately sends a command to reset its node id to something unique.  The node saves this new id in EEPROM and uses it henceforth.

This, of course, assumes that more than one 'new' node doesn't show up at the same time.

You can still broadcast to all nodes using RF69_BROADCAST_ADDR.