1
votes

I'm trying to communicate with GSM click module (Telit GL865-QUAD module) via UART with AT command. First I want to read all received messages, but for some reason I got error 314, meaning that SIM card is busy. Other answers from GSM are ok.

So this is my config (sending few at commands in a row):

  1. AT\r\n (check GSM)
  2. ATE0\r\n (echo disable)
  3. AT+CMGF=1\r\n (set SMS text mode)
  4. AT+IPR?\r\n (query current baud rate)
  5. AT+CMGL=\"ALL\"\r\n (finally read all messages)

All commands have 1 second delay after gsm get positive (OK) answer. For example: send AT\r\n wait for OK and then wait 1 second; after that delay send another AT command.

Result: I got fine response from GSM when I sent first 4 AT command. But after the fifth one the modem returns error 310 (sometimes) followed by error 314:

AT+CMGL="ALL"

+CMS ERROR: 310
AT+CMGL="ALL"

+CMS ERROR: 314\r\n

I tried it with 2 different SIM cards and got same result.

Any idea or comment are welcome.

2
Comments are not for extended discussion; this conversation has been moved to chat.Samuel Liew♦

2 Answers

2
votes

First of all, GE865-QUAD is an old device, so I recommend that you at least update it to the latest FW version. You can query current FW version of any GSM modem by issuing AT+CGMR AT command.

Edit: since you have a really old version (10.00.144 is dated 2009/2010!) I STRONGLY recommend updating it, since many bugs could have been fixed since then. You will be able to get last version from Telit site, and to flash it via UART.


Errors explanation

You seem to obtain error 314 preceeded, sometimes by error 310.

  1. +CMEE Error: 314 means SIM busy, as correctly stated by your question subject
  2. +CMEE Error: 310 means SIM not inserted


Possible solutions

  1. First of all, make sure that the SIM is correctly inserted. It has to be pushed all its way in. I suppose you correctly inserted it, but a check has to be done.

  1. Then, since you state that

I try with 2 sim cards and got same result.

I suggest you to check the contacts of the SIM holder (because it is unlikely that both your SIMs have bad electric contacts). In fact the SIM busy status, usually reached when a SIM is actually read (e.g. full phonebook) could also mean that some unconsistent action happened (also SIM failure massage can be shown in those cases).


  1. Make sure you wait enough for SIM ready. In fact, even if SIM initialization usually takes less than a second, in some old SIM models might happen that a longer time is needed.

Telit provides a command to query SIM status: AT#QSS. As descripted by the AT guide, it enables an unsolicited message for any SIM status change. But it also allows allows, through its read command to query the status asynchronously:

AT#QSS?

Read command reports whether the unsolicited indication #QSS is currently enabled or not, along with the SIM status, in the format:

#QSS: mode,status

mode - the verbosity level of #QSS URC, set with AT#QSS=mode. Default value is 0; 2 enables the maximum verbosity level.

status - current SIM status

0 - SIM NOT INSERTED

1 - SIM INSERTED

2 - SIM INSERTED and PIN UNLOCKED (Note: available only if mode=2!)

3 - SIM INSERTED and READY (SMS and Phonebook access are possible) (Note: available only if mode=2!)

So you have to wait until status 3 is reached. I suggest issuing read command every 1/2 seconds until the desired status is reached. Issuing commands that involve the SIM storage before that status is reached will lead to SIM Busy error.

Very important: since status=3 will be shown only with mode=2, issue the following concatenated AT command in order to discover if the SIM INSERTED and READY status has been actually received without enabling URCs:

AT#QSS=2;#QSS?;#QSS=0

In this way, mode=2 is set just before the read command so that the full status list is supported. Then mode is restored to value 0, avoiding URCs to appear.


  1. Make sure that the PIN has been inserted!

The SIM could be locked with the PIN code. Verify it by querying AT+CPIN?. If the response is +CPIN: SIM Ready you are fine. Otherwise, If the response is +CPIN: SIM PIN, you have to insert the PIN code by issuing

AT+CPIN=<PIN>
1
votes

I found what was problem. Power supply for GSM did not have enough Amps.. For GSM you must provide 3.3V and 3A from power supply unit. GSM don't have 6.5W power consumption if you think that GSM need 3A all the time. GSM have peaks of current up to 2A and thats why you need more Amps.