You are reading a single comment by @net-tobi and its replies. Click here to read the full conversation.
  • Great to see good progress :)

    I should react somewhere to "0, CLOSE". What I do not see currently is that the responses which are coming in are sent back to the HTTP-Lib.

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v80 Copyright 2015 G.Williams
    >echo(0);
    =undefined
    ["AT+CPIN?\r\n"
    ] "\r" <--- "\r"
    ] "\n+CPIN: READY\r\n\r\nOK\r\n" <--- "\n+CPIN: READY\r\n\r\nOK\r\n"
    ["AT+CGATT?\r\n"
    ] "\r" <--- "\r"
    ] "\n+CGATT: 1\r\n\r\nOK\r\n" <--- "\n+CGATT: 1\r\n\r\nOK\r\n"
    ["AT+CIPSHUT\r\n"
    ] "\r" <--- "\r"
    ] "\nSHUT OK\r\n" <--- "\nSHUT OK\r\n"
    ["AT+CIPSTATUS\r\n"
    ] "\r" <--- "\r"
    ] "\nOK\r\n\r\nSTATE: IP INITIAL\r\n" <--- "\nOK\r\n\r\nSTATE: IP INITIAL\r\n"
    ["AT+CIPMUX=1\r\n"
    ] "\r" <--- "\r"
    ] "\nOK\r\n" <--- "\nOK\r\n"
    ["AT+CIPHEAD=1\r\n"
    ] "\r\n" <--- "\r\n"
    ] "OK\r\n" <--- "OK\r\n"
    ["AT+CSTT=\"pinternet.interkom.@\ üÍ ñÿÿ] "\r" <--- "\r"
    ] "\nOK\r\n" <--- "\nOK\r\n"
    ["AT+CIICR\r\n"
    ] "\r" <--- "\r"
    ] "\nOK\r\n" <--- "\nOK\r\n"
    null
    ["AT+CIFSR\r\n"
    ] "\r\n" <--- "\r\n"
    ] "10.49.128.77\r\n" <--- "10.49.128.77\r\n"
    IP::10.49.128.77
    ["AT+CIPSTART=0,\"TCP\",\"http://www.pur3.co.uk\",80\r\n"
    ] "\r\nOK\r\n" <--- "\r\nOK\r\n"
    ] "\r\n0, CONN" <--- "\r\n0, CONN"
    ] "0, CONNECT OK\r\n" <--- "ECT OK\r\n"
    ["AT+CIPSEND=0,64\r\n"
    ] "\r\n> " <--- "\r\n> "
    ] "\r\n0, SEND OK\r\n" <--- "\r\n0, SEND OK\r\n"
    Send got: 0, SEND OK
    ["AT+CIPSEND=0,31\r\n"
    ] "\r\n" <--- "\r\n"
    ] "> " <--- "> "
    ] "\r\n0," <--- "\r\n0,"
    ] "0, SEND OK\r\n" <--- " SEND OK\r\n"
    Send got: 0, SEND OK
    ] "\r\n+RECEIVE," <--- "\r\n+RECEIVE,"
    ] "+RECEIVE,0,289:\r\nHTTP/1.1 200 OK\r\nDate: Tue, 02 Jun" <--- "0,289:\r\nHTTP/1.1 200 OK\r\nDate: Tue, 02 Jun"
    ] "Date: Tue, 02 Jun 2015 14:39:12 GMT\r\nServer: Apache/2.2.14 (Ubuntu)\r\nLast-Modified: Fri, 15 Nov 2013 " <--- " 2015 14:39:12 GMT\r\nServer: Apache/2.2.14 (Ubuntu)\r\nLast-Modified: Fri, 15 Nov 2013 "
    ] "Last-Modified: Fri, 15 Nov 2013 15:42:26 GMT\r\nETag: \"c01036-d-4eb390b8a8d18\"\r\nAccept-Ranges: bytes\r\nContent-Length: 13\r\nVary: Accept-Encoding\r\nC" <--- "15:42:26 GMT\r\nETag: \"c01036-d-4eb390b8a8d18\"\r\nAccept-Ranges: bytes\r\nContent-Length: 13\r\nVary: Accept-Encoding\r\nC"
    ] "Connection: close\r\nContent-Type: text/plain\r\n\r\nHello World!\n" <--- "onnection: close\r\nContent-Type: text/plain\r\n\r\nHello World!\n"
    ] "Hello World!\n\r\n0" <--- "\r\n0"
    ] "0, CLOSED\r\n" <--- ", CLOSED\r\n"
    ["AT+CIPCLOSE=0\r\n"
    ] "\r\n" <--- "\r\n"
    ] "ERROR\r\n" <--- "ERROR\r\n"
    > 
    
About

Avatar for net-tobi @net-tobi started