AT+USOCL gives error

After a lot of head scratching, I think I figured out why client.stop (or any other function that sends AT+USOCL to the modem) fails with "Error". In the NBClient.cpp Library @ around line #433:

MODEM.waitForResponse(10000)

This means the library only waits 10 sec for a response. This is not enough time. The uBlox AT commant reference states that it can take up to 120 sec for a response. I changed it to: MODEM.waitForResponse(120000) and things seem to be working...

Hello Zbelding,

Thank you so much for sharing your findings with Arduino community.

Your post is much appreciated and useful. Thank you so much!

Kind Regards