Skip to content

Conversation

@tyler-potyondy
Copy link

@tyler-potyondy tyler-potyondy commented Dec 16, 2025

IEEE 802.15.4 Examples and API Fixes

This PR updates the libtock-rs 15.4 API to account for the Phy/Standard 15.4 drivers in the kernel.

For context, the kernel has two 15.4 driver interfaces (that are mutually exclusive): a standard 15.4 driver and a Phy driver. The standard driver accepts payloads and forms the frame (adding headers, handling encryption, etc.). The Phy driver takes a buffer and transmits this buffer without modification.

The existing 15.4 API uses the standard driver. However, this driver does not expose functionality for things such as setting the channel or tx power (resulting in the errors in #586).

Changes

  • Update 15.4 API to include transmit "raw" (using Phy driver).
  • Remove set channel / tx power from standard examples.
  • Add a "tx_raw" example.
  • Adds some more debug prints to the examples.

TODO

  • I only have one board with me currently so I need to test tx/rx functionality together with two boards. I'll ping once this is ready to merge on my end.
  • We should integrate the libtock-rs 15.4 examples into the 15.4/OpenThread Nightly CI test.

The kernel exposese two 15.4 drivers, a standard driver and a phy
driver. The standard driver takes a payload and other fields and forms
the headers/handles encryption. The phy driver transmits "raw" payloads.

- Update naming of examples / functions to specify using raw interface.
@tyler-potyondy
Copy link
Author

I realized that the existing libtock-rs implementation explicitly only uses the Phy kernel driver. I updated the PR to only mention/use the Phy interface and more explicitly call out this as the "raw" transmit. Does there exist a README with documentation on the examples?

@brghena brghena added the blocked Blocked on promised changes or other PRs label Dec 17, 2025
brghena
brghena previously approved these changes Dec 17, 2025
The ieee802154_rx_raw and ieee802154_rx_tx apps expect a packet of the
form "frame XXXX" where XXXX encodes the frame number using the last
four bytes.

This fixes the parsing logic to correctly display this information.
@tyler-potyondy
Copy link
Author

tyler-potyondy commented Dec 17, 2025

I've confirmed that the ieee802154_rx_raw, ieee802154_rx_raw, and ieee802154_rx_tx_raw tests are working.

When testing, I noticed some issues with the parsing logic (which have now been fixed). Should be good to merge on my end. I see some CI failures, but those look like they are not relevant to me?

@brghena brghena removed the blocked Blocked on promised changes or other PRs label Dec 18, 2025
@lschuermann
Copy link
Member

Hm, it really looks like we ought to have a Cargo.lock in this repository as well, @jrvanwhy?

error: rustc 1.88.0 is not supported by the following packages:
  smol_str@0.3.4 requires rustc 1.89
  typed-index-collections@3.4.0 requires rustc 1.90.0

@jrvanwhy
Copy link
Collaborator

Hm, it really looks like we ought to have a Cargo.lock in this repository as well, @jrvanwhy?

error: rustc 1.88.0 is not supported by the following packages:
  smol_str@0.3.4 requires rustc 1.89
  typed-index-collections@3.4.0 requires rustc 1.90.0

Or upgrade to edition 2024.

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.

4 participants