nRF9160 Network connection status NB-IoT. Handling

Hello, 

i would like to ask you for advice how to correctly process the connection status information from the modem. Our application is sending telemetry data to the cloud and we would like to provide the user the most recent(real-time) information whether the data is being transmitted by the modem. 

Currently, we are using COAP protocol with NON message type, which does not have any response to determine, whether the data is being received by the server. For our use case the information that the data is being transmitted to the BTS is enough. We also would like to control the data flow to the modem by these notifications to prevent unnecessary re-transmission and reduce the data usage. There is no point sending message repeatedly when the modem did not event transmitted it.

The network we are using is NB-IoT, we do not have LTE-m active in our country so we cannot easily test it, however we are developing product for both.

Currently we are using for the flow control and user signaling only the +CEREG notification. Which has significant latency and it does not directly show whether the data is coming though. We would like to incorporate the +CSCON notification also into the flow, which should greatly improve the situation. The issue with CSCON is that when used for the flow control we are getting into a logical loop. When we are not sending data the CSCON will never activate(only on first BTS connection) and when CSCON is not active we would like to stop sending unnecessary data. Further more even the CSCON is not very accurate. In ideal situation the data is transmitted right after the BTS connection.

Ideal situation:

[11:34:30.731,000] <inf> dt_modem: Notif: +CEREG: 5,"BC48","000B0021",9,,,"11100000","00101000"
[11:34:30.747,000] <inf> main: Modem firmware version: nrf9160_1.3.1
[11:34:30.789,000] <inf> dt_app_flight: Processing Location Data: Takeoff: 139, Alt: 154, Rel: 14
[11:34:30.789,000] <inf> dt_app_flight: Time: 03.07.2022 09:34:27.000, timestamp: 1656840867000
[11:34:30.789,000] <inf> dt_app_flight: Sending 1 entrie to cloud
[11:34:30.789,000] <dbg> dt_coap_client: Non Con send Id: 41523
[11:34:30.790,000] <dbg> dt_socket_manager: Send handler: 1
[11:34:30.790,000] <dbg> dt_socket_manager: Msg fifo: 1
[11:34:30.790,000] <dbg> dt_socket_manager: Sending data: 53 # <------- Telemetry sent
[11:34:31.429,000] <inf> dt_modem: Notif: +CSCON: 1  # <------- The Flow control should sent it after the established connection is perfect world
[11:34:31.430,000] <inf> dt_modem: Notif: %CESQ: 86,4,26,3
[11:34:31.894,000] <dbg> dt_coap_client: Data recieved # <---- Recieved response from the server(only for testing)

However in connection to BTS with worse signal the data plane will signal CSCON=1 even thought it yet cannot transmit the data, afterwards it will try connection to another BTS.

What is your recommendation for processing the CEREG and CSCON notification, is there some additional notification, which can be used ? Maybe some interface for the packet sent confirmation ?

Do you have suggestion what additional information we should use to resolve the logical loop for flow control with use of CSCON ? Maybe some information whether the modem has enqueued a packet for transmission would resolve the loop. It may it self be used to determine the state of the connection. We are ending packets every 1-3s. That might be helpful to determine, whether the buffer is filling and waiting instead of sending.

The current notification capabilities are insufficient or interactive application, which used in mobile environment(lot of BTS changes (NB-IoT, the LTE-M should be significantly better)).

Parents Reply Children
No Data
Related