Open lakidd opened 8 years ago
not sure, but are they not CONST ? ( fixed lenght / difference lenght)
I've done some more troubleshooting and it's not that.
As soon as we get to
INFO("[APP] Start, connect to Wifi network: %s ..\n", WIFI_SSID);
it crashes straight after. It appears to be unrelated to this bit of code (commented it out same result) but I'm an RTOS newb as to what that might be.
how you set up your sta (wifi)
sorry I don't understand ? Even if I comment out the above line I get the same result.
WIFI_SSID is defined as
#define WIFI_SSID "xxxx"
I've tried replacing WIFI_SSID with "xxxx" in the INFO line above with the same result.
Does this code work for you ?
/* station mode! ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); wifi_config_t sta_config = { .sta = { .ssid = "OneTwoThreeFourFive", .password = "NoPublicHereNotShow", .bssid_set = false } }; ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &sta_config) ); ESP_ERROR_CHECK( esp_wifi_start() ); ESP_ERROR_CHECK( esp_wifi_connect() ); */
/* ap mode */
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_AP) ) ;
wifi_config_t ap_config = {
.ap = {
.ssid = "OneTwoThreeFourFive\0",
.password = "NoPublicHereNotShow",
/*.bssid_set = false,*/
.ssid_len = 0,
/* .channel = WIFI_COUNTRY_EU, */
.authmode = WIFI_AUTH_WPA2_PSK,
/* .ssid_hidden = , */
.max_connection = 10
/* .beacon_interval= */
}
https://github.com/tuanpmt/esp32-mqtt/blob/master/main/app_main.c#L112 https://github.com/tuanpmt/esp32-mqtt/blob/master/main/include/user_config.sample.h#L29 sry for confusing you are right. not sure why this is the setup for wifi is done in top code example ( esp-idf )
Yes exactly, it's crashing after a few lines of printing basically debug info, not much else. Can you get it to work ?
which esp-idf version ( commits nr ) you use? i know i have one problem with the newest in tcp server i used the preview version for this.
just in time i can't help you with do on a module, i am sitting in wrong place, earliest on monday.
no worries, thanks (rudi ?) using the latest esp-idf
yes ;-) sry can you test with an early version? best wishes rudi ;-) ;-) ED: i remember me, that the last update on wifi lib have a change ..
so I just updated to the latest library files and now get this
[APP] Start, connect to Wifi network: xxx ..
/Users/lakidd1/esp32/esp-idf/components/freertos/./queue.c:603 (xQueueGenericSend)- assert failed!
Guru Meditation Error: Core 0 panic'ed.
Register dump:
PC : Guru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled.
Register dump:
PC : 40083b06 PS : 00060033 A0 : 80083d29 A1 : 3ffb6a60
A2 : 00000000 A3 : 00000002 A4 : 00000000 A5 : 00000000
A6 : 3f401158 A7 : 3ff4001c A8 : 0000007d A9 : 3ff4001c
A10 : 3ff4001c A11 : 3f4002f4 A12 : 00000000 A13 : 3ffb6ac0
A14 : 00000000 A15 : 3f40126c SAR : 00000015 EXCCAUSE: 0000001c
EXCVADDR: 00000004 LBEG : 4000c2e0 LEND : 4000c2f6 LCOUNT : 00000000
Rebooting..
Yes, so might need to back an version thanks
can you see a change in your building messages? ( suspicious unknown ) warning..
not sure where the while(1) was removed https://github.com/tuanpmt/esp32-mqtt/commit/9a180aab325fe4af116f0aa57d151d6581b47fe2
perhabs it can be a task error ( not combine with this remove ) ..small change in the esp-idf / lib
this is the moment of reboot? https://github.com/tuanpmt/esp32-mqtt/blob/master/main/app_main.c#L118
OK I got it working but it was significant surgery to the existing code. I took the wifi init code from the http example in esp-idf and replaced the code between L112 and L118. Works now but not sure why...I suspect esp_wifi_set mode and others were throwing exceptions which weren't being handled and now are. @tuanpmt which version of esp-idf did you build this with ? How to I contribute my changes back (if you want them) ?
Edit: Ah this is all fixed in the dev branch. My bad
I had the same issue, in my case the stack depth of a task was to small.
@esp32de
user need to copy user_config.sample.h
to user_config.local.h
and compile project with some of the information does not want to public (.gitingore will ignore user_config.local.h
)
I'm updating this library work with select
api and outbox queue, but need to try with Arduino for ESP8266 first. As @vanthome said, Please try increasing the stack size
Hi, I've tried to install the app onto my devboard (having set things like the MQTT server, ssid and password and I get this constantly. My WiFi is mac filtered but it doesn't seem to be getting even that far (as in joining the network). It appears to be crashing at this line
But both are set
Any idea how to troubleshoot ?