diff --git a/libraries/MySensors/MyConfig.h b/libraries/MySensors/MyConfig.h index f0b52e9..37b3cab 100644 --- a/libraries/MySensors/MyConfig.h +++ b/libraries/MySensors/MyConfig.h @@ -542,6 +542,7 @@ #if DOXYGEN #define MY_SIGNING_ATSHA204 #define MY_SIGNING_SOFT +#define MY_SIGNING_REQUEST_SIGNATURES #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}} #define MY_IS_RFM69HW #endif diff --git a/libraries/MySensors/MySensor.h b/libraries/MySensors/MySensor.h index 90ef395..9b34525 100644 --- a/libraries/MySensors/MySensor.h +++ b/libraries/MySensors/MySensor.h @@ -40,7 +40,7 @@ * @def MY_NODE_TYPE * @brief Contain a string describing the class of sketch/node (gateway/repeater/sensor). */ -#if defined(MY_GATEWAY_SERIAL) || defined(MY_GATEWAY_W5100) || defined(MY_GATEWAY_ENC28J60) || defined(ARDUINO_ARCH_ESP8266) || defined(MY_GATEWAY_MQTT_CLIENT) +#if defined(MY_GATEWAY_SERIAL) || defined(MY_GATEWAY_W5100) || defined(MY_GATEWAY_ENC28J60) || defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_MQTT_CLIENT) #define MY_GATEWAY_FEATURE #define MY_IS_GATEWAY (true) #define MY_NODE_TYPE "gateway" @@ -65,10 +65,6 @@ //#undef F //#define F(x) (x) #include "core/MyHwESP8266.cpp" - // Enable gateway feature - #if !defined(MY_CORE_ONLY) - #define MY_GATEWAY_ESP8266 - #endif #elif defined(ARDUINO_ARCH_AVR) #include "core/MyHwATMega328.cpp" #elif defined(ARDUINO_ARCH_SAMD) @@ -296,7 +292,7 @@ #include #if !defined(MY_CORE_ONLY) - #if defined(MY_GATEWAY_ESP8266) + #if defined(ARDUINO_ARCH_ESP8266) #include "core/MyMainESP8266.cpp" #else #include "core/MyMainDefault.cpp" diff --git a/libraries/MySensors/examples/GatewayESP8266/GatewayESP8266.ino b/libraries/MySensors/examples/GatewayESP8266/GatewayESP8266.ino index d85bd79..803eb7d 100644 --- a/libraries/MySensors/examples/GatewayESP8266/GatewayESP8266.ino +++ b/libraries/MySensors/examples/GatewayESP8266/GatewayESP8266.ino @@ -78,7 +78,6 @@ #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 -// Gateway mode always enabled for ESP8266. But we add this anyway ;) #define MY_GATEWAY_ESP8266 #define MY_ESP8266_SSID "MySSID" diff --git a/libraries/MySensors/examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino b/libraries/MySensors/examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino index 4aeb228..60d052e 100644 --- a/libraries/MySensors/examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino +++ b/libraries/MySensors/examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino @@ -71,6 +71,7 @@ //#define MY_RADIO_RFM69 #define MY_GATEWAY_MQTT_CLIENT +#define MY_GATEWAY_ESP8266 // Set this nodes subscripe and publish topic prefix #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out" diff --git a/libraries/MySensors/tests/Arduino/sketches/hard_signing_no_whitelisting_full_debug/hard_signing_no_whitelisting_full_debug.ino b/libraries/MySensors/tests/Arduino/sketches/hard_signing_no_whitelisting_full_debug/hard_signing_no_whitelisting_full_debug.ino new file mode 100644 index 0000000..a25d379 --- /dev/null +++ b/libraries/MySensors/tests/Arduino/sketches/hard_signing_no_whitelisting_full_debug/hard_signing_no_whitelisting_full_debug.ino @@ -0,0 +1,44 @@ +/* + * 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 + * 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. + * + ******************************* + */ +#define MY_DEBUG +#define MY_DEBUG_VERBOSE_SIGNING +#define MY_RADIO_NRF24 //!< NRF24L01 radio driver +//#define MY_SIGNING_SOFT //!< Software signing +#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A +//#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}} +#define MY_SIGNING_REQUEST_SIGNATURES +#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed +#define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached + +#include +#include + +void setup() { +} + +void presentation() { + // Present locally attached sensors here +} + + +void loop() { + // Send locally attached sensors data here +} diff --git a/libraries/MySensors/tests/Arduino/sketches/hard_signing_whitelisting_full_debug/hard_signing_whitelisting_full_debug.ino b/libraries/MySensors/tests/Arduino/sketches/hard_signing_whitelisting_full_debug/hard_signing_whitelisting_full_debug.ino new file mode 100644 index 0000000..7d0b9af --- /dev/null +++ b/libraries/MySensors/tests/Arduino/sketches/hard_signing_whitelisting_full_debug/hard_signing_whitelisting_full_debug.ino @@ -0,0 +1,44 @@ +/* + * 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 + * 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. + * + ******************************* + */ +#define MY_DEBUG +#define MY_DEBUG_VERBOSE_SIGNING +#define MY_RADIO_NRF24 //!< NRF24L01 radio driver +//#define MY_SIGNING_SOFT //!< Software signing +#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A +#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}} +#define MY_SIGNING_REQUEST_SIGNATURES +#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed +#define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached + +#include +#include + +void setup() { +} + +void presentation() { + // Present locally attached sensors here +} + + +void loop() { + // Send locally attached sensors data here +} diff --git a/libraries/MySensors/tests/Arduino/sketches/soft_signing_no_whitelisting_full_debug/soft_signing_no_whitelisting_full_debug.ino b/libraries/MySensors/tests/Arduino/sketches/soft_signing_no_whitelisting_full_debug/soft_signing_no_whitelisting_full_debug.ino new file mode 100644 index 0000000..9205ff6 --- /dev/null +++ b/libraries/MySensors/tests/Arduino/sketches/soft_signing_no_whitelisting_full_debug/soft_signing_no_whitelisting_full_debug.ino @@ -0,0 +1,44 @@ +/* + * 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 + * 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. + * + ******************************* + */ +#define MY_DEBUG +#define MY_DEBUG_VERBOSE_SIGNING +#define MY_RADIO_NRF24 //!< NRF24L01 radio driver +#define MY_SIGNING_SOFT //!< Software signing +//#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A +//#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}} +#define MY_SIGNING_REQUEST_SIGNATURES +#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed +#define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached + +#include +#include + +void setup() { +} + +void presentation() { + // Present locally attached sensors here +} + + +void loop() { + // Send locally attached sensors data here +} diff --git a/libraries/MySensors/tests/Arduino/sketches/soft_signing_whitelisting_full_debug/soft_signing_whitelisting_full_debug.ino b/libraries/MySensors/tests/Arduino/sketches/soft_signing_whitelisting_full_debug/soft_signing_whitelisting_full_debug.ino new file mode 100644 index 0000000..27588fe --- /dev/null +++ b/libraries/MySensors/tests/Arduino/sketches/soft_signing_whitelisting_full_debug/soft_signing_whitelisting_full_debug.ino @@ -0,0 +1,44 @@ +/* + * 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 + * 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. + * + ******************************* + */ +#define MY_DEBUG +#define MY_DEBUG_VERBOSE_SIGNING +#define MY_RADIO_NRF24 //!< NRF24L01 radio driver +#define MY_SIGNING_SOFT //!< Software signing +//#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A +#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}} +#define MY_SIGNING_REQUEST_SIGNATURES +#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed +#define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached + +#include +#include + +void setup() { +} + +void presentation() { + // Present locally attached sensors here +} + + +void loop() { + // Send locally attached sensors data here +}