Hi everybody
I use the nrf52 SDK (nrf5_SDK_15.2.0) to develop the IoT application of BLE. The IoT device acts as the TCP server and the BLE gateway acts as the TCP client. The BLE gateway connects the IoT device periodically and disconnects after obtaining datas.
The program of TCP server is modified by the example/IoT/TCP/server in SDK. TCP client is implemented in Linux system with reference to IoT user guide. Different from the above example, link local address is used for IPv6 address, because the connection is only in the local area network.
Occasionally, I find that the gateway and IoT device cannot establish a TCP connection for a long time, and it will recover automatically after about 4.5 hours. By printing log during the period when the connection cannot be established, the BLE connection and IPv6 interface are established normally, but the IoT device has never received IPv6 NS (neighbor solicitation) message from the gateway, untill TCP connection timeout. Further more, the log is printed at the every abnormal returns of the NS message receiving path. It is found that no log is printed during the connection cannot be established. It can be inferred that the SoftDevice does not return any message to the application layer during the connection cannot be established.
The above problem may be improved by adding debug log output in the application layer and slightly changing the processing sequence.
If anyone else has found similar problem and who can tell me how to further investigate or solve this problem.
Best regards!