0 votes
in ESPaper by (170 points)

I have a working WeatherStationClassic & Color. Received ESPaper today. Upated settings.h and compiled and uploaded ok. Have tried multiple known working APs and SSIDs, but cannot get ESPaper to connect. I added a little debugging in the ConnectWiFi() procedure to print out WiFi.Status and increased the number of tries to 30 from 20 .. this is what I get ..

⸮⸮***********set register Start**********

***********set register  end**********

Loading config

Failed to open config file

State: 1

[NetgearWAC510][password-here]6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.1.1.1.1.1.1.1.1.1.1.1.1.1Could not connect to WiFi

Writing buffer

full init

***********set register Start**********

***********set register  end**********

Going to sleep

It looks like 6 means WL_DISCONNECTED (=if module is not configured in station mode) and

1 means WL_NO_SSID_AVAIL (=in case configured SSID cannot be reached).

If I enter Config mode I do see the display to Connect to SSID ESPaperConfig and then browse to 192.168.4.1 (and I see HTTP Server Started on the serial port). However, the SSID is *not* being broadcast and cannot be seen by anything else.

So. The WiFi is not working. Any suggested debugging steps? This is the limit of my ability!

Thanks :)

by (19.9k points)
Those 666111 etc is what is printed from your connect loop, right? Re: config portal, "the SSID is *not* being broadcast" means that your other devices (mobile, PC, etc.) don't see the SSID 'ESPaperConfig', correct?
by (19.9k points)
Questions by @G6EJD posted as an answer (which I deleted):

"When you check for available networks on your PC (?) do you see the ESP network available? You will see at least your normal network."
by (170 points)
edited by
That's right, I just inserted a print WiFi.status() in the loop right next to the code which prints the progress "."

I have a bunch of Wifi Networks available as it happens, PCs, Tablet, iPhone etc see them all, but do not see ESPaperConfig, which I *assume* means it's not available (not being broadcast) or is hidden. Have tried manually connecting to ESPaperConfig, but no luck their either.

Does the "Failed to open config file" have any part to play in this?

Thanks for replying!
by (19.9k points)
No, that config file is *expected* to be missing the first time you configure your device or if you configure everything through settings.h.

We'll discuss your case internally and keep you posted.
by (170 points)
Thanks! Much appreciated. It's an odd one ... everything works perfectly, but no WiFi. I'll try to do a bit more debugging ...
by (170 points)
Here is the output with WiFi.printDiag(Serial); in the loop [the xxxxxxxx just masks the real value]


 ets Jan  8 2013,rst cause:1, boot mode:(3,0)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld
⸮⸮***********set register Start**********
***********set register  end**********
Loading config
Failed to open config file
State: 1
[NetgearWAC510][xxxxxxxx]Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:1 - Mode: STA+AP
PHY mode: N
Channel: 4
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:2 - Mode: STA+AP
PHY mode: N
Channel: 7
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:3 - Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:4 - Mode: STA+AP
PHY mode: N
Channel: 12
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:5 - Mode: STA+AP
PHY mode: N
Channel: 14
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:6 - Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:7 - Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:8 - Mode: STA+AP
PHY mode: N
Channel: 8
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:9 - Mode: STA+AP
PHY mode: N
Channel: 11
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:10 - Mode: STA+AP
PHY mode: N
Channel: 13
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:11 - Mode: STA+AP
PHY mode: N
Channel: 14
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:12 - Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:13 - Mode: STA+AP
PHY mode: N
Channel: 5
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:14 - Mode: STA+AP
PHY mode: N
Channel: 8
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:15 - Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:16 - Mode: STA+AP
PHY mode: N
Channel: 13
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:17 - Mode: STA+AP
PHY mode: N
Channel: 14
AP id: 0
Status: 1
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:18 - Mode: STA+AP
PHY mode: N
Channel: 2
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:19 - Mode: STA+AP
PHY mode: N
Channel: 5
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:20 - Mode: STA+AP
PHY mode: N
Channel: 9
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:21 - Mode: STA+AP
PHY mode: N
Channel: 12
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:22 - Mode: STA+AP
PHY mode: N
Channel: 13
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:23 - Mode: STA+AP
PHY mode: N
Channel: 14
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:24 - Mode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:25 - Mode: STA+AP
PHY mode: N
Channel: 6
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:26 - Mode: STA+AP
PHY mode: N
Channel: 9
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:27 - Mode: STA+AP
PHY mode: N
Channel: 12
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:28 - Mode: STA+AP
PHY mode: N
Channel: 13
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:29 - Mode: STA+AP
PHY mode: N
Channel: 14
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
. Try:30 - Mode: STA+AP
PHY mode: N
Channel: 3
AP id: 0
Status: 3
Auto connect: 1
SSID (13): NetgearWAC510
Passphrase (8): xxxxxxxx
BSSID set: 0
Could not connect to WiFi
Writing buffer
full init
***********set register Start**********
***********set register  end**********
Going to sleep

2 Answers

0 votes
by (10.0k points)

Hi Pat

Just to be sure, your access point is a 2.4GHz Wifi AP and not 5GHz, right? The ESP8266 can only use 2.4GHz. Can you also please tell us the settings you have in the Arduino/Tools menu? I'm particularly interested in the board type, the flash settings but also all other settings in that menu sub section. Also have you ever tried to run the WiFi scanner example sketch that comes with the ESP/Arduino platform? It would be interesting if your ESP8266 module is able to see any WiFi AP at all. Do you see APs of your neighbours with your phone/tablet/labtop or do you live far away from other APs?

/*

    This sketch demonstrates how to scan WiFi networks.

    The API is almost the same as with the WiFi Shield library,

    the most obvious difference being the different file you need to include:

*/

#include "ESP8266WiFi.h"


void setup() {

  Serial.begin(115200);


  // Set WiFi to station mode and disconnect from an AP if it was previously connected

  WiFi.mode(WIFI_STA);

  WiFi.disconnect();

  delay(100);


  Serial.println("Setup done");

}


void loop() {

  Serial.println("scan start");


  // WiFi.scanNetworks will return the number of networks found

  int n = WiFi.scanNetworks();

  Serial.println("scan done");

  if (n == 0) {

    Serial.println("no networks found");

  } else {

    Serial.print(n);

    Serial.println(" networks found");

    for (int i = 0; i < n; ++i) {

      // Print SSID and RSSI for each network found

      Serial.print(i + 1);

      Serial.print(": ");

      Serial.print(WiFi.SSID(i));

      Serial.print(" (");

      Serial.print(WiFi.RSSI(i));

      Serial.print(")");

      Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE) ? " " : "*");

      delay(10);

    }

  }

  Serial.println("");


  // Wait a bit before scanning again

  delay(5000);

}
by (170 points)
Hi, I have loaded the WiFiScan sketch and get (as expected, I guess)

Setup done
scan start
scan done
no networks found

scan start
scan done
no networks found

scan start
scan done
no networks found

Definitely 2.4GHz. I even set up a new 2.4GHz SSID (not shared SSID with 5GHz). No luck.

Here are the Arduino/Tools settings ..

Auto Format
Archive Sketch
Fix Encoding & Reload Manage Libraries...
Serial Monitor
Serial Plotter
WiFi101 Firmware Updater

Board: "Generic ESP8266 Module"
Flash Mode: "QIO"
Flash Size: "2M (1M SPIFFS)"
Debug port: "Disabled"
Debug Level:"None"
lwlP Variant: "v2 Lower Memory"
Reset Method:"ck"
Crysta l Frequency: "40 MHz"
VTables: "Flash"
Flash Frequency: "40MHz"
CPU Frequency: "80 MHz"
Builtin Led: "2"
Upload  Speed: "921600"
Erase Flash: "Only Sketch"
Port: "COM3"

Get Board Info
Programmer: "AVRISP mkll"
Burn Bootloader

Laptops, Phone, the other thingpulse weathers (colour and little OLED) see the networks just fine.
by (170 points)
Here is the compiler output ...

Sketch uses 496616 bytes (47%) of program storage space. Maximum is 1044464 bytes.
Global variables use 36896 bytes (45%) of dynamic memory, leaving 45024 bytes for local variables. Maximum is 81920 bytes.
C:\Users\patmo\OneDrive\Documents\ArduinoData\packages\esp8266\tools\esptool\0.4.13/esptool.exe -vv -cd ck -cb 921600 -cp COM3 -ca 0x00000 -cf C:\Users\patmo\AppData\Local\Temp\arduino_build_419546/espaper-weatherstation.ino.bin
esptool v0.4.13 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
    setting board to ck
    setting baudrate from 115200 to 921600
    setting port from COM1 to COM3
    setting address from 0x00000000 to 0x00000000
    espcomm_upload_file
    espcomm_upload_mem
    setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    read 0, requested 1
trying to connect
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
Uploading 500768 bytes from C:\Users\patmo\AppData\Local\Temp\arduino_build_419546/espaper-weatherstation.ino.bin to flash at 0x00000000
    erasing flash
    size: 07a420 address: 000000
    first_sector_index: 0
    total_sector_count: 123
    head_sector_count: 16
    adjusted_sector_count: 107
    erase_size: 06b000
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    setting serial port timeouts to 15000 ms
    setting serial port timeouts to 1000 ms
    espcomm_send_command: receiving 2 bytes of data
    writing flash
................................................................................ [ 16% ]
................................................................................ [ 32% ]
................................................................................ [ 48% ]
................................................................................ [ 65% ]
................................................................................ [ 81% ]
................................................................................ [ 97% ]
..........                                                                       [ 100% ]
starting app without reboot
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    espcomm_send_command: receiving 2 bytes of data
closing bootloader
    flush start
    setting serial port timeouts to 1 ms
    setting serial port timeouts to 1000 ms
    flush complete
by (19.9k points)
Just to finish this thread for those who will find it in the future. As we have seen enough indication that this is a hardware issue and, hence, a faulty WiFi chip we reached out to the OP via PM and arranged for a replacement.
by (170 points)
Thanks for the help. A very mysterious one, this ..
0 votes
by (10.0k points)
Hi Pat

I'm picking up the thread here. You just reported, that the replacement didn't help, so we are back to square one. As you suggested yourself, it is highly unlikely that you have such a bad luck to receive two boards with broken WiFi. That would be two in hundreds of boards working just fine. So it must be something coming from your specific setup. Let's summarize the symptoms:
- you can't connect to WiFi from the two ESPaper modules, while this works just fine from other ESP8266. Are these two other modules (Color Kit and Classic Kit) still in operation? Maybe something changed since you used them last? Could you try to flash the WiFi scan sketch to them with the same settings that you use for the ESPaper? You might have to put the NodeMCU manually into Flash mode by pressing flash, flash + RST, flash. Alternatively: can you just flash again the sketches to the NodeMCU ,Wemos Mini with their regular settings (Board = NodeMcu, Board = Wemos D1 Mini Pro) and see if it still works?

- Scan sketch doesn't work either. This indicates basic problems with the WiFi firmware or hardware. Can you play with the lwlP Variant settings and see if that changes anything?

- If all that doesn't work, can you try out another ESP8266/ Arduino version? E.g. downgrade one or two versions, also re-install the current version? You can do this in the board manager by picking another version for ESP8266

- Are you on the latest Arduino IDE?

My guess is that there is something wrong with the build tools. It is just so unlikely that lightning strikes twice!

Kind regards,

Daniel
by (19.9k points)
Furthermore, I see in your report above that WiFi debugging in core is disabled (Debug port: "Disabled" , Debug Level:"None"). Can you send Tools -> Debug Level -> WiFi to Serial?
by (170 points)
Dani,

I used another laptop and did a fresh install of *everything*.

And of course it worked first time!

I have no idea what the other machine is up to - but there is something obviously screwy somewhere which is NOT AT ALL OBVIOUS :)

I am so sorry to have wasted so much time and cannot thank you enough for all the help.

I have ordered another Lite kit to help recompense you in a small way :-o

Pat
by (19.9k points)
Thanks Pat, I did in fact wonder what this was all about when I processed your order earlier today :) No matter what, we're glad your ESPaper is now working as it should.
by (380 points)
I've got the same problem and I fixed it when changed the Chrystal Frequency to 26MHz

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...