HTTPSND returns ERROR instead of HTTPRING

3 thoughts on “HTTPSND returns ERROR instead of HTTPRING

  1. I am using a DE910-DUAL. I am trying to use it to connect to a Windows SOAP service hosted by IIS Express on a Windows 10 machine.

    I am able to connect to the service using HTTPCFG and HTTPSND, an example is shown below:

    AT#SGACT=1,1

    #SGACT: "10.32.60.205"

    OK

    AT#HTTPCFG=0,"67.4.196.38",8888

    OK

    AT#HTTPSND=0,0,"/Service1.svc",611,"application/soap+xml"

    >>>...

    OK

    ERROR

    Using the same script with other services, I get an #HTTPRING instead of an ERROR. On the server side, the request is accepted and a status code of 200 (OK) is recorded. On the modem side, I have no more information about why I am getting the ERROR. AT+CMEE=2 does not give any more information.

    Note: The complete XML is not included in the sample above. The server is not available at the IP address above uness I set it up.

    Any ideas where to look next?

    1. Additional Information:

      I installed Wireshark on the server side and was able to capture the following response, which was sent to the modem. The response indicates a correct response, but apparently the modem software saw something in the response that triggered an ERROR response.

      HTTP/1.1 200 OK
      Cache-Control: private
      Content-Length: 861
      Content-Type: multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e12f79be-8b8f-4643-b951-74e6068548a6+id=2";start-info="application/soap+xml"
      Server: Microsoft-IIS/10.0
      MIME-Version: 1.0
      X-AspNet-Version: 4.0.30319
      X-Powered-By: ASP.NET
      Date: Sun, 31 Jan 2016 22:13:26 GMT
      Connection: close
      
      --uuid:e12f79be-8b8f-4643-b951-74e6068548a6+id=2
      Content-ID: <http://tempuri.org/0>
      Content-Transfer-Encoding: 8bit
      Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
      
      <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/IService1/StoreDataResponse</a:Action><ActivityId CorrelationId="f9b41739-02aa-46e1-821f-97a78afefe43" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">92290fe6-d567-4875-88bb-4c0bab1596bc</ActivityId><a:RelatesTo>urn:uuid:c6cb5104-adfd-4040-a2eb-a2cb659e8f2a</a:RelatesTo></s:Header><s:Body><StoreDataResponse xmlns="http://tempuri.org/"><StoreDataResult>3</StoreDataResult></StoreDataResponse></s:Body></s:Envelope>
      --uuid:e12f79be-8b8f-4643-b951-74e6068548a6+id=2--

      Can you confirm that the above response would be rejected?

      I am running modem firmware 15.00.026.

      Regards,

      -Mat

      1. Hello Mat,

        From the attached log i cannot tell why it is not working but would seem to be server side related.

        Please see my log below showing the command working.

        If you would like for me to see if I can connect to your server just let me know.

        Cheers

        Nick Tart

        AT+CGMM
        DE910-DUAL

        OK
        AT+CGMR
        15.00.026

        OK
        AT#SGACT=1,1

        #SGACT: “10.204.3.66”

        OK
        AT#HTTPCFG=0,httpbin.org,80,0,””,””,0,120,1
        OK
        AT#HTTPSND=0,0,”/post”,4,”application/json”

        >>>
        OK

        #HTTPRING: 0,200,”application/json”,267
        AT#HTTPRCV=0
        <<<{
        “args”: {},
        “data”: “test”,
        “files”: {},
        “form”: {},
        “headers”: {
        “Content-Length”: “4”,
        “Content-Type”: “application/json”,
        “Host”: “httpbin.org”
        },
        “json”: null,
        “origin”: “63.84.140.194”,
        “url”: “http://httpbin.org/post”
        }

        OK

        AT#SH=1

        OK
        AT#HTTPCFG=0,”www.google.com”
        OK
        AT#HTTPQRY=0,0,”/”

        OK

        #HTTPRING: 0,200,”text/html; charset=ISO-8859-1″,0
        AT#HTTPRCV=0
        <<<<!doctype html><html itemscope=”” itemtype=”http://schema.org/WebPage” lang=”en”><head><meta content=”Search the world’s information, including webpages, ……………………..
        Search”},”ovr”:{},”pq”:””,”refpd”:true,”rfs”:[],”scd”:10,”sce”:5,”stok”:”rmArbL58UhvWP6xn9cIHv3HbdV8″},”d”:{}};google.y.first.push(function(){if(google.med){google.med(‘init’);google.initHistory();google.med(‘history’);}});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}
        </script></div></body></html>
        OK
        AT#SD=1,0,80,”www.google.com”
        CONNECT
        HTTP/1.1 302 Moved Temporarily
        Content-Type: text/html; charset=UTF-8
        Location: https://accounts.google.com/ServiceLogin
        Content-Length: 222
        Date: Thu, 18 Feb 2016 21:29:57 GMT
        Expires: Thu, 18 Feb 2016 21:29:57 GMT
        Cache-Control: private, max-age=0
        X-Content-Type-Options: nosniff
        X-Frame-Options: SAMEORIGIN
        X-XSS-Protection: 1; mode=block
        Server: GSE

        <HTML>
        <HEAD>
        <TITLE>Moved Temporarily</TITLE>
        </HEAD>
        <BODY BGCOLOR=”#FFFFFF” TEXT=”#000000″>
        <H1>Moved Temporarily</H1>
        The document has moved <A HREF=”https://accounts.google.com/ServiceLogin”>here</A>.
        </BODY>
        </HTML>

        OK

        AT#SH=1
        OK