Pico 1.3 + ESP8266 ESP01 0.25.0.0 problem

Posted on
  • I have trouble getting wifi to work when I flash the 0.25.0.0 firmware to the ESP8266. I am using the test code:

    digitalWrite(B9,1);
    Serial2.setup(115200, { rx: A3, tx: A2 });
    var wifi = require("ESP8266WiFi_0v25").connect(Seri­al2, function(err){
      if (err) throw err;
      console.log("Connecting to WiFi");
      wifi.connect("SSID", "PASS", function(err){
        if (err) throw err;
        console.log("Connected");
        require("http").get("http://www.pur3.co.­uk/hello.txt", function(res){
          console.log("Response: ", res);
          res.on('data', function(d){ console.log("--->"+d); });
        });
      });
    });
    wifi.at.debug();
    

    I get the following output:

    Connecting to WiFi
    ["AT+CWMODE=1\r\n"
    ] "\r\nOK\r\n" <--- "\r\nOK\r\n"
    ["AT+CWJAP=\"SSID\",\"PASS\"\r\n"
    ] "W" <--- "W"
    ] "WIFI CONNECTED\r\nWIFI GOT IP\r\n" <--- "IFI CONNECTED\r\nWIFI GOT IP\r\n"
    ] "\r" <--- "\r"
    ] "\nOK\r\n" <--- "\nOK\r\n"
    Connected
    ["AT+CIPSTART=0,\"TCP\",\"http://www.pur­3.co.uk\",80\r\n"
    ] "DNS Fail\r\n\r" <--- "DNS Fail\r\n\r"
    ] "\nERROR\r\n" <--- "\nERROR\r\n"
    >wifi.getIP(function(a) { });
    ["AT+CIFSR\r\n"
    =undefined
    ] "+CIFSR:STAIP" <--- "+CIFSR:STAIP"
    ] "+CIFSR:STAIP,\"84.104.101.32\"\r\n+CIFS­R:STAMAC,\"1" <--- ",\"84.104.101.32\"\r\n+CIFSR:STAMAC,\"1­"
    ] "+CIFSR:STAMAC,\"18:fe:34:9b:48:c6\"\r\n­\r\nOK\r\n" <--- "8:fe:34:9b:48:c6\"\r\n\r\nOK\r\n"
    

    As you can see I get a strange DNS Fail message. After that I manually typed in wifi.getIP(...) and it seems like I never get a dynamic IP from the router.

    However, if I flash the old 0018000902-AI03 firmware, everything works fine. Also wifi.getIP(...) shows the IP assigned from the router.

    I am using the Shim Version 1 soldered to the Pico board.

  • That's really strange - are you using an up to date firmware on the Pico? And you're 100% sure that's the code you used?

    I just tried your exact code on a Pico with 0.25 here, And I get this line:

    ["AT+CIPSTART=0,\"TCP\",\"w ww.pur3.co.uk\",80\r\n"
    

    Note the "w ww.pur3.co.uk" and not "http://www.pur3.co.uk" - so I'm not sure why yours would be different?

    edit: I had to add a space in the www so the forum didn't change it :)

  • Actually sorry, the forum that was changing the text in your post. That's not it then :)

    But 0.25 does work for me here. I wonder if it's some issue with the communication with your router.

    Could be just be that the router got confused by the firmware update on the ESP8266? If the firmware update changed the MAC address, it might have refused to give it an IP.

    Maybe you could just try restarting the router? :s

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Pico 1.3 + ESP8266 ESP01 0.25.0.0 problem

Posted by Avatar for Drugge @Drugge

Actions