ESP32 DEV Module keep rebooting with assert failed: xQueueReceive queue.c:1475 (( pxQueue ))

Devanarayanan V
Posts: 2
Joined: Fri Jul 26, 2024 12:29 pm

ESP32 DEV Module keep rebooting with assert failed: xQueueReceive queue.c:1475 (( pxQueue ))

Postby Devanarayanan V » Fri Jul 26, 2024 12:58 pm

When tries to connect to a wi-fi network having WPA2 Enterprise I got this error .Please answer if anyone knows about this.

error:
assert failed: xQueueReceive queue.c:1475 (( pxQueue ))

Backtrace: 0x400823c1:0x3ffcd730 0x4008bdc1:0x3ffcd750 0x4009137e:0x3ffcd770 0x4008c4e3:0x3ffcd8a0 0x40113479:0x3ffcd8e0 0x400ff952:0x3ffcd900 0x4008e6be:0x3ffcd940

ELF file SHA256: f018158a7b3eb50f

Rebooting...
ets Jul 29 2019 12:21:46

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:0x3fff0030,len:1448
load:0x40078000,len:14844
ho 0 tail 12 room 4
load:0x40080400,len:4
load:0x40080404,len:3356
entry 0x4008059c


code:
// #include <WiFi.h>
#include "esp_eap_client.h" // This library is required for WPA2 Enterprise

#include "esp_wifi.h"

const char* ssid = "ssid"; // Your SSID
#define EAP_ID "username"
#define EAP_USERNAME "username"
#define EAP_PASSWORD "password"

// static const char incommon_ca[] PROGMEM = R"EOF(
REQUIRES esp_wifi;
// )EOF";

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

Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);



// WPA2 Enterprise configuration
// WiFi.disconnect(true); // Disconnect from any network if already connected
// WiFi.mode(soft-AP); // Set Wi-Fi mode to station
esp_err_t esp_wifi_set_mode(wifi_mode_t mode)

esp_err_t result;

// result = esp_eap_client_set_ca_cert((uint8_t *)incommon_ca, strlen(incommon_ca));
// if (result != ESP_OK) {
// Serial.print("Failed to set certificate: ");
// Serial.println(result);
// } else {
// Serial.println("certificate set successfully");
// }

// WPA2 Enterprise magic starts here
result = esp_eap_client_set_identity((uint8_t *)EAP_ID, strlen(EAP_ID));
if (result != ESP_OK) {
Serial.print("Failed to set identity: ");
Serial.println(result);
} else {
Serial.println("Identity set successfully");
}

result = esp_eap_client_set_username((uint8_t *)EAP_USERNAME, strlen(EAP_USERNAME));
if (result != ESP_OK) {
Serial.print("Failed to set username: ");
Serial.println(result);
} else {
Serial.println("Username set successfully");
}

result = esp_eap_client_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD));
if (result != ESP_OK) {
Serial.print("Failed to set password: ");
Serial.println(result);
} else {
Serial.println("Password set successfully");
}

// Optional: Set CA certificate if required
// esp_wifi_sta_wpa2_ent_set_ca_cert(ca_cert, ca_cert_len);

// Initialize WPA2 Enterprise
// result = esp_wifi_sta_enterprise_enable();
if (result == ESP_OK) {
Serial.print("Failed to enable WPA2 Enterprise: ");
Serial.println(result);
} else {
Serial.println("WPA2 Enterprise enabled successfully");
Serial.println(result);
}
// WPA2 Enterprise magic ends here

// wl_status_t wl_status = WiFi.begin(ssid); // Start connecting to the Wi-Fi network
// Serial.print(wl_status);

// int retry_count = 0;
// while (WiFi.status() != WL_CONNECTED) {
// delay(500);
// Serial.print(".");
// retry_count++;
// if (retry_count >= 60) { // Retry for 30 seconds
// Serial.println();
// Serial.println("Failed to connect to WiFi");
// return;
// }
// }

// Serial.println("");
// Serial.println("WiFi connected");
// Serial.println("IP address: ");
// Serial.println(WiFi.localIP());
}

void loop() {
// Your main code here
}

Who is online

Users browsing this forum: No registered users and 40 guests