Skip to content

Add access to RadioHead header #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2018
Merged

Add access to RadioHead header #12

merged 1 commit into from
Nov 25, 2018

Conversation

jerryneedell
Copy link
Contributor

The user may optionally set and receive the 4 byte RadioHead packet header.
I think this mimics the behavior of the Arduino implementation.
The default is to ignore the header as in the past.

On transmit, the user may provide a keyword argument: tx_header with a 4-tuple of bytes.
tx_header = (To,From,ID,Flags)
to set the outgoing header.

On receive, the user can request that the packet header be included at the beginning of the packet via a keyword argument: with_header.
If set to True, the header will be included as the first 4 bytes of the packet and the data payload begins at byte 4.
Also, the user may specify a keyword argument: rx_filter to reject any "non-broadcast" packets not addressed as specified. A "broadcast" message contains 0xff as the To address. Broadcast messages are always received.
If rx_filter is set to a value other than 0xff, then incoming packets with the To field not matching the rx_filter will be ignored unless the To field contains 0xff.
If rx_filter is set to 0xff then all packets are accepted.

Same implementation as for RFM69 adafruit/Adafruit_CircuitPython_RFM69#12

Tested on feather_m0_express with RFM9x_breakout and on Raspberry Pi 3B+ with RFM9x Featherwing

@ladyada ladyada merged commit c757c27 into adafruit:master Nov 25, 2018
@ladyada
Copy link
Member

ladyada commented Nov 25, 2018

looks good to me, want to bump release?

tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants