ENS22 - Unable to open a TCP socket | Telit Cinterion IoT Developer Community
October 3, 2019 - 2:20pm, 3324 views
Hello.
I'm using the ENS22 in conjunction with the DSB75. I'm trying to open a TCP socket to a webserver on my PC - this webserver is working correctly, I am able to access it externally using various mobile devices (via PLMNs). I have access to a local Vodafone NB-IoT tower using a Vodafone trial SIM, the SIM works fine and allows TCP socket connections using NB modems from another manufacturer.
I've attached my log as a text file.
The documentation that I have for this modem seems to concentrate more on UDP connections than TCP.
Version: 01.000
DocId: ENS22-E_ATC_V01.000
I presume TCP is supported with this f/w version?
Thanks.
Steve
Hello,
SICS defines the connection profile for SISS command. The profile number is not related to profiles defined with CGDCONT. PAP authentication is used if user and password are configured. PDP: connection failed" most likely means the wrong APN settigns, no data subsription on SIM which you are using or any other problem with PDP connection. It should not be related to the service that you are trying to use but in AT specification that I have there are no TCP connections. I can only see UDP and ping. You are trying to use TCP and the module accepts it while according to the doc it should not. Please try UDP or ping for comparison.
Please also try some diagnostic commands like AT+CGPADDR, AT+CGATT?, AT+CGDCONT?, AT+CEREG?, AT^SICI?, AT^SISI?
Regards,
Bartłomiej
Thanks Bartłomiej
The APN settings are definitely correct & the SIM is working fine. I'm able to Ping to presumably the module simply doesn't support TCP.
The documentation does mostly refer to UDP, but it also has references to TCP and the Gemalto webpage:
https://www.gemalto.com/m2m/solutions/modules-terminals/industrial/ens22
says that the module has embedded TCP/IP.
Do you know if TCP support is planned for this device and, if so, when?
Thanks
Steve
Hello,
So PING is working - it would suggest that it's not a PDP issue. And how about UDP - did you also try?
You have revision 1 module. Next revisinos are now being prepared which support socket connecitons - that probably explains the information in the document that you refer. The new modules should be available soon but I cannot give you an exact date. Please contact your local technical sales - maybe it's possible to already get the new samples.
Best regards,
Bartłomiej
Hi Bartłomiej
I've managed to come back to the ENS22 again to test a UDP connection; unfortunately, I can't get a UDP socket to open either - with the same error as I got for TCP.
The server I'm using is definitely working - I'm able to connect and communicate via UDP using other modems.
I've attached a log of my sequence, again.
Thanks.
Steve
Hello,
I don't have NB-IoT network here to test.
I think that it's possible that your provider does not allow multiple PDP contexts. Please send at+cgpaddr command to check if there's any IP addresses assigned to the module. If for example you get this reply:
+CGPADDR: 0,"***.***.***.***"
you can try the following:
at^sics=0,"conType","GPRS0"
at^siss=0,"conId","0"
and then try to open the connection.
According to the documentation "After entering AT^SISO, Cinterion® ENS22-E automatically tries to find and attach to an existed Packet Domain with same <conParmValue-conType> and APN, if not found, Cinterion® ENS22-E automatically tries to define and acti-vate a new Packet Domain with <conParmValue-conType> and APN."
Best regards,
Bartłomiej
Thanks Bartlomiej, you were right, I was using the wrong PDP context.
I'm just looking into the DTLS capability of the ENS22. Since the modem only supports the single PSK suite, can I simply open the service with "SOCKUDPS" or do I need to use the AT^SNBW command to configure it first?
If SNBW is required is there any documentation that describes it in more detail?
I currently don't have a DTLS server to communicate with, so could you advise, please?
Thanks again
Steve
Hello,
I cannot recommend you any public DTLS server as I haven't tested DTLS. According to the documentation DTLS available with ENS22 moudle only supports pre-shared keys(PSKs) for authentication. So I expect that you have to store some PSK before you can use DTLS. I haven't found any more documents regarding DTLS on this module.
Regards,
Bartłomiej