Create hidden network with EspruinoWifi

Posted on
  • Hi everybody,

    Based on the documentation and what I can see in the GitHub repository it looks like I should be able to create a hidden wireless network, but in practice it never seems to work? I'm using the EspruinoWiFi with firmware version 2.0.

    According the documentation here it looks like I should be able to pass hidden: 1 as an option to create a hidden network. My code looks like this:

    const wifi = require("Wifi");
    
    wifi.startAP("My Secret Network", {
        "authMode": "open",
        "password": "12345678",
        "hidden": 1
    }, (err) => {
        console.log(err);
    });
    

    It uploads fine and the network is created, but I'm able to see it from literally every device I own (iPhone, Android phone, tablets, macOS laptops, Windows...).

    Am I doing something wrong? Or do I have an incorrect assumption surrounding how this is supposed to work? I've tried replacing hidden: 1 with hidden: true and hidden: "1" but none of that seems to make a difference.

  • Hi @georgemandis

    Am I doing something wrong? Or do I have an incorrect assumption surrounding how this is supposed to work? I've tried replacing hidden: 1 with hidden: true and hidden: "1" but none of that seems to make a difference.

    No, this feature is waiting for a volunteer helper to be implemented.
    It is missing for the Wifi module used by "ESP8266 connected to an Espruino board"

    If you like take a look at the source code https://github.com/espruino/EspruinoDocs­/blob/master/devices/EspruinoWiFi.js

    I am not sure if this feature is available for the used AT command set. If you like, take a look at the source code and check the espressif documentation.

    Edit: updated the link

  • Thanks! I've looked into it a little and found this entry on the Espressif forums that seems promising:

    https://bbs.espressif.com/viewtopic.php?­t=2458

    I have a hunch of where to make changers to ESP8266WiFi.js. However, the solution to this person in the Espressif forum's problem was to update the AT firmware.

    Is there a way to find out what AT version is running on the EspruinoWifi? And is it possible to upgrade it if needed?

    I'm a little new to dabbling with my Espruino in this way, so please bear with me if my questioning is a little off :)

  • Sorry named the wrong module, edit post #2

    Try this snippet to find the AT version on the espressif board:

    var WIFI_SERIAL = Serial2;
    WIFI_SERIAL.setup(115200, { rx: A3, tx : A2});
    at = require("AT").connect(WIFI_SERIAL);
    
    //at.debug();
    
    at.cmd("AT+GMR\r\n", 1000, function cb(d) {
          console.log(d);
    });
    

    The one on my desks response

    AT version:0.40.0.0(Aug  8 2015 14:45:58)
    

    Sorry hidden AP it is not supported in 0v40.

  • Thanks MaBe! Got it working and, alas, mine is running the same the same version (0.4.0).

    I imagine getting an updated version of AT into the Espruino firmware is a process, but would you be able to point me in the right direction if I wanted to explore making that kind of contribution to the project?

  • It's a shame the v40 firmware doesn't support it. I believe that is the firmware built into all Espruino WiFi boards.

    You should be able to update the firmware using the code at http://www.espruino.com/ESP8266#use-espr­uino

    (The pins you need are in https://github.com/espruino/EspruinoDocs­/blob/master/devices/EspruinoWiFi.js#L1)

    but it's a slow old process as you have to use Espruino as a USB-Serial bridge. You can read out the firmware first which gives you a good way of detecting if what you're doing is working without risking bricking anything :)

    You could actually just use a separate USB-TTL converter and stick it into the correct holes in the ESP8266 and do it that way though?

  • Thanks Gordon! I'll bookmark this for the weekend, give it a shot and let you know how it goes.

    Do you think future versions of the EspruinoWifi will or could ship with an updated version of AT? I'm just curious. I wanted to write a little tutorial about setting up a hidden wifi network using the EspruinoWifi before I realized this feature wasn't baked into the firmware. I don't mind going through the update process because it's interesting and not something I've done with the Espruino yet, but am realizing it would be a lot of extra steps in my tutorial :)

  • It's a shame the v40 firmware doesn't support it. I believe that is the firmware built into all Espruino WiFi boards.

    Yes result of post #4 comes from a Espruino Wifi board

  • Yes, hopefully newer Espruino WiFis will ship with new AT firmwares - but I still have quite a lot of the current revision in stock so I don't really see that happening for at least a year I'm afraid.

    There had been some talk about adding a JS based ESP8266 flasher to the Web IDE - in that case I'd be able to add some code to make it work transparently through the Espruino WiFi to make updates nice and easy. Unfortunately at the moment I think that's probably a way off as well though as there was surprisingly little interest.

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

Create hidden network with EspruinoWifi

Posted by Avatar for georgemandis @georgemandis

Actions