Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9e13fd6
Fix "Unknown setting: antennaHeight_mm" due to overshoot
nseidle Sep 12, 2025
ea30ee3
Whitespace
nseidle Sep 12, 2025
cea432e
Fix ESP-NOW camelcase
nseidle Sep 12, 2025
cc281a5
CLI: Add Factory Reset command
nseidle Sep 16, 2025
c3720bb
Update form.h via Python
github-actions[bot] Sep 16, 2025
f3d0858
Merge branch 'nsUpdates' of https://github.com/sparkfun/SparkFun_RTK_…
nseidle Sep 17, 2025
f3ec9ee
CLI: Add firmware version
nseidle Sep 17, 2025
3195344
Report setting along with error
nseidle Sep 17, 2025
7dcf8af
Add bluetoothCommandIsConnected()
nseidle Sep 17, 2025
4788cac
Process CLI commands first, then decide where to report them
nseidle Sep 17, 2025
0060a1a
Add command to error report
nseidle Sep 17, 2025
54bab4c
Add error reporting for SPEXE commands
nseidle Sep 17, 2025
783ec19
Push CLI responses through BLE check
nseidle Sep 17, 2025
03c5789
Fix debug print
nseidle Sep 17, 2025
6a416c3
Increase OTA WiFi wait to 10 seconds
nseidle Sep 17, 2025
c5b98b6
CLI: Add rtkRemoteFirmwareVersion and UPDATEFIRMWARE commands
nseidle Sep 17, 2025
226fa1b
Update form.h via Python
github-actions[bot] Sep 17, 2025
c99731f
Add more commands to CLI. Use wifiConnectTimeout setting for OTA.
nseidle Sep 17, 2025
511f4ac
Merge branch 'nsUpdates' of https://github.com/sparkfun/SparkFun_RTK_…
nseidle Sep 17, 2025
0ae775a
Update form.h via Python
github-actions[bot] Sep 17, 2025
26db7a2
Reduce debug level to suppress BLE prints
nseidle Sep 18, 2025
ae931df
Update form.h via Python
github-actions[bot] Sep 18, 2025
6bf9cae
Fix SPEXE error output format
nseidle Sep 18, 2025
a4a7549
Fix get/set for profile names
nseidle Sep 18, 2025
b45f39f
Update form.h via Python
github-actions[bot] Sep 18, 2025
9b03afc
Add set support for profileNumber
nseidle Sep 18, 2025
9569999
CLI: Add gets for battery stats, deviceName,
nseidle Sep 19, 2025
d8c6821
CLI: Add error for sets on read only settings
nseidle Sep 19, 2025
5ac5d9a
Remove runCommandMode logic.
nseidle Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/non-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
echo "JSON_ENDING=-${{ steps.dateNoScores.outputs.dateNoScores }}" >> "$GITHUB_ENV"
echo "JSON_FILE_NAME=RTK-Everywhere-RC-Firmware.json" >> "$GITHUB_ENV"
echo "ENABLE_DEVELOPER=true" >> "$GITHUB_ENV"
echo "DEBUG_LEVEL=debug" >> "$GITHUB_ENV"
echo "DEBUG_LEVEL=error" >> "$GITHUB_ENV"
fi

- name: Setup Arduino CLI
Expand Down
48 changes: 37 additions & 11 deletions Firmware/RTK_Everywhere/Bluetooth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,36 @@ bool bluetoothIsConnected()
return (false);
}

// Return true if the BLE Command channel is connected
bool bluetoothCommandIsConnected()
{
#ifdef COMPILE_BT
if (bluetoothGetState() == BT_OFF)
return (false);

if (settings.bluetoothRadioType == BLUETOOTH_RADIO_SPP_AND_BLE)
{
if (bluetoothSerialBleCommands->connected() == true)
return (true);
}
else if (settings.bluetoothRadioType == BLUETOOTH_RADIO_SPP)
{
return (false);
}
else if (settings.bluetoothRadioType == BLUETOOTH_RADIO_BLE)
{
if (bluetoothSerialBleCommands->connected() == true)
return (true);
}
else if (settings.bluetoothRadioType == BLUETOOTH_RADIO_SPP_ACCESSORY_MODE)
{
return (false);
}
#endif // COMPILE_BT

return (false);
}

// Return the Bluetooth state
byte bluetoothGetState()
{
Expand Down Expand Up @@ -254,23 +284,19 @@ int bluetoothCommandAvailable()
}

// Pass a command string to the BLE Serial interface
void bluetoothProcessCommand(char *rxData)
void bluetoothSendCommand(char *rxData)
{
#ifdef COMPILE_BT
// Direct output to Bluetooth Command
PrintEndpoint originalPrintEndpoint = printEndpoint;

printEndpoint = PRINT_ENDPOINT_BLUETOOTH_COMMAND;
if (settings.debugCLI == true)
printEndpoint = PRINT_ENDPOINT_ALL;
else
printEndpoint = PRINT_ENDPOINT_BLUETOOTH_COMMAND;
printEndpoint = PRINT_ENDPOINT_ALL;

processCommand(rxData); // Send command proccesor output to BLE
systemPrint(rxData); // Send command output to BLE, SPP, and Serial
printEndpoint = originalPrintEndpoint;

#else // COMPILE_BT
processCommand(rxData); // Send command proccesor output to Serial
systemPrint(rxData); // Send command output to Serial
#endif // COMPILE_BT
}

Expand Down Expand Up @@ -534,9 +560,9 @@ void bluetoothStart()
memcpy(record.uuid.uuid.uuid128, UUID_IAP2, sizeof(UUID_IAP2));
record.service_name_length = strlen(sdp_service_name) + 1;
record.service_name = (char *)sdp_service_name;
//record.service_name_length = strlen(deviceName) + 1; // Doesn't seem to help the failed connects
//record.service_name = (char *)deviceName;
//record.rfcomm_channel_number = 1; // Doesn't seem to help the failed connects
// record.service_name_length = strlen(deviceName) + 1; // Doesn't seem to help the failed connects
// record.service_name = (char *)deviceName;
// record.rfcomm_channel_number = 1; // Doesn't seem to help the failed connects
esp_sdp_create_record((esp_bluetooth_sdp_record_t *)&record);
}
}
Expand Down
12 changes: 6 additions & 6 deletions Firmware/RTK_Everywhere/Display.ino
Original file line number Diff line number Diff line change
Expand Up @@ -666,15 +666,15 @@ void setRadioIcons(std::vector<iconPropertyBlinking> *iconList)
if (present.display_type == DISPLAY_64x48)
{
// There are three spots for icons in the Wireless area, left/center/right
// There are three radios that could be active: Bluetooth (always indicated), WiFi (if enabled), ESP-Now (if
// There are three radios that could be active: Bluetooth (always indicated), WiFi (if enabled), ESP-NOW (if
// enabled) Because of lack of space we will indicate the Base/Rover if only two radios or less are active
//
// Top left corner - Radio icon indicators take three spots (left/center/right)
// Allowed icon combinations:
// Bluetooth + Rover/Base
// WiFi + Bluetooth + Rover/Base
// ESP-Now + Bluetooth + Rover/Base
// ESP-Now + Bluetooth + WiFi
// ESP-NOW + Bluetooth + Rover/Base
// ESP-NOW + Bluetooth + WiFi

// Count the number of radios in use
uint8_t numberOfRadios = 1; // Bluetooth always indicated.
Expand Down Expand Up @@ -3091,14 +3091,14 @@ void paintKeyProvisionFail(uint16_t displayTime)
}
}

// Show screen while ESP-Now is pairing
// Show screen while ESP-NOW is pairing
void paintEspNowPairing()
{
displayMessage("ESP-Now Pairing", 0);
displayMessage("ESP-NOW Pairing", 0);
}
void paintEspNowPaired()
{
displayMessage("ESP-Now Paired", 2000);
displayMessage("ESP-NOW Paired", 2000);
}

void displayNtpStart(uint16_t displayTime)
Expand Down
6 changes: 3 additions & 3 deletions Firmware/RTK_Everywhere/ESPNOW.ino
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ esp_err_t espNowAddPeer(const uint8_t *peerMac)
}

//*********************************************************************
// Start ESP-Now if needed, put ESP-Now into broadcast state
// Start ESP-NOW if needed, put ESP-NOW into broadcast state
void espNowBeginPairing()
{
if (settings.enableEspNow == false)
Expand Down Expand Up @@ -155,7 +155,7 @@ void espNowOnDataReceived(const esp_now_recv_info *mac, const uint8_t *incomingD
{
espNowRSSI = packetRSSI; // Record this packet's RSSI as an ESP NOW packet

// We've just received ESP-Now data. We assume this is RTCM and push it directly to the GNSS.
// We've just received ESP-NOW data. We assume this is RTCM and push it directly to the GNSS.
// Determine if ESPNOW is the correction source
if (correctionLastSeen(CORR_ESPNOW))
{
Expand Down Expand Up @@ -492,7 +492,7 @@ void espNowStaticPairing()
{
systemPrintln("Begin ESP NOW Pairing");

// Start ESP-Now if needed, put ESP-Now into broadcast state
// Start ESP-NOW if needed, put ESP-NOW into broadcast state
espNowBeginPairing();

// Begin sending our MAC every 250ms until a remote device sends us there info
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class GNSS
// If LBand is being used, ignore any RTCM that may come in from the GNSS
virtual void rtcmOnGnssDisable();

// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
virtual void rtcmOnGnssEnable();

virtual uint16_t rtcmRead(uint8_t *rtcmBuffer, int rtcmBytesToRead);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_LG290P.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ class GNSS_LG290P : GNSS
// If LBand is being used, ignore any RTCM that may come in from the GNSS
void rtcmOnGnssDisable();

// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
void rtcmOnGnssEnable();

uint16_t rtcmRead(uint8_t *rtcmBuffer, int rtcmBytesToRead);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_LG290P.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ void GNSS_LG290P::rtcmOnGnssDisable()
}

//----------------------------------------
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
//----------------------------------------
void GNSS_LG290P::rtcmOnGnssEnable()
{
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_Mosaic.h
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ class GNSS_MOSAIC : GNSS
// If LBand is being used, ignore any RTCM that may come in from the GNSS
void rtcmOnGnssDisable();

// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
void rtcmOnGnssEnable();

uint16_t rtcmRead(uint8_t *rtcmBuffer, int rtcmBytesToRead);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_Mosaic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ void GNSS_MOSAIC::rtcmOnGnssDisable()
}

//----------------------------------------
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
//----------------------------------------
void GNSS_MOSAIC::rtcmOnGnssEnable()
{
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_None.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ class GNSS_None : public GNSS
{
}

// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
void rtcmOnGnssEnable()
{
}
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_UM980.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class GNSS_UM980 : GNSS
// If LBand is being used, ignore any RTCM that may come in from the GNSS
void rtcmOnGnssDisable();

// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
void rtcmOnGnssEnable();

uint16_t rtcmRead(uint8_t *rtcmBuffer, int rtcmBytesToRead);
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_UM980.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ void GNSS_UM980::rtcmOnGnssDisable()
}

//----------------------------------------
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
//----------------------------------------
void GNSS_UM980::rtcmOnGnssEnable()
{
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_ZED.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ class GNSS_ZED : GNSS

uint16_t rtcmBufferAvailable();

// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
void rtcmOnGnssDisable();

// If LBand is being used, ignore any RTCM that may come in from the GNSS
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/GNSS_ZED.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ void GNSS_ZED::rtcmOnGnssDisable()
}

//----------------------------------------
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-Now) to GNSS receiver
// If L-Band is available, but encrypted, allow RTCM through other sources (radio, ESP-NOW) to GNSS receiver
//----------------------------------------
void GNSS_ZED::rtcmOnGnssEnable()
{
Expand Down
4 changes: 2 additions & 2 deletions Firmware/RTK_Everywhere/NVM.ino
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void recordSystemSettingsToFile(File *settingsFile)
break; // Nothing to do here. Let each GNSS add its settings

case tEspNowPr: {
// Record ESP-Now peer MAC addresses
// Record ESP-NOW peer MAC addresses
for (int x = 0; x < rtkSettingsEntries[i].qualifier; x++)
{
char tempString[50]; // espnowPeer_1=B4:C1:33:42:DE:01,
Expand Down Expand Up @@ -1098,7 +1098,7 @@ bool parseLine(char *str)
};
const int tableEntries = sizeof(table) / sizeof(table[0]);

knownSetting = commandCheckForUnknownVariable(settingName, table, tableEntries);
knownSetting = commandCheckListForVariable(settingName, table, tableEntries);
}

if (knownSetting == false)
Expand Down
7 changes: 2 additions & 5 deletions Firmware/RTK_Everywhere/RTK_Everywhere.ino
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

#ifdef COMPILE_WIFI
#define COMPILE_AP // Requires WiFi. Comment out to remove Access Point functionality
#define COMPILE_ESPNOW // Requires WiFi. Comment out to remove ESP-Now functionality.
#define COMPILE_ESPNOW // Requires WiFi. Comment out to remove ESP-NOW functionality.
#endif // COMPILE_WIFI

#define COMPILE_LG290P // Comment out to remove LG290P functionality
Expand Down Expand Up @@ -408,7 +408,7 @@ RTK_WIFI wifi(false);

// WiFi Globals - For other module direct access
WIFI_CHANNEL_t wifiChannel; // Current WiFi channel number
bool wifiEspNowOnline; // ESP-Now started successfully
bool wifiEspNowOnline; // ESP-NOW started successfully
bool wifiEspNowRunning; // False: stopped, True: starting, running, stopping
uint32_t wifiReconnectionTimer; // Delay before reconnection, timer running when non-zero
bool wifiSoftApOnline; // WiFi soft AP started successfully
Expand Down Expand Up @@ -619,9 +619,6 @@ int bufferOverruns; // Running count of possible data lo
bool zedUartPassed; // Goes true during testing if ESP can communicate with ZED over UART
const uint8_t btEscapeCharacter = '+';
const uint8_t btMaxEscapeCharacters = 3; // Number of characters needed to enter remote command mode over Bluetooth
const uint8_t btAppCommandCharacter = '-';
const uint8_t btMaxAppCommandCharacters = 10; // Number of characters needed to enter app command mode over Bluetooth
bool runCommandMode; // Goes true when user or remote app enters ---------- command mode sequence

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/States.ino
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ void stateUpdate()
#ifdef COMPILE_ESPNOW
paintEspNowPairing();

// Start ESP-Now if needed, put ESP-Now into broadcast state
// Start ESP-NOW if needed, put ESP-NOW into broadcast state
espNowBeginPairing();

changeState(STATE_ESPNOW_PAIRING);
Expand Down
28 changes: 1 addition & 27 deletions Firmware/RTK_Everywhere/Tasks.ino
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ void btReadTask(void *e)
2000; // Bluetooth serial traffic must stop this amount before an escape char is recognized
uint8_t btEscapeCharsReceived = 0; // Used to enter remote command mode

uint8_t btAppCommandCharsReceived = 0; // Used to enter app command mode

// Start notification
task.btReadTaskRunning = true;
if (settings.printTaskStartStop)
Expand Down Expand Up @@ -207,25 +205,7 @@ void btReadTask(void *e)
addToGnssBuffer(btEscapeCharacter);
}
}
else if (incoming == btAppCommandCharacter)
{
btAppCommandCharsReceived++;
if (btAppCommandCharsReceived == btMaxAppCommandCharacters)
{
sendGnssBuffer(); // Finish sending whatever is left in the buffer

// Discard any bluetooth data in the circular buffer
btRingBufferTail = dataHead;

systemPrintln("Device has entered config mode over Bluetooth");
printEndpoint = PRINT_ENDPOINT_ALL;
btPrintEcho = true;
runCommandMode = true;

btAppCommandCharsReceived = 0;
btLastByteReceived = millis();
}
}

else // This character is not a command character, pass along to GNSS
{
Expand All @@ -234,10 +214,6 @@ void btReadTask(void *e)
{
addToGnssBuffer(btEscapeCharacter);
}
while (btAppCommandCharsReceived-- > 0)
{
addToGnssBuffer(btAppCommandCharacter);
}

// Pass byte to GNSS receiver or to system
// TODO - control if this RTCM source should be listened to or not
Expand All @@ -250,8 +226,6 @@ void btReadTask(void *e)
btLastByteReceived = millis();
btEscapeCharsReceived = 0; // Update timeout check for escape char and partial frame

btAppCommandCharsReceived = 0;

bluetoothIncomingRTCM = true;

// Record the arrival of RTCM from the Bluetooth connection (a phone or tablet is providing the RTCM
Expand Down Expand Up @@ -2610,7 +2584,7 @@ void bluetoothCommandTask(void *pvParameters)
if (rxSpot > 2 && rxData[rxSpot - 1] == '\n' && rxData[rxSpot - 2] == '\r')
{
rxData[rxSpot - 2] = '\0'; // Remove \r\n
bluetoothProcessCommand(rxData);
processCommand(rxData);
rxSpot = 0; // Reset
}
}
Expand Down
Loading