Merge pull request #364 from fallberg/test-sketches
Implemented signing test sketches
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 <Arduino.h>
|
||||
|
||||
#if !defined(MY_CORE_ONLY)
|
||||
#if defined(MY_GATEWAY_ESP8266)
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
#include "core/MyMainESP8266.cpp"
|
||||
#else
|
||||
#include "core/MyMainDefault.cpp"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
+44
@@ -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 <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.
|
||||
*
|
||||
*******************************
|
||||
*/
|
||||
#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 <SPI.h>
|
||||
#include <MySensor.h>
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
void presentation() {
|
||||
// Present locally attached sensors here
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// Send locally attached sensors data here
|
||||
}
|
||||
+44
@@ -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 <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.
|
||||
*
|
||||
*******************************
|
||||
*/
|
||||
#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 <SPI.h>
|
||||
#include <MySensor.h>
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
void presentation() {
|
||||
// Present locally attached sensors here
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// Send locally attached sensors data here
|
||||
}
|
||||
+44
@@ -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 <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.
|
||||
*
|
||||
*******************************
|
||||
*/
|
||||
#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 <SPI.h>
|
||||
#include <MySensor.h>
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
void presentation() {
|
||||
// Present locally attached sensors here
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// Send locally attached sensors data here
|
||||
}
|
||||
+44
@@ -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 <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.
|
||||
*
|
||||
*******************************
|
||||
*/
|
||||
#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 <SPI.h>
|
||||
#include <MySensor.h>
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
void presentation() {
|
||||
// Present locally attached sensors here
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// Send locally attached sensors data here
|
||||
}
|
||||
Reference in New Issue
Block a user