Hi there,
I have developed a small sensor device, which generates events when a reedcontact is triggered. When an event occurs a NB-iot message is sent.
However when I generate a couple of events within a short period of time, the nrf socket send function stalls and the watchdog is triggered.
For demonstration purpose I have reduced the code to this:
uint8_t buf[16];
u32_t size = 16;
u32_t flags = 0;
while(1)
{
err = send(fd, buf, size, flags);
k_sleep(K_MSEC(1000));
LOG_DBG("Tx retries = %d", retries);
retries++;
}
After 16 or 17 cycles I see that the send function hangs and that the watchdog resets the device.
Is it somehow possible to add a timeout to the send function? Or any other way to recover from such a situation?
Of course the best thing to do would be gather all the sensor events and sent them periodically but I would also like an explaination for this behavior.
Eric