2017-03-16 03:04:44 -04:00
|
|
|
# Wifi Performance Examples
|
|
|
|
|
|
|
|
Some simple codes help to test the wifi performance.
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-16 03:04:44 -04:00
|
|
|
Including TCP/UDP TX/RX throughput.
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
# tcp_perf
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
This example is used to test tcp throughput and delay time. First you should set options in menuconfig.
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
You can set esp32 as AP/STA, client/sever, sender/receiver. Make sure that STAcan connect to AP with your configuration in menuconfig.
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
So the tcp_perf can be used in following scenes:
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
* esp32 to Router (using esp32 as STA)
|
|
|
|
* esp32 to Wifi adaptor (using esp32 as AP)
|
|
|
|
* esp32 to esp32 (using one of them as AP, the other STA)
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
After connection established, TCP sever and TCP client can send data to each other. The result of throughput will show by COM.
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
Explaining more in [main.c](./tcp_perf/main/main.c).
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
# udp_perf
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
Similar with tcp_perf.
|
2017-03-20 01:43:04 -04:00
|
|
|
|
2017-03-21 08:06:32 -04:00
|
|
|
There are some points need to notice.
|
|
|
|
|
|
|
|
* A packet will be send from client to sever.So the sever can konw the ip&port of client.
|
|
|
|
|
|
|
|
* To easy use this example, it's better to use udp sever as recviver.
|
|
|
|
|
|
|
|
|
|
|
|
# More
|
2017-03-16 03:04:44 -04:00
|
|
|
|
|
|
|
See the [README.md](../README.md) file in the upper level [examples](../) directory for more information about examples.
|