fdcavalcanti opened a new pull request, #17008:
URL: https://github.com/apache/nuttx/pull/17008
## Summary
- boards/xtensa: update board and defconfigs for Wi-Fi on ESP32|S2|S3
Updates the defconfigs and board source to support driver refactor.
- arch/xtensa: refactor Wi-Fi driver for ESP32|S2|S3
Fixes low and inconsistent bandwidth issues. Adds new configuration options
for buffer management. Moves code around to make the implementation cleaner and
easier to debug.
This PR is similar and complements the refactor of Wi-Fi for Espressif
devices as seen on #16921. Please refer to that PR for detailed changes on
architecture level.
## Impact
- Impact on user: Yes, users now have a more stable and higher throughput.
Also improved wapi function support.
- Impact on build: No.
- Impact on hardware: No.
- Impact on documentation: No.
- Impact on security: No.
- Impact on compatibility: No.
## Testing
Tested extensively on ESP32|S2|S3. Test involves wapi function usage, IPERF
test for stability and throughput, DHCP and both operating modes: Wi-Fi station
and AP.
### Building
- ./tools/configure.sh esp32s3-devkit:sta_softap
- make and flash
### Running
Many tests are used for Wi-Fi, so I won't show them all here, but would be
happy to share them if needed.
I´ll share the process for IPERF testing on AP and STA.
IPERF testing example with ESP device running as client:
```
wapi psk wlan0 espmint123 3 3
wapi essid wlan0 Nuttx-IOT 1
renew wlan0
iperf -c 192.168.0.125 -i 3 -t 60
```
For running as IPERF server, use the following instead:
- iperf -s
### Results
Connecting to AP:
```
nsh> wapi psk wlan0 espmint123 3 3
nsh> wapi essid wlan0 Nuttx-IOT 1
nsh> renew wlan0
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 58:cf:79:07:51:e8 at RUNNING mtu 1500
inet addr:192.168.0.30 DRaddr:192.168.0.1 Mask:255.255.255.0
wlan1 Link encap:Ethernet HWaddr 58:cf:79:07:51:e9 at DOWN mtu 1500
inet addr:0.0.0.0 DRaddr:0.0.0.0 Mask:0.0.0.0
```
Running IPERF client results in:
```
nsh> iperf -c 192.168.0.125 -i 3 -t 60
IP: 192.168.0.30
mode=tcp-client sip=192.168.0.30:5001,dip=192.168.0.125:5001, interval=3,
time=60
Interval Transfer Bandwidth
0.00- 3.01 sec 3276800 Bytes 8.71 Mbits/sec
3.01- 6.02 sec 3899392 Bytes 10.36 Mbits/sec
6.02- 9.03 sec 3686400 Bytes 9.80 Mbits/sec
9.03- 12.04 sec 3244032 Bytes 8.62 Mbits/sec
12.04- 15.05 sec 3702784 Bytes 9.84 Mbits/sec
15.05- 18.06 sec 3784704 Bytes 10.06 Mbits/sec
18.06- 21.07 sec 3833856 Bytes 10.19 Mbits/sec
21.07- 24.08 sec 4030464 Bytes 10.71 Mbits/sec
24.08- 27.10 sec 4210688 Bytes 11.15 Mbits/sec
27.10- 30.11 sec 4046848 Bytes 10.76 Mbits/sec
30.11- 33.12 sec 3784704 Bytes 10.06 Mbits/sec
33.12- 36.13 sec 3620864 Bytes 9.62 Mbits/sec
36.13- 39.14 sec 3719168 Bytes 9.88 Mbits/sec
39.14- 42.15 sec 3801088 Bytes 10.10 Mbits/sec
42.15- 45.16 sec 3768320 Bytes 10.02 Mbits/sec
45.16- 48.17 sec 3637248 Bytes 9.67 Mbits/sec
48.17- 51.18 sec 3670016 Bytes 9.75 Mbits/sec
51.18- 54.19 sec 3817472 Bytes 10.15 Mbits/sec
54.19- 57.20 sec 3686400 Bytes 9.80 Mbits/sec
57.20- 60.21 sec 3883008 Bytes 10.32 Mbits/sec
0.00- 60.21 sec 75120640 Bytes 9.98 Mbits/sec
```
### Extra Test Results
```
testsuites/tests/test_wifi.py::test_device_sanity PASSED
[ 20%]
testsuites/tests/test_wifi.py::test_wifi_reconnect_on_psk PASSED [ 40%]
testsuites/tests/test_wifi.py::test_disconnect_from_ap PASSED [ 60%]
testsuites/tests/test_wifi.py::test_connect_wrong_password PASSED [ 80%]
testsuites/tests/test_wifi.py::test_iperf PASSED [100%]
testsuites/tests/test_sta_softap.py::test_network_device_sanity PASSED
[ 12%]
testsuites/tests/test_sta_softap.py::test_ping_ap PASSED [ 25%]
testsuites/tests/test_sta_softap.py::test_provide_less_secure_ap PASSED [
37%]
testsuites/tests/test_sta_softap.py::test_save_wifi_data PASSED [ 50%]
testsuites/tests/test_sta_softap.py::test_reboot_and_reconnect PASSED [62%]
testsuites/tests/test_sta_softap.py::test_disable_ip_iface PASSED [75%]
testsuites/tests/test_sta_softap.py::test_boot_connection_fails PASSED [87%]
testsuites/tests/test_sta_softap.py::test_enable_disable_softap PASSED [100%]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]