Esp32 Não conecta Wi-Fi

Projetos de ESP32
anchietaoliveira
Novato
Mensagens: 2
Registrado em: 08/Set/2020, 22:24

Esp32 Não conecta Wi-Fi

Mensagem por anchietaoliveira » 09/Set/2020, 00:32

No serial monitor aparece a seguinte mensagem

Connecting to Minha Rede Wi-Fi
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400dc8bc: 0009e080 00ffff1e 03dd0488
Core 0 register dump:
PC : 0x400dc8c0 PS : 0x00060830 A0 : 0x800daec3 A1 : 0x3ffb5490
A2 : 0x3ffc516c A3 : 0x3ffc51ac A4 : 0x3ffc1d94 A5 : 0x00000030
A6 : 0x3ffc50d0 A7 : 0x00000001 A8 : 0x800dc8c0 A9 : 0x3ffb5450
A10 : 0x40003f98 A11 : 0x400041fc A12 : 0x3ffc51ae A13 : 0x00000007
A14 : 0x3ffae0c0 A15 : 0x00000008 SAR : 0x0000001c EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400838e0 LEND : 0x400838f5 LCOUNT : 0x00000000

Backtrace: 0x400dc8c0:0x3ffb5490 0x400daec0:0x3ffb54c0 0x400db2d4:0x3ffb54e0 0x400d50cb:0x3ffb55a0 0x400d534a:0x3ffb55d0 0x400ec06c:0x3ffb5600 0x400ec15c:0x3ffb5630 0x400ec466:0x3ffb5660 0x400e883e:0x3ffb5690 0x4008f583:0x3ffb56b0 0x40088b7d:0x3ffb56f0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8


Connecting to Jose
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400dc8bc: 0009e080 00ffffbe 03dd0488
Core 0 register dump:
PC : 0x400dc8c0 PS : 0x00060830 A0 : 0x800daec3 A1 : 0x3ffb5490
A2 : 0x3ffc516c A3 : 0x3ffc51ac A4 : 0x3ffc1d94 A5 : 0x0000002e
A6 : 0x3ffc50d0 A7 : 0x00000001 A8 : 0x800dc8c0 A9 : 0x3ffb5450
A10 : 0x40003f98 A11 : 0x400041fc A12 : 0x3ffc51ae A13 : 0x00000007
A14 : 0x3ffae0c0 A15 : 0x00000008 SAR : 0x0000001c EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400838e0 LEND : 0x400838f5 LCOUNT : 0x00000000

Backtrace: 0x400dc8c0:0x3ffb5490 0x400daec0:0x3ffb54c0 0x400db2d4:0x3ffb54e0 0x400d50cb:0x3ffb55a0 0x400d534a:0x3ffb55d0 0x400ec06c:0x3ffb5600 0x400ec15c:0x3ffb5630 0x400ec466:0x3ffb5660 0x400e883e:0x3ffb5690 0x4008f583:0x3ffb56b0 0x40088b7d:0x3ffb56f0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8

Alguém pode me ajudar ?

FelipeSial
Novato
Mensagens: 1
Registrado em: 21/Set/2020, 17:26

Re: Esp32 Não conecta Wi-Fi

Mensagem por FelipeSial » 21/Set/2020, 17:54

Olá anchietaoliveira,

Coloca o modelo do seu Esp, mas acredito que o seu ESP tem um botão EN --> Reset, segura ele por alguns minutos, que o ESP irá resetar.

Depois deste ponto, segue um exemplo que funciona muito bem no meu ESP32 Wroom:

#include <SPI.h>
#include <WiFi.h>

//DECLARAÇÂO WIFI
const char* ssid = "xxxx"; //usuario
const char* password = "xxxx"; //senha

// DECLARAÇÃO DE FUNÇÕES

void lerCartao();

// ***************** INÍCIO DO SETUP *************************
void setup()
{
Serial.begin(9600);
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to WiFi..");
}
Serial.println("Connected to the WiFi network");


// Inicia SPI bus
SPI.begin();


while (!Serial)
{
; // ESPERA O SERIAL ESTAR PRONTO
}


}
// ***************** FIM DO SETUP ***************************

// ***************** INÍCIO DO LOOP *************************
void loop()
{

}
// ***************** FIM DO LOOP ***************************

anchietaoliveira
Novato
Mensagens: 2
Registrado em: 08/Set/2020, 22:24

Re: Esp32 Não conecta Wi-Fi

Mensagem por anchietaoliveira » 24/Set/2020, 01:25

Fiz o procedimento indicado e não funcionou. Me ajudemmmmm!!! :D

Versão ESP32 DEVKITV1

cleitonaps
Membro
Mensagens: 13
Registrado em: 21/Abr/2020, 15:09

Re: Esp32 Não conecta Wi-Fi

Mensagem por cleitonaps » 27/Out/2020, 22:11

Boa noite, poste o código desenvolvido. Provavelmente há algum parâmetro incorreto na chamada de alguma função, esse tipo de erro ocorre porque levanta uma exceção não tratada.

Paulo Habermann
Novato
Mensagens: 2
Registrado em: 28/Out/2020, 15:22

Re: Esp32 Não conecta Wi-Fi

Mensagem por Paulo Habermann » 06/Nov/2020, 19:36

Olá Anchieta Oliveira...

Acabei de testar um ESP32 que recebi agora e testei com esse Codigo e funcionou direitinho. Não esqueça de utilizar seu usuário e senha da sua rede wifi. é só mudar no código abaixo.

Para ver se está funcionando, verifique a velocidade da porta serial.

espero ter ajudado.
----------------------------------------------------------------------------------------------------------------------------------------------------
#include <WiFi.h>
#include "time.h"

const char* ssid = "Usuário";
const char* password = "Senha";

const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3600;
const int daylightOffset_sec = 3600;

void printLocalTime()
{
struct tm timeinfo;
if(!getLocalTime(&timeinfo)){
Serial.println("Failed to obtain time");
return;
}
Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
}

void setup()
{
Serial.begin(115200);

//connect to WiFi
Serial.printf("Connecting to %s ", ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println(" CONNECTED");

//init and get the time
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
printLocalTime();

//disconnect WiFi as it's no longer needed
WiFi.disconnect(true);
WiFi.mode(WIFI_OFF);
}

void loop()
{
delay(1000);
printLocalTime();
}

Responder