Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. [security] Introducing signing support to MySensors

[security] Introducing signing support to MySensors

Scheduled Pinned Locked Moved Development
security
491 Posts 48 Posters 334.1k Views 30 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M meddie

    @Anticimex
    its combined from two example sketches sensebendergateway and gatewayw5100 example sketch

    AnticimexA Offline
    AnticimexA Offline
    Anticimex
    Contest Winner
    wrote on last edited by
    #331

    @meddie ok, if it is a local construction, it might be an expected error due to api changes in the library, in which case you need to update locally. The examples from the repository should compile ok.

    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      meddie
      wrote on last edited by
      #332

      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

      AnticimexA 1 Reply Last reply
      1
      • M meddie

        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

        AnticimexA Offline
        AnticimexA Offline
        Anticimex
        Contest Winner
        wrote on last edited by
        #333

        @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.

        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

        alexsh1A 1 Reply Last reply
        0
        • AnticimexA Anticimex

          @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.

          alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by
          #334

          @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.

          AnticimexA 1 Reply Last reply
          0
          • alexsh1A alexsh1

            @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.

            AnticimexA Offline
            AnticimexA Offline
            Anticimex
            Contest Winner
            wrote on last edited by
            #335

            @alexsh1 That is because the sketch has this line

            #include <drivers/ATSHA204/ATSHA204.cpp>
            

            @tbowmo Is it intentional to include the cpp and not the header in the sketch?

            Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

            alexsh1A 1 Reply Last reply
            0
            • AnticimexA Anticimex

              @alexsh1 That is because the sketch has this line

              #include <drivers/ATSHA204/ATSHA204.cpp>
              

              @tbowmo Is it intentional to include the cpp and not the header in the sketch?

              alexsh1A Offline
              alexsh1A Offline
              alexsh1
              wrote on last edited by
              #336

              @Anticimex Thanks! I can confirm it compiles fine with the header included rather than the cpp. I suppose it was not an intention

              1 Reply Last reply
              0
              • tbowmoT Offline
                tbowmoT Offline
                tbowmo
                Admin
                wrote on last edited by
                #337

                @alexsh1

                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)

                alexsh1A 1 Reply Last reply
                0
                • tbowmoT tbowmo

                  @alexsh1

                  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)

                  alexsh1A Offline
                  alexsh1A Offline
                  alexsh1
                  wrote on last edited by
                  #338

                  @tbowmo No, I am just using Arduino IDE in Windows 10

                  1 Reply Last reply
                  0
                  • AnticimexA Offline
                    AnticimexA Offline
                    Anticimex
                    Contest Winner
                    wrote on last edited by
                    #339

                    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.
                    

                    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                    alexsh1A 1 Reply Last reply
                    0
                    • AnticimexA Anticimex

                      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.
                      
                      alexsh1A Offline
                      alexsh1A Offline
                      alexsh1
                      wrote on last edited by
                      #340

                      @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 17
                      

                      It 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.```
                      1 Reply Last reply
                      0
                      • tbowmoT Offline
                        tbowmoT Offline
                        tbowmo
                        Admin
                        wrote on last edited by
                        #341

                        Have you tried to comment the #include out?

                        alexsh1A 2 Replies Last reply
                        0
                        • tbowmoT tbowmo

                          Have you tried to comment the #include out?

                          alexsh1A Offline
                          alexsh1A Offline
                          alexsh1
                          wrote on last edited by
                          #342

                          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;
                          }
                          
                          1 Reply Last reply
                          0
                          • AnticimexA Offline
                            AnticimexA Offline
                            Anticimex
                            Contest Winner
                            wrote on last edited by
                            #343

                            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.

                            Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                            alexsh1A 1 Reply Last reply
                            0
                            • tbowmoT tbowmo

                              Have you tried to comment the #include out?

                              alexsh1A Offline
                              alexsh1A Offline
                              alexsh1
                              wrote on last edited by
                              #344

                              @tbowmo it compiles with this:

                              #include <drivers/ATSHA204/ATSHA204.h>

                              However, I cannot confirm that the singing is working - I need more time to set-up a node to test it.

                              1 Reply Last reply
                              0
                              • tbowmoT Offline
                                tbowmoT Offline
                                tbowmo
                                Admin
                                wrote on last edited by
                                #345

                                @Anticimex

                                It's the default sketch, that itead is putting in the gateway, including a simple hardware self-test routine.

                                I would like to keep it there, in case people run into troubles.. Then they can go back to factory stock firmware...

                                AnticimexA 1 Reply Last reply
                                0
                                • AnticimexA Anticimex

                                  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.

                                  alexsh1A Offline
                                  alexsh1A Offline
                                  alexsh1
                                  wrote on last edited by
                                  #346

                                  @Anticimex You suggest to remote it? It compiles fine if I remove it. I will set-up a node tomorrow to test signing with #include <drivers/ATSHA204/ATSHA204.cpp> removed.

                                  1 Reply Last reply
                                  0
                                  • tbowmoT tbowmo

                                    @Anticimex

                                    It's the default sketch, that itead is putting in the gateway, including a simple hardware self-test routine.

                                    I would like to keep it there, in case people run into troubles.. Then they can go back to factory stock firmware...

                                    AnticimexA Offline
                                    AnticimexA Offline
                                    Anticimex
                                    Contest Winner
                                    wrote on last edited by
                                    #347

                                    @tbowmo may I suggest an update which would switch out the include of the cpp file and the test if atsha based signing is enabled? Or is it too late to ship firmware updates to iTead?

                                    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                    1 Reply Last reply
                                    0
                                    • tbowmoT Offline
                                      tbowmoT Offline
                                      tbowmo
                                      Admin
                                      wrote on last edited by
                                      #348

                                      @Anticimex

                                      Such a change won't affect the firmware that is put into the sensebender GW per se, as we don't use signing in the default sketch. I was about to suggest the same :)

                                      AnticimexA M 2 Replies Last reply
                                      0
                                      • tbowmoT tbowmo

                                        @Anticimex

                                        Such a change won't affect the firmware that is put into the sensebender GW per se, as we don't use signing in the default sketch. I was about to suggest the same :)

                                        AnticimexA Offline
                                        AnticimexA Offline
                                        Anticimex
                                        Contest Winner
                                        wrote on last edited by
                                        #349

                                        @tbowmo then we have a way forward :)

                                        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                        1 Reply Last reply
                                        0
                                        • tbowmoT tbowmo

                                          @Anticimex

                                          Such a change won't affect the firmware that is put into the sensebender GW per se, as we don't use signing in the default sketch. I was about to suggest the same :)

                                          M Offline
                                          M Offline
                                          meddie
                                          wrote on last edited by
                                          #350

                                          @Anticimex
                                          sorry i didnt let hear anything from me for the last few days.
                                          i had the same problems with compiling the sketch. It depends on the signing. When you remove the #define MY_SIGNING_ATSHA204 the you can compile but when the singning is defined you get an error until you remove this line:
                                          #include <drivers/ATSHA204/ATSHA204.cpp>

                                          i have removed the line and defined the signing and for me works the singing and encryption.

                                          but i have an another problem, i dont know if i am right here or i better have to post in the sensebender micro forum, i posted that i had some troubles with the space on the sb micro, i have removed the #define my_debug that solved my space problem, but now i have observed that the node is starting and sends few times the temp and humidity but after the few times nothing happens anymore.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          10

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular