mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-03-29 19:39:07 +00:00
New meter config
This commit is contained in:
@@ -90,7 +90,7 @@ int HDLC_validate(const uint8_t* d, int len, HDLCConfig* config) {
|
||||
// Encrypted APDU
|
||||
// http://www.weigu.lu/tutorials/sensors2bus/04_encryption/index.html
|
||||
if(config == NULL)
|
||||
return -90;
|
||||
return HDLC_ENCRYPTION_CONFIG_MISSING;
|
||||
|
||||
memcpy(config->system_title, d + headersize + 2, 8);
|
||||
memcpy(config->initialization_vector, config->system_title, 8);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#define HDLC_FLAG 0x7E
|
||||
#define HDLC_ENCRYPTION_CONFIG_MISSING -90
|
||||
|
||||
struct HDLCConfig {
|
||||
uint8_t encryption_key[32];
|
||||
|
||||
Reference in New Issue
Block a user