Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

Rfm9x 'flags' values
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Rfm9x 'flags' values

by Rcayot on Wed Jan 26, 2022 10:51 am

Simple question,

What values can you set the 'flags' 4 bits to? 0-3 seems to work but other values, I am having trouble. Is it me or the flags values are limited?

Thanks in advance.

Roger

Rcayot
 
Posts: 229
Joined: Sat Feb 08, 2020 6:48 pm

Re: Rfm9x 'flags' values

by jerryn on Wed Jan 26, 2022 12:02 pm

Can you provide some examples of the problem?
It is a 4 bit value so anything form 0-15 should be OK.

jerryn
 
Posts: 1719
Joined: Sat Sep 14, 2013 9:05 am

Re: Rfm9x 'flags' values

by Rcayot on Wed Jan 26, 2022 1:54 pm

Thanks Jerry.

I reworked the problem and now 1-4 works. I don't know what went wrong initially.

However, interestingly, when I used a flag of zero, the recieving program barfed all over the startup message when trying to process it, that is why I went to 1-4.

Thanks again.

Roger

Rcayot
 
Posts: 229
Joined: Sat Feb 08, 2020 6:48 pm

Re: Rfm9x 'flags' values

by jerryn on Wed Jan 26, 2022 2:59 pm

The issue with 0 sounds odd, I'll try to reproduce it.
Just curious, how are you setting the flags:
passing as an argument to rfm9x.send(....,flags=x)
or via the property "rfm9x.flags=x "

jerryn
 
Posts: 1719
Joined: Sat Sep 14, 2013 9:05 am

Re: Rfm9x 'flags' values

by Rcayot on Wed Jan 26, 2022 4:15 pm

Using rfm9x.flags=x

Then recieve flag=packet[3]

Then if flag == to test.

The packets are data from a remote BME.280 from. Pico with rfm9x breakout, recieved by a RPI-4b with rfm9x bonnet.

I think the "startup message from node x" is sent by default with header perhaps. Is an easy workaround just not using a flag of zero.



Roger

Rcayot
 
Posts: 229
Joined: Sat Feb 08, 2020 6:48 pm

Re: Rfm9x 'flags' values

by jerryn on Thu Jan 27, 2022 10:39 am

I have not been able to reproduce any problem setting the rfm9x.flags value to anything from 0 to 15.
Can you provide more information about the issue you are having. If you could post your transmit and receive code, that would be very helpful.

jerryn
 
Posts: 1719
Joined: Sat Sep 14, 2013 9:05 am

Please be positive and constructive with your questions and comments.