Hi,
We are evaluating the nRF7002 Wi-Fi Companion device. We are not able to achieve the data throughput performance that we would need for our application, and we would like to understand why and if anything can be done.
Test Setup:
We use the nRF7002-DK evaluation kit for our tests.
Visual Studio Code 1.83.1
nRF Connect for Desktop v4.1.2
nRF Connect SDK 2.4.1
We use the Wi-Fi BLE Coexistence example to measure data throughput.
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/wifi/sr_coex/README.html
Test: Out-of-the-box Performance with Wi-Fi/BLE Coexistence example:
Using iperf 2.0.9. Command line : iperf -s -i 1 -e -f M
BLE test is disabled
Several of the configuration variables were adjusted to match the recommended values for the High performance STA mode Usage Profile, as per “Operating with a resource constrained host” page (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf70/developing/constrained.html#usage-profiles )
In order to compile a binary that actually connects to the TCP server, it was necessary to change CONFIG_HEAP_MEM_POOL_SIZE=200000, instead of 230000.
The test also changed the call from zperf_udp_upload_async to zperf_tcp_upload_async to run a TCP test instead.
The firmware runs, connects to the iperf server and transfer data. However, the data throughput is not near the expected throughput of 14.2Mbps, and there are some errors shown during the test:
[00:00:32.127,777] <inf> coex: New UDP session started
[00:00:41.683,227] <err> net_pkt: Data buffer (68) allocation failed.
[00:00:51.101,531] <err> net_pkt: Data buffer (1500) allocation failed.
[00:00:51.101,531] <err> net_tcp: conn: 0x20067288 packet allocation failed, len=1460
[00:01:00.318,786] <inf> coex: Wi-Fi benchmark: Upload completed!
[00:01:00.318,786] <inf> coex: Upload results:
[00:01:00.318,786] <inf> coex: 2298880 bytes in 27971 ms
[00:01:00.318,786] <inf> coex: 2245 packets sent
[00:01:00.318,786] <inf> coex: 0 packets lost
[00:01:00.318,786] <inf> coex: 272629760 packets received
[00:01:00.318,817] <inf> coex: UDP SESSION FINISHED
[00:01:00.318,817] <inf> coex: Disconnecting Wi-Fi
[00:01:00.322,753] <inf> coex: Disconnection request done (0)
[00:01:00.347,137] <inf> coex: Status: successful
The nRF7002-DK is located next to the Wi-Fi 6 Access Point, and there are only a couple of other devices connected to the AP with low data usage.
Iperf reports:
[ 4] local 10.0.0.31 port 5001 connected with 10.0.0.210 port 35769
[ 4] 0.00-1.00 sec 0.91 MBytes 0.91 MBytes/sec 620 620:0:0:0:0:0:0:0
[ 4] 1.00-2.00 sec 0.18 MBytes 0.18 MBytes/sec 122 122:0:0:0:0:0:0:0
[ 4] 2.00-3.00 sec 0.00 MBytes 0.00 MBytes/sec 0 0:0:0:0:0:0:0:0
[ 4] 3.00-4.00 sec 0.00 MBytes 0.00 MBytes/sec 0 0:0:0:0:0:0:0:0
[ 4] 4.00-5.00 sec 0.00 MBytes 0.00 MBytes/sec 0 0:0:0:0:0:0:0:0
[ 4] 5.00-6.00 sec 0.00 MBytes 0.00 MBytes/sec 0 0:0:0:0:0:0:0:0
[ 4] 6.00-7.00 sec 0.00 MBytes 0.00 MBytes/sec 0 0:0:0:0:0:0:0:0
[ 4] 7.00-8.00 sec 0.00 MBytes 0.00 MBytes/sec 0 0:0:0:0:0:0:0:0
[ 4] 8.00-9.00 sec 0.00 MBytes 0.00 MBytes/sec 0 0:0:0:0:0:0:0:0
[ 4] 9.00-10.00 sec 0.59 MBytes 0.59 MBytes/sec 418 418:0:0:0:0:0:0:0
[ 4] 10.00-11.00 sec 0.49 MBytes 0.49 MBytes/sec 314 314:0:0:0:0:0:0:0
Questions:
- nRF7002 Product Specification states that the device can deliver a PHY data rate of 86 Mbps (MCS7). Is there a way to really achieve this data rate?
- Section 7.3 QSPI throughput, show an expected peak achievable throughput of ~40 Mbps for TCP TX mode. Can you provide a working example that can achieve this?
- Even though nrf7002 PS, Section 7.3 QSPI throughput shows higher data throughput values, the effective data throughput presented in the “Operating with a resource constrained host” page (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf70/developing/constrained.html#usage-profiles ) shows much less performance. The High performance STA mode Usage Profile gives a 14.2 Mbps measurement under ideal RF conditions. Why is there such difference between the Product Specification and the effective measurements?
- Is it possible to determine what kind of data rate is being used during these tests? Does the nRF7002 drivers select the best (highest) data rate possible or is there a way to setup the driver to select the highest data rate?
- The compiled binaries appear to use most of the Flash and RAM memory of the host processor (nRF5340), despite the application being very simple (the iperf test).
[12/14] Linking C executable zephyr\zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 752564 B 1 MB 71.77%
RAM: 423928 B 448 KB 92.41%
IDT_LIST: 0 GB 2 KB 0.00%
[13/14] Generating zephyr/merged.hex
[14/14] Generating zephyr/merged_domains.hex
I imagine there are several optimizations and configuration to do, but it seems that the Zephyr OS is very bloated and takes too much of the Flash. Is that the case? Is it possible to get real examples of applications that use reasonable levels of Flash.
Thanks!
Alex.