From a04b5d11484d0f4825fb6ee3d38f3d37ec67d951 Mon Sep 17 00:00:00 2001 From: Nathan Seidle Date: Wed, 27 Dec 2023 16:14:09 -0700 Subject: [PATCH 1/2] Default Bluetooth name if state out of range --- Firmware/RTK_Surveyor/Bluetooth.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Firmware/RTK_Surveyor/Bluetooth.ino b/Firmware/RTK_Surveyor/Bluetooth.ino index 783765cbd..7648605d0 100644 --- a/Firmware/RTK_Surveyor/Bluetooth.ino +++ b/Firmware/RTK_Surveyor/Bluetooth.ino @@ -156,7 +156,10 @@ void bluetoothStart() else if (systemState >= STATE_BASE_NOT_STARTED && systemState <= STATE_BASE_FIXED_TRANSMITTING) strncpy(stateName, "Base-", sizeof(stateName) - 1); else + { + strncpy(stateName, "Rover-", sizeof(stateName) - 1); log_d("State out of range for Bluetooth Broadcast: %d", systemState); + } char productName[50] = {0}; strncpy(productName, platformPrefix, sizeof(productName)); From 6954e1208f2e0c632374b547fbfca4f9e946b2b8 Mon Sep 17 00:00:00 2001 From: Nathan Seidle Date: Wed, 27 Dec 2023 16:17:14 -0700 Subject: [PATCH 2/2] L-Band: Fix MQTT key checking --- Firmware/RTK_Surveyor/menuPP.ino | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Firmware/RTK_Surveyor/menuPP.ino b/Firmware/RTK_Surveyor/menuPP.ino index 00319a1c7..a7e5f4ced 100644 --- a/Firmware/RTK_Surveyor/menuPP.ino +++ b/Firmware/RTK_Surveyor/menuPP.ino @@ -613,7 +613,7 @@ bool pointperfectUpdateKeys() systemPrintf("Attempting to connect to MQTT broker: %s\r\n", settings.pointPerfectBrokerHost); - if (mqttClient.connect(settings.pointPerfectClientID)) + if (mqttClient.connect(settings.pointPerfectClientID) == true) { // Successful connection systemPrintln("MQTT connected"); @@ -621,18 +621,15 @@ bool pointperfectUpdateKeys() // Originally the provisioning process reported the '/pp/key/Lb' channel which fails to respond with // keys. Looks like they fixed it to /pp/ubx/0236/Lb. mqttClient.subscribe(settings.pointPerfectLBandTopic); - break; } - - // Check for connection failure - if (mqttClient.connected() == false) + else { systemPrintln("Failed to connect to MQTT Broker"); // MQTT does not provide good error reporting. // Throw out everything and attempt to provision the device to get better error checking. pointperfectProvisionDevice(); - break; + break; //Skip the remaining MQTT checking, release resources } systemPrint("Waiting for keys");