Closed TheMeaningfulEngineer closed 7 years ago
as a helpfull asside: i ran into this problem as well. turns out the chip needs a few seconds to connect to the wifi. put a time.sleep(3) after the code to connect to your wifi network and you're good to go.
I run into this too now and cannot for the life of me solve the client.connect() issue. I still keep getting OSError: [Errno 113] EHOSTUNREACH.
Any comments on how you solved the problem?
Hi
For the following code,
I'm experiencing the error below:
Line 17 is
client.connect()
.The peculiarity is that the exact same code can be run without errors when imputed step by step into the interactive shell. Actually, as soon as the exception occurs and the control returns to the shell I can run
client.connect()
without errors (returns 0) which is shown in the MQTT broker log.The version used is:
MicroPython v1.8.7-7-gb5a1a20a3 on 2017-01-09
on ESP8266