Sensebender Gateway with NRF24 PA and Hardsigning and Encryption



  • Hi together,

    i think i need some help, i have an old mysensor Ethernet Gateway i thin it Version 1.2. It is some time gone since i build it.
    But i didnt anything with the controller because i waited to the signing, ota and encryption.

    Now i bought the sensebender gateway and the w5100 ethernet modul. But wich sketch i should use.

    I dont understand, maybe somebody have some tips for me or maybe a complete sketch.
    Thanks a lot in advance.

    Greets Eddie


  • Mod

    @meddie see https://www.mysensors.org/hardware/sensebender-gateway under the sections "Default sketch" and "Other configurations".



  • Hi,

    yes i did it, but i hoped to find a ready sketch. But i didnt!

    I just puted from all the sketches i needed the parts of Code together. Could you please check, if my code would work correctly ot even i did some mistakes.

    Thanks a lot!

    /**
    * 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.
    *
    *******************************
    *
    * REVISION HISTORY
    * Version 1.0 - Henrik EKblad
    * Contribution by a-lurker and Anticimex,
    * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
    * Contribution by Tomas Hozza <thozza@gmail.com>
    *
    *
    * DESCRIPTION
    * The EthernetGateway sends data received from sensors to the ethernet link.
    * The gateway also accepts input on ethernet interface, which is then sent out to the 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)
    *
    */
    
    #include <stdint.h>
    #include <pins_arduino.h>
    #define SKETCH_VERSION "0.2"
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    #define MY_DEBUG_VERBOSE_SIGNING
    
    // 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
    
    						
    #define MY_OTA_FIRMWARE_FEATURE
    
    #define MY_SIGNING_ATSHA204
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
    #define MY_SIGNING_REQUEST_SIGNATURES
    #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
    #endif															
    #ifndef MY_SIGNING_ATSHA204_PIN
    #define MY_SIGNING_ATSHA204_PIN 17
    #endif			  
    #define MY_RF24_ENABLE_ENCRYPTION
    	  
    // Enable gateway ethernet module type
    #define MY_GATEWAY_W5100
    
    // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
    //#define MY_W5100_SPI_EN 4
    
    // Enable Soft SPI for NRF radio (note different radio wiring is required)
    // The W5100 ethernet module seems to have a hard time co-operate with
    // radio on the same spi bus.
    #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
    #define MY_SOFTSPI
    #define MY_SOFT_SPI_SCK_PIN 14
    #define MY_SOFT_SPI_MISO_PIN 16
    #define MY_SOFT_SPI_MOSI_PIN 15
    #endif
    
    // When W5100 is connected we have to move CE/CSN pins for NRF radio
    #ifndef MY_RF24_CE_PIN
    #define MY_RF24_CE_PIN 5
    #endif
    #ifndef MY_RF24_CS_PIN
    #define MY_RF24_CS_PIN 6
    #endif
    
    // Enable to UDP
    //#define MY_USE_UDP
    
    #define MY_IP_ADDRESS 192,168,178,66   // If this is disabled, DHCP is used to retrieve address
    // Renewal period if using DHCP
    //#define MY_IP_RENEWAL_INTERVAL 60000
    // The port to keep open on node server mode / or port to contact in client mode
    #define MY_PORT 5003
    
    // Controller ip address. Enables client mode (default is "server" mode).
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
    //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254
    
    // The MAC address can be anything you want but should be unique on your network.
    // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
    // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
    #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
    
    // 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
    
    
    #if defined(MY_USE_UDP)
    #include <EthernetUdp.h>
    #endif
    #include <Ethernet.h>
    #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;
    }
    
    

  • Admin

    @meddie

    You should be able to use the "stock" GatewayW5100 sketch.

    I see in the code that you posted above, that you have enabled OTA support. That doesn't make sense in a gateway, and specially not in the sensebender gw, as there is no support for OTA on arm processors yet.



  • Hi,

    thank you for your answers! I tried the GatewayW5100 Sketch but i get an error

    C:\Users\Meddie\AppData\Local\Temp\arduino_build_19882\sketch\GatewayW5100.ino.cpp:1:21: fatal error: Arduino.h: No such file or directory
    
     #include <Arduino.h>
    
                         ^
    
    compilation terminated.
    
    exit status 1``````
    
    

    Where i have to pu the Arduino.h file?

    I have already copied the files from drivers folder to the arduino ide drivers folder and i copied the whole mysensors-master folder to the libraries folder in the arduino ide.

    I got this error only if i select the sensebender Gatewas as board, when i select arduino uno i can compile witheout errors.

    When i switch in the ide to the Sensebender GW Board i get this text in the console:

    The current selected board needs the core 'arduino:arduino' that is not installed.```

  • Admin

    @meddie

    Which version of mysensors board definition files, and arduino ditto for SAMD do you have installed? (Have a look in the board manager)

    The newest Mysensors SAMD files (1.0.4) is only compatible up to Arduino SAMD 1.6.11, as the Arduino folks have made some changes again to their core again.



  • I have installed the 1.0.4 Version. But the Arduino IDE is 1.8.1


  • Admin

    @meddie

    Not the arduino IDE, but Arduino SAMD board support files.. These can be installed through the board manager.

    Sorry this was not made clear in the setup instructions..



  • Oh, ok i did not installed them. Just in moment i install the arduino sam Boards (32-bits ARM Cortex.m3) Version 1.6.11
    is that correct?


  • Admin

    @meddie

    No, you need to choose Arduino SAMD boards (32-bits ARM Cortex-M0) version 1.6.11



  • AAAAAH! I am so stupid! I read all the Time SAM and didnt seen the D at the end. Sorry sorry sorry.
    Yes it works now!!!
    Thank you very much!



  • Ok, next problem:
    the sketch Gateway5100 can be compiled but i get an error on uploding them.

    I have a Win 10 PC, the GW is detected by os and in the device manager i can see a usb device Com Port 3. When i connect the GW to the PC and start the serial monitor i get some lines.

    I think the communication should work.

    This is the output:

    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\meddie\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\meddie\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\meddie\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -vid-pid=0X1209_0X6949 -ide-version=10801 -build-path C:\Users\meddie\AppData\Local\Temp\arduino_build_739214 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.openocd.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino -prefs=runtime.tools.CMSIS.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.bossac.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0 -prefs=runtime.tools.avrdude.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0 -verbose C:\Program Files (x86)\Arduino\examples\MySensors\GatewayW5100\GatewayW5100.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\meddie\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\meddie\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\meddie\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -vid-pid=0X1209_0X6949 -ide-version=10801 -build-path C:\Users\meddie\AppData\Local\Temp\arduino_build_739214 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.openocd.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino -prefs=runtime.tools.CMSIS.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.bossac.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0 -prefs=runtime.tools.avrdude.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0 -verbose C:\Program Files (x86)\Arduino\examples\MySensors\GatewayW5100\GatewayW5100.ino
    Using board 'mysensors_gw_native' from platform in folder: C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4
    Using core 'arduino' from platform in folder: C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11
    WARNING: Spurious .mystools folder in 'MySensors' library
    Detecting libraries used...
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\sketch\GatewayW5100.ino.cpp" -o "nul"
    ..."C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI\SPI.cpp" -o "nul"
    Generating function prototypes...
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\sketch\GatewayW5100.ino.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\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\meddie\AppData\Local\Temp\arduino_build_739214\preproc\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\sketch\GatewayW5100.ino.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\sketch\GatewayW5100.ino.cpp.o"
    Compiling libraries...
    Compiling library "Ethernet"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\Dhcp.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\Dhcp.cpp.o"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\Dns.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\Dns.cpp.o"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\Ethernet.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\Ethernet.cpp.o"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\EthernetClient.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\EthernetClient.cpp.o"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\EthernetServer.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\EthernetServer.cpp.o"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\EthernetUdp.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\EthernetUdp.cpp.o"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\utility\socket.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\utility\socket.cpp.o"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src\utility\w5100.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\utility\w5100.cpp.o"
    Compiling library "MySensors-master"
    Compiling library "Wire"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire\Wire.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Wire\Wire.cpp.o"
    Compiling library "SPI"
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet\src" "-IC:\Program Files (x86)\Arduino\libraries\MySensors-master" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI" "C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI\SPI.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\SPI\SPI.cpp.o"
    Compiling core...
    "C:\Users\meddie\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\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.0.0/CMSIS/Device/ATMEL/" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\cores\arduino" "-IC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw" "C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw\variant.cpp" -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\core\variant.cpp.o"
    .......
    "C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-ar" rcs  "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\core\core.a" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\core\USB\USBCore.cpp.o"
    Linking everything together...
    "C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-gcc"  "-LC:\Users\meddie\AppData\Local\Temp\arduino_build_739214" -Os -Wl,--gc-sections -save-temps  "-TC:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\variants\mysensors_gw/linker_scripts/gcc/flash_with_bootloader.ld" "-Wl,-Map,C:\Users\meddie\AppData\Local\Temp\arduino_build_739214/GatewayW5100.ino.map" --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -o "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214/GatewayW5100.ino.elf" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\sketch\GatewayW5100.ino.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\Dhcp.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\Dns.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\Ethernet.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\EthernetClient.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\EthernetServer.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\EthernetUdp.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\utility\socket.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Ethernet\utility\w5100.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\Wire\Wire.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\libraries\SPI\SPI.cpp.o" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214\core\variant.cpp.o" -Wl,--start-group "-LC:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math -lm "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214/core\core.a" -Wl,--end-group
    "C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary  "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214/GatewayW5100.ino.elf" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214/GatewayW5100.ino.bin"
    "C:\Users\meddie\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\meddie\AppData\Local\Temp\arduino_build_739214/GatewayW5100.ino.elf" "C:\Users\meddie\AppData\Local\Temp\arduino_build_739214/GatewayW5100.ino.hex"
    Multiple libraries were found for "Ethernet.h"
     Used: C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet
     Not used: C:\Program Files (x86)\Arduino\libraries\Ethernet
    Using library Ethernet at version 1.1.2 in folder: C:\Users\meddie\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.4\libraries\Ethernet 
    Using library MySensors-master at version 2.1.1 in folder: C:\Program Files (x86)\Arduino\libraries\MySensors-master 
    Using library Wire at version 1.0 in folder: C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\Wire 
    Using library SPI at version 1.0 in folder: C:\Users\meddie\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.11\libraries\SPI 
    Sketch uses 43960 bytes (16%) of program storage space. Maximum is 262144 bytes.
    An error occurred while uploading the sketch```

  • Admin

    @meddie

    I'm not sure how things work on windows..



  • Hi,
    me again, today i installed the arduino ide on a other pc and it works now i could compile and upload the sketch. But when i user the Gateway5100 Sketch and put as ip Adresse 172.16.0.25 i could not ping the gateway.
    Do i have to config the pins that connected to the ethernet modul? A similar problem i had with my nrf24 modul when i connect it the gateway dont start. (i dont get any data on the serial port)
    Thank you a lot!
    Greets Eddie



  • Hi,
    i did it! The gateway has worked fine all the time! When i have uploaded the GatewayW5100 Sketch and connected the Eternet Module and the NRF24 Modul, then i didnt get anythin on Serial Monitor but i think its correct so, because FHEM (my Controller) shows me that the Sensebender Gateway is connected and added one new Device.

    Then i tried to upload the Sketch from second post, and get some errors, i had to delete this Line
    #include <drivers/ATSHA204/ATSHA204.cpp>

    then i could compile and upload the sketch but i get three warnings:

    c:/users/meddie/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

    c:/users/meddie/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

    c:/users/meddie/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

    I dont know what this means, but it looks like the gateway is working. FHEM continues showing as connected!

    Do you know what this warning does mean?
    Thanks a lot!



  • Is it correct, that if you want to enable ATSHA204A chip in gateway, you need to enable this in MyConfig.h?

    //#define MY_SIGNING_ATSHA204
    

    If I do, I get a lot of compile errors, see below, if I don't enable it, it compiles fine. It is development branch (I guess...). Setting up the environment is quite the trial and error

    In file included from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:86:0:
    
    C:\Users\aaa\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\aaa\Documents\Arduino\libraries\MySensors/MySensors.h:166:0,
    
                     from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:84:
    
    C:\Users\aaa\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\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:86:0:
    
    C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)':
    
    C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:23:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)'
    
     static void swi_set_signal_pin(uint8_t is_high)
    
                 ^
    
    and a lot more...
    

  • Contest Winner

    @Magnus-Pernemark normally, you don't change MyConfig.h, you just use it as reference. And then you set your defines in your sketch prior to include mysensors.h.

    I think there was a problem in the official release that the SenseBender gw sketch included some files for self testing that is not really needed (or more correctly, it included them without considering the atsha flag), so you can probably strip them from the sketch or conditionally include them. I believe it was fixed on beta. But perhaps it is still in there.



  • @Anticimex Ah, I was under the impression that the SenseBender Gateway, came with default serial sketch without signing and you had to enable signing by your self if you want it. And some how in MyConfig.h (not MySensors.h) this sounded like something that needs to be changed (comment said so).

    /**
     * @def MY_SIGNING_ATSHA204
     * @brief Enables HW backed signing functionality in library.
     *
    * For any signing related functionality to be included, this define or @ref MY_SIGNING_SOFT has to
     * be enabled.
     *
    //#define MY_SIGNING_ATSHA204
    

    So after configuring the ATSHA chip and uploading the serialgateway to the GW, without altering any code, it will start using the ATSHA chip and reject those without?

    Is it the same with Sensebender Micro? If it has a ATSHA chip it will use it, if it doesn't it will not?

    I run the development branch code, 2.2.2-beta


  • Contest Winner

    @Magnus-Pernemark no, it is not enabled by default. But the SenseBender gw sketch also include self test logic used in the factory that test atsha204a communication. But this code is always included, so if you do enable the signing using atsha204a, it includes some code twice. So the sketch would only include the atsha stuff if the define isn't set.



  • @Anticimex I'm sorry, my vacation brain just cannot comprehend all these terms (I don't think it would even if I wasn't on vecaction 🙂 My four hour experience with c/c++ surely has its limits).

    Is it safe to say, the GW sketch does not use the ATSHA chip, and the sketch needs some modification for it to start using it?

    In the mean-time, I'll try it out with the default sketch. It looks like the GW and the bender are talking to each other


  • Contest Winner

    @Magnus-Pernemark no, I am saying that the sketch use the atsha by default for self testing. It is not using it by default for signing. And the problem is that if you want to use it for signing it has already included some code for self testing that it shouldn't in that case. If you are not able to code c i suggest hanging on some time for someone to fix the problem. I can't do it at the moment since I am on the road. Ping @tbowmo


  • Admin

    @Magnus-Pernemark

    You need to enable signing with
    #define MY_SIGNING_ATSHA204

    This will make the sketch break though, as it includes the atsha204 driver already (and the library wants to include it as well)

    To remove the error comment out the following line (it's line 86 in the original source)

    #include <drivers/ATSHA204/ATSHA204.cpp> 
    

    (Reference to the line in github :
    https://github.com/mysensors/MySensors/blob/master/examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino#L86)

    As an alternative, you can load the standard GatewaySerial sketch.. The only difference to the SensebenderGatewaySerial, is that the later includes test routines used in the factory.

    @Anticimex I don't think that I made a PR for conditionally include the atsha driver, as the error still persists in dev branch..


  • Contest Winner

    @tbowmo no, but I remember that another user had the same issue and agreed to file a pr but perhaps he never got around to it. Should just be a matter of adding a ifndef though.



  • @Anticimex @tbowmo an #ifndef made it work and sketch compiled.


Log in to reply
 

Suggested Topics

26
Online

11.2k
Users

11.1k
Topics

112.5k
Posts