0

Cannot connect to MQTT service using ESP8266
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Cannot connect to MQTT service using ESP8266

by jonsnow07 on Tue Jan 22, 2019 12:48 am

Hello all,

I am currently building a 4WD robot car which can be controlled using voice through Google Assistant.
Since this is my first Arduino project, I need some guidance for completing my project. I have already built up the model and uploaded the code using Arduino IDE with all the required libraries. But after uploading the code, the serial monitor on IDE shows this error:

.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error


I referred this project page for developing this project. I have also used the same code uploaded by the developer on the page. I have used Wemos D1 R2 board with L298N bridge along with 2 18650 3.7v batteries.

Need help ASAP!
Thanks.

jonsnow07
 
Posts: 2
Joined: Tue Dec 25, 2018 3:57 am

Re: Cannot connect to MQTT service using ESP8266

by brubell on Wed Jan 23, 2019 7:24 pm

Do you have all 3 of the libraries used in this guide installed in the Arduino IDE?

https://github.com/arduino-libraries/ArduinoHttpClient
https://github.com/adafruit/Adafruit_IO_Arduino
https://github.com/adafruit/Adafruit_MQTT_Library


Could you provide more output from the serial monitor, and paste your code?

brubell
 
Posts: 245
Joined: Fri Jul 17, 2015 10:33 pm

Re: Cannot connect to MQTT service using ESP8266

by jonsnow07 on Sun Jan 27, 2019 8:37 am

brubell wrote:Do you have all 3 of the libraries used in this guide installed in the Arduino IDE?

https://github.com/arduino-libraries/ArduinoHttpClient
https://github.com/adafruit/Adafruit_IO_Arduino
https://github.com/adafruit/Adafruit_MQTT_Library


Could you provide more output from the serial monitor, and paste your code?


Yes! I have installed all the three libraries shown in the guide.
And for the serial monitor only shows this error

.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error
.mqttStatus() failed to connectUnknown error


and nothing else is displayed on the serial monitor not even WiFi is connected stamp. Although I have checked through my home WiFi settings which shows Arduino connected status.

jonsnow07
 
Posts: 2
Joined: Tue Dec 25, 2018 3:57 am

Please be positive and constructive with your questions and comments.