7 releases (breaking)

Uses new Rust 2024

0.6.0 Nov 27, 2025
0.5.0 Aug 28, 2025
0.4.1 Aug 27, 2025
0.4.0 Jul 15, 2025
0.0.0 Mar 7, 2023

#2594 in Embedded development

Download history 1149/week @ 2025-10-17 1107/week @ 2025-10-24 1219/week @ 2025-10-31 773/week @ 2025-11-07 1010/week @ 2025-11-14 1187/week @ 2025-11-21 1227/week @ 2025-11-28 1085/week @ 2025-12-05 1475/week @ 2025-12-12 558/week @ 2025-12-19 332/week @ 2025-12-26 631/week @ 2026-01-02 972/week @ 2026-01-09 608/week @ 2026-01-16 582/week @ 2026-01-23 414/week @ 2026-01-30

2,679 downloads per month
Used in 4 crates

MIT/Apache

600KB
12K SLoC

cyw43

Rust driver for the CYW43439 wifi+bluetooth chip. Implementation based on Infineon/wifi-host-driver.

Works on the following boards:

  • Raspberry Pi Pico W (RP2040)
  • Raspberry Pi Pico 2 W (RP2350A)
  • Pimoroni Pico Plus 2 W (RP2350B)
  • Any board with Raspberry Pi RM2 radio module.
  • Any board with the CYW43439 chip, and possibly others if the protocol is similar enough.

Features

Working:

  • WiFi support
    • Station mode (joining an AP).
    • AP mode (creating an AP)
    • Scanning
    • Sending and receiving Ethernet frames.
    • Using the default MAC address.
    • embassy-net integration.
    • RP2040 PIO driver for the nonstandard half-duplex SPI used in the Pico W.
    • Using IRQ for device events, no busy polling.
    • GPIO support (for LED on the Pico W).
  • Bluetooth support
    • Bluetooth Classic + LE HCI commands.
    • Concurrent operation with WiFi.
    • Implements the bt-hci controller traits.
    • Works with the TrouBLE bluetooth LE stack. Check its repo for examples using cyw43.

Running the WiFi examples

  • Install probe-rs following the instructions at https://probe.rs.
  • cd examples/rp

Example 1: Scan the wifi stations

  • cargo run --release --bin wifi_scan

Example 2: Create an access point (IP and credentials in the code)

  • cargo run --release --bin wifi_ap_tcp_server

Example 3: Connect to an existing network and create a server

  • cargo run --release --bin wifi_tcp_server

After a few seconds, you should see that DHCP picks up an IP address like this

11.944489 DEBUG Acquired IP configuration:
11.944517 DEBUG    IP address:      192.168.0.250/24
11.944620 DEBUG    Default gateway: 192.168.0.33
11.944722 DEBUG    DNS server 0:    192.168.0.33

This example implements a TCP echo server on port 1234. You can try connecting to it with:

nc 192.168.0.250 1234

Send it some data, you should see it echoed back and printed in the firmware's logs.

Dependencies

~2.4–3.5MB
~59K SLoC