You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NGWOS_AWS_MQTT/ReadMe.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,23 @@ Do not proceed to this program until you have successfully connected to and publ
88
88
89
89
You need your thing name and endpoint again for this sketch.
90
90
91
+
## Configuring the ModularSensors library
92
+
93
+
To get consistent two-way communication with the USGS AWS instance, you need to increase the default timeout for MQTT messages within the ModularSensors library.
94
+
This is a simple change to a single file.
95
+
96
+
- Find the ModularSensors configuration header
97
+
- If you are using the Arduino IDE, the file will be here: `"C:\Users\{your_user_name}\Documents\Arduino\libraries\EnviroDIY_ModularSensors\src\ModSensorConfig.h"`
98
+
- Open the configuration file in a text editor (like notepad)
99
+
- You cannot open this header file in the Arduino IDE; you must use a text editor.
100
+
- In line 317 of ModSensorConfig.h, find the define `#define MS_AWS_IOT_MAX_CONNECTION_TIME 30000L` and replace the `30000L` with `120000L`:
101
+
- Line 317 will end up as `#define MS_AWS_IOT_MAX_CONNECTION_TIME 120000L`
102
+
- Save and close the file.
103
+
104
+
If you are using PlatformIO you *do not* need to modify this file.
105
+
Instead, add a the [build flag](https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html)`-DMS_AWS_IOT_MAX_CONNECTION_TIME=120000L`to your platformio.ini file
106
+
This build flag is already set in the platformio.ini file for this example.
0 commit comments