• I've now fixed the multiple disconnect issue, so on newer builds your code outputs this.

    >onInit()
    **** STARTING ****
    =undefined
    WiFi Connected!
    ["AT+CIPSTART=0,\"TCP\",\"weeso\",1888\r­\n"
    net client before callback {"type":0,"opt":{"host":"weeso","port":1­888},"sckt":1}
    net client callback {"type":0,"opt":{"host":"weeso","port":1­888},"sckt":1,"conn":true}
    ] "\r\nERROR\r\n0" <--- "\r\nERROR\r\n0"
    net client disconnected {"type":0,"opt":{"host":"weeso","port":1­888},"conn":true} *** undefined
    net closed, had_error: false
    ] "0,CLOSED\r\n" <--- ",CLOSED\r\n"
    

    For some reason the other debug lines didn't make it into your dump - but an error (with no other info) is reported by the ESP8266. There's no socket number so I guess we just have to hope that it's always in response to a CIPSTART :)

    I had a bit of a fiddle with the EspruinoWiFi driver to try and get it to detect errors, but it does seem there is some issue reporting them back through the HTTP/TCPIP stack so I'm not going to put that code in until I can get the whole thing going.

About

Avatar for Gordon @Gordon started