From 38990d093ffc8335c29e19791c86585de46d227f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Wed, 29 Nov 2023 14:43:28 +0100 Subject: [PATCH] Some feature/README-related cleanup (#368) * Clean up embedded-svc feature remnants * Improve serial jtag section * Improve feature descriptions --- esp-wifi/README.md | 38 ++++++++++++++++++++------------------ esp-wifi/docs/examples.md | 16 ++++++++-------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/esp-wifi/README.md b/esp-wifi/README.md index 7bdf52c4b24..3f39d22986b 100644 --- a/esp-wifi/README.md +++ b/esp-wifi/README.md @@ -60,34 +60,36 @@ Within this crate, `CCOMPARE0` CPU timer is used for timing, ensure that in your ## USB-SERIAL-JTAG -When using USB-SERIAL-JTAG you have to activate the feature `phy-enable-usb`. +When using USB-SERIAL-JTAG (for example by selecting `jtag-serial` in [`esp-println`](https://crates.io/crates/esp-println)) you have to activate the feature `phy-enable-usb`. -Don't use this feature if your are _not_ using USB-SERIAL-JTAG since it might reduce WiFi performance. +Don't use this feature if your are _not_ using USB-SERIAL-JTAG as it might reduce WiFi performance. ## Features | Feature | Meaning | | -------------- | ---------------------------------------------------------------------------------------------------- | -| wifi-logs | logs the WiFi logs from the driver at log level info | -| dump-packets | dumps packet info at log level info | +| wifi-logs | logs the WiFi logs from the driver at log level `info` | +| dump-packets | dumps packet info at log level `info` | | smoltcp | Provide implementations of `smoltcp` traits | -| utils | Provide utilities for smoltcp initialization; adds `smoltcp` dependency | +| utils | Provide utilities for smoltcp initialization. Adds `smoltcp` dependency | | ble | Enable BLE support | | wifi | Enable WiFi support | -| esp-now | Enable esp-now support | -| coex | Enable coex support | -| ipv4 | IPv4 support: includes `utils` feature | -| ipv6 | IPv6 support: includes `utils` feature | -| tcp | TCP socket support: includes `ipv4` feature | -| udp | UDP socket support: includes `ipv4` feature | -| igmp | IGMP (multicast) support: includes `ipv4` feature | -| dns | DNS support: includes `udp` feature | -| dhcpv4 | DHCPv4 support, both creating sockets and autoconfiguring network settings: includes `utils` feature | -| phy-enable-usb | See _USB-SERIAL-JTAG_ below | -| ps-min-modem | Enable minimum modem sleep. Only for STA mode | -| ps-max-modem | Enable maximum modem sleep. Only for STA mode | +| esp-now | Enable [esp-now](https://www.espressif.com/en/solutions/low-power-solutions/esp-now) support | +| coex | Enable WiFi-BLE coexistence support | +| ipv4 | IPv4 support. Includes `utils` feature | +| ipv6 | IPv6 support. Includes `utils` feature | +| tcp | TCP socket support. Includes `ipv4` feature | +| udp | UDP socket support. Includes `ipv4` feature | +| igmp | IGMP (multicast) support. Includes `ipv4` feature | +| dns | DNS support. Includes `udp` feature | +| dhcpv4 | DHCPv4 support, both creating sockets and autoconfiguring network settings. Includes `utils` feature | +| phy-enable-usb | See [USB-SERIAL-JTAG](#usb-serial-jtag) above | +| ps-min-modem | Enable minimum modem sleep. Only affects STA mode | +| ps-max-modem | Enable maximum modem sleep. Only affects STA mode | | log | Route log output to the `log` crate | -| defmt | Add `defmt::Format` implementation | +| defmt | Add `defmt::Format` implementation and output logs via `defmt` | + +Note that not all features are available on every MCU. For example, `ble` (and thus, `coex`) is not available on ESP32-S2. When using the `dump-packets` feature you can use the extcap in `extras/esp-wifishark` to analyze the frames in Wireshark. For more information see [extras/esp-wifishark/README.md](../extras/esp-wifishark/README.md) diff --git a/esp-wifi/docs/examples.md b/esp-wifi/docs/examples.md index 5b934cc81e4..b8bd5c58039 100644 --- a/esp-wifi/docs/examples.md +++ b/esp-wifi/docs/examples.md @@ -15,7 +15,7 @@ cargo esp32c3 --release ... - gets an ip address via DHCP - performs an HTTP get request to some "random" server -`cargo $CHIP --example dhcp --release --features "embedded-svc,wifi"` +`cargo $CHIP --example dhcp --release --features "wifi"` ### static_ip @@ -25,7 +25,7 @@ cargo esp32c3 --release ... - uses the given static IP - responds with some HTML content when connecting to port 8080 -`cargo $CHIP --example static_ip --release --features "embedded-svc,wifi"` +`cargo $CHIP --example static_ip --release --features "wifi"` ### ble @@ -54,7 +54,7 @@ cargo esp32c3 --release ... - does BLE advertising - coex support is still somewhat flaky -`cargo $CHIP --example coex --release --features "embedded-svc,wifi,ble"` +`cargo $CHIP --example coex --release --features "wifi,ble"` **NOTE:** Not currently available for the ESP32, ESP32-C2, ESP32-C6 or ESP32-S2 @@ -80,7 +80,7 @@ cargo esp32c3 --release ... - Read and Write to sockets over WiFi asyncronously using embassy-executor. -`cargo $CHIP --example embassy_dhcp --release --features "async,embedded-svc,wifi,embassy-net"` +`cargo $CHIP --example embassy_dhcp --release --features "async,wifi,embassy-net"` ### access_point @@ -89,7 +89,7 @@ cargo esp32c3 --release ... - open http://192.168.2.1:8080/ in your browser - on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping` -`cargo $CHIP --example access_point --release --features "embedded-svc,wifi"` +`cargo $CHIP --example access_point --release --features "wifi"` ### access_point_with_sta @@ -100,7 +100,7 @@ cargo esp32c3 --release ... - open http://192.168.2.1:8080/ in your browser - the example will perform an HTTP get request to some "random" server - on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping` -`cargo $CHIP --example access_point_with_sta --release --features "embedded-svc,wifi"` +`cargo $CHIP --example access_point_with_sta --release --features "wifi"` ### embassy_access_point @@ -109,7 +109,7 @@ cargo esp32c3 --release ... - open http://192.168.2.1:8080/ in your browser - on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping` -`cargo $CHIP --example embassy_access_point --release --features "async,embedded-svc,wifi,embassy-net"` +`cargo $CHIP --example embassy_access_point --release --features "async,wifi,embassy-net"` ### embassy_access_point_with_sta @@ -120,7 +120,7 @@ cargo esp32c3 --release ... - open http://192.168.2.1:8080/ in your browser - the example will perform an HTTP get request to some "random" server - on Android you might need to choose _Keep Accesspoint_ when it tells you the WiFi has no internet connection, Chrome might not want to load the URL - you can use a shell and try `curl` and `ping` -`cargo $CHIP --example embassy_access_point_with_sta --release --features "async,embedded-svc,wifi,embassy-net"` +`cargo $CHIP --example embassy_access_point_with_sta --release --features "async,wifi,embassy-net"` ## Benchmarking