This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to recover a nRF9160 from sporadic ENETDOWN

Using a Thingy!91 (v1.0.0 and v1.4.0, firmware 1.2.3, 1.2.7) I get sometimes (every couple of days) a ENETDOWN when sending data out. Before that ENETDOWN, the device was usually able to exchange 100 and more UDP messages.

Currently I do a "sys_reboot(SYS_REBOOT_COLD)", but I'm wondering, if there are less massive ways to recover.   

I found other questions, but I'm still struggling to see an "useful" answer. e.g.

https://devzone.nordicsemi.com/f/nordic-q-a/57642/nrf9160-lte-modem-documentation

but the link at the end, ends in "NOT FOUND".

So, what is the recommended way to recover from ENETDOWN?

  • > What is it you are not sure about?

    I'm not sure, if this is the only root cause and reopen the socket is always the fix for the ENETDOWN.

    My test was done with plugin an external lte-antenna and then cover that or remove the antenne (leave the plugtail in the modem). That causes a couple of network reconnects, but even with that, only a few showed also the ENETDOWN.

    So, lets see, if that "lost network" is the only cause of the ENETDOWN and the failing socket.

    (And in too many cases, after fixing a bug, the next bug will show up. Same as in soccer ;-) ):

  • Let me add:

    For me, the modem nRF9160 and the nrflib are "blackboxes". Trying to test the behavior is somehow limited. You never know, if there are cases (... if ...) you not aware of and so you never will have a really stable function. Also sometimes things are changing and with that, FMPOV, this requires to be specified by the manufacturer, as well, as I would assume that changes in the behavior (if at all in the future) must also be documented.

    Would it be possible, that the developers of these components check their implementation about that?

    What happens, if the modem lose the network?

    What happens, if the modem gets connected again?

    Is it right, that sockets are not longer usable, if that happens?

    Is reopening the socket the right thing to do?

    Are the cases, that after a network reconnect, more than just reopen the socket is required.  

  • Hello Achim,

    Achim Kraus said:
    What happens, if the modem lose the network?

    The modem will perform a new connection attempt according to 3GPP rules.


    Achim Kraus said:
    What happens, if the modem gets connected again?

    The modem will report this to the application (if configured), and wait for further instructions. Depending on network, modem might enter PSM.


    Achim Kraus said:
    Is it right, that sockets are not longer usable, if that happens?

    Yes, if the socket connection can not be kept, the modem will send a socket close request.


    Achim Kraus said:
    Is reopening the socket the right thing to do?

    Since the socket has been closed, it must be re-opened again, yes.


    Achim Kraus said:
    Are the cases, that after a network reconnect, more than just reopen the socket is required.  

    That depends on each individual case and on how the implemented application is handling them.

    Achim Kraus said:
    Would it be possible, that the developers of these components check their implementation about that?

    When initialising and starting the modem, it will act according to requests from the application and 3GPP rules. Hence, there should be no need to verify its functionality as it is certified from our side towards all major network operators. But then of course, no software is perfect and you are always welcome to report unexpected behaviour to us :-)

    Regards,

    Markus

  • Thanks for your answer!

    > That depends on each individual case and on how the implemented application is handling them.

    For me this is simply about the modem and the nrflib and what is required to send data via UDP, if a network outage appears and the modem has connected again. That's a general question, I'm not sure, what should be application specific for the very basic functionality of sending UDP data.

Related