Compiling RTK Facet Firmware From Source -- Secret Tokens

I’ve been playing around with compiling the RTK Facet (L-Band) source code, and I’m hitting a wall. Hoping someone could shed some light on the issue:

My goal is to modify the code to add an auto power on and auto power off feature. I’ve got that working, compiling, and uploading into RTK Facets fine, but the issue comes from the compiler not being able to build in the SparkFun PointPerfect token, and therefore never being able to commission the RTK correction service on the device in question. Here’s what I mean:

I’m using Arduino IDE 1.8.15 (or 2.1.0) on Windows 10 home 64bit, ESP core 2.0.2, all the appropriate libraries, partition file and settings, etc. – Following the compiling instructions here https://docs.sparkfun.com/SparkFun_RTK_ … #windows_1

This is from the most recent ver 3.3 of the code in RTK_Surveyor.ino, line 36:

//This is passed in from compiler extra flags

#ifndef POINTPERFECT_TOKEN

#define FIRMWARE_VERSION_MAJOR 99

#define FIRMWARE_VERSION_MINOR 99

From what I can tell, versions 3.1 onwards use compiler extra flags for version numbers and pointperfect tokens. All versions use compiler flags for pointperfect tokens.

I found the workflow yaml file, and realized that SparkFun is using a GitHub action and Arduino CLI to compile and release. – the last paragraph of the compile instructions says so:

“The firmware can be compiled using Arduino CLI. This makes compilation fairly platform independent and flexible. All release candidates and firmware releases are compiled using Arduino CLI using a github action…”

This is cool, but it’s that workflow file that’s defining both the revision number and pointperfect token: (near the top of the file)

FIRMWARE_VERSION_MAJOR: 3

FIRMWARE_VERSION_MINOR: 3

POINTPERFECT_TOKEN: ${{ secrets.POINTPERFECT_TOKEN }}

If the SparkFun pointperfect token is loaded in during compile time as a secret on SparkFun’s repository, how can I do a successful, offline compile?

This applies to unmodified I compile as well – I just noticed the issue first on my modified code.

Also, Sparky, if you’re reading: this is unrelated to the RTK float issue I’ve reported on in the past – all of those units are stock, unmodified code from released .bin files :smiley:

Compiling the source is not trivial. Nice job! You’ve joined a very small club :wink:

You are correct, the token is provided during compilation in the github action, we can’t provide it separately for obvious reasons. However, the RTK firmware supports custom tokens. You’ll need to setup your own account with ThingStream and PointPerfect: https://docs.sparkfun.com/SparkFun_RTK_ … ntperfect/

Option ‘1’ will allow a user to enter their Device Profile Token. This is the token that is used to provision a device on a PointPerfect account. By default, users may use the SparkFun token but must pay SparkFun for the annual service fee. If an organization would like to administer its own devices, the token can be changed here.

Thank you, Sparky.

I was thinking that was going to be the answer, and that makes sense – we develop custom code, we take on the burden of subscription.

In that case, in the future, would SparkFun be willing to sell “blank” RTK Facet L-Band units that don’t have default PointPerfect tokens to customers that want to purchase and maintain their own subscription?

I’m not sure how you’d do that, since as they are, someone could just load one of your released .bin files; but has that been talked about?

I’m installing these on a fleet of heavy equipment, and integrating them with the control systems, by the way.

Yes, we can absolutely help out. Our system works based on white listed unique IDs so it’s not a problem to produce units that don’t need/have a subscription.

I’m installing these on a fleet of heavy equipment, and integrating them with the control systems, by the way.

Very cool! Let us know if you need anything. We’re always planning the future roadmap.