Skip to content

Commit 36bb01b

Browse files
authored
Merge pull request #16 from jonathandreyer/improve-encrypted-key
Add possibility to use custom encrypted key
2 parents 26d4b1e + 8507df4 commit 36bb01b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

firmware/emonth2.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131
-------------------------------------------------------------------------------------------------------------
3232
*/
3333

34-
const char *firmware_version = {"4.1.1\n\r"};
34+
const char *firmware_version = {"4.1.2\n\r"};
3535
/*
3636
3737
Change log:
38+
V4.1.2 - (27/02/23) Add option to used custom encrpytion key
3839
V4.1.1 - (19/02/23) Fix missing frequency initialization
3940
V4.1.0 - (17/02/23) LowPowerLabs radio format option
4041
V4.0.0 - (10/07/21) Replace JeeLib with OEM RFM69nTxLib using RFM69 "Native" packet format, add emonEProm library support
@@ -244,7 +245,11 @@ void setup()
244245
Serial.println("Init RFM...");
245246
#if RadioFormat == RFM69_LOW_POWER_LABS
246247
radio.initialize(EEProm.RF_freq,EEProm.nodeID,EEProm.networkGroup);
248+
#ifndef RFM69_LPL_AES_ENCRYPTION_KEY
247249
radio.encrypt("89txbe4p8aik5kt3"); // initialize RFM
250+
#else
251+
radio.encrypt(RFM69_LPL_AES_ENCRYPTION_KEY); // initialize RFM
252+
#endif
248253
radio.setPowerLevel(EEProm.rfPower);
249254
#else
250255
rfm_init(); // initialize RFM

firmware/platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ lib_deps =
1717
OneWire
1818
DallasTemperature
1919
SI7021
20+
#build_flags = '-DRFM69_LPL_AES_ENCRYPTION_KEY="my-encrypted-key"'
2021

0 commit comments

Comments
 (0)