-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathTroubleshootingyourAWSconnecion.txt
63 lines (42 loc) · 3.78 KB
/
TroubleshootingyourAWSconnecion.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Troubleshooting ESP8266 and ESP32 connection issues.
Update 2024 - make sure you have a TLS 1.2 Policy selected (Not TLS 1.3) from Settings-->Device (https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html#tls-policy-table)
1. Make sure you are on a 2.4GHz network, and not 5GHz, the ESP IoT device only communicates at 2.4GHz.
1B. Use the 'ATS' AWS endpoint from IoT Core--> Settings or: aws iot describe-endpoint --endpoint-type iot:Data-ATS
2. Make sure your IoT device AWS endpoint region matches the current AWS region in your console and on the browser.
3. Make sure port 8883 on your computer isn't being blocked by your network admin, this is the port that MQTT(s) traditionally communicates. AWS IoT Core requires you send MQTT data over secure port 8883 or 443.
4. Make sure your onboard device security certificates match your AWS IoT Core region. The RootCA x509 certificate is fungible between regions, but the client and private certs are not.
5. Make sure you attached an AWS IoT Policy to your security certificates and activate it. If you have not, you will see the connection on the monitor tab, but no data will appear on the MQTT test client.
IoT permissive policy should look like:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}
6. Don't exceed your 'char' buffer in your Arduino sketch. The MQTT protocol requires payloads get sent by time and size over cycles. If you overload the buffer,
the payload will not show up on the cloud but you won't receive an error message indicating the problem.. To solve this issue for large payloads in your sketch you
can increase the size of your buffer by changing the value of MQTT_MAX_PACKET_SIZE constant in the PubSubClient.h header file from 128 to 256 or 512 bytes to solve this issue.
This bigger payload allocation will allow longer buffer payloads to be transmitted.
7. If you aren't receiving your devices payload under your subscription topic in AWS IoT Core in the on the MQTT test client, then go to the "Monitor" tab in AWS IoT Core and
determine if your device is even connecting. Often a IoT device is connecting but the payload isn't being received, the reason for this is usually a problem with your device security certificates.
The IoT device will connect but the payload won’t pass through if your device certificates aren't activated correctly and have an attached IoT policy. The problem could also be the issue listed
previously as the MQTT max payload buffer is exceeded.
If your device connection isn't even showing up in the monitor, then it is likely a hardware issue not a certificate issue. Confirm you are using the correct virtualization package
or board manager for your device.
8. Does your serial monitor look like: *M???
????????%^&???*^$#$^
After running your Arduino sketch? Make sure your serial monitor baud rate matches your sketch baud rate (probably 115200).
9. For the ESP8266 only: Make sure you are using the right version of the sketch for your Arduino Board Manager. If you are not receiving IoT payloads on AWS IoT Core,
it could be because you are using the wrong ESP8266 sketch for your current Arduino Board Manager package.
Some older or cheaper ESP32 board issues:
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Solution:
While connecting and holding down the ‘Boot’ button for one second initiates the firmware downloads mode (BOOT button = FLASH button).
Warning:
# Do not press the Enable (EN)/RESET(RST) Button
For a more extensive list see the GitHub.