Skip to content

Commit 09115e1

Browse files
authored
Merge pull request #128 from mazgch/mazgch-patch-setId
Fix example
2 parents cfc4eda + f1b0b9e commit 09115e1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ void beginClient()
138138
wifiClient.setCACert(AWS_CERT_CA);
139139
wifiClient.setCertificate(AWS_CERT_CRT);
140140
wifiClient.setPrivateKey(AWS_CERT_PRIVATE);
141+
mqttClient.setId(MQTT_CLIENT_ID);
142+
mqttClient.setKeepAliveInterval(60*1000);
143+
mqttClient.setConnectionTimeout( 5*1000);
141144
if (!mqttClient.connect(AWS_IOT_ENDPOINT, AWS_IOT_PORT)) {
142145
Serial.print(F("MQTT connection failed! Error code = "));
143146
Serial.println(mqttClient.connectError());

examples/ZED-F9P/Example18_PointPerfectClient/secrets.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const char MQTT_TOPIC_KEY[] = "/pp/key/ip";
1515
// <Your PointPerfect Thing> -> Credentials -> IP correction topic for EU/US region
1616
const char MQTT_TOPIC_SPARTN[] = "/pp/ip/us"; // choice of {eu, us}
1717

18+
// <Your PointPerfect Thing> -> Credentials -> Client Id
19+
static const char MQTT_CLIENT_ID[] = "<ADD YOUR CLIENT ID HERE>";
20+
1821
// <Your PointPerfect Thing> -> Credentials -> Amazon Root Certificate
1922
static const char AWS_CERT_CA[] PROGMEM = R"EOF(
2023
-----BEGIN CERTIFICATE-----

0 commit comments

Comments
 (0)