Git Product home page Git Product logo

cyw43's Introduction

ARCHIVED - moved into the main Embassy repo https://github.com/embassy-rs/embassy

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

TODO:

  • Setting a custom MAC address.
  • Bus sleep (unclear what the benefit is. Is it needed for IRQs? or is it just power consumption optimization?)

Running the examples

  • cargo install probe-rs-cli
  • cd examples/rpi-pico-w

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 tcp_server_ap

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

  • 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

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.

License

This work is licensed under either of

at your option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.