Skip to content

Allow access to RadioHead packet headers #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 4 commits into from
Nov 19, 2018
Merged

Allow access to RadioHead packet headers #12

merged 4 commits into from
Nov 19, 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.

@ladyada
Copy link
Member

ladyada commented Nov 19, 2018

thanks @jerryneedell - just to check, do our existing examples still work asis or do they need updating?

@jerryneedell
Copy link
Contributor Author

@ladyada the existing rfm69_simpletest.py works as is. No changes necessary.

@ladyada
Copy link
Member

ladyada commented Nov 19, 2018

ok thanks - looks good to me! ill merge, do you wanna add more PR's or shall we do a release?

@ladyada ladyada merged commit c184cb3 into adafruit:master Nov 19, 2018
@jerryneedell
Copy link
Contributor Author

That's all I planned for now -- Ok to release as far as I am concerned.

@ladyada
Copy link
Member

ladyada commented Nov 19, 2018

aweosme - if you can, please do a release at your convenience :)

@jerryneedell jerryneedell deleted the jerryn_header branch November 19, 2018 18:57
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 20, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_74HC595 to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_74HC595#2 from kattni/pypi-setup

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPR121 to 2.0.0 from 1.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPR121#14 from caternuson/iss12

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 1.2.3 from 1.2.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#12 from jerryneedell/jerryn_header

Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 2.2.7 from 2.2.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#22 from pdp7/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_74HC595
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