SecurityPersonalizer will not compile



  • hi,

    I am having trouble to compile security personalizer sketch for Sensebender GW
    https://github.com/mysensors/MySensors/tree/development/examples/SecurityPersonalizer

    I receive error log. any advise?

    regards, rimantas

    Arduino: 1.8.5 (Linux), Board: "Sensebender Gateway"
    
    /root/Arduino/SecurityPersonalizer_v11/SecurityPersonalizer_v11.ino: In function 'void write_eeprom_checksum()':
    SecurityPersonalizer_v11:697: error: 'EEPROM_PERSONALIZATION_CHECKSUM_ADDRESS' was not declared in this scope
      hwWriteConfigBlock((void*)&hash[0], (void*)EEPROM_PERSONALIZATION_CHECKSUM_ADDRESS, 1);
                                                 ^
    /root/Arduino/SecurityPersonalizer_v11/SecurityPersonalizer_v11.ino: In function 'void probe_and_print_peripherals()':
    SecurityPersonalizer_v11:1327: error: 'unique_id_t' was not declared in this scope
      unique_id_t uniqueID;
      ^
    SecurityPersonalizer_v11:1327: error: expected ';' before 'uniqueID'
      unique_id_t uniqueID;
                  ^
    SecurityPersonalizer_v11:1352: error: 'uniqueID' was not declared in this scope
      if (hwUniqueID(&uniqueID)) {
                      ^
    SecurityPersonalizer_v11:1352: error: 'hwUniqueID' was not declared in this scope
      if (hwUniqueID(&uniqueID)) {
                              ^
    exit status 1
    'EEPROM_PERSONALIZATION_CHECKSUM_ADDRESS' was not declared in this scope
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    

  • Mod

    @rzylius which version of the MySensors library do you have installed? The sketch needs to match the library version (use the 2.1.1 sketch with MySensors 2.1.1, or the development sketch with the development version of MySensors).


  • Mod

    The sketch compiles fine for me:

    Using board 'mysensors_gw_native' from platform in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5
    Using core 'arduino' from platform in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.17
    ...
    Using library MySensors at version 2.2.0-rc.2 in folder: R:\Documents\Arduino\libraries\MySensors 
    Using library Wire at version 1.0 in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.17\libraries\Wire 
    Sketch uses 20764 bytes (7%) of program storage space. Maximum is 262144 bytes.
    

    (Arduino IDE 1.8.5)



  • @mfalkvidd I tested now on my windows machine with fresh install of arduino185. Mysenors library 2.1.1 , mysensors SAMD boards.

    the same outcome

    Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: "Sensebender Gateway"
    
    Build options changed, rebuilding all
    C:\Users\rzylius\Documents\Arduino\SecurityPersonalizer\SecurityPersonalizer.ino: In function 'void write_eeprom_checksum()':
    
    SecurityPersonalizer:697: error: 'EEPROM_PERSONALIZATION_CHECKSUM_ADDRESS' was not declared in this scope
    
      hwWriteConfigBlock((void*)&hash[0], (void*)EEPROM_PERSONALIZATION_CHECKSUM_ADDRESS, 1);
    
                                                 ^
    
    C:\Users\rzylius\Documents\Arduino\SecurityPersonalizer\SecurityPersonalizer.ino: In function 'void probe_and_print_peripherals()':
    
    SecurityPersonalizer:1327: error: 'unique_id_t' was not declared in this scope
    
      unique_id_t uniqueID;
    
      ^
    
    SecurityPersonalizer:1327: error: expected ';' before 'uniqueID'
    
      unique_id_t uniqueID;
    
                  ^
    
    SecurityPersonalizer:1352: error: 'uniqueID' was not declared in this scope
    
      if (hwUniqueID(&uniqueID)) {
    
                      ^
    
    SecurityPersonalizer:1352: error: 'hwUniqueID' was not declared in this scope
    
      if (hwUniqueID(&uniqueID)) {
    
                              ^
    
    exit status 1
    'EEPROM_PERSONALIZATION_CHECKSUM_ADDRESS' was not declared in this scope
    
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    
    

  • Mod

    @rzylius you opened the security personalizer sketch from File->Examples->MySensors ?
    Could you post the sketch?

    My suspicion is that you are still using the development version of the sketch.



  • @mfalkvidd , yes, I see. As I wrote in the first post I was using https://github.com/mysensors/MySensors/tree/development/examples/SecurityPersonalizer code.

    I checked with the Personizer code in the Library examples - it does compile, thanks.

    What I find a bit confusing - in the sketch in exampla library you have to make two keys - USER_SOFT_KEY and USER_KEY (when you do not use hw hashing, and when you do).

    I have mixed configurations. Should those keys be the same in my network for mixed configuration to work?

    thanks for help and sorry for confusion


Log in to reply
 

Suggested Topics

0
Online

11.4k
Users

11.1k
Topics

112.6k
Posts