Skip to content

Instantly share code, notes, and snippets.

@heijmerikx
Created August 23, 2025 15:37
Show Gist options
  • Save heijmerikx/b02c3848186715b32151407c4cde9a33 to your computer and use it in GitHub Desktop.
Save heijmerikx/b02c3848186715b32151407c4cde9a33 to your computer and use it in GitHub Desktop.
Set a license for the Heltec v3 LoRa board
#include <Arduino.h>
#include "LoRaWan_APP.h"
// Find your license using your chip id here: https://resource.heltec.cn/search
// Replace with YOUR license split into 4 words
// The below dummy does not work
uint32_t license[4] = {
0xAAAAAAAA, 0xBBBBBBBB, 0xCCCCCCCC, 0xDDDDDDDD
};
// Fallbacks if your board package doesn't define these (lets it compile)
#ifndef HELTEC_BOARD
#define HELTEC_BOARD 0
#endif
#ifndef SLOW_CLK_TPYE
#define SLOW_CLK_TPYE 0
#endif
void setup() {
Serial.begin(115200);
delay(100);
Mcu.setlicense(license, HELTEC_BOARD);
int rc = Mcu.begin(HELTEC_BOARD, SLOW_CLK_TPYE);
Serial.println("\nLicense set via Mcu.setlicense().");
Serial.printf("Mcu.begin() rc=%d\n", rc);
Serial.println("If another sketch still asks for a license, include these lines again.");
}
void loop() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment