[security] Introducing signing support to MySensors
-
@Anticimex
thank you very much for your support and for your patience with me!!!!
i just tried and the signing is working fine!!!!
i look forward to try the encryption! i@meddie you are so welcome! Glad that signing works for you. That is actually more complicated than encryption. We (the core team) have confirmed a problem with the write routine to the I2C eeprom on the SenseBender gateway. So people are investigating.
-
@Anticimex
thank you very much for your support and for your patience with me!!!!
i just tried and the signing is working fine!!!!
i look forward to try the encryption! i -
@meddie the development branch has been updated with a bug fix for the eeprom problem on samd based boards. If you pull the latest changes you should be able to properly personalize the AES key so that encryption will work.
@Anticimex
Hi, i just tried it out and now it and it has worked! The Aes key is stored correctly! BUT i get now an error on compile the gateway sketchC:\Users\meddie\Documents\Arduino\SenseebnderGW_LAN_NRF24\SenseebnderGW_LAN_NRF24.ino\SenseebnderGW_LAN_NRF24.ino.ino: In function 'bool testEEProm()': SenseebnderGW_LAN_NRF24.ino:315: error: 'i2c_eeprom_read_byte' was not declared in this scope eeprom_d1 = i2c_eeprom_read_byte(EEPROM_VERIFICATION_ADDRESS); ^ SenseebnderGW_LAN_NRF24.ino:318: error: 'i2c_eeprom_write_byte' was not declared in this scope i2c_eeprom_write_byte(EEPROM_VERIFICATION_ADDRESS, eeprom_d1);i could use the stable lib again then it should compile, but i think you would like to know that an error occours.
Greets Eddie -
@Anticimex
Hi, i just tried it out and now it and it has worked! The Aes key is stored correctly! BUT i get now an error on compile the gateway sketchC:\Users\meddie\Documents\Arduino\SenseebnderGW_LAN_NRF24\SenseebnderGW_LAN_NRF24.ino\SenseebnderGW_LAN_NRF24.ino.ino: In function 'bool testEEProm()': SenseebnderGW_LAN_NRF24.ino:315: error: 'i2c_eeprom_read_byte' was not declared in this scope eeprom_d1 = i2c_eeprom_read_byte(EEPROM_VERIFICATION_ADDRESS); ^ SenseebnderGW_LAN_NRF24.ino:318: error: 'i2c_eeprom_write_byte' was not declared in this scope i2c_eeprom_write_byte(EEPROM_VERIFICATION_ADDRESS, eeprom_d1);i could use the stable lib again then it should compile, but i think you would like to know that an error occours.
Greets Eddie -
@Anticimex
Hi, i just tried it out and now it and it has worked! The Aes key is stored correctly! BUT i get now an error on compile the gateway sketchC:\Users\meddie\Documents\Arduino\SenseebnderGW_LAN_NRF24\SenseebnderGW_LAN_NRF24.ino\SenseebnderGW_LAN_NRF24.ino.ino: In function 'bool testEEProm()': SenseebnderGW_LAN_NRF24.ino:315: error: 'i2c_eeprom_read_byte' was not declared in this scope eeprom_d1 = i2c_eeprom_read_byte(EEPROM_VERIFICATION_ADDRESS); ^ SenseebnderGW_LAN_NRF24.ino:318: error: 'i2c_eeprom_write_byte' was not declared in this scope i2c_eeprom_write_byte(EEPROM_VERIFICATION_ADDRESS, eeprom_d1);i could use the stable lib again then it should compile, but i think you would like to know that an error occours.
Greets Eddie -
@meddie the sketch you compile, is it from the MySensors library examples tree, the external examples repository, or a local sketch?
@Anticimex
its combined from two example sketches sensebendergateway and gatewayw5100 example sketch -
@Anticimex
its combined from two example sketches sensebendergateway and gatewayw5100 example sketch -
i used the stable lib and comiled the sketch both features are now working encryption and signing! Thank you very much!!!!! I will try to update the example lib and try again.
I got just the next problem the space from sensebender micro is not enought to use all three features signing, encryption and ota. When i use AES and Signing i get over 109%, when i use the example sketch temp and humidty meassure.
Greets Eddie
-
i used the stable lib and comiled the sketch both features are now working encryption and signing! Thank you very much!!!!! I will try to update the example lib and try again.
I got just the next problem the space from sensebender micro is not enought to use all three features signing, encryption and ota. When i use AES and Signing i get over 109%, when i use the example sketch temp and humidty meassure.
Greets Eddie
@meddie you could consider using a conversion board (@tbowmo has published one at openhardware.io) and use rfm69 radios which do AES encryption in hw. It should put less strain on memory resources.
-
@meddie you could consider using a conversion board (@tbowmo has published one at openhardware.io) and use rfm69 radios which do AES encryption in hw. It should put less strain on memory resources.
@Anticimex I am using a default SensebenderGatewaySerial sketch and get the following error when compiling:
In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: redefinition of 'uint8_t device_pin' static uint8_t device_pin; ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: 'uint8_t device_pin' previously declared here static uint8_t device_pin; ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)' static void swi_set_signal_pin(uint8_t is_high) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: 'void swi_set_signal_pin(uint8_t)' previously defined here static void swi_set_signal_pin(uint8_t is_high) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_send_bytes(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:35:16: error: redefinition of 'uint8_t swi_send_bytes(uint8_t, uint8_t*)' static uint8_t swi_send_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:35:16: error: 'uint8_t swi_send_bytes(uint8_t, uint8_t*)' previously defined here static uint8_t swi_send_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_send_byte(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:74:16: error: redefinition of 'uint8_t swi_send_byte(uint8_t)' static uint8_t swi_send_byte(uint8_t value) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:74:16: error: 'uint8_t swi_send_byte(uint8_t)' previously defined here static uint8_t swi_send_byte(uint8_t value) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:79:16: error: redefinition of 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)' static uint8_t swi_receive_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:79:16: error: 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)' previously defined here static uint8_t swi_receive_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:178:16: error: redefinition of 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)' static uint8_t sha204p_receive_response(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:178:16: error: 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)' previously defined here static uint8_t sha204p_receive_response(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_resync(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:212:16: error: redefinition of 'uint8_t sha204c_resync(uint8_t, uint8_t*)' static uint8_t sha204c_resync(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:212:16: error: 'uint8_t sha204c_resync(uint8_t, uint8_t*)' previously defined here static uint8_t sha204c_resync(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:234:16: error: redefinition of 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)' static uint8_t sha204c_send_and_receive(uint8_t *tx_buffer, uint8_t rx_size, uint8_t *rx_buffer, ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:234:16: error: 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)' previously defined here static uint8_t sha204c_send_and_receive(uint8_t *tx_buffer, uint8_t rx_size, uint8_t *rx_buffer, ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:379:16: error: redefinition of 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)' static uint8_t sha204m_read(uint8_t *tx_buffer, uint8_t *rx_buffer, uint8_t zone, uint16_t address) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:379:16: error: 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)' previously defined here static uint8_t sha204m_read(uint8_t *tx_buffer, uint8_t *rx_buffer, uint8_t zone, uint16_t address) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:399:13: error: redefinition of 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)' static void sha204c_calculate_crc(uint8_t length, uint8_t *data, uint8_t *crc) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:399:13: error: 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)' previously defined here static void sha204c_calculate_crc(uint8_t length, uint8_t *data, uint8_t *crc) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_check_crc(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:424:16: error: redefinition of 'uint8_t sha204c_check_crc(uint8_t*)' static uint8_t sha204c_check_crc(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:424:16: error: 'uint8_t sha204c_check_crc(uint8_t*)' previously defined here static uint8_t sha204c_check_crc(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_init(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:438:6: error: redefinition of 'void atsha204_init(uint8_t)' void atsha204_init(uint8_t pin) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:438:6: error: 'void atsha204_init(uint8_t)' previously defined here void atsha204_init(uint8_t pin) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_idle()': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:455:6: error: redefinition of 'void atsha204_idle()' void atsha204_idle(void) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:455:6: error: 'void atsha204_idle()' previously defined here void atsha204_idle(void) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_sleep()': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:460:6: error: redefinition of 'void atsha204_sleep()' void atsha204_sleep(void) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:460:6: error: 'void atsha204_sleep()' previously defined here void atsha204_sleep(void) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_wakeup(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:465:9: error: redefinition of 'uint8_t atsha204_wakeup(uint8_t*)' uint8_t atsha204_wakeup(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:465:9: error: 'uint8_t atsha204_wakeup(uint8_t*)' previously defined here uint8_t atsha204_wakeup(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:495:9: error: redefinition of 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)' uint8_t atsha204_execute(uint8_t op_code, uint8_t param1, uint16_t param2, ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:495:9: error: 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)' previously defined here uint8_t atsha204_execute(uint8_t op_code, uint8_t param1, uint16_t param2, ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_getSerialNumber(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:571:9: error: redefinition of 'uint8_t atsha204_getSerialNumber(uint8_t*)' uint8_t atsha204_getSerialNumber(uint8_t * response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:571:9: error: 'uint8_t atsha204_getSerialNumber(uint8_t*)' previously defined here uint8_t atsha204_getSerialNumber(uint8_t * response) ^ Multiple libraries were found for "SD.h" Used: C:\Users\Alex\Documents\Arduino\libraries\SD Not used: C:\Program Files (x86)\Arduino\libraries\SD Using library MySensors at version 2.1.1 in folder: C:\Users\Alex\Documents\Arduino\libraries\MySensors Using library Wire at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire Using library SPI at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI Using library SD at version 1.1.1 in folder: C:\Users\Alex\Documents\Arduino\libraries\SD exit status 1 Error compiling for board Sensebender Gateway.If I delete "#include <drivers/ATSHA204/ATSHA204.cpp>", it compiles just fine.
Any ideas please?I am using Mysensors 2.1.1, Arduino IDE 1.8.1 and latest SAMD board def.
-
@Anticimex I am using a default SensebenderGatewaySerial sketch and get the following error when compiling:
In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: redefinition of 'uint8_t device_pin' static uint8_t device_pin; ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: 'uint8_t device_pin' previously declared here static uint8_t device_pin; ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)' static void swi_set_signal_pin(uint8_t is_high) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: 'void swi_set_signal_pin(uint8_t)' previously defined here static void swi_set_signal_pin(uint8_t is_high) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_send_bytes(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:35:16: error: redefinition of 'uint8_t swi_send_bytes(uint8_t, uint8_t*)' static uint8_t swi_send_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:35:16: error: 'uint8_t swi_send_bytes(uint8_t, uint8_t*)' previously defined here static uint8_t swi_send_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_send_byte(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:74:16: error: redefinition of 'uint8_t swi_send_byte(uint8_t)' static uint8_t swi_send_byte(uint8_t value) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:74:16: error: 'uint8_t swi_send_byte(uint8_t)' previously defined here static uint8_t swi_send_byte(uint8_t value) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:79:16: error: redefinition of 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)' static uint8_t swi_receive_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:79:16: error: 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)' previously defined here static uint8_t swi_receive_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:178:16: error: redefinition of 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)' static uint8_t sha204p_receive_response(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:178:16: error: 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)' previously defined here static uint8_t sha204p_receive_response(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_resync(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:212:16: error: redefinition of 'uint8_t sha204c_resync(uint8_t, uint8_t*)' static uint8_t sha204c_resync(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:212:16: error: 'uint8_t sha204c_resync(uint8_t, uint8_t*)' previously defined here static uint8_t sha204c_resync(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:234:16: error: redefinition of 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)' static uint8_t sha204c_send_and_receive(uint8_t *tx_buffer, uint8_t rx_size, uint8_t *rx_buffer, ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:234:16: error: 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)' previously defined here static uint8_t sha204c_send_and_receive(uint8_t *tx_buffer, uint8_t rx_size, uint8_t *rx_buffer, ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:379:16: error: redefinition of 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)' static uint8_t sha204m_read(uint8_t *tx_buffer, uint8_t *rx_buffer, uint8_t zone, uint16_t address) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:379:16: error: 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)' previously defined here static uint8_t sha204m_read(uint8_t *tx_buffer, uint8_t *rx_buffer, uint8_t zone, uint16_t address) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:399:13: error: redefinition of 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)' static void sha204c_calculate_crc(uint8_t length, uint8_t *data, uint8_t *crc) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:399:13: error: 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)' previously defined here static void sha204c_calculate_crc(uint8_t length, uint8_t *data, uint8_t *crc) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_check_crc(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:424:16: error: redefinition of 'uint8_t sha204c_check_crc(uint8_t*)' static uint8_t sha204c_check_crc(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:424:16: error: 'uint8_t sha204c_check_crc(uint8_t*)' previously defined here static uint8_t sha204c_check_crc(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_init(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:438:6: error: redefinition of 'void atsha204_init(uint8_t)' void atsha204_init(uint8_t pin) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:438:6: error: 'void atsha204_init(uint8_t)' previously defined here void atsha204_init(uint8_t pin) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_idle()': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:455:6: error: redefinition of 'void atsha204_idle()' void atsha204_idle(void) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:455:6: error: 'void atsha204_idle()' previously defined here void atsha204_idle(void) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_sleep()': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:460:6: error: redefinition of 'void atsha204_sleep()' void atsha204_sleep(void) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:460:6: error: 'void atsha204_sleep()' previously defined here void atsha204_sleep(void) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_wakeup(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:465:9: error: redefinition of 'uint8_t atsha204_wakeup(uint8_t*)' uint8_t atsha204_wakeup(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:465:9: error: 'uint8_t atsha204_wakeup(uint8_t*)' previously defined here uint8_t atsha204_wakeup(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:495:9: error: redefinition of 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)' uint8_t atsha204_execute(uint8_t op_code, uint8_t param1, uint16_t param2, ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:495:9: error: 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)' previously defined here uint8_t atsha204_execute(uint8_t op_code, uint8_t param1, uint16_t param2, ^ In file included from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:98:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_getSerialNumber(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:571:9: error: redefinition of 'uint8_t atsha204_getSerialNumber(uint8_t*)' uint8_t atsha204_getSerialNumber(uint8_t * response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\Documents\Arduino\SensebenderGatewaySerial-2.1.1\SensebenderGatewaySerial-2.1.1.ino:96: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:571:9: error: 'uint8_t atsha204_getSerialNumber(uint8_t*)' previously defined here uint8_t atsha204_getSerialNumber(uint8_t * response) ^ Multiple libraries were found for "SD.h" Used: C:\Users\Alex\Documents\Arduino\libraries\SD Not used: C:\Program Files (x86)\Arduino\libraries\SD Using library MySensors at version 2.1.1 in folder: C:\Users\Alex\Documents\Arduino\libraries\MySensors Using library Wire at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire Using library SPI at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI Using library SD at version 1.1.1 in folder: C:\Users\Alex\Documents\Arduino\libraries\SD exit status 1 Error compiling for board Sensebender Gateway.If I delete "#include <drivers/ATSHA204/ATSHA204.cpp>", it compiles just fine.
Any ideas please?I am using Mysensors 2.1.1, Arduino IDE 1.8.1 and latest SAMD board def.
-
@Anticimex Thanks! I can confirm it compiles fine with the header included rather than the cpp. I suppose it was not an intention
-
What environment are you building in? platform.io ? Or?
I know it's awkward to include the cpp file, but it must have been done intentional at some point in time, and arduino way of doing things are very weird at times..
Btw it does compile fine for me (even with the .cpp as include)
-
What environment are you building in? platform.io ? Or?
I know it's awkward to include the cpp file, but it must have been done intentional at some point in time, and arduino way of doing things are very weird at times..
Btw it does compile fine for me (even with the .cpp as include)
-
I tried building the sketch in Arduino 1.8.1 on Windows 10. Worked fine here. In your log, the sketch name looks changed. It does not end with -2.1.1 here.
Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\P\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\P\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Cloud\Google Drive\gits\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10801 -build-path .... "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.elf" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\sketch\SensebenderGatewaySerial.ino.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\Wire\Wire.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SPI\SPI.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\File.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\SD.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\utility\Sd2Card.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\utility\SdFile.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\utility\SdVolume.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\core\variant.cpp.o" -Wl,--start-group "-LC:\Users\P\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math -lm "C:\Users\P\AppData\Local\Temp\arduino_build_482491/core\core.a" -Wl,--end-group "C:\Users\P\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.elf" "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.bin" "C:\Users\P\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.elf" "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.hex" Multiple libraries were found for "SD.h" Used: C:\Cloud\Google Drive\gits\libraries\SD Not used: C:\Program Files (x86)\Arduino\libraries\SD Using library MySensors at version 2.1.1 in folder: C:\Cloud\Google Drive\gits\libraries\MySensors Using library Wire at version 1.0 in folder: C:\Users\P\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire Using library SPI at version 1.0 in folder: C:\Users\P\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI Using library SD at version 1.1.1 in folder: C:\Cloud\Google Drive\gits\libraries\SD Sketch uses 42984 bytes (16%) of program storage space. Maximum is 262144 bytes. -
I tried building the sketch in Arduino 1.8.1 on Windows 10. Worked fine here. In your log, the sketch name looks changed. It does not end with -2.1.1 here.
Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\P\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\P\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Cloud\Google Drive\gits\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10801 -build-path .... "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.elf" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\sketch\SensebenderGatewaySerial.ino.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\Wire\Wire.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SPI\SPI.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\File.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\SD.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\utility\Sd2Card.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\utility\SdFile.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\libraries\SD\utility\SdVolume.cpp.o" "C:\Users\P\AppData\Local\Temp\arduino_build_482491\core\variant.cpp.o" -Wl,--start-group "-LC:\Users\P\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math -lm "C:\Users\P\AppData\Local\Temp\arduino_build_482491/core\core.a" -Wl,--end-group "C:\Users\P\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.elf" "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.bin" "C:\Users\P\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.elf" "C:\Users\P\AppData\Local\Temp\arduino_build_482491/SensebenderGatewaySerial.ino.hex" Multiple libraries were found for "SD.h" Used: C:\Cloud\Google Drive\gits\libraries\SD Not used: C:\Program Files (x86)\Arduino\libraries\SD Using library MySensors at version 2.1.1 in folder: C:\Cloud\Google Drive\gits\libraries\MySensors Using library Wire at version 1.0 in folder: C:\Users\P\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire Using library SPI at version 1.0 in folder: C:\Users\P\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI Using library SD at version 1.1.1 in folder: C:\Cloud\Google Drive\gits\libraries\SD Sketch uses 42984 bytes (16%) of program storage space. Maximum is 262144 bytes.@Anticimex Sorry, my bad I forgot to mention that the sketch compiles OK as is.
Only when I add signing://#define MY_SIGNING #define MY_SIGNING_ATSHA204 #define MY_SIGNING_REQUEST_SIGNATURES #define MY_SIGNING_ATSHA204_PIN 17It fails to compile:
Arduino: 1.8.1 (Windows 10), Board: "Sensebender Gateway" C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Alex\AppData\Local\Arduino15\packages -hardware C:\Users\Alex\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Alex\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Alex\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10801 -build-path C:\Users\Alex\AppData\Local\Temp\arduino_build_806240 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino5-static -prefs=runtime.tools.bossac.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0 -prefs=runtime.tools.CMSIS.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0 -verbose C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Alex\AppData\Local\Arduino15\packages -hardware C:\Users\Alex\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Alex\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Alex\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10801 -build-path C:\Users\Alex\AppData\Local\Temp\arduino_build_806240 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino5-static -prefs=runtime.tools.bossac.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0 -prefs=runtime.tools.CMSIS.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0 -verbose C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino Using board 'mysensors_gw_native' from platform in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5 Using core 'arduino' from platform in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12 WARNING: Spurious .mystools folder in 'MySensors' library Detecting libraries used... "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON '-DUSB_MANUFACTURER="MySensors.org"' '-DUSB_PRODUCT="Sensebender GW"' "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw" "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp" -o "nul" "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON '-DUSB_MANUFACTURER="MySensors.org"' '-DUSB_PRODUCT="Sensebender GW"' "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw" "-IC:\Users\Alex\Documents\Arduino\libraries\MySensors" "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp" -o "nul" "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON '-DUSB_MANUFACTURER="MySensors.org"' '-DUSB_PRODUCT="Sensebender GW"' "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw" "-IC:\Users\Alex\Documents\Arduino\libraries\MySensors" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire" "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp" -o "nul" "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON '-DUSB_MANUFACTURER="MySensors.org"' '-DUSB_PRODUCT="Sensebender GW"' "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw" "-IC:\Users\Alex\Documents\Arduino\libraries\MySensors" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI" "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp" -o "nul" "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON '-DUSB_MANUFACTURER="MySensors.org"' '-DUSB_PRODUCT="Sensebender GW"' "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw" "-IC:\Users\Alex\Documents\Arduino\libraries\MySensors" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI" "-IC:\Users\Alex\Documents\Arduino\libraries\SD\src" "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp" -o "nul" Using cached library dependencies for file: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire\Wire.cpp Using cached library dependencies for file: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI\SPI.cpp Using cached library dependencies for file: C:\Users\Alex\Documents\Arduino\libraries\SD\src\File.cpp Using cached library dependencies for file: C:\Users\Alex\Documents\Arduino\libraries\SD\src\SD.cpp Using cached library dependencies for file: C:\Users\Alex\Documents\Arduino\libraries\SD\src\utility\Sd2Card.cpp Using cached library dependencies for file: C:\Users\Alex\Documents\Arduino\libraries\SD\src\utility\SdFile.cpp Using cached library dependencies for file: C:\Users\Alex\Documents\Arduino\libraries\SD\src\utility\SdVolume.cpp Generating function prototypes... "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON '-DUSB_MANUFACTURER="MySensors.org"' '-DUSB_PRODUCT="Sensebender GW"' "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw" "-IC:\Users\Alex\Documents\Arduino\libraries\MySensors" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI" "-IC:\Users\Alex\Documents\Arduino\libraries\SD\src" "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp" -o "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\preproc\ctags_target_for_gcc_minus_e.cpp" "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\preproc\ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON '-DUSB_MANUFACTURER="MySensors.org"' '-DUSB_PRODUCT="Sensebender GW"' "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw" "-IC:\Users\Alex\Documents\Arduino\libraries\MySensors" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire" "-IC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI" "-IC:\Users\Alex\Documents\Arduino\libraries\SD\src" "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp" -o "C:\Users\Alex\AppData\Local\Temp\arduino_build_806240\sketch\SensebenderGatewaySerial.ino.cpp.o" In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: redefinition of 'uint8_t device_pin' static uint8_t device_pin; ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: 'uint8_t device_pin' previously declared here static uint8_t device_pin; ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)' static void swi_set_signal_pin(uint8_t is_high) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: 'void swi_set_signal_pin(uint8_t)' previously defined here static void swi_set_signal_pin(uint8_t is_high) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_send_bytes(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:35:16: error: redefinition of 'uint8_t swi_send_bytes(uint8_t, uint8_t*)' static uint8_t swi_send_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:35:16: error: 'uint8_t swi_send_bytes(uint8_t, uint8_t*)' previously defined here static uint8_t swi_send_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_send_byte(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:74:16: error: redefinition of 'uint8_t swi_send_byte(uint8_t)' static uint8_t swi_send_byte(uint8_t value) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:74:16: error: 'uint8_t swi_send_byte(uint8_t)' previously defined here static uint8_t swi_send_byte(uint8_t value) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:79:16: error: redefinition of 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)' static uint8_t swi_receive_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:79:16: error: 'uint8_t swi_receive_bytes(uint8_t, uint8_t*)' previously defined here static uint8_t swi_receive_bytes(uint8_t count, uint8_t *buffer) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:178:16: error: redefinition of 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)' static uint8_t sha204p_receive_response(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:178:16: error: 'uint8_t sha204p_receive_response(uint8_t, uint8_t*)' previously defined here static uint8_t sha204p_receive_response(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_resync(uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:212:16: error: redefinition of 'uint8_t sha204c_resync(uint8_t, uint8_t*)' static uint8_t sha204c_resync(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:212:16: error: 'uint8_t sha204c_resync(uint8_t, uint8_t*)' previously defined here static uint8_t sha204c_resync(uint8_t size, uint8_t *response) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:234:16: error: redefinition of 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)' static uint8_t sha204c_send_and_receive(uint8_t *tx_buffer, uint8_t rx_size, uint8_t *rx_buffer, ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:234:16: error: 'uint8_t sha204c_send_and_receive(uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t)' previously defined here static uint8_t sha204c_send_and_receive(uint8_t *tx_buffer, uint8_t rx_size, uint8_t *rx_buffer, ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:379:16: error: redefinition of 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)' static uint8_t sha204m_read(uint8_t *tx_buffer, uint8_t *rx_buffer, uint8_t zone, uint16_t address) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:379:16: error: 'uint8_t sha204m_read(uint8_t*, uint8_t*, uint8_t, uint16_t)' previously defined here static uint8_t sha204m_read(uint8_t *tx_buffer, uint8_t *rx_buffer, uint8_t zone, uint16_t address) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:399:13: error: redefinition of 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)' static void sha204c_calculate_crc(uint8_t length, uint8_t *data, uint8_t *crc) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:399:13: error: 'void sha204c_calculate_crc(uint8_t, uint8_t*, uint8_t*)' previously defined here static void sha204c_calculate_crc(uint8_t length, uint8_t *data, uint8_t *crc) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t sha204c_check_crc(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:424:16: error: redefinition of 'uint8_t sha204c_check_crc(uint8_t*)' static uint8_t sha204c_check_crc(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:424:16: error: 'uint8_t sha204c_check_crc(uint8_t*)' previously defined here static uint8_t sha204c_check_crc(uint8_t *response) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_init(uint8_t)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:438:6: error: redefinition of 'void atsha204_init(uint8_t)' void atsha204_init(uint8_t pin) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:438:6: error: 'void atsha204_init(uint8_t)' previously defined here void atsha204_init(uint8_t pin) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_idle()': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:455:6: error: redefinition of 'void atsha204_idle()' void atsha204_idle(void) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:455:6: error: 'void atsha204_idle()' previously defined here void atsha204_idle(void) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void atsha204_sleep()': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:460:6: error: redefinition of 'void atsha204_sleep()' void atsha204_sleep(void) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:460:6: error: 'void atsha204_sleep()' previously defined here void atsha204_sleep(void) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_wakeup(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:465:9: error: redefinition of 'uint8_t atsha204_wakeup(uint8_t*)' uint8_t atsha204_wakeup(uint8_t *response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:465:9: error: 'uint8_t atsha204_wakeup(uint8_t*)' previously defined here uint8_t atsha204_wakeup(uint8_t *response) ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:495:9: error: redefinition of 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)' uint8_t atsha204_execute(uint8_t op_code, uint8_t param1, uint16_t param2, ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:495:9: error: 'uint8_t atsha204_execute(uint8_t, uint8_t, uint16_t, uint8_t, uint8_t*, uint8_t, uint8_t*, uint8_t, uint8_t*)' previously defined here uint8_t atsha204_execute(uint8_t op_code, uint8_t param1, uint16_t param2, ^ In file included from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:91:0: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'uint8_t atsha204_getSerialNumber(uint8_t*)': C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:571:9: error: redefinition of 'uint8_t atsha204_getSerialNumber(uint8_t*)' uint8_t atsha204_getSerialNumber(uint8_t * response) ^ In file included from C:\Users\Alex\Documents\Arduino\libraries\MySensors/MySensors.h:131:0, from C:\Users\Alex\AppData\Local\Temp\arduino_modified_sketch_295317\SensebenderGatewaySerial.ino:89: C:\Users\Alex\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:571:9: error: 'uint8_t atsha204_getSerialNumber(uint8_t*)' previously defined here uint8_t atsha204_getSerialNumber(uint8_t * response) ^ Multiple libraries were found for "SD.h" Used: C:\Users\Alex\Documents\Arduino\libraries\SD Not used: C:\Program Files (x86)\Arduino\libraries\SD Using library MySensors at version 2.1.1 in folder: C:\Users\Alex\Documents\Arduino\libraries\MySensors Using library Wire at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire Using library SPI at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI Using library SD at version 1.1.1 in folder: C:\Users\Alex\Documents\Arduino\libraries\SD exit status 1 Error compiling for board Sensebender Gateway.``` -
This is the sketch:
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * DESCRIPTION * The ArduinoGateway prints data received from sensors on the serial link. * The gateway accepts input on seral which will be sent out on radio network. * * This GW code is designed for Sensebender GateWay / (Arduino Zero variant) * * Wire connections (OPTIONAL): * - Inclusion button should be connected to SW2 * * LEDs on board (default assignments): * - Orange: USB RX/TX - Blink when receiving / transmitting on USB CDC device * - Yellow: RX - Blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved * - Green : TX - Blink fast on radio message transmitted. In inclusion mode will blink slowly * - Red : ERR - Fast blink on error during transmission error or recieve crc error * - Blue : free - (use with LED_BLUE macro) * */ #define SKETCH_VERSION "0.2" // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 // Set LOW transmit power level as default, if you have an amplified NRF-module and // power your radio separately with a good regulator you can turn up PA level. #define MY_RF24_PA_LEVEL RF24_PA_HIGH // Enable serial gateway #define MY_GATEWAY_SERIAL //#define MY_SIGNING #define MY_SIGNING_ATSHA204 #define MY_SIGNING_REQUEST_SIGNATURES #define MY_SIGNING_ATSHA204_PIN 17 // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender) #if F_CPU == 8000000L #define MY_BAUD_RATE 38400 #endif // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway #define MY_INCLUSION_BUTTON_FEATURE // Inverses behavior of inclusion button (if using external pullup) //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button //#define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Inverses the behavior of leds //#define MY_WITH_LEDS_BLINKING_INVERSE // Flash leds on rx/tx/err // Uncomment to override default HW configurations //#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin //#define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin //#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED #include <MySensors.h> #include <SD.h> #include <drivers/ATSHA204/ATSHA204.cpp> Sd2Card card; #define EEPROM_VERIFICATION_ADDRESS 0x01 static uint8_t num_of_leds = 5; static uint8_t leds[] = {LED_BLUE, LED_RED, LED_GREEN, LED_YELLOW, LED_ORANGE}; void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors } void loop() { // Send locally attached sensor data here } void preHwInit() { pinMode(MY_SWC1, INPUT_PULLUP); pinMode(MY_SWC2, INPUT_PULLUP); if (digitalRead(MY_SWC1) && digitalRead(MY_SWC2)) { return; } uint8_t tests = 0; for (int i=0; i< num_of_leds; i++) { pinMode(leds[i], OUTPUT); } uint8_t led_state = 0; if (digitalRead(MY_SWC1)) { while (!Serial) { digitalWrite(LED_BLUE, led_state); led_state ^= 0x01; delay(500); } // Wait for USB to be connected, before spewing out data. } digitalWrite(LED_BLUE, LOW); if (Serial) { Serial.println("Sensebender GateWay test routine"); Serial.print("Mysensors core version : "); Serial.println(MYSENSORS_LIBRARY_VERSION); Serial.print("GateWay sketch version : "); Serial.println(SKETCH_VERSION); Serial.println("----------------------------------"); Serial.println(); } if (testSha204()) { digitalWrite(LED_GREEN, HIGH); tests++; } if (testSDCard()) { digitalWrite(LED_YELLOW, HIGH); tests++; } if (testEEProm()) { digitalWrite(LED_ORANGE, HIGH); tests++; } if (testAnalog()) { digitalWrite(LED_BLUE, HIGH); tests++; } if (tests == 4) { while(1) { for (int i=0; i<num_of_leds; i++) { digitalWrite(leds[i], HIGH); delay(200); digitalWrite(leds[i], LOW); } } } else { while (1) { digitalWrite(LED_RED, HIGH); delay(200); digitalWrite(LED_RED, LOW); delay(200); } } } bool testSha204() { uint8_t rx_buffer[SHA204_RSP_SIZE_MAX]; uint8_t ret_code; if (Serial) { Serial.print("- > SHA204 "); } atsha204_init(MY_SIGNING_ATSHA204_PIN); ret_code = atsha204_wakeup(rx_buffer); if (ret_code == SHA204_SUCCESS) { ret_code = atsha204_getSerialNumber(rx_buffer); if (ret_code != SHA204_SUCCESS) { if (Serial) { Serial.println(F("Failed to obtain device serial number. Response: ")); } Serial.println(ret_code, HEX); } else { if (Serial) { Serial.print(F("Ok (serial : ")); for (int i=0; i<9; i++) { if (rx_buffer[i] < 0x10) { Serial.print('0'); // Because Serial.print does not 0-pad HEX } Serial.print(rx_buffer[i], HEX); } Serial.println(")"); } return true; } } else { if (Serial) { Serial.println(F("Failed to wakeup SHA204")); } } return false; } bool testSDCard() { if (Serial) { Serial.print("- > SD CARD "); } if (!card.init(SPI_HALF_SPEED, MY_SDCARD_CS)) { if (Serial) { Serial.println("SD CARD did not initialize!"); } } else { if (Serial) { Serial.print("SD Card initialized correct! - "); Serial.print("type detected : "); switch(card.type()) { case SD_CARD_TYPE_SD1: Serial.println("SD1"); break; case SD_CARD_TYPE_SD2: Serial.println("SD2"); break; case SD_CARD_TYPE_SDHC: Serial.println("SDHC"); break; default: Serial.println("Unknown"); } } return true; } return false; } bool testEEProm() { uint8_t eeprom_d1, eeprom_d2; SerialUSB.print(" -> EEPROM "); Wire.begin(); eeprom_d1 = i2c_eeprom_read_byte(EEPROM_VERIFICATION_ADDRESS); delay(500); eeprom_d1 = ~eeprom_d1; // invert the bits i2c_eeprom_write_byte(EEPROM_VERIFICATION_ADDRESS, eeprom_d1); delay(500); eeprom_d2 = i2c_eeprom_read_byte(EEPROM_VERIFICATION_ADDRESS); if (eeprom_d1 == eeprom_d2) { SerialUSB.println("PASSED"); i2c_eeprom_write_byte(EEPROM_VERIFICATION_ADDRESS, ~eeprom_d1); return true; } SerialUSB.println("FAILED!"); return false; } bool testAnalog() { int bat_detect = analogRead(MY_BAT_DETECT); Serial.print("-> analog : "); Serial.print(bat_detect); if (bat_detect < 400 || bat_detect > 650) { Serial.println(" Failed"); return false; } Serial.println(" Passed"); return true; } -
The gateway sketch include a test of the atsha which I don't think belong there. You can probably remove the include and the test function.