Zephyr: Add network module with WLAN/LAN configuration support. - #18205
Draft
bikeNomad wants to merge 1 commit into
Draft
Zephyr: Add network module with WLAN/LAN configuration support.#18205bikeNomad wants to merge 1 commit into
bikeNomad wants to merge 1 commit into
Conversation
Add new network module providing standard MicroPython network API for configuring WiFi and Ethernet interfaces on Zephyr RTOS. This enables interface activation, connection management, and IP configuration. Features: - network.WLAN class for WiFi configuration (connect, disconnect, status) - network.LAN class for Ethernet configuration - ifconfig() method returns IP, netmask, gateway, and DNS server - Event-driven connection status tracking via Zephyr net_mgmt - DHCP support with fallback DNS configuration Files modified: - ports/zephyr/modnetwork.c (new) - ports/zephyr/modsocket.c (major refactoring) - ports/zephyr/mpconfigport.h - ports/zephyr/CMakeLists.txt - ports/zephyr/main.c - ports/zephyr/prj.conf 🤖 Generated with the help of [Claude Code](https://claude.com/claude-code) Signed-off-by: Ned Konz <ned@metamagix.tech>
bikeNomad
force-pushed
the
zephyr/add-network-module
branch
from
October 4, 2025 02:58
f5b5121 to
0fd2264
Compare
bikeNomad
marked this pull request as draft
October 7, 2025 23:09
Contributor
Author
|
I'm still working on getting this complete and passing the tests. |
Member
|
This is great! But please make sure it matches the existing API, in particular:
|
Contributor
|
Hello, what is the status of this? I am looking at implementing WLAN for Bouffalolab boards |
Contributor
Author
|
@VynDragon I haven't had a chance to work on it any more since then; sorry. |
Contributor
|
Alright, I'll try coming up with something for WLAN |
Contributor
|
@bikeNomad #19666 Check this out, would appreciate if you tested and extended it with LAN support. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new network module providing standard MicroPython network API for configuring WiFi and Ethernet interfaces on Zephyr RTOS. This enables interface activation, connection management, and IP configuration.
Although there was a socket module, it was impossible to use sockets in a real board because of the lack of a network module allowing control of Ethernet and Wifi hardware.
Features:
Files modified:
Testing
I've tested this on my MIMXRT1020_EVK board using its Ethernet interface. I haven't had a chance to make a board configuration for a wifi-enabled board yet (I have Rpi Pico W boards available).
Trade-offs and Alternatives
This PR (on the MIMXRT1020_EVK, with -Og optimization) adds: