My application communicates via UDP and all communication is initiated from the device. Before packet transmission, network registration status is checked (CEREG) and sendto() is called only if the modem is registered to the network (maybe it would be better to check PDN status with CGEV). This works, but if the modem is in PSM, then it isn't updating network status (except for periodic TAU, which is in my case much longer than the communication period). Therefore when the device wants to send data, it doesn't know, if the modem is really connected or not. It calls sendto(), which copies data to the modem, the modem wakes up and reports the network status. If the network is not available for some reason, then data are already in the modem's buffer and the modem will send them when the network is available again (I guess?). My questions are:
- How long will the modem keep data to be sent in its buffer?
- It is possible to get a number of bytes/packets waiting in the buffer?
- It is possible to get confirmation, that the packet was successfully transmitted to the network?
- It is possible to clear the buffer (cancel the transmission)?
Development setup:
- NRF9160 SIBA B1A
- mfw 1.3.7
- ncs 2.9.1