Improved L2/L3 decoupling in IEEE 802.15.4 stack


I'm currently trying to implement a non-IP custom protocol on top of zephyr's IEEE 802.15.4 MAC (L2) layer.

This requires me to...

1) implement additional 802.15.4 MAC service primitives from the 2015 standard, namely (some aspects of) RIT and/or TSCH,

2) rely on already implemented L2-features like CSMA plus most of the existing management commands, but

3) not depend on any IP-only features like 6LoWPAN.

While analyzing zephyr's source code with this goal in mind I realized that:

1) There are IEEE 802.15.4 "RAW" and "CUSTOM" L2 modes. Unfortunately both seem to exclude most of zephyr's generic IEEE 802.15.4 MAC implementation in [1] including those parts I'd like to re-use.

2) Parts of the IEEE 802.15.4 L2 implementation are coupled to IP-specific L3 concerns - namely 6LoWPAN fragmentation and header compression. This breaks L2 re-usability and encapsulation in my case.

3) There are some hurdles to overcome in order to add additional service primitives to the MAC layer:
* The "*_IEEE802154_RADIO_*" constants in and some L2
structs mix up PHY and MAC concerns.
* The internal L2/L1-API makes only partial or indirect reference to
IEEE 802.15.4 PHY/MAC service primitives. This is probably partially
required to maintain a common API across zephyr's L2
implementations. Nevertheless there seem to be a few opportunities
to improve readability, standards compliance and extensibility of
the stack while I'm on it.
* Some of the existing services are not yet fully 2015-standards

Rather than patching zephyr locally, I'd prefer to contribute some of the more generic changes upstream.

It's just a weekend project on my part but I'm used to provide small iterative patches. I'd like to start with some low hanging fruits and let it grow as my availability allows.

*One thing that seems to be rather easy to achieve is improved L2/L3 decoupling by factoring 6LoWPAN aspects into conditionally included files.*

* Would such a first contribution be welcome?

* Would someone from the zephyr dev team be available as a sparrings partner to discuss architecture and integration issues?

* Some of my requirements are addressed in or related to [2]. Who owns these issues? Would these people be interested in collaborating?

Kind regards,




[2] (802.15.4 Soft MAC 2015 version support)

Join { to automatically receive all group messages.