Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smartconfig fails to retrieve WiFi credentials #8691

Open
6 tasks done
BarrMan opened this issue Oct 14, 2022 · 1 comment
Open
6 tasks done

Smartconfig fails to retrieve WiFi credentials #8691

BarrMan opened this issue Oct 14, 2022 · 1 comment

Comments

@BarrMan
Copy link

BarrMan commented Oct 14, 2022

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: ESP-01|
  • Core Version: 3.0.2
  • Development Env: Arduino IDE/Platformio
  • Operating System: MacOS

Settings in IDE

  • Module: Generic ESP8266 Module
  • Flash Mode: dout
  • Flash Size: 1MB
  • lwip Variant: Unknown
  • Reset Method: nodemcu
  • Flash Frequency: [40Mhz]
  • CPU Frequency: 80Mhz|
  • Upload Using: SERIAL
  • Upload Speed: 115200

Problem Description

I’m trying to use esp8266 smart config but it fails to connect. There’s no error message shown and after inspecting the smart config app UDP message using WireShark, I see that the UDP messages are sent correctly.

MCVE Sketch

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include "smartconfig.h"

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.setDebugOutput(true);
  WiFi.mode(WIFI_STA);
  delay(500);
  esptouch_set_timeout(20);
  
  // timeout
  WiFi.beginSmartConfig();
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
    Serial.println(WiFi.smartConfigDone());
  }
  Serial.println("WiFi connected");  
  Serial.println(WiFi.localIP());

}

Debug Messages

Wireshark logs:

I’ve tried adding some more logs in _smartConfigCallback to find out what actually happens and it looks like it’s trying to find a channel.

Also, I saw that my smartconfig version is v2.5.4 and in other posts, I see that people are using version 2.9.0. Tried looking for a way to upgrade the version but found no resources on that as well.

Is it an issue with the version of smartconfig that I’m using? Is there a way to view more debugging logs so I could figure out what the exact issue is?

Thanks a lot!

@Pontifex42
Copy link

Same issue on my ESP8266-12E / -12F. additionaly tested on a D1 mini, too. SmartConfig does not work on any of my ESP8266, while other ways of connecting to WiFi work well there. I tried same SmartConfig-Connect code on an ESP32 dev module and there, it works. So I am sure the problem is not my App nor my Android device.
I tried ESP8266 board managers V3.02, V3.1.0 and 3.1.1. Environment is Arduino IDE V2.0 and the VisualStudio-Plugin "VisualMicro" (which has other issues with V3.1 board manager). Firmware always prompts "ets Jan 8 2013".
I'm pretty sure there is something rotten in the state of denmark... and in the WiFi lib of the board manager.
Any help somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants