Commit Graph
100 Commits
Author SHA1 Message Date
Patrick Fallberg e086ba3203 Merge pull request #486 from tekka007/ESPCoreFix
Update MyMainESP8266 to compile with ESPlib 2.3.0
2016-06-28 19:00:10 +02:00
Patrick Fallberg 27ecc89773 Merge pull request #482 from fallberg/signing
Signing troubleshooting guide in Doxygen
2016-06-24 00:09:02 +02:00
Patrick Fallberg 0379330569 Update documentation with signing troubleshooting 2016-06-21 20:45:26 +02:00
Patrick Fallberg 012de4496f Added some RF-related debug prints in signing code
If a failed transmsission is detected, a debug print will give
a hint to why the signing session fails.
2016-06-21 20:34:57 +02:00
Patrick Fallberg 22ce382046 Update README.md
Doxygen links added and a nice headline for the CI statuses
2016-06-20 23:13:25 +02:00
Patrick Fallberg ea0e30683a Merge pull request #477 from tekka007/StaticENUMS
Define static enums in MyMessage
2016-06-20 20:35:00 +02:00
Patrick Fallberg 385d441d0e Merge pull request #474 from tekka007/SigningImprovement
Speedup signing presentation phase
2016-06-14 07:17:19 +02:00
Patrick Fallberg 1336da125b Merge pull request #472 from tekka007/SigningFix
Fix sending buffer in MySigning.cpp
2016-06-12 23:01:08 +02:00
Patrick Fallberg cd5c243f7b Handle inbound and outbound nonces simultaneously
Two separate buffers are used for nonce storage. One for the
nonce used for signing a message and one for the nonce used
for verifying a message.
2016-06-12 15:37:45 +02:00
Patrick Fallberg a0615b53a2 Make test sketches only set IO if not set in board
If a specific board is picked, some IO will be preconfigured
and should not be overridden by a sketch.
2016-06-12 15:37:45 +02:00
Patrick Fallberg 0a8aaedf8b Optimize ATSHA204 respose times
Instead of shutting down the ATSHA between calls in a session,
it is put in idle state. This removes the need for a full resync
when the device is woken and that saves time which translate to
a quicker turnaround time for signed messages with HW signing.
To save power, it is still shut down when not in use.
2016-06-12 15:37:45 +02:00
Patrick Fallberg a5b0e8d8bb Purge ATSHA204 backend of c++ code
There is no need for class structures in the atsha low-end driver.
Removing this saves both code space and compilation time.
2016-06-12 15:37:45 +02:00
Patrick Fallberg b01282c7c7 Improve nonce generation in signing backends
For atsha204, update seed every time and only extract
the full 32-byte random value once.
For both atsha204 and soft backends, XOR all random bytes
with hwMillis() in order to "whiten" the random value a bit.
2016-06-12 15:37:45 +02:00
Patrick Fallberg 6498354546 Merge pull request #470 from tekka007/FixIndication
Fix MyIndication definitions
2016-06-12 15:32:04 +02:00
Patrick Fallberg 4509df40dd Merge pull request #464 from Yveaux/development
Added power metering variables
2016-06-08 21:12:04 +02:00
Patrick Fallberg 585150c46d Add and use timing neutral memcmp for signing
Fixes #443
2016-05-22 18:34:00 +02:00
Patrick Fallberg 99084ec98d Add destination parameter to signingPresentation
In order to allow a node to send signed messages to another node
the signingPresentation function can be called to make a
node2node presentation of signing preferences.
It is up to the sketch developer to make sure updated signing
preferences are communicated accordingly.
2016-05-03 11:03:59 +02:00
Patrick Fallberg 41a9f4cf28 Merge pull request #397 from fallberg/encryptiontests
Added NRF24 and RFM69 encryption to Jenkins tests
2016-03-06 22:12:29 +01:00
Patrick Fallberg 235aa218dc Merge pull request #401 from tbowmo/samd
Interrupt pins was not configured correctly for RFM69
2016-02-17 21:54:12 +01:00
Patrick Fallberg 0d72bf2260 Fix complation error for NRF24 encryption 2016-02-16 10:10:22 +01:00
Patrick Fallberg 2d93722692 Merge pull request #399 from tbowmo/samd
Adapts RFM69 to be used with SAMD
2016-02-16 09:45:13 +01:00
Patrick Fallberg 53ea022035 Fix complation error for RFM69 encryption 2016-02-16 09:45:12 +01:00
Patrick Fallberg 21beab382b Added NRF24 and RFM69 encryption to Jenkins tests
Also cleaned up the other Jenkins test sketches.
2016-02-16 09:45:12 +01:00
Patrick Fallberg 1f27c3dd36 Update library.json version to 1.5.4 2016-02-07 13:08:21 +01:00
Patrick Fallberg 350bf568fb Merge pull request #386 from mysensors/add-optional-before-method
Add before() for initialisations before radio hogs SPI
2016-02-06 21:01:55 +01:00
Patrick Fallberg 72a40d69df Merge pull request #388 from mysensors/turn-off-access-point-on-wifi-mqtt
Turn off access point when running ESP8266 MQTT client
2016-02-06 21:01:39 +01:00
Patrick Fallberg 24aba671c1 Merge pull request #387 from mysensors/fix-udp-compile-problems
Fix compile problems when enabling UDP
2016-02-06 19:52:37 +01:00
Patrick Fallberg 5be0e2e3b5 Merge pull request #365 from ivankravets/patch-2
Fix version to stable
2016-02-02 16:14:49 +01:00
Patrick Fallberg 7de2764d2d Node lock feature
When activated, suspicious signing related activities will eventually
cause the node to lock down and transmit a I_LOCKED message to the
gateway at 30m intervals.
Unlocking is done by grounding a pin or erasing the EEPROM.
See Doxygen for details on use.
Fixes #280
2016-01-29 11:41:53 +01:00
Patrick Fallberg 4c3d700d87 Merge pull request #375 from mysensors/bring-old-prs-up-to-date
Bring old prs up to date
2016-01-28 10:28:12 +01:00
Patrick Fallberg 15167d69e8 Support building test sketches for ESP8266 2016-01-20 22:29:38 +01:00
Patrick Fallberg 4a5c0f9314 Make ESP8266 sketches explicitly declare GW
In order to build core tests, there cannot be any hard coded
GATEWAY flags (like MY_GATEWAY_ESP8266). These needs to be set
in the sketch that implements the gateway.
2016-01-20 22:07:45 +01:00
Patrick Fallberg 94c7f4451e Resolved Doxygen warnings relating to signing 2016-01-20 22:04:19 +01:00
Patrick Fallberg 842d575fc5 Implemented signing test sketches
These will automatically be built for every PR by Jenkins.
The test sketches in this commit evaluates signing (hard/soft) and
whitelisting (on/off). Full verbose signing debug is enabled.
RF24 radio is also enabled.
2016-01-20 20:51:58 +01:00
Patrick Fallberg 5a16cf0b5e Merge pull request #359 from fallberg/doxygen
Cleaned up Doxygen warnings
2016-01-20 01:06:50 +01:00
Patrick Fallberg dcb5cc9928 Cleaned up Doxygen include graphs 2016-01-19 23:56:28 +01:00
Patrick Fallberg 0f55969ace Cleaned up Doxygen warnings in library drivers 2016-01-19 23:56:27 +01:00
Patrick Fallberg 877cac266f Cleaned up Doxygen warnings in examples 2016-01-19 23:56:27 +01:00
Patrick Fallberg 5853cf5fe0 Cleaned up Doxygen warnings in libraries/MySensors/drivers/AVR 2016-01-19 23:56:26 +01:00
Patrick Fallberg 44b52f10be Cleaned up Doxygen warnings in MyConfig.h 2016-01-19 23:56:26 +01:00
Patrick Fallberg 0683709506 Cleaned up Doxygen warnings in libraries/MySensors/core 2016-01-19 23:56:25 +01:00
Patrick Fallberg 92f6585a90 Merge pull request #358 from fallberg/sign-fix
Make sure signing presentation data is sent correctly
2016-01-19 23:46:40 +01:00
Patrick Fallberg 6b6e829f93 Make sure signing presentation data is sent correctly
The message sender was retrieved from the message buffer after
prepareSigningPresentation() was called. This function resets
the message buffer so that is not the proper way to do it. Now,
the message sender is extracted first in signerProcessInternal()
in order to avoid the value being overwritten later on.
2016-01-19 09:17:18 +01:00
Patrick Fallberg f6d482d4ce Merge pull request #333 from Kolbi/patch-2
Update HumiditySensor.ino
2016-01-15 11:16:39 +01:00
Patrick Fallberg e966366968 Merge pull request #339 from tbowmo/samd
Fixes problem with MY_LED_BLINKING_FEATURE being enabled on all builds
2016-01-13 20:53:30 +01:00
Patrick Fallberg 1f365342c2 Merge pull request #342 from marcovannoord/development
Use the internal pullup to be able to hook up this sketch directly to S0 meters
2016-01-13 19:08:57 +01:00
Patrick Fallberg 74a54267d2 Merge pull request #305 from fallberg/signing_refactoring
Signing improvements
2016-01-12 17:08:43 +01:00
Patrick Fallberg c52d2cd643 All software security related data moved to EEPROM
The Sha204Personalizer has been converted to a SecurityPersonalizer.
It takes care of generation and storage of keys and data to both
ATSHA204A and nonvolatile storage (EEPROM).
Library has been updated to read any software security related data
from the corresponding EEPROM locations.

The effect this has is that any node using any security feature has to
execute the personalizer at least once to store appropriate values.
The benefit of this is that the software no longer contain sensitive data
such as HMAC or AES keys.
Whitelists still are stored in software as they are variable in size.
2016-01-12 10:26:58 +01:00
Patrick Fallberg 3bf9184670 Removed signing identifier from nonces
It serves no practical use to have signing identifier in nonces
as nonces are architecture independent.

Fixes #318
2016-01-12 08:43:11 +01:00
Patrick Fallberg 58dbc2ad27 MY_DEBUG_VERBOSE_SIGNING flag implemented
This enables more verbose debug information for signing operations.

Fixes #319
2016-01-12 08:43:10 +01:00
Patrick Fallberg ff015dd373 Signing whitelisting rewritten
Whitelisting is now supported by all nodes that support signing,
while only nodes that define a whitelist with
MY_SIGNING_NODE_WHITELISTING will check signatures against a whitelist.
This allows a single node in a network to have a whitelist without require
all nodes that communicate it to be configured for whitelisting. The node
will publish its whitelisting preferences to the gateway together with its
signing preferences. In other words; whitelisting is now working as signing
requirements does.
A node that use whitelisting will reject any message (signed or unsigned)
from nodes not present in its whitelist.

Fixes #279
2016-01-12 08:41:55 +01:00
Patrick Fallberg 5ecf146f15 Sha256 calculator for library use
The signing infrastructure now supports calculating sha256.
This feature does not require signing support to be activated.
Fixes #315
2016-01-12 08:41:54 +01:00
Patrick Fallberg 02fbe536d4 Signing infrastructure refactored
Signing logic has now been centralized to MySigning.cpp in order to simplify
maintenance and debugging.
Debug prints have been extended and "demoted" to verbose level.
To get signing related debug info, MY_DEBUG_VERBOSE will need to be defined.
This fixes #278
2016-01-12 08:41:54 +01:00
Patrick Fallberg b64f676316 Merge pull request #325 from tekka007/ClearConfig
HW-independent ClearEepromConfig, substitutes #314
2016-01-11 23:41:00 +01:00
Patrick Fallberg 91985beb9d Bumped version to 2.0.0-beta
Considering the magnitude of the delta between master and
development branch currently, 2.0.0-beta apperas to be a
more realistic version than 1.6.0-beta.
2016-01-10 12:52:07 +01:00
Patrick Fallberg cee1dd3a4e Merge pull request #323 from tbowmo/samd
LED HW definitions in arduino HW files overridable
2016-01-07 23:43:59 +01:00
Patrick Fallberg 3e0e4d601b Merge pull request #327 from Br3nda/patch-1
spelling correction in esp8266 example sketch
2016-01-07 15:45:22 +01:00
Patrick Fallberg 7ee39509eb Merge pull request #321 from Mickaelh51/development
Add Oregon decoder library
2016-01-04 23:03:29 +01:00
Patrick Fallberg ebf183c3cf Merge pull request #311 from tbowmo/samd
Samd
2016-01-03 23:35:32 +01:00
Patrick Fallberg 62f522a065 Prevent SecureActuator from accepting ACKs as commands
As ACKs are not currently signed, allowing ACKs as commands
is a considerable security hole for this sketch. This is now resolved.
2015-12-16 10:54:05 +01:00
Patrick Fallberg ca4358591d Make sure nodes not supporting signing informs GW
A node that does not support signing, still needs to inform the
gateway about this to make sure the gateway carries a valid signing
requirement table when a node Id that was requiering signing stops
doing this.
This fixes #286.
2015-12-16 10:53:53 +01:00
Patrick Fallberg 68e8c2438e Better output directory handling in doxygen 2015-12-11 12:35:18 +01:00
Patrick Fallberg ce36a087fa Adjusted MySigning documentation slightly based on feedback 2015-12-11 00:40:03 +01:00
Patrick Fallberg 313bcf05f8 Added some more docs for MyMessage 2015-12-11 00:40:03 +01:00
Patrick Fallberg 5142cdc936 Documentation styling made a bit more "MySensorish" 2015-12-11 00:40:03 +01:00
Patrick Fallberg 6bfe853709 Added doc default style templates and activated graphing 2015-12-11 00:40:03 +01:00
Patrick Fallberg 941503b24f Divided public and private/internal modules
Public modules can be declared as normal. Internal modules should
have @ingroup internals after the group definition.
2015-12-11 00:40:03 +01:00
Patrick Fallberg a69f2889bf Better file documentation for the MySigning group 2015-12-11 00:40:03 +01:00
Patrick Fallberg f34ed5466e Added documentation extension mapping for INO files 2015-12-11 00:40:03 +01:00
Patrick Fallberg 9f0a348fbf Removed obsolete Doxyfile tags 2015-12-11 00:40:02 +01:00
Patrick Fallberg 9d7a2fd6e3 Documented signing related functionality 2015-12-11 00:40:02 +01:00
Patrick Fallberg cc544909ce Doxygen warnings cleanup
But made sure that any undocumented parts generates a warning
2015-12-11 00:40:02 +01:00
Patrick Fallberg e9971285a5 Initial Doxyfile commit
Project named "MySensors Library & Examples"
Index root is libraries/MySensors with recursive search
No LaTeX generation
Documentation/html added to .gitignore
2015-12-11 00:40:02 +01:00
Patrick Fallberg 36dcf2b5b6 Let prints on GW:s be up to MY_GATEWAY_MAX_SEND_LENGTH large 2015-11-30 14:16:58 +01:00
Patrick Fallberg 8280479724 Removed requirement for payload data for signed messages 2015-11-27 13:53:10 +01:00
Patrick Fallberg f6e018f5e3 Fixed bug in repeaters when forwarding signed messages
For repeated messages, sign flag must not be touched.
2015-11-19 09:28:36 +01:00
Patrick Fallberg cec516bc7e Added support for private configuration data
libraries/MySensors/core/MyPrivateConfig.h.sample contain an example for
how private configuration data can be organized.
Rename that file to MyPrivateConfig.h and place it in the same folder
as the sketch you want to build and include it in order to add private
settings that you for various reasons do not want to store in git:
Make sure to place this include before

All MyPrivateConfig.h files are ignored by git.
2015-11-17 14:04:55 +01:00
Patrick Fallberg 7cacb7d4fe Activated OTA in SensebenderMicro example by default 2015-11-16 22:14:26 +01:00
Patrick Fallberg 8a134f4a89 Refactored signing backend debug prints
Signing backend debugs are now controlled by the MY_DEBUG flag.
This also means that on serial gateways, signing related debug
messages are forwarded to the controller with the appropriate
MySensors header information.
2015-10-29 09:13:57 +01:00
Patrick Fallberg d793b5a089 Changed library version to comply with Semantic Versioning
New version: 1.6.0-beta for development of 1.6.0.
See http://semver.org
2015-10-28 10:55:24 +01:00
Patrick Fallberg 3c4ebbe310 Fixed bug in nonce exchange
Nonce-state machine got locked in SIGN_OK state.
2015-10-27 18:56:07 +01:00
Patrick Fallberg e75e735a10 Signing related fixes
* Secure actuator example now require signed messages by default
* Whitelisting config example in MyConfig.h now uses correct keywords
* keywords.txt updated with the actual whitelisting keyword
* Signing backends have improved debug output
  - The type of backend is presented in Get and Put nonce functions
  - The resulting signature is printed for both sender and receiver
* Fixed bug in soft signer (the untransmitted part of the nonce buffer was
  not the same in both ends)
* The ATSHA personalizer is updated to use acceptable syntax for user provided
  HMAC key
2015-10-26 22:15:42 +01:00
Patrick Fallberg 921b9fd3fc Forward declare all inline functions
This seem to be mandatory for newer Arduino IDE versions.
2015-09-24 10:45:46 +02:00
Patrick Fallberg a33e9cce48 Added preprocessor definitions to MySensors AVR boards
This allows the MySensors AVR boards (SenseBender) to be built with
upcoming versions of the Arduino IDE.
2015-09-22 23:25:43 +02:00
Patrick Fallberg a6e13bb4f1 Added build badges for the nightly builds of "future" Arduino IDE 2015-09-09 11:48:22 +02:00
Patrick Fallberg 255a8d821c Fixed "invalid suffix on literal" warning 2015-09-08 23:41:33 +02:00
Patrick Fallberg 33ddd161d5 Include utility/SPIFlash.h in SensebenderBlink.ino 2015-08-15 18:46:16 +02:00
Patrick Fallberg b7e4d23902 Merge master into development 2015-08-15 18:28:22 +02:00
Patrick Fallberg 21166528f8 Removed warnings in parkingsensor example 2015-08-13 23:10:16 +02:00
Patrick Fallberg e6a25ebb6b Renamed illegaly named sketches so they can be built
Also fixed the warnings in RGB-3D.ino
2015-08-13 17:43:18 +02:00
Patrick Fallberg 2b2a0ce294 Fixed various sketch-specific warnings 2015-08-09 10:06:10 +02:00
Patrick Fallberg af6e5d3019 Resolved various compiler warnings
This should make Jenkins happy.
2015-08-09 10:06:09 +02:00
Patrick Fallberg 997cb33226 Allow MySensor specific boards to be compiled with warnings enabled
This commit enables the Arduino IDE to configure MySensor specific
boards with more verbose warnings just as official Arduino boards.
2015-08-08 00:18:41 +02:00
Patrick Fallberg 99cec3bb16 Support Arduino MEGA boards for RFM69 interrupt config 2015-08-07 21:09:23 +02:00
Patrick Fallberg 4aee5bd448 Demoted #error to #warning in SecureActuator.ino 2015-08-07 15:16:47 +02:00
Patrick Fallberg 1049246a88 Make sure SPI backend is initialized in SPIFlash driver
In some cases, SPIFlash driver hangs during initialization
because it reads data from the SPI backend. But if SPI backend
has not been initialized, this fails.
2015-06-20 13:39:30 +02:00
Patrick Fallberg f8281302eb Fixed software signing whitelisting example in SecureActuator
The software serial is now provided to the backend as it should be.
2015-03-18 22:31:14 +01:00
Patrick Fallberg 6fb7266752 Removed 'new' from PinChangeInt library
As a consequence, only one pin is currently suppored.
AddPin will not really add a new pin, just replace the configuration
of the existing pin.

The motivation for this limitation is that 'new' costs a lot of
program memory.
2015-03-16 23:15:55 +01:00
Patrick Fallberg 6fd26880a2 Made "Inclusion started by button" a DEBUG message
In other words, the message will only be printed if DEBUG flag is enabled.
2015-03-16 23:15:55 +01:00
Patrick Fallberg 70eac0423d Added config flag MY_SIGNING_FEATURE in MyConfig.h
By disabeling MY_SIGNING_FEATURE all signing logic in the library
will be removed.
2015-03-16 23:15:54 +01:00