I have the following problem with a STM32F7 board connected to a GT202 module (QCA4004 based).
A server/client application is running in the following way:
- The server is an echo server (supporting both TCP and UDP), that waits for a client connection (TCP only), then receives data on a socket and echoes it back. This server is running on PC
- The client is running on the STM32F7 board, and does the following:
- Scans all available wifi access points
- Connects to a wifi access point (same as the PC, WPA2 encryption)
- Updates the time via an NTP request
- Start a TCP test loop, generating 1MB of random data and sending it to the server in chunks of 256 bytes. Then, it waits for each chunk to be received and compares the sent/received data
- Start a UDP test loop, generating 1MB of random data and sending it to the server in chunks of 4096 bytes. Then, it waits for each chunk to be received and compares the sent/received data
- Start a multithreaded TCP/UDP test loop, with 1 socket opened per protocol, generating 1MB of random data on each socket and sending it to the server in chunks of 256/4096 bytes. Then, it waits for each chunk to be received and compares the sent/received data
- Single TCP socket test works fine, all the data is sent/received, no data corrupted
- Single UDP socket test works fine, there are some UDP packets being lost, but this is normal, due to the unreliability of the UDP protocol (and no re-transmission)
- Issue observed when testing with 2 opened sockets, one TCP and one UDP. In this scenario, I have lost TCP packets, which should never be the case. Note that I've set the socket receive timeout to 5 seconds, and the wifi rssi is very high (2 meters away from the wifi router)
- The Atheros Driver is integrated from QCA4002/4 Firmware/Software SDK v3.3.5
- The following configuration of the driver was enabled:
- Enable DRIVER_CONFIG_MULTI_TASKING
- Enable DRIVER_CONFIG_IMPLEMENT_RX_FREE_QUEUE
- Enable ENABLE_STACK_OFFLOAD
- Enable MULTI_SOCKET_SUPPORT
- Enable NON_BLOCKING_RX
- The module is plugged into the Arduino connectors of the STM32F7 board, and it is communicating on SPI at 12.5MHz, with SPI communication in DMA mode (for rx/tx transfer) and in polling mode (for command transfer).
Some analysis was performed on my side, and in case of missing packets, the interrupt from the GT202 chip (over SPI_INT) is not comming. Normally, this interrupt should come to indicate that a packet was received by the wifi chip, and it can be read by the host.
Also, another issue was found with enabling of NON_BLOCKING_TX option, that caused some data to be corrupted in the exchanged stream.
Could someone provide support for this issue?