OSError: Couldn't start connection to Modem (modem_state=disconnected) error



  • Hi,

    After only a few weeks of operation my GPys tend to get stuck in a mode where they refuese to connect via LTE. Connecting it to a computer, I get the error message

    OSError: Couldn't start connection to Modem (modem_state=disconnected)
    WARN: An exception was caught by boot.py: Couldn't start connection to Modem (modem_state=disconnected). Connect the device to a computer for more debugging information.

    Possibly this could be resolved with power cycling the device, but that is not what deploying IoT-devices is all about. I had two occasions in a week. One was ok to power cycle, the other one we had to reformat.

    Our general function is to connect to LTE, upload data, disconnect from LTE and set the GPy in deepsleep. We do have a watchdog that kicks in if the device stalls or does not connect to LTE. As we are in the process of deploying large volumes, we really need a fix, hope you can assist with ideas.



  • We have had similar problems. Our solution ended up being adding an external watchdog that switches the +5V power to the GPy chip. Resetting the GPy chip does not solve the problem. The power must be cycled off/on.



  • @d-alvrzx Thanks for your help and concern! I will dive into the code a bit. (Forums are great, but if you want to sell a product and be successful I believe that it also equates that the manufacturer needs to attend the discussions. The product is great, but faster support is needed to accelerate sales. )



  • Hi, I get your frustration. Unfortunately, I have never worked with GPy, only LoPy4, but I am bumping this thread hoping you get an answer from someone more qualified (it seems to me it has become more difficult to get answers in this forum as of late).

    I can only think, have you tested different firmware versions? Sometimes, stability issues are fixed (or broken) with new firmware versions, so try downgrading/upgrading, whichever is your case. Also, if you have the hardware, try loading up different firmware versions on different GPys, and running long-duration tests on all of them, see if maybe one specific fw version doesn't fail. My last very naive piece of advice would be to put a try/except statement around the line of code that causes OSError, and try to reinitiate the LTE modem after the exception (maybe run a deinit first, and the init again?). You might've already tried this, but just saying...

    Take a look at the releases tab in the pycom repo, maybe there has been a change to one of the releases that somewhat relates to your issue. Or go and see if there has been any talk about this in the github issues.

    Good luck,

    Dan



  • Hi, I would really need help… anyone out there that knows the answer? I am hoping my heros @Gijs or @robert-hh has something useful to say?


Log in to reply
 

Pycom on Twitter