forked from sborsay/Serverless-IoT-on-AWS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtroubleshooting_device_connections
23 lines (16 loc) · 1.71 KB
/
troubleshooting_device_connections
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Troubleshooting ESP8266 and ESP32 connection issues.
1. Make sure you are on a 2.4GHz network not 5GHz, the device only communicates at 2.4GHz
2. Make sure port 8883 isn't being blocked by your network admin, this is the port that MQTT(s) communicates on to AWS
3. Make sure your onboard device certificates match your AWS IoT Core region (the x509 rootCA is interchangable between regions)
4. Dont overflow your Char, sprintf, or snprintf buffer. MQTT requires payloads get sent by time and size over cycles.
if you overload the buffer it may not transmit or receive the payload. If you make an extended payload use short names like (t,h, lat)
and small data types you can always convert these variable abbreviations to longer, explicit names once on the cloud. You
can slo increase the size of your MQTT BUffer by changing the value of MQTT_MAX_PACKET_SIZE in PubSubClient.h from 128 to 512
5. If you aren't receiving your devices payload under your subscription topic in AWS IoT Core in the "test" tab, then go to the "Monitor" tab
and see if your device is even connecting. Often a device is actually connecting, but the payload isn't being received, the reason for this
is usually a problem with your device certificates. The device will connect but the payload wont pass through if your device certificates
aren't exactly correct.
A)
Fatal Error Occurred: “Failed to connect to ESP32: Timed out waiting for packet header” error when trying to upload new code to your ESP32
board. Some ESP32 development boards don’t go into flashing/uploading mode automatically when uploading a new code.
to solve this hold-down the “BOOT/FLASH” button (NOT EN/RESET) then release it while it is trying to connect