• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Error in MQTT_Client_2 code

Q&A Forum › Category: Home Automation › Error in MQTT_Client_2 code
0 Vote Up Vote Down
Joe Williams asked 3 years ago

The MQTT broker is working fine, as is the MQTT_Client_1 code. I’ve never encountered an error like this, and don’t have any idea where to begin troubleshooting.
The code compiles and loads OK, but I get the following output from the serial port, continuously repeating. The display is lit, but blank. Can you please help me troubleshoot this error?
————— CUT HERE FOR EXCEPTION DECODER —————
Exception (0):
epc1=0x40205dc9 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

stack>>>

ctx: cont
sp: 3ffffdc0 end: 3fffffc0 offset: 0190
3fffff50: 3ffe85cc 3ffee704 00000001 40205dc9
3fffff60: 3fffdad0 3ffee704 3ffeea80 40205e18
3fffff70: 3fffdad0 3ffee704 3ffeea80 4020134c
3fffff80: feefeffe feefeffe feefeffe feefeffe
3fffff90: feefeffe feefeffe feefeffe feefeffe
3fffffa0: 3fffdad0 00000000 3ffeebac 40206f1c
3fffffb0: feefeffe feefeffe 3ffe85e4 40100c99
<<<stack<<<
I’ve checked and double-checked all the code and it looks OK.
It’s a NodeMCU, and I’m using the code downloaded from Github.
Thanks!

11 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Can you tell me the ESP8266 boards version you have installed?
Go to Tools > Board > Boards Manager and search for “ESP8266”.
Regards,
Sara

0 Vote Up Vote Down
Joe Williams answered 3 years ago

Sure – it’s esp8266 by esp8266 Community version 3.02.
Does that help?

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi again.
Can you downgrade to version 3.0.1?
Let me know if it fixes the issue.
Regards,
Sara

0 Vote Up Vote Down
Joe Williams answered 3 years ago

Sara, I downgraded to v3.01, but still get the same, continuous output from the serial port. 🙁

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Can you double-check that you’ve wired correctly all the components?

0 Vote Up Vote Down
Joe Williams answered 3 years ago

Yes, I have checked and double-checked both the code and the wiring. It’s all good.

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Can you try a sample code for the I2C LCD display? Just to check if it is related to the LCD?
Regards,
Sara

0 Vote Up Vote Down
Joe Williams answered 3 years ago

Sure. I ran the “Unit 6: I2C Liquid Crystal Display (LCD)” code and it runs fine.

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
I think you may need to move the content of the onMqttMessage() to the loop().
I modified the code. Can you try it? At the moment I don’t have an LCD to try it out, so I’m not sure if there’s something missing.
Here’s the link to the code: https://gist.github.com/sarasantos/230e702a6058c3b06a1c738e97d69f16
Regards,
Sara

0 Vote Up Vote Down
Joe Williams answered 3 years ago

Sure, I’ll be out of town for a few days, but will try it when I return. Thanks!

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Ok. 
Then, let me know the results.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.