HL6: AT+CMGS returns ERROR several times before succeeding

Below you can see the communication between the MCU and the HL6. It appears that sending the SMS fails several times before it works. I see no reason why it shouldn’t work the first time. The retry count is in the area of 10 - 40, sometimes lower. I checked the SMS PDU with the online tool available here http://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-pdu-decoder/. SIM unlocking and attaching to the network work fine. I have the *PSNTRG URC enabled so I always know whether I am able to send or not.

22.04.2015 15:57:16.002 [COM24] - AT+CMGS=137<CR>

22.04.2015 15:57:16.004 [COM17] - <CR><LF>
> 
22.04.2015 15:57:16.535 [COM24] - 0011000D91945137245350F60000AA8BC2B75BFDAECB41CDB09C9E768358206519D42ED3E7207619347CB7C569D0BC2E07B5C3F231BACC02D1CB6D78411EA6D7E56510B90C1ABFDDF3F4D95D06C9664316C85E76D3D3EC30BD5C9783AC452795052A87EBA0A7D1C80285EDE531E818D6BB40D330BB4E0FD3D36FF79C05B2BFE9F23228ED2CD341C2371E<SUB>
22.04.2015 15:57:16.547 [COM17] - <CR><LF>
ERROR<CR><LF>

22.04.2015 15:57:48.543 [COM24] - AT+CSQ<CR>

22.04.2015 15:57:48.550 [COM17] - <CR><LF>
+CSQ: 18,99<CR><LF>
<CR><LF>
OK<CR><LF>

22.04.2015 15:57:48.559 [COM24] - AT+CMGS=137<CR>

22.04.2015 15:57:48.566 [COM17] - <CR><LF>
> <CR><LF>
ERROR<CR><LF>

22.04.2015 15:57:49.095 [COM24] - 0011000D91945137245350F60000AA8BC2B75BFDAECB41CDB09C9E768358206519D42ED3E7207619347CB7C569D0BC2E07B5C3F231BACC02D1CB6D78411EA6D7E56510B90C1ABFDDF3F4D95D06C9664316C85E76D3D3EC30BD5C9783AC452795052A87EBA0A7D1C80285EDE531E818D6BB40D330BB4E0FD3D36FF79C05B2BFE9F23228ED2CD341C2371E<SUB>AT+CSQ<CR>

22.04.2015 15:58:21.112 [COM17] - <CR><LF>
+CSQ: 18,99<CR><LF>
<CR><LF>
OK<CR><LF>

22.04.2015 15:58:21.118 [COM24] - AT+CMGS=137<CR>

22.04.2015 15:58:21.128 [COM17] - <CR><LF>
> 
22.04.2015 15:58:21.653 [COM24] - 0011000D91945137245350F60000AA8BC2B75BFDAECB41CDB09C9E768358206519D42ED3E7207619347CB7C569D0BC2E07B5C3F231BACC02D1CB6D78411EA6D7E56510B90C1ABFDDF3F4D95D06C9664316C85E76D3D3EC30BD5C9783AC452795052A87EBA0A7D1C80285EDE531E818D6BB40D330BB4E0FD3D36FF79C05B2BFE9F23228ED2CD341C2371E<SUB>
22.04.2015 15:58:21.656 [COM17] - <CR><LF>
ERROR<CR><LF>

22.04.2015 15:58:53.661 [COM24] - AT+CSQ<CR>

22.04.2015 15:58:53.674 [COM17] - <CR><LF>
+CSQ: 18,99<CR><LF>
<CR><LF>
OK<CR><LF>

22.04.2015 15:58:53.677 [COM24] - AT+CMGS=137<CR>

22.04.2015 15:58:53.690 [COM17] - <CR><LF>
> 
22.04.2015 15:58:54.211 [COM24] - 0011000D91945137245350F60000AA8BC2B75BFDAECB41CDB09C9E768358206519D42ED3E7207619347CB7C569D0BC2E07B5C3F231BACC02D1CB6D78411EA6D7E56510B90C1ABFDDF3F4D95D06C9664316C85E76D3D3EC30BD5C9783AC452795052A87EBA0A7D1C80285EDE531E818D6BB40D330BB4E0FD3D36FF79C05B2BFE9F23228ED2CD341C2371E<SUB>
22.04.2015 15:58:59.173 [COM17] - <CR><LF>
+CMGS: 125<CR><LF>
<CR><LF>
OK<CR><LF>

Can you set AT+CMEE=1 and see what exact error is coming?

I started using a new SIM card from the same provider and the problem is gone. It appears that the SIM card was worn out due to many slot-insertion cycles. At least that is my theory. Indeed ony I was encountering the issue. Testers didn’t see the problem although I gave them a heads up.

BTW… I double checked the prepaid balance. That wasn’t the issue.

I think here are some people that have used a GSM modem a couple of times more often than I have. Is this a plausible explanation? The SIM card may have been inserted and ejected about 3000 times during the last half year.

Again, AT+CMEE=1 to see the precise error code would give more information to go on.

SIM cards are certainly not designed for that kind of service :exclamation:

:open_mouth: