Code Monkey home page Code Monkey logo

Comments (17)

ESP32DE avatar ESP32DE commented on July 2, 2024

not sure,
but are they not CONST ?
( fixed lenght / difference lenght)

from esp32-mqtt.

lakidd avatar lakidd commented on July 2, 2024

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.

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

how you set up your sta (wifi)

from esp32-mqtt.

lakidd avatar lakidd commented on July 2, 2024

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 ?

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

/* 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=  */

    }

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

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 )

from esp32-mqtt.

lakidd avatar lakidd commented on July 2, 2024

Yes exactly, it's crashing after a few lines of printing basically debug info, not much else.
Can you get it to work ?

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

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.

from esp32-mqtt.

lakidd avatar lakidd commented on July 2, 2024

no worries, thanks (rudi ?) using the latest esp-idf

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

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 ..

from esp32-mqtt.

lakidd avatar lakidd commented on July 2, 2024

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

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

can you see a change in your building messages?
( suspicious unknown ) warning..

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

https://github.com/espressif/esp-idf/blob/master/components/freertos/queue.c#L603

from esp32-mqtt.

ESP32DE avatar ESP32DE commented on July 2, 2024

not sure where the while(1) was removed
9a180aa

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

from esp32-mqtt.

lakidd avatar lakidd commented on July 2, 2024

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

from esp32-mqtt.

vanthome avatar vanthome commented on July 2, 2024

I had the same issue, in my case the stack depth of a task was to small.

from esp32-mqtt.

tuanpmt avatar tuanpmt commented on July 2, 2024

@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

from esp32-mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.