diff options
| -rw-r--r-- | README.md | 13 |
1 files changed, 7 insertions, 6 deletions
| @@ -21,27 +21,28 @@ TODO: | |||
| 21 | - Setting a custom MAC address. | 21 | - Setting a custom MAC address. |
| 22 | - Bus sleep (unclear what the benefit is. Is it needed for IRQs? or is it just power consumption optimization?) | 22 | - Bus sleep (unclear what the benefit is. Is it needed for IRQs? or is it just power consumption optimization?) |
| 23 | 23 | ||
| 24 | ## Running the example | 24 | ## Running the examples |
| 25 | 25 | ||
| 26 | - `cargo install probe-rs-cli` | 26 | - `cargo install probe-rs-cli` |
| 27 | - `cd examples/rpi-pico-w` | 27 | - `cd examples/rpi-pico-w` |
| 28 | ### Example 1: Scan the wifi stations | ||
| 29 | - `cargo run --release --bin wifi_scan` | ||
| 30 | ### Example 2: Create an access point (IP and credentials in the code) | ||
| 31 | - `cargo run --release --bin tcp_server_ap` | ||
| 32 | ### Example 3: Connect to an existing network and create a server | ||
| 28 | - `WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release` | 33 | - `WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release` |
| 29 | 34 | ||
| 30 | After a few seconds, you should see that DHCP picks up an IP address like this | 35 | After a few seconds, you should see that DHCP picks up an IP address like this |
| 31 | |||
| 32 | ``` | 36 | ``` |
| 33 | 11.944489 DEBUG Acquired IP configuration: | 37 | 11.944489 DEBUG Acquired IP configuration: |
| 34 | 11.944517 DEBUG IP address: 192.168.0.250/24 | 38 | 11.944517 DEBUG IP address: 192.168.0.250/24 |
| 35 | 11.944620 DEBUG Default gateway: 192.168.0.33 | 39 | 11.944620 DEBUG Default gateway: 192.168.0.33 |
| 36 | 11.944722 DEBUG DNS server 0: 192.168.0.33 | 40 | 11.944722 DEBUG DNS server 0: 192.168.0.33 |
| 37 | ``` | 41 | ``` |
| 38 | 42 | This example implements a TCP echo server on port 1234. You can try connecting to it with: | |
| 39 | The example implements a TCP echo server on port 1234. You can try connecting to it with: | ||
| 40 | |||
| 41 | ``` | 43 | ``` |
| 42 | nc 192.168.0.250 1234 | 44 | nc 192.168.0.250 1234 |
| 43 | ``` | 45 | ``` |
| 44 | |||
| 45 | Send it some data, you should see it echoed back and printed in the firmware's logs. | 46 | Send it some data, you should see it echoed back and printed in the firmware's logs. |
| 46 | 47 | ||
| 47 | ## License | 48 | ## License |
