From 32b46c332c3464a209da96e28156fb006def52ee Mon Sep 17 00:00:00 2001 From: Michael Ammann Date: Wed, 9 Mar 2022 10:26:40 +0100 Subject: [PATCH 1/5] Update Example18_PointPerfectClient.ino --- .../Example18_PointPerfectClient.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino index b31cfa5..6359db5 100644 --- a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino +++ b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino @@ -138,6 +138,7 @@ void beginClient() wifiClient.setCACert(AWS_CERT_CA); wifiClient.setCertificate(AWS_CERT_CRT); wifiClient.setPrivateKey(AWS_CERT_PRIVATE); + mqttClient.setId(MQTT_CLIENT_ID); if (!mqttClient.connect(AWS_IOT_ENDPOINT, AWS_IOT_PORT)) { Serial.print(F("MQTT connection failed! Error code = ")); Serial.println(mqttClient.connectError()); From e6d910310a557b7de43dec4991484d438b0caed6 Mon Sep 17 00:00:00 2001 From: Michael Ammann Date: Wed, 9 Mar 2022 10:28:50 +0100 Subject: [PATCH 2/5] Update secrets.h --- examples/ZED-F9P/Example18_PointPerfectClient/secrets.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h b/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h index 4353c50..e15d4b8 100644 --- a/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h +++ b/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h @@ -15,6 +15,9 @@ const char MQTT_TOPIC_KEY[] = "/pp/key/ip"; // -> Credentials -> IP correction topic for EU/US region const char MQTT_TOPIC_SPARTN[] = "/pp/ip/us"; // choice of {eu, us} +// -> Credentials -> Client Id +static const char MQTT_CLIENT_ID = ""; + // -> Credentials -> Amazon Root Certificate static const char AWS_CERT_CA[] PROGMEM = R"EOF( -----BEGIN CERTIFICATE----- From fb86111dbc23a918401eb25eb578d65530fc5dcf Mon Sep 17 00:00:00 2001 From: Michael Ammann Date: Wed, 9 Mar 2022 10:30:47 +0100 Subject: [PATCH 3/5] Update Example18_PointPerfectClient.ino --- .../Example18_PointPerfectClient.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino index 6359db5..3e1d623 100644 --- a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino +++ b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino @@ -138,6 +138,8 @@ void beginClient() wifiClient.setCACert(AWS_CERT_CA); wifiClient.setCertificate(AWS_CERT_CRT); wifiClient.setPrivateKey(AWS_CERT_PRIVATE); + mqttClient.setKeepAliveInterval(60*1000); + mqttClient.setConnectionTimeout( 5*1000); mqttClient.setId(MQTT_CLIENT_ID); if (!mqttClient.connect(AWS_IOT_ENDPOINT, AWS_IOT_PORT)) { Serial.print(F("MQTT connection failed! Error code = ")); From 9052ec4de982f6741e86ad7957f0b905f9e1b977 Mon Sep 17 00:00:00 2001 From: Michael Ammann Date: Wed, 9 Mar 2022 10:31:23 +0100 Subject: [PATCH 4/5] Update Example18_PointPerfectClient.ino --- .../Example18_PointPerfectClient.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino index 3e1d623..2edc5bb 100644 --- a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino +++ b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino @@ -138,9 +138,9 @@ void beginClient() wifiClient.setCACert(AWS_CERT_CA); wifiClient.setCertificate(AWS_CERT_CRT); wifiClient.setPrivateKey(AWS_CERT_PRIVATE); + mqttClient.setId(MQTT_CLIENT_ID); mqttClient.setKeepAliveInterval(60*1000); mqttClient.setConnectionTimeout( 5*1000); - mqttClient.setId(MQTT_CLIENT_ID); if (!mqttClient.connect(AWS_IOT_ENDPOINT, AWS_IOT_PORT)) { Serial.print(F("MQTT connection failed! Error code = ")); Serial.println(mqttClient.connectError()); From f1b0b9e23d09387bf681319f6c213c0278101c21 Mon Sep 17 00:00:00 2001 From: Michael Ammann Date: Wed, 9 Mar 2022 10:31:54 +0100 Subject: [PATCH 5/5] Update secrets.h --- examples/ZED-F9P/Example18_PointPerfectClient/secrets.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h b/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h index e15d4b8..d206b1c 100644 --- a/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h +++ b/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h @@ -16,7 +16,7 @@ const char MQTT_TOPIC_KEY[] = "/pp/key/ip"; const char MQTT_TOPIC_SPARTN[] = "/pp/ip/us"; // choice of {eu, us} // -> Credentials -> Client Id -static const char MQTT_CLIENT_ID = ""; +static const char MQTT_CLIENT_ID[] = ""; // -> Credentials -> Amazon Root Certificate static const char AWS_CERT_CA[] PROGMEM = R"EOF(