1. Introduction
1.1. Project Goals
This project aims to upstream the wpanusb
and bcfserial
drivers that allow Linux to interface with the BeagleConnect Freedom as a SubGHz IEEE 802.15.4 radio gateway. Integrating these drivers into the mainline Linux kernel will eliminate the need for out-of-tree patches and simplify long-term maintenance and support.
To be accepted upstream, the current drivers and firmware need significant improvements. Key gaps identified include:
- Missing driver operations in
wpanusb.c
, such as Listen Before Talk (LBT) and frame retry configuration, which currently exist only as incomplete sketches.
- Lack of firmware support for the above operations; they need to be implemented and properly connected to Zephyr's
radio_api
.
- No mechanism to retrieve the device's permanent extended address, which Linux requires for proper network identification.
- Static, hard-coded configurations in the Linux driver for radio parameters like band, supported channels, power levels, and channel pages, which should instead be dynamically queried from the firmware.
- No handling yet for new IEEE 802.15.4 features being added in the Linux stack, such as management frames, and active/passive scanning, all of which require firmware support to be effective.
1.2. Scope
This document provides:
- A systematic audit of hard-coded parameters within
wpanusb.c
and bcfserial.c
.
- A detailed mapping of the communication flow between the Linux drivers and the Zephyr firmware, highlighting all points where static configurations must be replaced with dynamic querying mechanisms.
- Documentation of all unimplemented IEEE 802.15.4 driver operations in
wpanusb.c
.
- A strategy for implementing dynamic querying of radio parameters (e.g., EUI-64, operational band, supported channels per page, available power levels).
- Proposed extensions to the Zephyr firmware API to support these dynamic queries and new operations.
- A detailed roadmap for integrating missing critical operations, including Listen Before Talk (LBT), frame retries, and comprehensive scanning functionalities.
- Defined data structures for exchanging device capability information.
2. Comprehensive Codebase Analysis
2.1. Systematic Audit of Hard-coded Parameters