GSM Server: 24/7 reability and AT commands in the response?

Hello everyone!

I'm new in this forum so glad to contribute to this huge and amazing community.

I'm working on a GSM server project. The arduino is remote actuator. I send a command number from my computer via TCP/IP and it actuates.
Some commands retrieve data from sensors, and others turn on/off things.

In order to do this, i'm using an arduino uno with GSM shield v1 in GSM Server configuration. I've followed the GSM server example: https://www.arduino.cc/en/Tutorial/GSMToolsTestWebServer
Everything works well except two things:

  1. After some time, the boards stop responding. It's impossible to mantain it working 24/7. I'm wondering if the GSM library is bug free and functional in production enviroments...

To achieve 24/7 connection, I want to constantly monitor the network status of the modem, but i'm unable to read the network connection status. All of the reads of the network status return fake data.
I've used this functions to check network status without success:

  • GSM.isAccessAlive() -> allways returns false
  • GSM.getStatus() -> returns disconected at startup, once it connects sucessfully returns allways connected, but if you lost signal, or put off the sim card, keeps returning connected ok. But oviously, the modem is not online.
  • GSMPIN.checkReg() -> allways returns not registered

So I need to find a realible method to check the current network status, to do a reconection or arduino reset in case of temporary network loss.

  1. When I send two consecutive read sensor data commands, the second command in stead of returning me the data value, returns some random AT commands or empty string.
    It's like the first command invoques certain AT commands related to client connection, and when the second command arrives the modem stops interpreting all data received from the serial port and sends directly to the new client.

It only occurs when the commands are consecutive. If you wait a couple of seconds between sends, it works well.

To solve this, I'm tryng to do a server.stop() when the first client is connected, and server.begin() when all the communication process is over; to prevent multiple connections. But it does the same thing, the second consecutive command is received ok by the modem and it send the wrong response with the AT commands in stead of the actual data.
It's like the server.stop() funcion is not implemented in library, or not working properly at least.

Thank you very much for your time :slight_smile: