Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (37 sloc) 1.85 KB

Security "personalization" for MySensors SecurityPersonalizer.ino sketch How To

Very detailed explanation you can find here : Signing support created by Patrick "Anticimex" Fallberg

If you do not want to dive deep into it, just follow these 3 steps. Assume you know what is the Arduiono IDE and the Serial Monitor from the Arduiono IDE:

Step 1 - generate random MY_HMAC_KEY

You can skip Step 1 by filling some numbers instead of zeroes in SecurityPersonalizer.ino #define MY_HMAC_KEY 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00.......

Open SecurityPersonalizer.ino from MySensors examples. Comment out lines:

//#define USER_KEY

Upload sketch to the node and open the serial monitor. Copy from the serial monitor #define MY_HMAC_KEY 0x blah blah blah

open serial monitor and copy #define MY_HMAC_KEY 0x blah blah blah

Step 2 - save MY_HMAC_KEY

Put #define MY_HMAC_KEY into here Put it here

Step 3 - write MY_HMAC_KEY into the Node


#define USER_KEY

Upload sketch into the node

Now you have CryptoAuthentication key written into Atsha204 chip. You can rewrite another one later if you want to change it.


Please note:

Your Node sketch you want to protect should have:

#define MY_SIGNING_ATSHA204 

your Gateway Serial sketch need basically only this one:

You can’t perform that action at this time.