Rfm9x 'flags' values

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Rcayot
 
Posts: 321
Joined: Sat Feb 08, 2020 6:48 pm

Rfm9x 'flags' values

Post by Rcayot »

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

User avatar
jerryn
 
Posts: 1868
Joined: Sat Sep 14, 2013 9:05 am

Re: Rfm9x 'flags' values

Post by jerryn »

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

User avatar
Rcayot
 
Posts: 321
Joined: Sat Feb 08, 2020 6:48 pm

Re: Rfm9x 'flags' values

Post by Rcayot »

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

User avatar
jerryn
 
Posts: 1868
Joined: Sat Sep 14, 2013 9:05 am

Re: Rfm9x 'flags' values

Post by jerryn »

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 "

User avatar
Rcayot
 
Posts: 321
Joined: Sat Feb 08, 2020 6:48 pm

Re: Rfm9x 'flags' values

Post by Rcayot »

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

User avatar
jerryn
 
Posts: 1868
Joined: Sat Sep 14, 2013 9:05 am

Re: Rfm9x 'flags' values

Post by jerryn »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”