Skip to content

Conversation

@ianic
Copy link
Contributor

@ianic ianic commented Jan 26, 2026

This adds few more features to the rpi pico WiFi driver:

  • WiFi networks scan
  • interrupt mode
  • non blocking (polling) option for join
  • reporting link state (up/down) to the lwip

There are two new examples:

  • scan lists available WiFi networks
  • irq shows how to use interrupt mode, interrupt is fired when there is data packet to read from cyw43

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Lint Results

Found 1 issue on changed lines in 1 file:

  • drivers/wireless/cyw43439/ioctl.zig: 1 issue

@ianic ianic marked this pull request as draft January 27, 2026 13:43
ianic added 16 commits January 27, 2026 20:23
Besides blocking wifi join we can now poll for the join status while
still have option to do another work between polls.
During join and later in recv. We can now detect disconnect, reconnect
and set connected state.
Make them both return has more flag.
2 + len when len is u8 can overflow
Handle scan/join in the same function. Add join_state and scan_result
to the main struct.
Fix todo: move country option to init.
Rename methods, join and scan are no blocking returning poller. Blocking
join is now join_wait.
Report status after init, not also during init. Remember last status and
de-duplicate. Remove error log which is also passed to the application.
Use that state to set lwip link up/down.
Handling cyw43 data packet receive interrupts.
vtable is `*const Vtable` making it runtime known makes that local
variable. Making it comptime known const.
Partially reverting changes from ZigEmbeddedGroup#861.

Macros set on net module are not visible when building lwip. For example
setting `net_mod.addCMacro("MEM_ALIGNMENT", "4");` gets lwip build with
default 1 of MEM_ALIGNMENT. Changed to setting that on lwip module
instead of net module. Later I also copied that to the net module
because it is needed when using cImport in net package. Without that
it also gets default if I check `lwip.MEM_ALIGNMENT` somewhere in
src/root.zig.
Suggested by lint results.
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.

1 participant