Radiohead increase number of available addresses

Hi all,

I’m working with the RadioHead library RF95 and originally the lib allow to set address as uint8_t like you see here

bool RHReliableDatagram::sendtoWait|
(uint8_t * *buf*,
uint8_t *len*,
uint8_t *address*)

I’d like to change it and set address to uint16_t it’s easy to change it but my question is Radiohead will allow it in packet construction ? Should I only change all uint8_t address by uint16_t address ?

You will have to modify several parts of the library code to do that.

Why do you think you need more that 255 addresses?

Yep but should I only change uint8_t address and uint8_t from?

I need more than 255 because all my adresses start from 1500 and I can’t change it. The address coming from another code and I receive the address by serial and all addresses starting from 1500 this why I need uint16_t

Of course you can. Subtract 1500 and use the remainder in RadioHead.

Or use some other operation, like a lookup table, that maps 16 bit addresses to unique 8 bit addresses.

Revert back to the original address on the receiving end. People do this all the time.

Ok but if I got 1825 it’s doesn’t works and it’s possible or I can have 1925 for example.
And I can’t do minus 1800 and minus 1900 because it will result at the same address

Before you spout objections, read all of a post. Are three lines of text too many for you?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.