+CGEV: APNRATECTRL STAT - Not reported with pdn_event_handler_t

mfw 1.3.5, NCS 2.4.1

I received a

+CGEV: APNRATECTRL STAT 0,1,86307

from the modem.

I'm wondering, if that is processed by a pdn_event_handler_t.

If not, how does the application know that?

  • I opened this PR to add the events to the PDN library, if you'd like to take a look.

  • > you should be able to send() successfully afterwards.

    I get the same error as before, it's errno -11.

    I would create a modem-trace, but if that needs to include the start, then it contains 256 messages in will get large. I will see, if I manage to get one tomorrow.

  • > I opened this PR

    I will try to pick that to NCS 2.4.2. If that works, I will also test that tomorrow.

  • Here my logs:

    rate limit is reached:

    +CGEV: APNRATECTRL STAT 0,1,86305
    I 99.884: received_from_peer 1074 bytes
    I 99.884: received message (1074 bytes), starting with 'application_data', epoch 1
    I 99.884: got 'application_data' epoch 1 sequence 250 (1074 bytes)
    I 99.889: ** application data:
    I 99.889: CoAP ACK response received. code: 2.05, token 0xb588f4cf, 1024 bytes
    I 99.889: CoAP content format appl/octetstream (42)
    I 99.902: -1ms/305ms: success
    I 99.902: retrans: 0*250, 1*0, 2*0, 3*0, failures 0
    I 99.902: rtt: 0-2s: 250, 2-4s: 0, 4-6s: 0, 6-8s: 0, 8-10s: 0
    I 99.902: rtt: 10-12s: 0, 12-14s: 0, 14-16s: 0, 16-18s: 0, 18-20: 0
    I 99.902: rtt: avg. 1s (250#)
    I 99.903: 2023-09-13T07:51:02Z
    I 99.903: Download block 249, pos 0x3e400
    I 99.903: next download request
    I 99.903: send 27 bytes.
    W 99.903: send_to_peer failed: -1, errno 11 (No more processes)
    I 99.904: APNRATECTRL STATUS: 0,0,1,86305
    W 99.904: send_to_peer failed: rate limit, 86305 s
    W 99.904: Failed to send CoAP request with 27 bytes via DTLS, 11 (No more processes)
    I 99.905: -1ms/-1ms: failure, send
    I 99.905: current failures 1.
    I 99.905: Transfer canceled after 93 s.
    I 99.906: 2023-09-13T07:51:02Z
    I 99.906: APNRATECTRL STATUS: 0,0,1,86305
    I 99.907: Modem rate limit exceeded, wait 60 s.

    and after the modem was switched off and on.

    W 86.211: hs_send_to_peer failed: -1, errno 11 (No more processes)
    I 86.212: APNRATECTRL STATUS: 0,0,0
    I 86.212: Start DTLS 1.2 handshake.
    W 86.213: hs_send_to_peer failed: -1, errno 11 (No more processes)
    I 86.214: APNRATECTRL STATUS: 0,0,0
    I 86.214: dtls connect ...
    I 86.214: APNRATECTRL STATUS: 0,0,0
    I 87.215: State: connected, prevent suspend
    I 87.215: DTLS hs wait 1 of 3 s
    I 87.216: APNRATECTRL STATUS: 0,0,0
    I 88.216: State: connected, prevent suspend
    I 88.216: DTLS hs wait 2 of 3 s

    And the trace.

    trace-2023-09-13T07-49-20.899Z.zip

  • Can you confirm that you are trying to send() in non-blocking mode?

Related