tmedicci opened a new pull request, #18827:
URL: https://github.com/apache/nuttx/pull/18827
## Summary
Enables the ethernet driver support on ESP32-P4 based on a common-source
implementation. This required a set of changes regarding the event handler for
the Wi-Fi driver (which is now shared with the ethernet driver).
## Impact
Impact on user: Yes. Users can now use Ethernet on ESP32-P4.
Impact on build: No.
Impact on hardware: Yes. Mostly ESP32-P4, but all the supported SoCs from
Espressif required small changes and optimization.
Impact on documentation: Yes. Documentation for the Ethernet network was
properly added to ESP32-P4 chip its Functio EV board.
Impact on security: No.
Impact on compatibility: No.
## Testing
`esp32p4-function-ev-board:ethernet` defconfig can be used to test Ethernet
on ESP32-P4. `iperf` testing is also possible. Please note that for v1.5.2 of
the board, it's easier to flash using the USB-Serial/JTAG port (usually
`/dev/ttyACM`) and use an externally connected USB-to-serial converter attached
to UART0.
### Building
```
make -j distclean
./tools/configure.sh -S esp32p4-function-ev-board:ethernet
make flash ESPTOOL_PORT=/dev/ttyACM0 -s -j$(nproc)
picocom -b 115200 /dev/ttyUSB1
```
### Running
#### Checking `eth0` with DHCP client enabled:
Attach the ethernet cable to the board and check the interface status and
its IP address (please ensure that the cable is connected to a network with a
DHCP server enabled):
```
nsh> ifconfig
eth0 Link encap:Ethernet HWaddr 30:ed:a0:ec:f1:60 at RUNNING mtu 1500
inet addr:10.0.10.50 DRaddr:10.0.10.1 Mask:255.255.255.0
```
#### `iperf` testing:
Both UDP and TCP modes can be tested.
##### UDP
On the host PC, run the `iperf` server:
```
iperf -u -s -p 11111 -i 1
```
On the device, run the `iperf` client:
```
nsh> iperf -u -c <host_pc_ip_address> -p 11111 -i 1 -t 5 &
```
##### TCP
On the host PC, run the `iperf` server:
```
iperf -s -p 11111 -i 1
```
On the device, run the `iperf` client:
```
nsh> iperf -c <host_pc_ip_address> -p 11111 -i 1 -t 5 &
```
### Results
For `ifconfig`, the network's status should be `RUNNING` and it should
acquire a valid IP address.
`iperf`'s results are the following. Both are closed to the port's bandwidth
limit of 100Mbits/sec.
#### UDP
```
nsh> IP: 10.0.10.50
mode=udp-client sip=10.0.10.50:5001,dip=10.0.10.81:11111, interval=1, time=5
Interval Transfer Bandwidth
0.00- 1.01 sec 11992384 Bytes 94.99 Mbits/sec
1.01- 2.02 sec 12082176 Bytes 95.70 Mbits/sec
2.02- 3.03 sec 12083648 Bytes 95.71 Mbits/sec
3.03- 4.04 sec 12082176 Bytes 95.70 Mbits/sec
4.04- 5.05 sec 12082176 Bytes 95.70 Mbits/sec
0.00- 5.05 sec 60322560 Bytes 95.56 Mbits/sec
iperf exit
```
#### TCP
```
nsh> IP: 10.0.10.50
mode=tcp-client sip=10.0.10.50:5001,dip=10.0.10.81:11111, interval=1, time=5
Interval Transfer Bandwidth
0.00- 1.01 sec 10256384 Bytes 81.24 Mbits/sec
1.01- 2.02 sec 10338304 Bytes 81.89 Mbits/sec
2.02- 3.03 sec 10338304 Bytes 81.89 Mbits/sec
3.03- 4.04 sec 10338304 Bytes 81.89 Mbits/sec
4.04- 5.05 sec 10338304 Bytes 81.89 Mbits/sec
0.00- 5.05 sec 51609600 Bytes 81.76 Mbits/sec
iperf exit
```
--
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]