Using the NRF5340 combined with the NRF7002 in access point mode for data transfer to a host

We are utilizing the nrf5340 alongside the nrf7002 for Bluetooth Low Energy (BLE) and Wi-Fi communication between a wearable device and a host. The host is a laptop connected to a USB dongle that also employs the nrf5340 and nrf7002. Communication between the wearable device and the dongle occurs over Wi-Fi using a hotspot.

The wearable device serves as a sensor, while the device connected to the laptop acts as a gateway. In the sensor device, data is streamed to the nrf5340 over SPI, with the nrf5340 configured as an SPI slave. The streaming rate is approximately 400 KB per second, divided into 40 packets per second, each with a size of around 10 KB. This means that every 25 milliseconds, a 10 KB packet is transferred to the nrf5340 on the sensor board. The sensor board then processes the data and transmits it over Wi-Fi to the gateway board. The gateway board subsequently forwards the data to the host (laptop) via USB CDC.

We are encountering the following issues:

1. There are packet losses in Wi-Fi communication.

2. Reducing the SPI clock speed from 40 MHz to 10 or 5 MHz results in fewer data losses.

This raises the first question: Why does the SPI clock speed, which influences the duration of data transfer within the 25-millisecond window, affect data losses?

Additionally, reducing the packet rate from 40 to 20 packets per second eliminates losses entirely. The second question is: What steps can we take to achieve the required data rate without encountering data losses?

We are using Zephyr v2.5.1 in VS IDE.

Parents
  • Hello,

    We need more clarification of these following questions/comments below:

    • Does the block diagram above accurately describe the scenario in question? Can you please confirm/edit as required?

    • Are you using QSPI or SPI at the STA TX end (between 5340 and 7002)?

    • Please differentiate between Wi-Fi packet errors v/s Sensor data loss

      • If sensor data is lost but Wi-Fi pkts are not in error, it could be throttling buffers at the STA stack resulting in loss of sensor data.

    • Can you provide sniffer logs for working and non-working cases?

    • >>Additionally, reducing the packet rate from 40 to 20 packets per second eliminates losses entirely

      • Does this mean the effective rate is reduced from 400KB/s to 200KB/s? 

      • Is this at 40MHz SPI clock?

    • Is it UDP or TCP traffic that runs from the STA to the SoftAP? Can you run the Wi-Fi shell sample (with the same config as STA mode) and let us know the baseline zperf TX throughputs you see?

  • Hi,

    1. We are using QSPI between 5340 and 7002 (default implementation provided in nRF connect SDK)

    2. SPI is used between sensor device and 5340 .

    3.TCP protocol is used to send data over WIFI.

    Thanks.

  • Hello,

    I have asked our team. I will get back to you when there is an update. 

    Thanks.

    BR

    Kazi

Reply Children
No Data
Related