-->
Page 1 of 2

ESP8266-01 & MQTT can't connect to wifi

PostPosted: Mon Mar 09, 2015 3:38 pm
by LastSamurai
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!

Re: ESP8266-01 & MQTT can't connect to wifi

PostPosted: Fri Mar 13, 2015 1:27 pm
by terenceang
I had the same problem, hope this workaround helps.

https://github.com/tuanpmt/esp_mqtt/issues/51

Re: ESP8266-01 & MQTT can't connect to wifi

PostPosted: Fri Mar 13, 2015 4:44 pm
by LastSamurai
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).

Re: ESP8266-01 & MQTT can't connect to wifi

PostPosted: Sat Mar 14, 2015 3:05 pm
by LastSamurai
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 ;)