diff --git a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino index 2edc5bb..a573d32 100644 --- a/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino +++ b/examples/ZED-F9P/Example18_PointPerfectClient/Example18_PointPerfectClient.ino @@ -36,6 +36,7 @@ If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) Open the serial monitor at 115200 baud to see the output */ + #include #include #include // Click here to get the library: http://librarymanager/All#ArduinoMqttClient @@ -67,8 +68,11 @@ void setup() Serial.println(F("u-blox module connected")); myGNSS.setI2COutput(COM_TYPE_UBX); //Turn off NMEA noise myGNSS.setPortInput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_SPARTN); // Be sure SPARTN input is enabled. - + + myGNSS.setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED); // Set the differential mode - ambiguities are fixed whenever possible myGNSS.setNavigationFrequency(1); //Set output in Hz. + myGNSS.setVal8(UBLOX_CFG_SPARTN_USE_SOURCE, 0); // use IP source (default) + Serial.print(F("Connecting to local WiFi")); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { @@ -151,7 +155,7 @@ void beginClient() // Subscribe to MQTT and register a callback Serial.println(F("Subscribe to Topics")); mqttClient.onMessage(mqttMessageHandler); - mqttClient.subscribe(MQTT_TOPIC_KEY); + //mqttClient.subscribe(MQTT_TOPIC_KEY); // The ZED does not need the keys in this example. SPARTN is delivered via secure MQTT mqttClient.subscribe(MQTT_TOPIC_SPARTN); lastReceived_ms = millis(); } //End attempt to connect diff --git a/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h b/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h index d206b1c..171d674 100644 --- a/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h +++ b/examples/ZED-F9P/Example18_PointPerfectClient/secrets.h @@ -11,7 +11,8 @@ const char password[] = ""; const char AWS_IOT_ENDPOINT[] = "pp.services.u-blox.com"; const unsigned short AWS_IOT_PORT = 8883; // -> Credentials -> IP key distribution topic -const char MQTT_TOPIC_KEY[] = "/pp/key/ip"; +const char MQTT_TOPIC_KEY[] = "/pp/ubx/0236/ip"; // This topic provides the IP only dynamic keys in UBX format +//const char MQTT_TOPIC_KEY[] = "/pp/ubx/0236/Lb"; // This topic provides the L-Band + IP dynamic keys in UBX format // -> Credentials -> IP correction topic for EU/US region const char MQTT_TOPIC_SPARTN[] = "/pp/ip/us"; // choice of {eu, us}