ENS22 - Unable to open a TCP socket | Telit Cinterion IoT Developer Community
October 3, 2019 - 2:20pm, 3326 views
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.
I presume TCP is supported with this f/w version?
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?
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:
says that the module has embedded TCP/IP.
Do you know if TCP support is planned for this device and, if so, when?
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.
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.
ENS22 UDP Socket attempt.txt
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:
you can try the following:
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."
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?
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.