So i'am learning on my custom esp32 "board" recently.
It is a bare ESP32-WROOM-32 chip with 16mb flash.
I have built a "board" for it from modules around it, to a breadboard.
I have several things on this board including
-An lcd display
-Some I/O expander
-A LAN 8720PHY ethernet board
-A digital Potentiometer
-A ds3231 RTC module
-An EN125 ENTESLA RFID module
-A key matrix
etc...
My power supply is an EMG 18144 adjustable 0-40v and 0-5A DC power supply.
Similar to this but mine is 5Amper:
https://www.radiomuseum.org/r/elektroni ... 5_vol.html
The issue:
When calling either:
- WiFi.softAP(ssid,password, WiFiChannel, 0, 1);
- WiFi.softAP(ssid,password);
- WiFi.mode(WIFI_AP);
- WiFi.enableAP(true);
With or without delay after the functions,
the ESP RESTARTS without a single error message on the serial monitor with
build_flags = -DCORE_DEBUG_LEVEL=5 on the platformio.ini file.
I have capacitors everywhere on the circuit.
One on the power supply pins, one on the Display POWER in pins and one on the ESP32's power pins.
The rest of the code works fine and the softAp was worked fine until today.
I'am using PlatformIO IDE on Vscode with latest libraries and latest arduino framework.
And these libraries:
#include <Arduino.h> // FRAMEWORK
#include <WebAuthentication.h>
/** WIFI LIBRARIES **/
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <WebSocketsServer.h>
#include <ESPmDNS.h> // NOT WORKING PROPERLY!!!!
#include <WiFiUdp.h>
#include <ModbusIP_ESP8266.h> // EXPERIMENTAL COMMUNICATION WITH PLC
/** I/O EXPANDER LIBRARY **/
#include "PCF8574.h"
#include <MCP23008.h>
/** KEY MATRIX LIBRARY **/
#include <tca8418.h>
/** ETHERNET COMMUNICATION LIBRARY **/
#include <Ethernet.h>
/** OVER THE AIR WEB UPDATE BOTH IP AND HTPP **/
#include <ArduinoOTA.h>
#include <Update.h>
/** DIGITAL POTENTIOMETER **/
#include <Systronix_AD5274.h>
/** SPIFFS LIBRARIES **/
#define FS_NO_GLOBALS
#include <FS.h>
#include "SPIFFS.h"
#include <Wire.h> // I2C
#include <Ticker.h> // Uptime
/** REAL TIME LIBRARI **/
#include <ESP32-hal-I2C.h>
#include <RtcDS3231.h>
//#include <EepromAt24C32.h>
/** SPI TFT LIBRARI AND DEFINES **/
#include <TFT_eSPI.h>
#include <SPI.h>
#include <JPEGDecoder.h>
/** OWN LIBRARIES **/
#include <sajat.h> // ETHERNET HANDLES
#include <OwnLib.h> // DECLARATIONS
#include "Pages.h" // HTML PAGES
#include <Handles.h> // ALL HANDLES
#include <I2C_Things.h> // I2C FUNCTIONS
#include <DisplayUI.h> // TFT FUNCTIONS
#include <RFID_Dolgok.h> // RFID FUNCTIONS
#include <TCP_Requests.h> // TCP/IP HANDLES
#include <SPIFFS_Dolgok.h> // SPIFFS FUNCTIONS
ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
- Attachments
-
- 2.jpg (131.77 KiB) Viewed 9959 times
-
- 1.jpg (175.21 KiB) Viewed 9959 times
Re: ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
I forgot to mention what i tried:
-I tried palcing the WiFi.softAP(ssid,password);
To everywhere on my sketch.
To the setup, to the loop with a turn on flag.
-I tried to disconnect the wifi before the softap.
-I tried (150) delay after the softap.
-I tried softap config ( static ip ) before and after the softap.
-I tried with different power supply.
-I tried without capacitors on the circuit.
-I tried it with a following bare async sketch(Result is the same, ESP REBOOTS without ERROR):
-With simple Sync Webserver (Result is the same, ESP REBOOTS without ERROR):
-I tried palcing the WiFi.softAP(ssid,password);
To everywhere on my sketch.
To the setup, to the loop with a turn on flag.
-I tried to disconnect the wifi before the softap.
-I tried (150) delay after the softap.
-I tried softap config ( static ip ) before and after the softap.
-I tried with different power supply.
-I tried without capacitors on the circuit.
-I tried it with a following bare async sketch(Result is the same, ESP REBOOTS without ERROR):
Code: Select all
#include <Arduino.h>
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
AsyncWebServer server(80);
const char* ssid = "ProbaAP";
const char* password = "12345678";
void notFound(AsyncWebServerRequest *request) {
request->send(404, "text/plain", "Not found");
}
void setup(){
Serial.begin(115200);
WiFi.softAP(ssid,password);
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(200, "text/plain", "Hello, world");
});
server.onNotFound(notFound);
server.begin();
}
void loop(){
}
Code: Select all
#include <Arduino.h>
#include <WiFi.h>
#include <WebServer.h>
/* Put your SSID & Password */
const char* ssid = "ESP32"; // Enter SSID here
const char* password = "12345678"; //Enter Password here
WebServer server(80);
void handle_OnConnect() {
server.send(200, "text/html", "Hello server!");
}
void handle_NotFound(){
server.send(404, "text/plain", "Not found");
}
void setup() {
Serial.begin(115200);
WiFi.softAP(ssid, password);
delay(100);
server.on("/", handle_OnConnect);
server.onNotFound(handle_NotFound);
server.begin();
Serial.println("HTTP server started");
}
void loop() {
server.handleClient();
}
-
- Posts: 1
- Joined: Sun Aug 25, 2019 7:27 am
Re: ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
Take a look at https://github.com/espressif/arduino-esp32/issues/2025
I had an extremely similar experience to you and wiping the flash with esptool and then setting WiFi.persistent(false) (before calling the WiFi.softap cures problem.
The post above has a few other suggestions but this is the only one that works for me.
I had an extremely similar experience to you and wiping the flash with esptool and then setting WiFi.persistent(false) (before calling the WiFi.softap cures problem.
Code: Select all
WiFi.persistent(false)
The post above has a few other suggestions but this is the only one that works for me.
Re: ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
That didn't help.
I erased my flash and reupload my code with that function before softap call and the reset comes even after all that.
I will try some suggestions from that post that you linked!
Thanks.
Edit: I tried all of the methods that i find on that link but none of them worked.
I erased my flash and reupload my code with that function before softap call and the reset comes even after all that.
I will try some suggestions from that post that you linked!
Thanks.
Edit: I tried all of the methods that i find on that link but none of them worked.
Re: ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
With so many peripherals make sure you didnt connect any bootstrap pin which prevents esp32 to start:
https://github.com/espressif/esptool/wi ... -Selection
https://github.com/espressif/esptool/wi ... -Selection
Re: ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
hello is it possible you send me the esp32 library that you are using for the tca8418.h
Re: ESP32 reboots on WiFi.softAP(ssid,password); or WiFi.enableAP(true); without error.
Getting this error when trying to compile tca8418.h library for esp32 arduino. The error is in the PCint.h file can you help me with the working library or a workaround for this error... thanks in advance.
In file included from C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\tca8418.cpp:33:0:
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:8:41: error: 'PCMSK0' was not declared in this scope
volatile uint8_t *port_to_pcmask[] = { &PCMSK0, &PCMSK1, &PCMSK2 };
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:8:50: error: 'PCMSK1' was not declared in this scope
volatile uint8_t *port_to_pcmask[] = { &PCMSK0, &PCMSK1, &PCMSK2 };
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:8:59: error: 'PCMSK2' was not declared in this scope
volatile uint8_t *port_to_pcmask[] = { &PCMSK0, &PCMSK1, &PCMSK2 };
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h: In function 'void PCattachInterrupt(uint8_t, void (*)(), int)':
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:47:2: error: 'PCICR' was not declared in this scope
PCICR |= 0x01 << port;
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h: In function 'void PCdetachInterrupt(uint8_t)':
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:72:3: error: 'PCICR' was not declared in this scope
PCICR &= ~(0x01 << port);
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h: At global scope:
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:109:7: error: expected constructor, destructor, or type conversion before '(' token
SIGNAL(PCINT0_vect) {
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:112:7: error: expected constructor, destructor, or type conversion before '(' token
SIGNAL(PCINT1_vect) {
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:115:7: error: expected constructor, destructor, or type conversion before '(' token
SIGNAL(PCINT2_vect) {
^
exit status 1
Error compiling for board ESP32 Dev Module.
In file included from C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\tca8418.cpp:33:0:
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:8:41: error: 'PCMSK0' was not declared in this scope
volatile uint8_t *port_to_pcmask[] = { &PCMSK0, &PCMSK1, &PCMSK2 };
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:8:50: error: 'PCMSK1' was not declared in this scope
volatile uint8_t *port_to_pcmask[] = { &PCMSK0, &PCMSK1, &PCMSK2 };
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:8:59: error: 'PCMSK2' was not declared in this scope
volatile uint8_t *port_to_pcmask[] = { &PCMSK0, &PCMSK1, &PCMSK2 };
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h: In function 'void PCattachInterrupt(uint8_t, void (*)(), int)':
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:47:2: error: 'PCICR' was not declared in this scope
PCICR |= 0x01 << port;
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h: In function 'void PCdetachInterrupt(uint8_t)':
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:72:3: error: 'PCICR' was not declared in this scope
PCICR &= ~(0x01 << port);
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h: At global scope:
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:109:7: error: expected constructor, destructor, or type conversion before '(' token
SIGNAL(PCINT0_vect) {
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:112:7: error: expected constructor, destructor, or type conversion before '(' token
SIGNAL(PCINT1_vect) {
^
C:\Users\truufseir\Documents\Arduino\libraries\TCA8418\PCint.h:115:7: error: expected constructor, destructor, or type conversion before '(' token
SIGNAL(PCINT2_vect) {
^
exit status 1
Error compiling for board ESP32 Dev Module.
Who is online
Users browsing this forum: No registered users and 59 guests