The use of the ESP8266 in the world of IoT

User avatar
By LastSamurai
#11684 Hey there,
I hope this is the right subforum for this kind of question. I am currently playing around with the esp8266 (great little piece of hardware :D ) and mqtt in C (https://github.com/tuanpmt/esp_mqtt). I tried out this code (https://github.com/nathanchantrell/esp_mqtt_oled) which also uses the mqtt lib and works for me. Now I rewrote the example of tuan to fit my own needs, flashed it and... endless loops of
STATION_IDLE
no t found, reconnect after ls
scandone
...

I don't know why... the wifi settings in user_config.h should be right. Any idea where the error could be? Thanks in advance!
User avatar
By LastSamurai
#11939 Thanks a lot! I just saw your post too (and wanted to link it here :D ). I was already wundering where the 1 came from but I haven't had the time to figure it out yet. Will try to get it working tomorrow (and give the results here).
User avatar
By LastSamurai
#11976 Hey, its me again ;) I wasn't able to make it work for me. What exactly did you change in the original mqtt code? Simply call os_sprintf(sysCfg.sta_ssid, "%s", STA_SSID); againa after CFG_Load(); in your main method?
PS Thats exactly what fixed the problem for me. I had another error somewhere else to fix first in my code though ;)