Modern embedded framework, using Rust and async.
Find a file
2023-04-27 19:37:19 +02:00
.github/workflows Add CI. 2023-03-27 03:33:20 +02:00
.vscode ci: build with DEFMT_LOG=trace to catch all defmt issues. 2023-04-26 16:20:49 +02:00
cyw43-pio Update embassy 2023-04-27 19:37:19 +02:00
examples/rpi-pico-w Update embassy 2023-04-27 19:37:19 +02:00
firmware Obtain the firmware blobs from the user instead of hardcoding magic flash addrs. 2022-07-17 00:33:30 +02:00
src Update embassy 2023-04-27 19:37:19 +02:00
.gitignore Obtain the firmware blobs from the user instead of hardcoding magic flash addrs. 2022-07-17 00:33:30 +02:00
Cargo.toml Update embassy 2023-04-27 19:37:19 +02:00
ci.sh ci: build with DEFMT_LOG=trace to catch all defmt issues. 2023-04-26 16:20:49 +02:00
LICENSE-APACHE Add LICENSEs 2022-07-11 22:53:57 +02:00
LICENSE-MIT Add LICENSEs 2022-07-11 22:53:57 +02:00
README.md Switch from probe-run to probe-rs-cli. 2023-04-26 18:10:57 +02:00
rust-toolchain.toml Update embassy 2023-04-27 19:37:19 +02:00
rustfmt.toml 🌈 2022-07-10 19:45:26 +02:00

cyw43

WIP driver for the CYW43439 wifi chip, used in the Raspberry Pi Pico W. Implementation based on Infineon/wifi-host-driver.

Current status

Working:

  • Station mode (joining an AP).
  • 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
  • GPIO support (for LED on the Pico W)

TODO:

  • AP mode (creating an AP)
  • Scanning
  • Setting a custom MAC address.
  • Investigate why can this use higher PIO speed.
  • Bus sleep (unclear what the benefit is. Is it needed for IRQs? or is it just power consumption optimization?)

Running the example

  • cargo install probe-rs-cli
  • cd examples/rpi-pico-w
  • WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release

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

The 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.

License

This work is licensed under either of

at your option.