Hi -
I'm using the Radiohead library with the MoteinoMega/RF95 Lora (915 mhz) boards to implement a longish range mobile mesh network. So far so good - several radios moving around in/out of range and things work well. My next iteration attempts to dynamically assign a radio ID using a random number generated in setup() vs. assigning them at compile time (hard to scale things this way but certainly doable).
Currently Radiohead supports 1-octet radio addressing. That is pretty limiting - it's hard to create a random number in that space. A brief back and forth with Mike C. over a Radiohead said that he implemented it that way because *most* radio hardware only allows a single octet addressing scheme (in the packet I assume).
He was unsure if the rh95 would support something different. I can change the Radiohead libraries to support what I want - but I'm unsure if the rh95 radio packets would allow me to create a 4 or 5 digit number as a radio ID.
Possible?
Limitations?
I'm a reasonably good c/c++ but I'm not deeply skilled in rf.
thanks,
--J
Quote from: joffers on January 19, 2016, 06:56:51 PM
Hi -
I'm using the Radiohead library with the MoteinoMega/RF95 Lora (915 mhz) boards to implement a longish range mobile mesh network. So far so good - several radios moving around in/out of range and things work well. My next iteration attempts to dynamically assign a radio ID using a random number generated in setup() vs. assigning them at compile time (hard to scale things this way but certainly doable).
Currently Radiohead supports 1-octet radio addressing. That is pretty limiting - it's hard to create a random number in that space. A brief back and forth with Mike C. over a Radiohead said that he implemented it that way because *most* radio hardware only allows a single octet addressing scheme (in the packet I assume).
He was unsure if the rh95 would support something different. I can change the Radiohead libraries to support what I want - but I'm unsure if the rh95 radio packets would allow me to create a 4 or 5 digit number as a radio ID.
Possible?
Limitations?
I'm a reasonably good c/c++ but I'm not deeply skilled in rf.
thanks,
--J
One byte (octet) gives you a total of 256 possible node ID's. Often times out of convention one of these is reserved as a "broadcast" address so you typically get 255 nodes. How many do you need?
When you say it's hard to create a random number in that space, do you mean actually coming up with the code, or the fact that it's not enough nodes for you?
@syrinxtech
Thanks for the quick reply. You are correct and I was under-estimating the range of the number space. 256 will work fine.
This thread can be closed.
--Jon
Glad to help Jon.
If it helps with anything, I would add that it's possible to hardwire an ID inside the payload itself. The optional FLASH MEM chips that come with Moteinos have a factory unique MAC id (8 bytes), that can be used for this purpose without a need for random generation.