Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

EHS5 HTTP Post Basic Authentication Not Being Sent | Telit Cinterion IoT Developer Community

March 16, 2017 - 6:07pm, 4193 views

Hello!

I am working on sending an HTTP Post to a server that uses basic authentication and I have not been able to get the modem to send out the authentication header containing the username and password.

What I have tried and looked at so far:

* I have verified that my modem is using the GSM character set

* I have tried defining the user name and password on their own using the "passwd" and "user" variables when defining my service profile

* I have tried placing the username and password in the URL for the server (both using the escape for '@' and also simply using the @ symbol)

When I use the escape character for '@', I get a parameter error - bad address when trying to open the HTTP service.  When I simply place the '@' character in the string, it appears to accept it, but again, the basic authentication is not sent with the HTTP Post.  I don't understand why the @ symbol appears to be accepted (it might not be in reality, but I can't tell), yet the escape sequence is NOT accepted, even though the documentation leads me to think that just the opposite should be working given I am using the GSM character set.

I have version 3.001 of firmware on my modem; is there any chance it ***** to be updated?  Is there a location to find the latest versions of firmware and a change log for the different firmware versions?

I am posting to the httpbin.org/post service at the moment that will bounce my post request right back to me for inspection.  I have also used the requestb.in service to catch and view my post requests as well.  Neither service is showing me the authentication (and I can "hurl" a post at those services using basic authentication, and I do see the authentication, so I think I know what to look for).

I'd like to confirm I don't need to define the authentication type for PDP using AT^SGAUTH or anything like that to activate the basic HTTP authentication.  My understanding is that if I place a username and password in the service profile, it will use them when the post command occurs.  Is that correct?

Thanks so much for any feedback anyone can offer me!

Adam

Here is a "sniffed" log file of one of the many transactions that I have tried, that I *think* should work based on my current understanding (USER NAME and Password are changed from real, but show the characters and format that are typically used):

3/16/2017 11:04:42.145 [COM2] - AT^SICS=0,conType,none<CR><LF>

3/16/2017 11:04:42.173 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:42.186 [COM2] - AT^SICS=0,conType,GPRS0<CR><LF>

3/16/2017 11:04:42.217 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:42.229 [COM2] - AT^SICS=0,apn,"Broadband"<CR><LF>

3/16/2017 11:04:42.257 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:42.771 [COM2] - AT^SISS=6,srvType,"Http"<CR><LF>

3/16/2017 11:04:43.007 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.033 [COM2] - AT^SISS=6,conId,"0"<CR><LF>

3/16/2017 11:04:43.067 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.096 [COM2] - AT^SISS=6,"address","http://httpbin.org/post"<CR><LF>

3/16/2017 11:04:43.126 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.156 [COM2] - AT^SISS=6,"user","10101"<CR><LF>

3/16/2017 11:04:43.175 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.205 [COM2] - AT^SISS=6,"passwd","D5NtS"<CR><LF>

3/16/2017 11:04:43.228 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.246 [COM2] - AT^SISS=6,cmd,"post"<CR><LF>

3/16/2017 11:04:43.261 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.286 [COM2] - AT^SISS=6,"hcContLen","2"<CR><LF>

3/16/2017 11:04:43.320 [COM3] - <CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.348 [COM2] - AT^SISO=6<CR><LF>

3/16/2017 11:04:43.424 [COM3] - <CR><LF>
OK<CR><LF>
<CR><LF>
^SIS: 6,0,2200,"Http httpbin.org:80"<CR><LF>
<CR><LF>
^SISW: 6,1<CR><LF>

3/16/2017 11:04:43.585 [COM2] - ATI1<CR><LF>

3/16/2017 11:04:43.608 [COM3] - <CR><LF>
Cinterion<CR><LF>
EHS5-US<CR><LF>
REVISION 03.001<CR><LF>
A-REVISION 00.000.31<CR><LF>
<CR><LF>
OK<CR><LF>

3/16/2017 11:04:43.630 [COM2] - AT^SISW=6,199,1<CR><LF>

3/16/2017 11:04:43.761 [COM3] - <CR><LF>
^SISW: 6,199,0<CR><LF>

3/16/2017 11:04:43.794 [COM2] - cust=ADAM<LF>
proc_fw=4.68<LF>
cpld_fw=0.02<LF>
modem_manuf=Cinterion<LF>
modem_model=EHS5-E<LF>
modem_sn=4764177927<LF>
sim_imei=357041062026839<LF>
sim_iccid=89014103278148719019<LF>
sim_imsi=310410814871901<LF>
call_spacing=120,360<LF>

3/16/2017 11:04:47.315 [COM3] - <CR><LF>
OK<CR><LF>
<CR><LF>
^SISW: 6,2<CR><LF>
<CR><LF>
^SIS: 6,0,2200,"HTTP POST: http://httpbin.org/post"<CR><LF>
<CR><LF>
^SIS: 6,0,2200,"HTTP POST Response: 200"<CR><LF>
<CR><LF>
^SISR: 6,1<CR><LF>

3/16/2017 11:04:55.813 [COM2] - AT^SISR=6,0<CR><LF>

3/16/2017 11:04:55.830 [COM3] - <CR><LF>
^SISR: 6,669<CR><LF>
<CR><LF>
OK<CR><LF>

3/16/2017 11:04:55.854 [COM2] - AT^SISR=6,669<CR><LF>

3/16/2017 11:04:55.927 [COM3] - <CR><LF>
^SISR: 6,669<CR><LF>
{<LF>
  "args": {}, <LF>
  "data": "", <LF>
  "files": {}, <LF>
  "form": {<LF>
    "cust": "ADAM\nproc_fw=4.68\ncpld_fw=0.02\nmodem_manuf=Cinterion\nmodem_model=EHS5-E\nmodem_sn=4764177927\nsim_imei=357041062026839\nsim_iccid=89014103278148719019\nsim_imsi=310410814871901\ncall_spacing=120,360\n"<LF>
  }, <LF>
  "headers": {<LF>
    "Accept": "*/*", <LF>
    "Content-Length": "199", <LF>
    "Content-Type": "application/x-www-form-urlencoded", <LF>
    "Host": "httpbin.org", <LF>
    "User-Agent": "EHS5-US/357041062026839 Profile/IMP-NG Configuration/CLDC-1.1", <LF>
    "Via": "HTTP/1.1 aln2nz05msp2ts04.wnsnet.attws.com"<LF>
  }, <LF>
  "json": null, <LF>
  "origin": "166.137.125.52", <LF>
  "url": "http://httpbin.org/post"<LF>
}<LF>

3/16/2017 11:04:56.006 [COM2] - AT^SISC=6<CR><LF>

3/16/2017 11:04:56.129 [COM3] - <CR><LF>
OK<CR><LF>