Send SMS issue with TCP connection

Hello,
I have an issue using FX100 (see picture for packages versions).
So,
I have downloaded in the modem the sample “tcp_client Sample” provided by sierra. So now the problem :
If I stop the Open AT application (here “tcp_client Sample”) I can send and receive SMS using console with AT+CMGS command.
Now if I start the Open AT application, I receive CMS ERROR 513.
Here the console capture :
Without Open AT application running (“tcp_client Sample”) :
+WIND: 13
+WIND: 13
+CREG: 0
+WIND: 7
+WIND: 1
+CREG: 2
+CREG: 1
+WIND: 16
+WIND: 4
+WIND: 10,“SM”,0,“FD”,0,“ON”,0,“SN”,0,“EN”,0
+WIND: 11,“ACD2BDCE4B8123886ADE97461DF2E760”,“935027F0A3ADD8904F411C9A205474AF”
at+cmgs=“XXXXXXXXXX”

test
+CMGS: 3
OK

After stating Open AT Application:
+CREG: 0
+CREG: 2
+CREG: 1
at+cmgs=“XXXXXXXXXX”

test
+CMS ERROR: 513

But It is possible to receive SMS!??
So to sumuarize :
1 - FX100 works properly (antenna, location, network…)
2 - Without TCP connection SMS can be sent en received properly
3 - With TCP connection established, SMS can be received but “+CMS ERROR: 513” occurs when I try to send a SMS with my custom application (adl api) and/or with console.

or during application “tcp_client Sample”

2015/09/02;14:32:19:706;001;ADL;4;Embedded Application : Main
2015/09/02;14:32:19:707;001;ADL;4;(CfgGprs) Enter.
2015/09/02;14:32:23:304;001;ADL;4;(cbEvhSim) Enter.
2015/09/02;14:32:23:789;001;ADL;4;(cbEvhSim) Enter.
2015/09/02;14:33:15:516;001;ADL;4;(cbEvhSim) Enter.
2015/09/02;14:33:15:516;002;ADL;4;(cbPollCreg) Enter.
2015/09/02;14:33:15:516;003;ADL;4;(cbPollCreg) Registered on GPRS network.
2015/09/02;14:33:15:517;001;ADL;27;Call subs 1071358F : 0
2015/09/02;14:33:15:518;001;ADL;16;[ADL port] IsAvailable(80) : 1
2015/09/02;14:33:15:677;001;L3SMG;1;45 43 4d 31 00 04 00 02 00 00 20 00
2015/09/02;14:33:18:755;001;ADL;4;[SAMPLE]: connecting to client %s:%i
2015/09/02;14:33:19:564;001;ADL;4;[SAMPLE] Connection established successfully
2015/09/02;14:33:19:570;001;ADL;4;[SAMPLE] Can send more data
2015/09/02;14:33:19:572;001;ADL;4;[SAMPLE] Everything has been sent, won’t send more.

console :
+CREG: 1
at+cmgs=“XXXXXXXXXX”

test
+CMGS: 22
OK

at+cmgs=“XXXXXXXXXX”

test
+CMS ERROR: 513

Any idea??
Thanks

Hi,
I have a new information about this issue.
Normaly, in my previous descritpion I have pointed that without TCP connection, sending a SMS works properly. Now I have removed the antenna and the modem reports CMS ERROR 513!
Maybe something around signal quality?
Here the values when modem cannot send SMS (=TCP enabled and connected):
at+creg?
+CREG: 1,1
OK
at+csq
+CSQ: 4,0
OK
now when TCP is disabled
at+creg?
+CREG: 1,1
OK
at+csq
+CSQ: 9,0
OK
Whith my understanding, it seems that the signal quality is very BAD.

But Why the signal quality decrease when an internet connexion is activer?

Have you looked up what +CMS ERROR: 513 actually means :question:

yes of course : Error: CMS ERROR 513: Lower layer failure (for SMS)
but it doesn’t help me. I have done some search on this forum (using “Lower layer failure” as key words) and google, and I didn’t manage to find any explanation that solve this issue.
But this reseach pointed that signal quality can have an impact an generate this error. So I have tried without antenna on a working configuration, an this error fired! So I have double checked the signal quality with AT+CSQ command and I noticed that the signal quality level decrease.
All this observation doen’t help me to find a solution or a workaround.

Using “tcp_client Sample” I can observe that from application startup, until the GPRS registration, it is possible to send SMS. But after GPRS registration, I receive +CMS ERROR: 513 :
A) Application Trace
01 - 2015/09/04;10:11:45:208;001;ADL;4;Embedded Application : Main
02 - 2015/09/04;10:11:45:218;001;ADL;4;(CfgGprs) Enter.
03 - 2015/09/04;10:11:48:636;001;ADL;4;(cbEvhSim) Enter.
04 - 2015/09/04;10:11:49:134;001;ADL;4;(cbEvhSim) Enter.
05 - 2015/09/04;10:12:45:558;001;ADL;4;(cbEvhSim) Enter.
06 - 2015/09/04;10:12:45:558;002;ADL;4;(cbPollCreg) Enter.
07 - 2015/09/04;10:12:45:559;001;ADL;4;(cbPollCreg) Registered on GPRS network.
08 - 2015/09/04;10:12:45:559;002;ADL;27;Call subs 1071358F : 0
09 - 2015/09/04;10:12:45:560;001;ADL;16;[ADL port] IsAvailable(80) : 1
10 - 2015/09/04;10:12:45:697;001;L3SMG;1;45 43 4d 31 00 04 00 02 00 00 20 00
11 - 2015/09/04;10:12:49:328;001;ADL;4;[SAMPLE]: connecting to client %s:%i
12 - 2015/09/04;10:12:49:766;001;ADL;4;[SAMPLE] Connection established successfully
13 - 2015/09/04;10:12:49:766;002;ADL;4;[SAMPLE] Can send more data
14 - 2015/09/04;10:12:49:769;001;ADL;4;[SAMPLE] Everything has been sent, won’t send more.
B) console command :

OK
+CREG: 0
+CREG: 2
+CREG: 1
at+cmgs=“XXXXXXXXXX”

test
+CMGS: 97
OK

at+cmgs=“XXXXXXXXXX”

test
+CMGS: 98
OK

at+cmgs=“XXXXXXXXXX”

test
+CMGS: 99
OK
=> after step 7 achieved (see on trace above)
can’t send SMS
at+cmgs=“XXXXXXXXXX”
test
+CMS ERROR: 513

Hi,
here the answer from sierra. This workaround works properly for me!


There is a command AT+CGSMS which is used set the MO SMS transport service. On FX100/ Q2698, its default value is set to 3. Can you please confirm the response of AT+CGSMS? command and if it is not equal to 1, set it to 1 using AT+CGSMS=1. And after that try to send SMS while application is running.

We have tested it and it is working fine with AT+CGSMS=1. In other cases, we are also able to see the issue.
Test once again with AT+CGSMS value set to 1 and let us know in case of any issue.

Hi
Basically the command AT+CGSMS tell the device to use either circuit switched service or packet switched service to send the SMS out.

The SMS which is generally send over circuit switched service, while TCP connection is ON (which is over GPRS) the device will try to send the SMS over GPRS if the service is not selected as 1 ( circuit switched).

Me too had this issue, and this solution worked for me.