Transparent service issue | Telit Cinterion IoT Developer Community
May 25, 2021 - 8:21pm, 2261 views
I am trying to use the Transparent service to send my file upload.CSV to the /ftp/ directory on my server. I have the following sequence of commands. For some reason, I get an error from the modem when the address is loaded (AT^SISS=0,"address","socktcp://cnktechlabs.com:80;ext;timer=200”). For some reason the modem doesn’t like the address string.
AT^SISS=0,"srvType","Socket"
AT^SISS=0,"conId",3
AT^SISS=0,"address","socktcp://cnktechlabs.com:80;ext;timer=200”
AT^SISS=0,"alphabet",1
AT^SISS=0,"path","/ftp/"
AT^SISS=0,"files","upload.CSV"
AT^SICA=1,3
AT^SICA?
AT^SISO=0
at^sisi?
at+cmee=2
at^sist=0
at^sisi=0
AT^SISO?
write_file() //Send data string to the modem over ttyACM0 interface
+++
at^sisi?
AT^SISC=0
Hello,
Could you write what module you are using (ATI1 reply)?
And when exactly the error comes - on the address configuration - AT^SISS=0,"address","socktcp://cnktechlabs.com:80;ext;timer=200” - or when you open the connection with AT^SISO or later. Please paste the log with module replies.
Best regards,
Bartłomiej
The module complained that the address parameter doesn't exist. I changed the address to socktcp://cnktechlabs.com:80 and it seems to work in transparent mode.
I have the following sequence of commands and it seems to work somehow. I was able to POST 2700 byte file to my webapplicatio. Does the sequence makes sense?
AT^SISS=0,"srvType","Transparent"
AT^SISS=0,"conId",3
AT^SISS=0,"address","socktcp://cnktechlabs.com:80"
AT^SISS=0,"alphabet",1
AT^SICA=1,3
AT^SISO=0
at^sisi?
at+cmee=2
at^sist=0
POST /url.php HTTP/1.1
Host: cnktechlabs.com
Content-Type: application/x-www-form-urlencoded + "\r\n" + "Content-Length: " + ContentLength + "\r\n\r\n" + "rsvp=" + file_string
There are some slight differences between modules regarding IP services. It would be easier to verify this if you pasted ATI1 reply from the module.
Hi, below "Sent command" is the command I send to the module (ELS31). "Mdm Rspnse" is the response I get from the module. It seems to work. My web application receives the data sent with the POST request.
Sent commnd: b'AT^SISS=0,"srvType","Transparent"\r\n'
Mdm Rspnse: b'OK\r\n'
Sent commnd: b'AT^SISS=0,"conId",3\r\n'
Mdm Rspnse: b'AT^SISS=0,"srvType","Transparent"\r\r\n'
Mdm Rspnse: b'OK\r\n'
Sent commnd: b'AT^SISS=0,"address","socktcp://cnktechlabs.com:80"\r\n'
Mdm Rspnse: b'AT^SISS=0,"conId",3\r\r\n'
Mdm Rspnse: b'OK\r\n'
Sent commnd: b'AT^SISS=0,"alphabet",1\r\n'
Mdm Rspnse: b'AT^SISS=0,"address","socktcp://cnktechlabs.com:80"\r\r\n'
Mdm Rspnse: b'OK\r\n'
Sent commnd: b'AT^SICA=1,3\r\n'
Mdm Rspnse: b'AT^SISS=0,"alphabet",1\r\r\n'
Mdm Rspnse: b'OK\r\n'
Sent commnd: b'AT^SISO=0\r\n'
Mdm Rspnse: b'AT^SICA=1,3\r\r\n'
Mdm Rspnse: b'OK\r\n'
Mdm Rspnse: b'AT^SISO=0\r\r\n'
Mdm Rspnse: b'ERROR\r\n'
Resending command...
Mdm Rspnse: b'AT^SISO=0\r\r\n'
Mdm Rspnse: b'OK\r\n'
Mdm Rspnse: b'\r\n'
Mdm Rspnse: b'^SISW: 0,1\r\n'
Sent commnd: b'at^sisi?\r\n'
Mdm Rspnse: b'at^sisi?\r\r\n'
Mdm Rspnse: b'^SISI: 0,4,0,0,0,0\r\n'
Mdm Rspnse: b'\r\n'
Mdm Rspnse: b'OK\r\n'
Sent commnd: b'at+cmee=2\r\n'
Mdm Rspnse: b'at+cmee=2\r\r\n'
Mdm Rspnse: b'OK\r\n'
Sent commnd: b'at^sist=0\r\n'
Mdm Rspnse: b'at^sist=0\r\r\n'
Mdm Rspnse: b'CONNECT\r\n'
Sent commnd: b'POST /url.php HTTP/1.1\nHost: cnktechlabs.com\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 2327\r\n\r\nrsvp=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28\nCycle Stop Time
Mdm Rspnse: b'HTTP/1.1 200 OK\r\n'
Mdm Rspnse: b'Date: Thu, 27 May 2021 15:51:05 GMT\r\n'
Mdm Rspnse: b'Content-Type: text/html\r\n'
Mdm Rspnse: b'Content-Length: 2446\r\n'
Mdm Rspnse: b'Connection: keep-alive\r\n'
Mdm Rspnse: b'Keep-Alive: timeout=30\r\n'
Mdm Rspnse: b'Server: Apache/2\r\n'
Mdm Rspnse: b'X-Powered-By: PHP/5.3.29\r\n'
Mdm Rspnse: b'Set-Cookie: PHPSESSID=e16ecd84d443f48c808b9c03f5bb225e; path=/\r\n'
Mdm Rspnse: b'Expires: Thu, 19 Nov 1981 08:52:00 GMT\r\n'
Mdm Rspnse: b'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n'
Mdm Rspnse: b'Pragma: no-cache\r\n'
Mdm Rspnse: b'\r\n'
Mdm Rspnse: b'<!DOCTYPE html>\r\n'
Mdm Rspnse: b'<html lang="en">\r\n'
Mdm Rspnse: b'\r\n'
Mdm Rspnse: b'<body>\r\n'
Mdm Rspnse: b'\tV-00: \n'
Mdm Rspnse: b'got from POST: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28\n'
Mdm Rspnse: b'Cycle Stop Time,Username,Ignore,Cycle Start Time,Room Number,Ignore,Cycle Start Time,Cycle Stop Time
Mdm Rspnse: b'</body> </html>\x10\x04\r\n'
Mdm Rspnse: b'NO CARRIER\r\n'
Mdm Rspnse: b'\r\n'
Mdm Rspnse: b'^SIS: 0,0,48,"Remote peer has closed the connection"\r\n'
Mdm Rspnse: b'\r\n'
Mdm Rspnse: b'^SISR: 0,2\r\n'
Sent commnd: b'AT^SISC=0\r\n'
Mdm Rspnse: b'AT^SISC=0\r\r\n'
Mdm Rspnse: b'OK\r\n'
Hello,
I don't have this module now to check but according to the AT specification there is no "Transparent" value for "srvType" parameter. "Socket" should be used and "etx" subparameter added to URL.
I'm sure that there also was "Transparent" value for "srvType" for some module. In that case "etx" is not necessary as a marker.
Regards,
Bartłomiej
Hi,
Thank you for your reply. It is kind of strange, but when I change to AT^SISS=0,"srvType","Socket" and set address to AT^SISS=0,"address","socktcp://cnktechlabs.com:80;ext;timer=200". I get ^SIS: 0,0,56,"address parameter missing" from the modem. Not sure why, but it seems to work when I set service type to Transparent.
There should be 'etx', not 'ext' added to the address string. I didn't notice this earlier, even when I wrote you about 'etx', I didn't notice that there is 'ext' in your logs. Anyway I tried this configuration with ELS31-VA module and it worked.
Regards,
Bartłomiej
Thank you,
this fixed the problem