Skip to content

Commit 55abf96

Browse files
authored
Merge branch 'main' into release_candidate
2 parents b415446 + d0a99da commit 55abf96

File tree

87 files changed

+1169
-727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1169
-727
lines changed

Firmware/RTK_Everywhere/MQTT_Client.ino

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,8 @@ void mqttClientReceiveMessage(int messageSize)
458458

459459
settings.pointPerfectNextKeyDuration = (1000LL * 60 * 60 * 24 * 28) - 1; // Assume next key duration is 28 days
460460

461-
if (online.rtc)
462-
settings.lastKeyAttempt = rtc.getEpoch(); // Mark it - but only if RTC is online
463-
461+
settings.lastKeyAttempt = rtc.getEpoch(); // Mark it
462+
464463
recordSystemSettings(); // Record these settings to unit
465464

466465
if (settings.debugCorrections == true)

Firmware/RTK_Everywhere/menuPP.ino

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,8 +1207,8 @@ void provisioningSetState(uint8_t newState)
12071207
}
12081208
}
12091209

1210-
unsigned long provisioningStartTime_millis;
1211-
const unsigned long provisioningTimeout_ms = 120000;
1210+
unsigned long provisioningStartTime;
1211+
const unsigned long provisioningTimeout = 120000;
12121212

12131213
void updateProvisioning()
12141214
{
@@ -1227,15 +1227,14 @@ void updateProvisioning()
12271227
default:
12281228
case PROVISIONING_OFF:
12291229
{
1230-
provisioningStartTime_millis = millis(); // Record the start time so we can timeout
1230+
provisioningStartTime = millis(); // Record the start time so we can timeout
12311231
provisioningSetState(PROVISIONING_WAIT_RTC);
12321232
}
12331233
break;
12341234
case PROVISIONING_WAIT_RTC:
12351235
{
12361236
if ((online.rtc)
1237-
// If RTC is not online after provisioningTimeout_ms, try to provision anyway
1238-
|| (millis() > (provisioningStartTime_millis + provisioningTimeout_ms))
1237+
|| (millis() > (provisioningStartTime + provisioningTimeout))
12391238
|| (settings.requestKeyUpdate))
12401239
provisioningSetState(PROVISIONING_NOT_STARTED);
12411240
}
@@ -1273,21 +1272,21 @@ void updateProvisioning()
12731272
}
12741273
else
12751274
{
1276-
// RTC is online. Determine days until next key expires
1275+
// Determine days until next key expires
12771276
int daysRemaining =
12781277
daysFromEpoch(settings.pointPerfectNextKeyStart + settings.pointPerfectNextKeyDuration + 1);
12791278

12801279
if (settings.debugPpCertificate)
12811280
systemPrintf("Days until keys expire: %d\r\n", daysRemaining);
12821281

12831282
if (daysRemaining > 28)
1284-
provisioningSetState(PROVISIONING_KEYS_REMAINING); // Don't need new keys
1283+
provisioningSetState(PROVISIONING_KEYS_REMAINING);
12851284
else
1286-
provisioningSetState(PROVISIONING_CHECK_ATTEMPT); // Do need new keys
1285+
provisioningSetState(PROVISIONING_CHECK_ATTEMPT);
12871286
}
12881287
}
12891288
break;
1290-
case PROVISIONING_CHECK_ATTEMPT: // Requires RTC to be online
1289+
case PROVISIONING_CHECK_ATTEMPT:
12911290
{
12921291
// When did we last try to get keys? Attempt every 24 hours - or always for DEVELOPER
12931292
//if (rtc.getEpoch() - settings.lastKeyAttempt > ( ENABLE_DEVELOPER ? 0 : (60 * 60 * 24)))
@@ -1322,7 +1321,7 @@ void updateProvisioning()
13221321
{
13231322
ztpResponse = ZTP_NOT_STARTED; // HTTP_Client will update this
13241323
httpClientModeNeeded = true; // This will start the HTTP_Client
1325-
provisioningStartTime_millis = millis(); // Record the start time so we can timeout
1324+
provisioningStartTime = millis(); // Record the start time so we can timeout
13261325
paintGettingKeys();
13271326
provisioningSetState(PROVISIONING_STARTED);
13281327
}
@@ -1337,8 +1336,8 @@ void updateProvisioning()
13371336
}
13381337
else if (ztpResponse == ZTP_SUCCESS)
13391338
{
1340-
httpClientModeNeeded = false; // Tell HTTP_Client to give up
1341-
recordSystemSettings(); // Make sure the new cert and keys are recorded
1339+
httpClientModeNeeded = false; // Tell HTTP_Client to give up. (But it probably already has...)
1340+
recordSystemSettings();
13421341
provisioningSetState(PROVISIONING_KEYS_REMAINING);
13431342
}
13441343
else if (ztpResponse == ZTP_DEACTIVATED)
@@ -1362,7 +1361,7 @@ void updateProvisioning()
13621361
"subscription. Please reference device ID: %s\r\n",
13631362
landingPageUrl, hardwareID);
13641363

1365-
httpClientModeNeeded = false; // Tell HTTP_Client to give up
1364+
httpClientModeNeeded = false; // Tell HTTP_Client to give up. (But it probably already has...)
13661365
displayAccountExpired(5000);
13671366

13681367
provisioningSetState(PROVISIONING_KEYS_REMAINING);
@@ -1388,7 +1387,7 @@ void updateProvisioning()
13881387
"activated. Please reference device ID: %s\r\n",
13891388
landingPageUrl, hardwareID);
13901389

1391-
httpClientModeNeeded = false; // Tell HTTP_Client to give up
1390+
httpClientModeNeeded = false; // Tell HTTP_Client to give up. (But it probably already has...)
13921391
displayNotListed(5000);
13931392

13941393
provisioningSetState(PROVISIONING_KEYS_REMAINING);
@@ -1404,7 +1403,7 @@ void updateProvisioning()
14041403
"[email protected] for more assistance. Please reference device ID: %s\r\n",
14051404
hardwareID);
14061405

1407-
httpClientModeNeeded = false; // Tell HTTP_Client to give up
1406+
httpClientModeNeeded = false; // Tell HTTP_Client to give up. (But it probably already has...)
14081407
displayAlreadyRegistered(5000);
14091408

14101409
provisioningSetState(PROVISIONING_KEYS_REMAINING);
@@ -1413,7 +1412,7 @@ void updateProvisioning()
14131412
{
14141413
systemPrintln("updateProvisioning: ZTP_UNKNOWN_ERROR");
14151414

1416-
httpClientModeNeeded = false; // Tell HTTP_Client to give up
1415+
httpClientModeNeeded = false; // Tell HTTP_Client to give up. (But it probably already has...)
14171416

14181417
provisioningSetState(PROVISIONING_KEYS_REMAINING);
14191418
}
@@ -1452,17 +1451,21 @@ void updateProvisioning()
14521451
provisioningSetState(PROVISIONING_WAIT_ATTEMPT);
14531452
}
14541453
break;
1455-
case PROVISIONING_WAIT_ATTEMPT: // We may still not have RTC... Or RTC may come online _during_ this state.
1454+
case PROVISIONING_WAIT_ATTEMPT:
14561455
{
14571456
if (settings.requestKeyUpdate) // requestKeyUpdate can be set via the menu, mode button or web config
14581457
provisioningSetState(PROVISIONING_CHECK_REMAINING);
14591458
else if (!settings.enablePointPerfectCorrections || !settings.autoKeyRenewal)
14601459
provisioningSetState(PROVISIONING_OFF);
14611460
// When did we last try to get keys? Attempt every 24 hours - or every 15 mins for DEVELOPER
1462-
//else if (millis() > (provisioningStartTime_millis + ( ENABLE_DEVELOPER ? (1000 * 60 * 15) : (1000 * 60 * 60 * 24))))
1461+
//else if (online.rtc && (rtc.getEpoch() - settings.lastKeyAttempt > ( ENABLE_DEVELOPER ? (15 * 60) : (60 * 60 * 24))))
14631462
// When did we last try to get keys? Attempt every 24 hours
1464-
else if (millis() > (provisioningStartTime_millis + (1000 * 60 * 60 * 24))) // Don't use settings.lastKeyAttempt (#419)
1465-
provisioningSetState(PROVISIONING_CHECK_REMAINING);
1463+
else if (online.rtc && (rtc.getEpoch() - settings.lastKeyAttempt > (60 * 60 * 24)))
1464+
{
1465+
settings.lastKeyAttempt = rtc.getEpoch(); // Mark it
1466+
recordSystemSettings(); // Record these settings to unit
1467+
provisioningSetState(PROVISIONING_STARTING);
1468+
}
14661469
}
14671470
break;
14681471
}

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ The line of RTK Everywhere products offered by SparkFun all run identical firmwa
55

66
<table class="table table-hover table-striped table-bordered">
77
<tr align="center">
8-
<td><a href="https://www.sparkfun.com/products/24672"><img src="docs/img/SparkFun_RTK_Torch.png"></a></td>
8+
<td><a href="https://www.sparkfun.com/products/25662"><img src="docs/img/SparkFun_RTK_Torch.png"></a></td>
9+
<td><a href="https://www.sparkfun.com/products/24342"><img src="docs/img/SparkFun_RTK_EVK.png"></a></td>
910
</tr>
1011
<tr align="center">
11-
<td><a href="https://www.sparkfun.com/products/24672">SparkFun RTK Torch (GPS-24672)</a></td>
12+
<td><a href="https://www.sparkfun.com/products/25662">SparkFun RTK Torch (GPS-25662)</a></td>
13+
<td><a href="https://www.sparkfun.com/products/24342">SparkFun RTK EVK (GPS-24342)</a></td>
1214
</tr>
1315
<tr align="center">
14-
<td><a href="https://learn.sparkfun.com/tutorials/sparkfun-rtk-facet-l-band-hookup-guide">Hookup Guide</a></td>
16+
<td><a href="https://docs.sparkfun.com/SparkFun_RTK_Torch/">Hookup Guide</a></td>
17+
<td><a href="https://docs.sparkfun.com/SparkFun_RTK_EVK/">Hookup Guide</a></td>
1518
</tr>
1619
</table>
1720

18-
The [SparkFun RTK Torch](https://www.sparkfun.com/products/24672) is a centimeter-level GNSS receiver. With RTK enabled, these devices can output your location with 8mm horizontal and vertical [*accuracy*](https://docs.sparkfun.com/SparkFun_RTK_Everywhere_Firmware/accuracy_verification/) at up to 20Hz!
21+
The [SparkFun RTK Torch](https://www.sparkfun.com/products/25662) is a centimeter-level GNSS receiver. With RTK enabled, these devices can output your location with 8mm horizontal and vertical [*accuracy*](https://docs.sparkfun.com/SparkFun_RTK_Everywhere_Firmware/accuracy_verification/) at up to 20Hz. It supports Galileo E6 HAS and has built-in tilt compensation too!
22+
23+
The [SparkFun RTK EVK](https://www.sparkfun.com/products/24342) is the perfect development platform for your fixed or mobile high-precision positioning and navigation needs. We called it the EVK (Evaluation Kit) as it truly covers all the options: L1 + L2 RTK GNSS, with L-Band correction built-in. Regarding connectivity, the SparkFun RTK EVK has it all: WiFi / Bluetooth®, Ethernet and LTE cellular!
1924

2025
This repo houses the [RTK Product Manual](https://docs.sparkfun.com/SparkFun_RTK_Everywhere_Firmware) and the firmware that runs on the SparkFun RTK product line including:
2126

22-
* [SparkFun RTK Torch](https://www.sparkfun.com/products/24672)
27+
* [SparkFun RTK Torch](https://www.sparkfun.com/products/25662)
28+
* [SparkFun RTK EVK](https://www.sparkfun.com/products/24342)
2329

2430
For compiled binaries of the firmware, please see [SparkFun RTK Everywhere Firmware Binaries](https://github.com/sparkfun/SparkFun_RTK_Everywhere_Firmware_Binaries).
2531

docs/accuracy_verification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Accuracy Verification
22

3-
Torch: ![Feature Supported](img/Icons/GreenDot.png)
3+
Torch: ![Feature Supported](img/Icons/GreenDot.png) / EVK: ![Feature Supported](img/Icons/GreenDot.png)
44

55
![Facet in the field](img/VerifyAccuracy/SparkFun%20Verify%20RTK%20-%2016%20Facet%20in%20the%20Field.jpg)
66

docs/configure_with_bluetooth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configure with Bluetooth
22

3-
Torch: ![Feature Supported](img/Icons/GreenDot.png)
3+
Torch: ![Feature Supported](img/Icons/GreenDot.png) / EVK: ![Feature Supported](img/Icons/GreenDot.png)
44

55
![Configuration menu open over Bluetooth](img/Bluetooth/SparkFun%20RTK%20BEM%20-%20Config%20Menu.png)
66

docs/configure_with_ethernet.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Configure with Ethernet
2+
3+
Torch: ![Feature Not Supported](img/Icons/RedDot.png) / EVK: ![Feature Supported](img/Icons/GreenDot.png)
4+
5+
During Ethernet configuration, the RTK device will present a webpage that is viewable from a desktop/laptop connected to the local network.
6+
7+
![SparkFun RTK Ethernet Configuration Interface](<img/WiFi Config/SparkFun RTK Ethernet Config - Crop.png>)
8+
9+
*SparkFun RTK Ethernet Configuration Interface*
10+
11+
## RTK EVK
12+
13+
To get into Ethernet configuration follow these steps:
14+
15+
1. Power on the RTK EVK and connect it to your Ethernet network using the supplied cable
16+
2. Once the device has started, put the RTK EVK into Ethernet config mode by clicking the Mode button on the front panel. The first click opens the mode menu, successive clicks select the next menu option. Keep clicking until **Cfg Eth** is highlighted, then do a quick double-click to select it. Note that it is only possible to put the EVK into this mode via the Mode button, requiring physical access to the EVK. Remote configuration is only possible after putting the EVK into this mode.
17+
18+
![SparkFun RTK EVK Mode Menu](<img/Displays/24342-RTK-EVK-Action-Screen_GIF_750ms.gif>)
19+
20+
*SparkFun RTK EVK Mode Menu*
21+
22+
3. The RTK EVK will reboot into a dedicated Configure-Via-Ethernet mode
23+
4. By default, the RTK EVK uses DHCP, obtaining its IP address from your DHCP server. The IP address is displayed on the OLED display. You can use a fixed IP address if desired. See [Ethernet Menu](menu_ethernet.md) for more details.
24+
25+
![SparkFun RTK EVK Config Ethernet](<img/Displays/SparkFun RTK EVK Ethernet Config.png>)
26+
27+
*SparkFun RTK EVK Config Ethernet*
28+
29+
5. Open a browser (Chrome is preferred) on your computer and type the EVK's IP address into the address bar. The web config page will open.
30+
31+
![SparkFun RTK Ethernet Configuration Interface](<img/WiFi Config/SparkFun RTK Ethernet Config - Main Interface.png>)
32+
33+
*SparkFun RTK Ethernet Configuration Interface*
34+
35+
## File Manager
36+
37+
![List of files in file manager](<img/WiFi Config/SparkFun%20RTK%20WiFi%20Config%20File%20Manager.png>)
38+
39+
On devices that support an external SD card, a file manager is shown if an SD card is detected. This is a handy way to download files to a local device (cell phone or laptop) as well as delete any unneeded files. The SD size and free space are shown. Files may be uploaded to the SD card if needed.
40+
41+
Additionally, clicking on the top checkbox will select all files for easy removal of a large number of files.
42+
43+
## Saving and Exit
44+
45+
![Save and Exit buttons](<img/WiFi Config/SparkFun RTK WiFi Config - Save Steps.png>)
46+
47+
Once settings are input, please press ‘Save Configuration’. This will validate any settings, show any errors that need adjustment, and send the settings to the unit. The page will remain active until the user presses ‘Exit and Reset’ at which point the unit will exit Ethernet configuration and return to whichever mode was selected in the **System Configuration** tab **System Initial State** drop-down (Base, Rover or NTP).
48+
49+
It is also possible to exit Configure-Via-Ethernet mode by: clicking the Mode button on the front panel; or by opening the serial menu and selecting 'r'.

docs/configure_with_serial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configure with Serial
22

3-
Torch: ![Feature Supported](img/Icons/GreenDot.png)
3+
Torch: ![Feature Supported](img/Icons/GreenDot.png) / EVK: ![Feature Supported](img/Icons/GreenDot.png)
44

55
**Note:** Any serial menu that is shown below can also be accessed over Bluetooth. This makes any configuration of a device much easier in the field. Please see [Configure With Bluetooth](configure_with_bluetooth.md) for more information.
66

docs/configure_with_settings_file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configure with Settings File
22

3-
Torch: ![Feature Not Supported](img/Icons/RedDot.png)
3+
Torch: ![Feature Not Supported](img/Icons/RedDot.png) / EVK: ![Feature Supported](img/Icons/GreenDot.png)
44

55
![SparkFun RTK Facet Settings File](img/SparkFun_RTK_Express_-_Settings_File.jpg)
66

docs/configure_with_ucenter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configure with u-center
22

3-
Torch: ![Feature Not Supported](img/Icons/RedDot.png)
3+
Torch: ![Feature Not Supported](img/Icons/RedDot.png) / EVK: ![Feature Supported](img/Icons/GreenDot.png)
44

55
On devices that have a u-blox GNSS receiver, the ZED-F9P GNSS module can be configured independently using the u-center software from u-blox by connecting a USB cable to the *Config u-blox* USB connector. Settings can be saved to the module between power cycles. For more information please see SparkFun’s [Getting Started with u-center by u-blox](https://learn.sparkfun.com/tutorials/getting-started-with-u-center-for-u-blox/all).
66

docs/configure_with_wifi.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configure with WiFi
22

3-
Torch: ![Feature Supported](img/Icons/GreenDot.png)
3+
Torch: ![Feature Supported](img/Icons/GreenDot.png) / EVK: ![Feature Supported](img/Icons/GreenDot.png)
44

55
![SparkFun RTK WiFi Configuration Interface](<img/WiFi Config/SparkFun RTK WiFi Config - Main Interface.png>)
66

@@ -26,6 +26,27 @@ To get into WiFi configuration follow these steps:
2626

2727
*Browser with rtk.local*
2828

29+
Continue with [Connecting to WiFi network](#connecting-to-wifi-network).
30+
31+
## RTK EVK
32+
33+
To get into WiFi configuration follow these steps:
34+
35+
1. Ensure the WiFi / Bluetooth antenna is attached, then connect the RTK EVK to a power source.
36+
2. Once the device has started, put the RTK EVK into WiFi config mode by clicking the Mode button on the front panel. The first click opens the mode menu, successive clicks select the next menu option. Keep clicking until **Cfg WiFi** is highlighted, then do a quick double-click to select it.
37+
38+
![SparkFun RTK EVK Mode Menu](<img/Displays/24342-RTK-EVK-Action-Screen_GIF_750ms.gif>)
39+
40+
*SparkFun RTK EVK Mode Menu*
41+
42+
3. The display will change, showing that the EVK is in WiFi configuration mode.
43+
4. Connect to WiFi network named ‘RTK Config’.
44+
5. You should be automatically re-directed to the config page but if you are not, open a browser (Chrome is preferred) and type **rtk.local** into the address bar.
45+
46+
![Browser with rtk.local address](<img/WiFi Config/SparkFun RTK WiFi Config - Browser rtk local.png>)
47+
48+
*Browser with rtk.local*
49+
2950
## Connecting to WiFi Network
3051

3152
![Discovered WiFi networks](<img/WiFi Config/RTK_Surveyor_-_WiFi_Config_-_Networks.jpg>)
@@ -38,7 +59,7 @@ Note: Upon connecting, your phone may warn you that this WiFi network has no int
3859

3960
*Connected to the RTK WiFi Setup Page*
4061

41-
Clicking on the category 'carrot' will open or close that section. Clicking on an ‘i’ will give you a brief description of the options within that section.
62+
Clicking on the category tab will open or close that section. Clicking on an ‘i’ will give you a brief description of the options within that section.
4263

4364
![Firmware highlighted](<img/WiFi Config/SparkFun RTK WiFi Config - Header Firmware Version.png>)
4465

@@ -50,12 +71,12 @@ Please note that the firmware for the RTK device and the firmware for the GNSS r
5071

5172
![List of files in file manager](<img/WiFi Config/SparkFun%20RTK%20WiFi%20Config%20File%20Manager.png>)
5273

53-
On devices that support an external SD card, a file manager is shown if an SD card is detected. This is a handy way to download files to a local device (cell phone or laptop) as well as delete any unneeded files. The SD size and free space are shown. And files may be uploaded to the SD card if needed.
74+
On devices that support an external SD card, a file manager is shown if an SD card is detected. This is a handy way to download files to a local device (cell phone or laptop) as well as delete any unneeded files. The SD size and free space are shown. Files may be uploaded to the SD card if needed.
5475

5576
Additionally, clicking on the top checkbox will select all files for easy removal of a large number of files.
5677

5778
## Saving and Exit
5879

5980
![Save and Exit buttons](<img/WiFi Config/SparkFun RTK WiFi Config - Save Steps.png>)
6081

61-
Once settings are input, please press ‘Save Configuration’. This will validate any settings, show any errors that need adjustment, and send the settings to the unit. The page will remain active until the user presses ‘Exit to Rover Mode’ at which point the unit will exit WiFi configuration and return to standard Rover mode.
82+
Once settings are input, please press ‘Save Configuration’. This will validate any settings, show any errors that need adjustment, and send the settings to the unit. The page will remain active until the user presses ‘Exit and Reset’ at which point the unit will exit WiFi configuration and return to whichever mode was selected in the **System Configuration** tab **System Initial State** drop-down (Base, Rover or NTP).

0 commit comments

Comments
 (0)