@Robinek70
$ sudo mysgw -h
Usage: mysgw [options]
Options:
-h, --help Display a short summary of all program options.
-d, --debug Enable debug.
-b, --background Run as a background process.
--gen-soft-hmac-key Generate and print a soft hmac key.
--gen-soft-serial-key Generate and print a soft serial key.
--gen-aes-key Generate and print an aes encryption key.
--print-soft-hmac-key Print the soft hmac key from the config file.
--print-soft-serial-key Print the soft serial key from the config file.
--print-aes-key Print the aes encryption key from the config file.
--set-soft-hmac-key Write a soft hmac key to the config file.
--set-soft-serial-key Write a soft serial key to the config file.
--set-aes-key Write an aes encryption key to the config file.
To generate a soft hmac key, run:
sudo mysgw --gen-soft-hmac-key
and set it using:
sudo mysgw --set-soft-hmac-key=KEY
For example:
$ sudo mysgw --gen-soft-hmac-key
SOFT_HMAC_KEY | 7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
The next line is intended to be used in SecurityPersonalizer.ino:
#define MY_SOFT_HMAC_KEY 0X7F,0X3F,0X1A,0X1C,0X1E,0XA3,0X2B,0X72,0XBF,0X4B,0XED,0XE2,0XD1,0X65,0X43,0X97,0X1C,0X26,0X44,0X2F,0X69,0X57,0X21,0X77,0XD9,0XCC,0XDE,0X39,0X3B,0XFB,0X81,0X26
To use this key, run mysgw with:
--set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
$ sudo mysgw --set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
The same process applies to generate/set the other key types.