Avatar for CrashingDutchman

CrashingDutchman

Member since Apr 2015 • Last active Oct 2017
  • 7 conversations
  • 39 comments

Gadget freak

Most recent activity

    • 10 comments
    • 794 views
  • in ESP8266
    Avatar for CrashingDutchman

    I solved it by disconnecting and reconnecting the Sonoff and make a connection with Putty first. Then disconnect and connect again with the Espruino IDE. Make sure your FTDI USB programmer can provide enough current at 3V.

  • in ESP8266
    Avatar for CrashingDutchman

    Are you 100% sure that your connection details (see your 1st code share in your first post) are correct? I understand that what you posted here is mocked up, but check in your actual code.

    I would suggest to try this code (a bit simpler than yours):

    var wifi = require("Wifi");
    wifi.connect("ssid", {password:"password"}, function(){ console.log("connected"); });
    

    Then wait for "connected" message.

    Also, make sure you do a wifi.save() to make sure that wifi settings are saved for after a power cycle.

  • in ESP8266
    Avatar for CrashingDutchman

    @Wilberforce, he said he could connect with esp-open-rtos, so it would be weird if he would need an antenna now.

    @citizen12123 How are you powering the board? Maybe your power source isn't able to supply enough current?

  • in ESP8266
    Avatar for CrashingDutchman

    Thank you @allObjects. I understand that I have no option to modify code for the Wifi to make the hidden SSID a possibility? One of the firmware maintainers has to do this?

  • in ESP8266
    Avatar for CrashingDutchman

    Finally found some time to pick this up again. Sending the sample in http://www.espruino.com/modules/ESP8266W­iFi_0v25.js doesn't work. I understand that this was created for the Espruino on ESP8266. Correct?

    I am using a NodeMCU and it breaks on A2 and A3 (not defined). I converted the original line from the example to:

    Serial2.setup(115200, { rx: NodeMCU.D9, tx : NodeMCU.D10 });
    

    where it was:

    Serial2.setup(115200, { rx: A3, tx : A2 });
    

    The sample stops at

    Connecting to ESP8266
    =undefined
    Connecting to WiFi
    Connected
    >Uncaught Error: CIPSTART failed (Timeout)
     at line 1 col 72
    ...'CIPSTART failed (Timeout)');
                                  ^
    in function called from system
    

    The sample code I used is:

    Serial2.setup(115200, { rx: NodeMCU.D9, tx : NodeMCU.D10 });
    console.log("Connecting to ESP8266");
    var wifi = require("mywifi").connect(Serial2, function() {
      wifi.reset(function() {
        console.log("Connecting to WiFi");
        wifi.connect("my own ssid","password", function() {
          console.log("Connected");
          require("http").get("http://www.espruino­.com", function(res) {
            console.log("Response: ",res);
            res.on('data', function(d) {
              console.log("--->"+d);
            });
          });
        });
      });
    });
    

    It seems to break on the get() of http://www.espruino.com. Any ideas?

    Edit: I created an Espruino IDE project for this in a folder on a local drive.

  • in ESP8266
    Avatar for CrashingDutchman

    @Gordon I was going to do the change for ESP8266+Espruino, so I guess I need to be at ESP8266WiFi_0v25 module. Can you explain why I don't see that the require("Wifi") doesn't seem to generate any traffic to the modules folder on http://www.espruino.com?

  • in ESP8266
    Avatar for CrashingDutchman

    @ClearMemory041063 I tried to use espruino.com/modules/EspruinoWiFi.js as source in a project in the Espruino WebIDE but I never got it to work. It seems that it is using pins A13 and A14 which are not supported on an ESP8266.

    When I used Fiddler to see where exactly a module is being loaded when I do a require("Wifi") I saw nothing being loaded from Internet. When you load another module, for example through a require("DS18B20), there is network traffic to http://www.espruino.com/modules//DS18B20­.min.js

    So, I am not sure how to do this.

    If anyone can help me getting started, I would appreciate it very much!

  • in ESP8266
    Avatar for CrashingDutchman

    Would be nice if it could be added!

    Thank you @ClearMemory041063 and @Kolban for explaining!

Actions