EHS6 Modem: TCP PAD Configuration Fails - PDP Context Problem | Telit Cinterion IoT Developer Community
April 14, 2017 - 7:58pm, 8086 views
Dear Group:
What I am trying to do is configure the Gemalto EHS6 wireless modem as a
TCP PAD and Internet client, such that only TCP payload data flows across the
modem serial port once a TCP connection is established. So far I have failed.
A description of the modem configuration and AT commands used follows. (i.e.
Please note that configuration is being done with Hyperterminal on a PC and that
the modem is connected to the PC via its serial port.)
The problem appears to be related to PDP context configuration. Please
advise me of the correct way to configure the modem as a TCP PAD.
I have confirmed that the modem has UMTS network connectivity and the SIM
being used is functional. In addition, the modem is able to receive SMS messages
via the network, and perform basic PDP context operations. The APN used to verify
that is telargo.t-mobile.com and the following AT command was used to configure
the PDP context and APN.
AT+CGDCONT=1,"IP","telargo.t-mobile.com",,0,0
Also, I verified that the Internet server is functional and does not require
authentication.
The AT commands I am using to configure the modem as a TCP PAD and a description of
their use follows.
* Reset the modem to factory settings.
AT&F
* Configure operation on a UMTS network with a GPRS core and the APN.
AT^SICS=0,conType,GPRS0
AT^SICS=0,apn,telargo.t-mobile.com
* Configure transparent service for a UMTS network with UTRAN RAN.
(i.e. Service profile 2.) Note, that substituting "Socket" for "Transparent"
as in the tutorial makes no difference, and I believe that Transparent is
correct. Please advise me if this is wrong.
AT^SISS=2,srvType,"Transparent"
AT^SISS=2,conID,0
* Configure the Internet server address and Port and set 26=Ctrl-Z as the
escape character. I have hard coded the IP address because the modem
doesn't appear to have DNS resolution capability. Is there a way to
configure the modem to perform DNS resolution.
AT^SISS=2,address,"socktcp://10.224.141.12:634;etx=26;timer=300"
* Open Transparent Service. Initially the response is OK but if you
wait for a short period the response is ^SIS: 2,0,94, "PDP: connection failed".
If the command is successful, a TCP connection with the Internet server should
be established at this point.
AT^SISO=2
* Enable Transparent Service. This always fails. If the command is successful,
it should be possible to send and receive TCP payload data via the modem
serial port at this point.
AT^SIST=2
Hello,
The AT+CGDCONT setting is not used by this type of connection, the APN is configured only with AT^SICS command.
The error message would mean that the problem is with the PDP context not the configuration of the connection. Maybe there's a problem with network signal quality, antenna etc.
Have you tried other type of connection, for example http to read some simple website for verification?
DNS should be working - normally the DNS address should be provided by the network but it depends on the particular network. You can also configure it manually with AT^SICS command.
Is your application sending other commands at the time of transparent tcp attempt? Please also paste the complete log.
Actually the IP address from your post is from the private pool.
Best regards,
Bartłomiej
Hi Bartiomiej:
In answer to your question, I can establish a TCP connection to the
server successfully using port 634. However, the application on port
634 is not a web server.
I believe that DNS works correctly and would appreciate it if you
could point me to instructions for enabling DNS. I assume the only
requirement is that the ISP has DHCP capability.
My application is not issuing an AT commands except those I mentioned.
Also, I did not use AT+CGDCONT in my previous connection attempts.
Also, I noticed some people make a TCP connection as follows.
(i.e. adp.aquamonrsvp.com is a real server.)
ATDT adp.aquamonrsvp.com,634
However, I can find no description of the ATDT command in the manual.
Please explain.
Finally a trace of a TCP connection attempt follows as you requested.
Best Regards,
Paul R.
**************************************************
^SYSLOADING
^SYSSTART
+PBREADY
at
OK
at
OK
at&f
OK
at^sics=0,conType,GPRS0
OK
at^sics=0,apn,telargo.t-mobile.com
OK
at^siss=2,srvType,"Transparent"
OK
at^siss=2,conId,0
OK
at^siss=2,address,"socktcp://10.224.141.12:634;etx=26;timer=300"
OK
at^siso=2
OK
^SIS: 2,0,94,"PDP: connection failed"
Hello,
My intention was to check if you are able to establish http connection to google.com for example using the same SICS settings to verify if PDP will be established. If not we have another evidence that there's something wrong with the APN settings or similar. If it succeeds, the situation is strange because this type of error ("PDP: connection failed") should indicate that there is a problem with connection to internet in general, not with particular service on top of that.
Example for manual configuration of the DNS address:
AT^SICS=2,"dns1","8.8.8.8"
If you don't do this the DNS address should be obtained from the network automatically.
ATDT stands for tone dial. It is accepted by the module probably for the compatibility reasons. It should not make any difference compared to ATD.
However your example of ATDT usage will not work.
I have tried a similar connection to yours (I have only changed the IP address and APN) and it succeeded.
Best regards,
Bartłomiej
Hi Bartiomiej:
I will try what you suggested. I don't know if this important but my application is a pure
TCP rather than HTTP application.
Best Regards,
Paul R.
Hi Bartiomiej:
I was able to establish a partial TCP connection to www.lmi.net:80 and
adp.aquamonrsvp.com:634 very briefly. The diagnostics suggest that the
remote server closed the connection. However, I know that adp.aquamonrsvp.com:634
does not automatically close established TCP connections. Consequently, I
think there is a configuration problem or some problem with the wireless
ISP which is Wyless. Please note than I can reliably establish a TCP connection
with adp.aquamonrsvp.com:634 with 100% reliability via the open Internet
rather than the APN telargo.t-mobile.com.
Two traces follows. First, the final segment of a TCP connection attempt
with www.lmi.net:80. Second, a complete trace of a TCP connection attempt
with adp.aquamonrsvp.com:634.
In both case the AT^SIST=2 command eventually fails but for different reasons.
Also, note a minor variation in the modem response to AT^SISO=0.
Best Regards,
Paul R.
*********************** TRACE SEGMENT ******************
Comment: Partially successful connection to 66.117.140.16 Port 80. (i.e. www.lmi.net )
I am not sure about authentication requirements in this case.
at^siss=2,address,"socktcp://66.117.140.16:80;etx=26;timer=300"
OK
at^siso=2
OK
^SISW: 2,1
at^sist=2
ERROR
^SIS: 2,0,48,"Remote peer has closed the connection"
^SISR: 2,2
********************** COMPLETE TRACE *********************
Comment: Partially successful connection to 10.224.141.12 Port 634.
(i.e. adp.aquamonrsvp.com ) No authentication is required in this case.
at&f
OK
Comment: Restart modem
^SYSLOADING
^SYSSTART
+PBREADY
at
OK
at&f
at
OK
at^sics=0,conType,GPRS0
OK
at^sics=0,apn,telargo.t-mobile.com
OK
at^siss=2,srvType,"Transparent"
OK
at^siss=2,conId,0
OK
at^siss=2,address,"socktcp://10.224.141.12:634;etx=26;timer=300"
OK
at^siso=2
OK
at^sist=2
ERROR
^SIS: 2,0,14,"An established connection was aborted, possibly due to data transmission"
Hello,
I have repeated your test.
In case of connection to 10.224.141.12 Port 634 there's the same result - I can't switch to transparent data mode with at^sist=2 because the connection is not established - you can check the status with AT^SISI?, the result is ^SISI: 2,3,0,0,0,0 which means that the service is in the connecting state. Finally there's similar result and SISI shows that the connection is down.
However I still was able to successfully connect to a different server. So it seems that there's some problem with your server configuration or something else. Do you have a possibility to trace TCP traffic on the server side?
In case of connection to 66.117.140.16 Port 80 I have also received the same result. But I have also tried to google.com IP address and there was no such problem. So I think that again it may depend on the server configuration - this is http servers and it is possible that it closes the connection in case of not receiving any http request.
By the way I have also faced the DNS issue - it turned out that domain names are not supported for socket connections, only for http, smtp, and ftp. It is written in AT commands specification document. Seems that I have mislead you here. I'm sorry.
Regards,
Bartłomiej
Hi Bartiomiej:
I attempted to connect to the 10.224.141.12:634 a few more ***** and
noticed the following details.
* AT^SISO=2
The response to this command is "OK" but I never set "^SISW:2,1".
* AT^SIST=2
This command fails with the following response as before:
ERROR
^SIS: 2,0,14,"An Established connection was aborted possibly due to a data transmission"
If I monitor the server during connection establishment after AT^SISO=2 has been issued
and do not issue AT^SIST=2, this is what happens.
Eventually, AT^SISO=2 ***** out with the same diagnostic I mentioned above--2,0,14.
Before the timeout, I can verity that a TCP connection was established with the server
and right ****** is established using the Linux netstat and ps utilities. When I issue
the AT^SISI? command, it shows that the status is 3--Connecting, as you predicted. This
suggests that the application ****** timed out is some way. Does this seem reasonable to you ?
I will contact Wyless and try to determine if they abort a TCP connection if data
does not start flowing soon enough, and I will investigate the server application
****** and try to determine the same.
Best Regards,
Paul R.
Hello,
I haven't noticed one very important thing while testing your scenario...
In fact I have already been trying in one of my previous posts to draw your attention at the fact that the address 10.224.141.12 is private so it is not accessible from the public network that is used by the module.
But at the moment of testing I have somehow missed it...
So I have pinged the adp.aquamonrsvp.com domain and got the public address 207.20.229.104. Then I have repeated the test and got connected.
Regards,
Bartłomiej
Hi Bartiomiej:
You are correct. I verified that Wyless cannot access the address 10.224.14.12 because
it is private. In addtion, in contrast to reality, you should not be able to access that
address over the open Internet.
Best Regards,
Paul R.
Hi Bartiomiej:
A outgoing TCP connection fails under the following conditions.
The SMS configuration, below, is performed first, and the TCP configuration, below,
is performed second.
If you attempt a TCP connection, with AT^SICO=2 and no SMS messages have been
received, it works correctly. However, if you attempt a TCP connection with
AT^SICO=2, after an SMS message has been received and AT^SISC=2 has been issued,
it fails with the following diagnostic.
^SIS: 2,0,94, "PDP: connection failed"
The AT^SISI command response indicates the connection status 2 which means allocated.
Is there something that ***** to be done after receiving an SMS message, to
enable outgoing TCP connections ? Maybe the PDP context ***** to be deallocated
some way ?
* SMS Configuration
Command: AT+CSMS=0
Command: AT+CMGF=1
Command: AT+CSMP=17,169,0,0
Command: AT+CNMI=2,1,0,0,0
Command: AT+CPMS="SM","SM","SM"
* TCP Configuration
Command: AT^SICS=0,conType,GPRS0
Command: AT^SICS=0,apn,telargo.t-mobile.com
Command: AT^SISS=2,srvType,"Transparent"
Command: AT^SISS=2,conId,0
Command: AT^SISS=2,address,"socktcp://207.20.229.104:634;etx=26;timer=300"
Best Regards,
Paul R.
Pages