Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
how_to:mysensors:sign_your_node [2019/03/21 21:33]
franzunix created
how_to:mysensors:sign_your_node [2019/09/11 18:32] (current)
franzunix
Line 1: Line 1:
 ====== Secure your node ====== ====== Secure your node ======
 +
 +To secure your nodes you have to upload to your Arduino board or bare ATmega microcontroller the [[https://​www.mysensors.org/​apidocs/​SecurityPersonalizer_8ino-example.html|SecurityPersonalizer.ino]] sketch that comes pre-installed with the MySensors library in the Arduino IDE.
 +
 +You have to modify the following lines in the sketch, inserting your [[how_to:​mysensors:​generate_private_keys|personal keys]]:
 +  * #define MY_HMAC_KEY ​
 +  * #define MY_AES_KEY
 +  * #define MY_SOFT_SERIAL
 +
 +Uncomment the line 119:
 +  * #define PERSONALIZE_SOFT_RANDOM_SERIAL
 +
 +and then upload the modified sketch to your Arduino board or bare ATmega microcontroller.\\
 +In the serial monitor of the Arduino IDE, if nothing is go wrong, you should see a success message.
 +
 +<alert type="​info"​ dismiss="​true"​ icon="​fa fa-info">​Check that the HMAC and AES key are the same of the one in your gateway and annotate the SERIAL KEY, which in unique for each node. The value of the serial key is necessary for [[https://​www.mysensors.org/​apidocs-beta/​group__MySigninggrpPub.html#​MySigningwhitelisting|whitelisting]]</​alert>​
 +
 +Now your node is able to communicate with the gateway in a secure way. Save your modified SecurityPersonalizer.ino sketch to easily secure other nodes
 +
 +If you wont to delete the keys from the eeprom of your board, run the [[https://​www.mysensors.org/​build/​debug#​clearing-eeprom|ClearEepromConfig.ino]] sketch that comes pre-installed with the MySensors library in the Arduino IDE.
 +
 +If you are using [[https://​platformio.org/​|Platformio]],​ you can download the pre-built [[https://​github.com/​d-diot/​MySensors-Clear-EEPROM.git|MySensors-Clear-EEPROM]] and the [[https://​github.com/​d-diot/​d-diot-personalize-node.git|d-diot-personalize-node]] projects from the d-diot account on [[https://​github.com/​d-diot|github]]. ​  
 +
 +Follow the [[how_to:​mysensors:​firmware_upload|firmware upload]] guide to know how to flash your Arduino board with PlatformIO CLI, directly from your d-diot hub.
 +
 +[<>]
 + 
  
  • how_to/mysensors/sign_your_node.1553203993.txt.gz
  • Last modified: 2019/03/21 21:33
  • by franzunix