gsmat-commandgprsverifone

At command Communication between Verifone Nurit8320 and siemens MC55 external modem


I am communicating with a server from Verifone Nurit8320(DTE) via siemens MC55 gsm modem(DCE). I am passing AT commands via UART to give commands to siemens MC55 gsm modem (DCE).

I have given a delay of 100 ms (required) between every AT command and I am flushing the UART of DTE before sending any command on it.

Now the problem is this

In many cases DCE is responding with the response of the previously executed AT command. The DCE UART is never flushed.

Where can I get the set of AT commands so that I can flush the UART buffer of DCE?


Solution

  • The problem you are trying to solve (flushing the DCE UART) is the wrong problem to focus on, because it is a problem that does not exist in AT command communication.

    After sending an AT command to the DCE you MUST read every single character sent back as response from the DCE, and parse the text until you have received a Final Result Code (e.g. OK, ERROR and a few more) before you can send the next AT command. Any other way is doomed to bring in an endless list of problems and will never, never, ever work reliably.

    See this answer for a general outline of how your AT command sending/parsing should look like. Using a fixed time delay should never be done; it will either abort the command or in best case waste time while waiting unnecessarily long while never removing the risk of aborting despite of waiting. See this answer for more information about abortion of AT commands.