RobotDyn D1 R2 ESP8266 - WiFi not working (AP and STA)

Posted on
Page
of 2
/ 2
Next
  • Hello,
    I'm having trouble with this neat little board.

    WiFi is not working at all neither in AP nor STA mode. I have tried both v91.545 and v91 stable - getting the exact same result. Wifi works just fine using esp-open-rtos under 80 and 160 Mhz

    Attempting to connect to my router:

    var wifi = require("Wifi");
    wifi.connect("simple", {password:"12345678"}, function(err) {
        console.log("connected? err=", err, "info=", wifi.getIP());
    });
    

    It says "no_ap_found" and callback does not execute. getDetails() does say "connecting" for a brief moment.

    >wifi.getDetails()
    ={
      "status": "connecting",
      "ssid": "simple",
      "password": "12345678",
      "rssi": 0, "savedSsid": null }
    > 
    >wifi.getDetails()
    ={
      "status": "no_ap_found",
      "ssid": "simple",
      "password": "12345678",
      "rssi": 0, "savedSsid": null }
    >
    >wifi.getStatus()
    ={
      "mode": "sta+ap",
      "station": "no_ap_found",
      "ap": "enabled",
      "phy": "11n",
      "powersave": "ps-poll",
      "savedMode": "off"
     }
    

    Strangest of all, AP callback does execute, but the actual AP is not visible by any device.

    >wifi.startAP("test", {authMode:"open", channel:6}, function() {
        console.log("started AP.");
    });
    =undefined
    started AP.
    >
    >wifi.getAPDetails()
    ={
      "status": "enabled",
      "authMode": "open",
      "hidden": false, "maxConn": 4,
      "ssid": "test",
      "password": "",
      "savedSsid": null,
      "stations": [  ]
     }
    

    Flashed with:

    esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin
    

    I've tried "cpuFrequency": 80 too.

    >esp8266.getState();
    ={
      "sdkVersion": "2.0.0(5a875ba)",
      "cpuFrequency": 160, "freeHeap": 10224, "maxCon": 10,
      "flashMap": "4MB:512/512",
      "flashKB": 4096,
      "flashChip": "0xef 0x4016"
     }
    

    I am hoping this is only me doing something wrong or not doing something :D Will try out some older BINs and report back. Please advise on what else we could try.

    I really appreciate your effort in this project - it is one of very few I donated to.

    The bastard:

    32Mb, $5

  • Compiled my own firmware from latest source - same result.
    Also, wifi.scan() returns an empty object. I have a few APs around for sure.

    >wifi.scan(function(ap){print(ap);});
    =undefined
    [  ]
    

    Tried with esp_init_data_default.bin at 0x3FC000 and without it. I'm also erasing before every flash.

  • Here's what it does after wifi.connect():

    >esp8266.printLog()
    988179> reconnect
    990305> scandone
    990305> no simple found, reconnect after 1s
    990405> reconnect
    992531> scandone
    992531> no simple found, reconnect after 1s
    992632> reconnect
    994758> scandone
    994758> no simple found, reconnect after 1s
    994858> reconnect
    =undefined
    

    At least it's trying... Okay.

    >wifi.scan(function(ap){print(ap);});
    =undefined
    [  ]
    >
    >esp8266.printLog()
     74724> mode : sta(5c:cf:7f:de:6a:74)
     74725> add if0
     76851> scandone
    =undefined
    
  • I think this is a hardware issue. Looking at your board, there is a socket for the wifi antenna to plug in - have you added an aerial?

  • @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?

  • @Wilberforce I have added the antenna - getting the same result. esp-open-rtos works fine with and without the antenna though.

    @CrashingDutchman It's being powered through USB out of my laptop - same power source as with esp-open-rtos. Just tried powering it with 12V 1A adapter - didn't see any improvement. Also erased and re-flashed using the new power source.

    What else can we try? :D

  • 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.

  • Yes - the WiFi details are correct. "simple" is the actual SSID and also is the password. I did try your code snippet.

    I would like to point out, that WiFi credentials get set properly:

    >wifi.getDetails()
    ={
      "status": "no_ap_found",
      "ssid": "simple",
      "password": "12345678",
      "rssi": 0, "savedSsid": null }
    

    Looks like it's unable to use the radio at all somehow.

    >wifi.scan(function(ap){print(ap);});
    =undefined
    [  ]
    >var esp8266 = require("ESP8266");
    =function () { [native code] }
    >esp8266.printLog()
    292141> reconnect
    294267> scandone
    294267> no simple found, reconnect after 1s
    294367> reconnect
    296493> scandone
    296493> no simple found, reconnect after 1s
    296593> reconnect
    298717> scandone
    298717> no simple found, reconnect after 1s
    298817> reconnect
    =undefined
    > 
    

    Oh dear what a riddle.

  • @citizen12123

    I had their Wifi-NodeM board. It detected virtually no Access Points. I concluded the radio was very poor, maybe since it was embedded in the board on the Wifi-NodeM.

    There was an odd trick that got it to work - which I don't fully remember but - it involved shorting a a pin to the hole in the antenna. Do that and reception good.

    This workaround, worked very well, but I felt the chips got very hot. Again, because the chipset is uncovered I couldn't tell you if this is hotter than a nodeMCU board would run.

    Tried to return and get money back, which seller agreed to, but postage terms and costs made it infeasible.

  • @Ollie do you mean shorting the antenna connector? Tried that out of desperation and also flashed espruino_1v85_esp8266_combined_512.bin - issue remains.

  • Enabled WiFi logging

    >esp8266.printLog()
    89478> wifi.on(#ondisconnected)
     89575> reconnect
     91698> scandone
     91699> no simple found, reconnect after 1s
     91699> Wifi event: disconnected from ssid simple, reason beacon_timeout (201) status=no_ap_found
     91702> wifi.on(#ondisconnected)
     91799> reconnect
    

    Nothing terribly useful. Just checked Micropython on this board - WiFi works great.

  • Yes. On the Wifi NodeM there's a tiny hole in antenna which is embedded in the PCB. I don't know whether I grounded it, or powered it, but one of the two massively improved the reception. Without that, a scan of APs returned 1, or 2 at best, when a NodeMCU would return all in range.

    Odd though, you say Micropython Wifi runs fine on yours, and others seem to have also had success with the Wifi-NodeM running Arduino, so maybe there is an Espruino related quirk on the Robodyn boards.

  • Ordered 3 Wemos d1 minis from different suppliers. Will see how they perform while this remains a mystery...

  • I expect, you'll have no issues there - that's where I went after the Wifi-NodeM. Specifically I wanted an unpinned board, and they've been great.

  • Hi @citizen12123,

    try this code to list APs that your board can find

    require("Wifi").scan(function(arrayOfAcessPoints){print(arrayOfAcessPoints);});
    
  • Hello @MaBe,
    I did and it does the same thing - returns an empty array.

    >require("Wifi").scan(function(arrayOfAcessPoints){print(arrayOfAcessPoints);});  
    =undefined
    [  ]
    
  • Wifi works just fine using esp-open-rtos under 80 and 160 Mhz

    Hmm, strange

    If you like you can try 11b and 11g and scan again.

    require("Wifi").setConfig({phy:"11b"});
    require("Wifi").scan(function(arrayOfAc­essPoints){print(arrayOfAcessPoints);});­ 
    
  • You could reflash with your esp-open-rtos and see if that still works.

    Then you know if it is hardware on not...

  • Thank you everybody for your time trying to help out.

    What I mean to say here is that esp-open-rtos works just fine at this moment. As soon as I flash it with Espruino I encounter the wifi problem.

    @MaBe I've already tried changing to b/g/n - doesn't improve anything.

  • I'm trying to use the same hardware, but working with Arduino. It seems to be that it is far from being as functional as a wemos D1 R2... I've tried almost everything, and when asked to robotdyn they sent a link to a wemos d1 example at instructables... my only current guess right now is that it will not work without an external antenna... my only current suggestion is "do not buy/use this hardware", aka "The bastard".

  • Confirmed: at least my robotdyn wifi d1 r2 works (both as AP and STA) only with an antenna attached to it

  • Faced such a problem, using NodeM from RoboDyn.
    On other firmware Wifi works fine. But Espruno does not find an access point. All of the above does not help either.

    What's New?

    If you bring the board close to the router, it finds access points. This means a problem in a weak signal. Tried NodeMCU firmware. An excellent signal, the problem is still in the firmware, but not in the hardware. Different signal strength settings?

  • Its a hardware/antenna problem. I have 2 identical boards, and only one of them connects as it should. Connect the antenna

  • Hi, I am having the same problem but I have a WeMos Board. Is there any fix for this available (the wifi works fine with Arduino software)

  • This is firmare bag.

    NodeMCU

    esptool.py --port COM3 --baud 115200 write_flash --flash_freq 80m
     --flash_mode dio --flash_size 4MB 0x0000 nodemcu-master-7-modules-2018-09-23-00-37-50-float.bin
    
    wifi.setmode(wifi.STATION)
    function listap(t)
        for k,v in pairs(t) do
            print(k.." : "..v)
        end
    end
    wifi.sta.getap(listap)
    

    then I get

    Rostelecom_61 : 3,-86,2c:37:96:a2:ad:37,1
    ROSTELECOM_2050 : 3,-27,62:45:cb:16:5b:e4,10
    

    Espruino

    esptool.py --port COM3 --baud 115200 write_flash --flash_freq 80m --flash_mode dio
     --flash_size 4MB 0x0000 espruino_1v99_esp8266_4mb_combined_4096.bin
    
    const wifi = require('Wifi'); 
     wifi.scan((list) => {
      console.log(list); 
    });
    

    I get empty array

    [  ]
    

    same board - without antenna

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

RobotDyn D1 R2 ESP8266 - WiFi not working (AP and STA)

Posted by Avatar for citizen12123 @citizen12123

Actions