Hello everyone!
I’m Manas, I’ll be working on the project upstream wpanusb bcfserial as part of Google Summer of Code 2025, under the guidance of my mentors @vaishnav @ayush1325 and @Vedant_Paranjape
The goal of this project is to upstream the wpanusb and bcfserial drivers, which are essential for enabling Linux-based systems (like BeagleConnect Freedom) to act as Sub-GHz IEEE802.15.4 gateways. These drivers currently live outside the mainline kernel and have several known functional gaps. My work this summer will involve:
- Adding missing driver ops (e.g., Listen Before Talk, frame retries, etc.)
- Implementing the corresponding firmware-side logic in Zephyr
- Enabling Linux to query key radio parameters (band, power, supported channels)
- Supporting dynamic reading of the extended address
- Laying the groundwork for Zigbee and multi-band (2.4GHz/SubGHz) support
This thread will serve as my weekly devlog, where I’ll document:
- What I accomplished each week
- Current roadblocks and how I’m addressing them
- Any unresolved blockers or tricky issues
- Plans and goals for the upcoming week
I’ll also be using this space to share relevant patches, RFCs, and discussions with the upstream kernel and linux-wpan communities.
Please feel free to chime in with feedback, suggestions, or just drop by to follow the progress. I’m really excited to contribute and collaborate with the broader community this summer!
Looking forward to a challenging and rewarding journey ahead!
Warm regards,
Manas Gupta
1 Like
Week 0
Accomplishments
- Engaged with mentors for feedback and discussion regarding approach, and timeline finalization
- Acquired the BeagleConnect Freedom hardware, the primary development platform
- Initiated a systematic audit of
wpanusb.c
and bcfserial.c
to identify hard-coded parameters, mapping the communication flow between Linux drivers and Zephyr firmware and document unimplemented driver operations LINK : https://www.notion.so/GSoC-25-upstream-wpanusb-bcfserial-blog-20560fe7db43801b8cb0f44fc375a927?source=copy_link
I’ll work on converting this into a blog website
- Studied IEEE 802.15.4 specifications and analyzed Zephyr’s
radio_api
implementation to understand extension points
- Started configuring the ARM cross-compilation environment for BeagleConnect Freedom targets
- Installed and configured the
b4
tool to streamline interactions with Linux kml
- Delivered a detailed design document outlining the dynamic configuration strategy
- Recorded and published an introductory YouTube video summarizing project goals and design. link: hi all, I’ve made a introductory video. link here: https://www.youtube.com/watch?v=MP_S028ihf4
Resolution to Blockers
- Hardware Acquisition: The BeagleConnect Freedom hardware, has been acquired. This unblocks tasks dependent on the physical hardware.
Ongoing Blockers
- Hardware Setup Completion & Familiarization: The complete setup of the BeagleConnect Freedom development environment and thorough familiarization is still in progress. This is necessary before intensive hardware-specific development and testing can fully commence.
Plans for Next Week
- Implement prototype enhancements in the Linux drivers:
- Implement the basic structure for Listen Before Talk (LBT) in both
wpanusb
and bcfserial
drivers, including parameter validation in wpanusb_set_lbt()
and preparing the parameter passing mechanism.
- Add the framework for the frame retry mechanism, updating
wpanusb_set_frame_retries()
and implementing equivalent functionality in bcfserial
.
- Replace hard-coded power arrays with placeholder query functions.
- Develop unit tests to validate these new functionalities.
- Set up CI/CD pipelines for automated testing of code changes.
- Run existing drivers with diagnostic logging to establish a baseline for current functionality.
- Document all current limitations with specific code references.
- Define data structures for device capability information.
- Create a detailed mapping of required new firmware API functions (e.g.,
get_ext_address()
, get_band()
, get_supported_channels()
) to the corresponding Linux driver routines.
- Outline where and how these API calls will be incorporated into driver initialization and configuration.
- Share the updated design specification with mentors for feedback.
Feel free to share any suggestions or feedback. Looking forward to an exciting and productive journey with you all!
1 Like
Week 4 & 5
Accomplishments
Implemented 6 critical driver functions that were previously non-functional:-
-
wpanusb_set_frame_retries() - Removed FIXME comment, added proper IEEE 802.15.4 validation (0-7 retries)
-
wpanusb_set_txpower() - Replaced -ENOTSUPP with full implementation including power level validation against device capabilities
-
wpanusb_set_cca_mode() - Completed empty switch cases, added real USB communication for all CCA modes (Energy/Carrier/Both)
-
wpanusb_set_cca_ed_level() - Replaced stub implementation with real energy detection level
-
settingwpanusb_set_csma_params() - Added IEEE 802.15.4 parameter validation and real USB
-
communicationwpanusb_set_promiscuous_mode() - Implemented real boolean enable/disable functionality
Outlined comprehensive test plan for end-to-end validation covering:
- LBT (Listen Before Talk) testing scenarios
- Frame retry mechanism validation
Resolution to Blockers
- Coding the handlers for commands mentioned in Zephyr firmware and the missing extended address and capability queries
Ongoing Blockers
- hardware testing, integration testing and protocol testing is pending
- implementation of usbvendor request handlers
Plans for Next Week.
- Set up CI/CD pipelines for automated testing of code changes for all 3 repos: wpanusb, wpanusb_bc and the bcfserial repo
- end to end usb testing between the linux host and the firmware
Week 10
Accomplishments
Maintainer Feedback Integration & Architecture Analysis
- Received valuable responses from WPAN kernel maintainers and analyzed their requirements
- Confirmed SoftMAC Architecture: Validated that timing-critical MAC operations (AACK/ARET) are properly split between firmware (PHY) and Linux driver (MAC layer) as required
- Comprehensive Driver Implementation: Completed 1,337 lines of production-quality kernel code with 9 MAC operations fully implemented
- Advanced Capability System: Dynamic capability discovery system (more sophisticated than existing 802.15.4 drivers) working with device validation and fallback mechanisms
I’ve been working simultaneously on all maintainer-requested components:
- Generic Framework Design: Architected atusb-style generic layer to enable multiple SoftMAC transceiver support
- HCI-like Protocol Enhancement: Enhanced existing structured protocol with standardized headers, async events, and version negotiation
- Virtual Testing Infrastructure: Designed virtual USB-serial backend connecting to mac802154_hwsim for hardware-independent CI/CD testing
Resolution to Blockers
- USB Protocol Issues: RESOLVED - Fixed control pipe bugs and USB table syntax errors
- Dynamic Capability Discovery: RESOLVED - Replaced all hardcoded parameters with comprehensive device querying system
Ongoing Blockers
- Framework Implementation Gap: Generic abstraction layer, virtual testing backend, and formal documentation require implementation (identified as critical for kernel acceptance)
- Zephyr Firmware Build: some West build errors still present
- Hardware Testing: Physical BeagleConnect Freedom validation pending for complete protocol verification
Plans for Next Week
-
Extract common USB 802.15.4 functionality into wpan_usb_core.c
-
Make device-specific components pluggable for multiple transceiver support
-
try Implement virtual USB device using dummy_hcd
-
Create protocol bridge to mac802154_hwsim for CI/CD integration
-
start preparing the patches for submission and tesitng
Goal: Address maintainer requirements for generic architecture and testing infrastructure.
1 Like