Wifi Module not found ?

Posted on
  • Hi,

    I just flashed my esp8266 (ESP12E) using espruino_1v85_esp8266 but now, when I try to connect it to my wifi it keep telling me that the wifi module is not found.

    I search on the forum and it didn't answer my question as long as I'm using a power supply (ywrobot connected to a power outlet) and I've used the latest espruino firmware (I think).

    Do you have any idea of what's going on and how to fix it ?

    I'm new to ESP8266 and Espruino, so it's totally possible that I've done something wrong.

    I also had http and NetworkJS modules not found several times when running different code.

    Thank you, and sorry if there are some english mistakes, it's not my native language :)

  • What tools/code are you using to try and connect?

  • In fact I tried different code like :

    Serial2.setup(115200, { rx: A3, tx : A2 });
    var wifi = require("ESP8266WiFi_0v25").connect(Seri­al2, function(err) {
      //                ^^^^^^^^^^^^^^^^
      //                Use ESP8266WiFi here (and 9600 baud) if you have an ESP8266 with firmware older than 0.25
      if (err) throw err;
      wifi.reset(function(err) {
        if (err) throw err;
        console.log("Connecting to WiFi");
        wifi.connect("WiFi_Name","WPA2_Key", function(err) {
          if (err) throw err;
          console.log("Connected");
          // Now you can do something, like an HTTP request
          require("http").get("http://www.pur3.co.­uk/hello.txt", function(res) {
            console.log("Response: ",res);
            res.on('data', function(d) {
              console.log("--->"+d);
            });
          });
        });
      });
    });
    

    return http and NetworkJS modules not found

    >var wifi = require("Wifi");
    =function () { [native code] }
    >wifi.connect("my-ssid", {password: "my-password"},
       function(err){if(err)console.log(err);el­se console.log("connected!");})
    =undefined
    

    return Wifi module not found.

    I flashed it with esptool, and I am trying to communicate with my esp8266 using Chrome web IDE.

  • In your first example you are using the js module which is intended for use when ESP8226 is purely used as Wifi Adapter - i.e Pico + ESP8266

    Your second example is correct, and you can generally ignore module not found warnings.

    The acid test is can you do anything with the wifi object - can you get status with wifi.getStatus()? If you can, your module is loaded and available.

  • the second on is correct.

    after creating the wifi object (the first line), you should be able to do something like wifi.getStatus() to actually get some info back from it to confirm its working

  • But, see, I have others issues, I am doing something wrong ?

    Even when I'm doing something like

    screen COM4 115200
    

    I've nothing that appear in the left part.


    1 Attachment

    • wifimodule.JPG
  • you can't just paste all that text in there.
    you just need the the javascript commands not the return values.
    type in the left black panel;

    var wifi = require("Wifi");

    then wait to get the return message which will be function(){[native code]};

    then type wifi.getStatus();
    and see what you get

  • In fact, when I'm typing something on the black panel, nothing is shown...
    It's like I can't type anything in it.

    Even the example "1+2", nothing is shown.

    I'm connected to my esp8266 using an USB TTL.

  • try lowering the baud rate, disconnect, hit reset on the esp8266, then connect again.

    it can take a little fiddling till it works

  • Nothing happen...
    In Settings --> Communication I've tried every baud rate possible (I originally was at 9600) and I was unable to type in the left part.
    I've tried something else

    var wifi = require("ESP8266WiFi");
    

    And now I have trouble with NetworkJS
    Seems to be endless :/

  • you don't want to do that....you need to type
    var wifi = require("Wifi");

    it is not that you are requesting the wrong module, its because its not communicating with the esp8266 correctly, which is why you cannot type into the console.

    did you hit reset on the esp8266 before reconnecting? Have you got the ch_pd pin high?

  • I know my computer is able to communicate, before I was using Arduino to programm my ESP and I did successfully.

    What I just did is :
    ESP : Off
    Launching Espruino web IDE
    ESP : ON
    Connect to ESP
    Try to type : var wifi = require("Wifi");
    Try to type into the console.
    Changing baud rate in Settings --> Communication
    Switch OFF ESP
    Do it again.

    Nothing happened. I've never been able to communicate with my esp nor to type into the console.
    Could it finally be my power supply ? Am I still doing something wrong ?

    I'm a trainee, that's why my skills level is not high. Sorry about that :/

  • Don't turn it off, ground out the reset pin

    so turn it on, wait a little while, hit connect, try and type into console. if nothing, hit disconnect, ground out the reset pin and try again.
    what pins have you got wired up

  • Here is my wiring scheme :
    3.3V : VCC / EN / GPIO2
    GND : GND / GPIO15 / GPIO0
    Rx & Tx to my USB TTL

    Then GPIO4 / GPIO5 / GPIO12 linked to some sensors, but I'm not using it (I disconnected it from 5V & 3.3V).


    1 Attachment

    • wiringESP.png
  • Since you have ESPtool, and you've previously been using the ESP8266 for Arduino sketches, maybe use ESPtool's erase_flash command then flash again. The flashing command does not touch the area where Espruino saves programs, maybe there is some garbage in that memory area that is not helping. I generally wipe all my ESP8266 boards before flashing, whether I've used for Espruino or not.

  • Hey, sorry to answer just now but I had to move forward on another project.

    Just want to let you know that it has worked I've been able to talk with my esp using the web ide. I've even be able to connect to the Wi-fi.

    But I shut it down using a button on my power supply and now I'm where I was one week ago, not able to connect to my esp...

    That's raging.

    I tried to erase the memory and flash it again but nothing happen...

  • Nevermind guys, it's working again.

    I just forgot to pull GPIO0 at HIGH :/

    Thank you for your help !
    Really appreciated it :)

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

Wifi Module not found ?

Posted by Avatar for Hawky @Hawky

Actions