ESP8266MQTTMesh icon indicating copy to clipboard operation
ESP8266MQTTMesh copied to clipboard

Connect to wifi problem on ESP32

Open Tim97Egl opened this issue 4 years ago • 4 comments

I have a similar problem like some other users mentioned. Using the library on an ESP32 the programm stops at: [connect] Connecting to SSID:

I havent found any solutions to this problem in previous issues. Has anyone used the lib on an ESP32?

Tim97Egl avatar May 26 '20 08:05 Tim97Egl

Hi, have you tried out my fork of the Project?

simone1999 avatar Jul 07 '20 06:07 simone1999

Yes, but it didnt work either. Can you explain, what you have done differently?

Tim97Egl avatar Aug 27 '20 15:08 Tim97Egl

In ESP822MQTTMesh.h three lines have to be uncommented and one has to be adapted:

#ifdef ESP32 #include <AsyncTCP.h> //#include <ESP32Ticker.h> #include <Ticker.h> #define USE_WIFI_ONEVENT #include "WiFiCompat.h" #else #include <ESP8266WiFi.h> #include <ESPAsyncTCP.h> #include <Ticker.h> #endif

In ESP8266.cpp the following changes have to be made:

//os_sprintf(id, "ChipID:%06X FirmwareID:%04X v%s IP:%s %s", _chipID, firmware_id, firmware_ver, WiFi.localIP().toString().c_str(), meshConnect ? "mesh" : "");

sprintf(id, "ChipID:%06X FirmwareID:%04X v%s IP:%s %s", _chipID, firmware_id, firmware_ver, WiFi.localIP().toString().c_str(), meshConnect ? "mesh" : "");

I remember that another error message occurred but I can not find the spot in the source code. I just commented the lines out and it is working fine.

eporocrail avatar May 01 '21 12:05 eporocrail