Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix crash caused by incorrectly set broker url in mqtt object #353

Merged
merged 1 commit into from
Oct 13, 2022
Merged

fix crash caused by incorrectly set broker url in mqtt object #353

merged 1 commit into from
Oct 13, 2022

Conversation

brentru
Copy link
Member

@brentru brentru commented Oct 13, 2022

Beta 50 and Beta 51 experienced crashing during the MQTT connection process:

Attempting to connect to WiFi...
CONNECTING
FSM_NET_ESTABLISH_MQTT
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (28):

This was due to a call to new Adafruit_MQTT_Client(). The pointer to the char array storing the MQTT broker URL was not set unless the user was using the development (staging) server. This code was changed when we switched to remove MQTTS due to the fingerprinting requirement for ESP8266 boards.

This pull request

Output of this PR running with incorrect Adafruit IO credentials:

Attempting to connect to WiFi...
CONNECTING
FSM_NET_ESTABLISH_MQTT
Unable to connect to Adafruit IO MQTT, retrying in 3 seconds...
Unable to connect to Adafruit IO MQTT, retrying in 3 seconds...
Unable to connect to Adafruit IO MQTT, retrying in 3 seconds...
Unable to connect to Adafruit IO MQTT, retrying in 3 seconds...
Unable to connect to Adafruit IO MQTT, retrying in 3 seconds...
ERROR [WDT RESET]: ERROR: Unable to connect to Adafruit.IO MQTT, rebooting soon...

Output of this PR running with correct Adafruit IO credentials:

-------Device Information-------
Firmware Version: 1.0.0-beta.52
Board ID: feather-esp8266
Adafruit.io User: brubell
WiFi Network: Adafruit
MAC Address: 84:F3:EB:5B:05:51
-------------------------------
Subscribing to MQTT topics...
Running Network FSM...
Attempting to connect to WiFi...
CONNECTING
FSM_NET_ESTABLISH_MQTT
Registering hardware with WipperSnapper...
Registering hardware with IO...
Encoding registration request...Encoding registration msg...Published!
Polling for registration message response...2
GOT Registration Response Message:
Hardware Response Msg:
	GPIO Pins: 10
	Analog Pins: 1
	Reference voltage: 1.10v
Completed registration process, configuration next!
Polling for message containing hardware configuration...
Polling for message containing hardware configuration...
cbSignalTopic: New Msg on Signal Topic
2 bytes.
decodeSignalMsg
cbSignalMsg
Sub-messages found: 1
Signal Msg Tag: Pin Configuration
Initial Pin Configuration Complete!
Publishing to pin config complete...
Hardware configured successfully!
Registering components...
SERVO: OK!
Registration and configuration complete!
Running application...
PING!

@brentru brentru added this to the beta 52 milestone Oct 13, 2022
@brentru brentru changed the title fix crash caused by unset broker url in mqtt object fix crash caused by incorrectly set broker url in mqtt object Oct 13, 2022
@brentru brentru merged commit 0f11dc5 into adafruit:main Oct 13, 2022
@brentru brentru deleted the fix-esp8266-crash branch October 13, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESP8266 Feather Crash on Beta 50
2 participants