* Removed ability to lock data section
* Introduced "guided mode" to simplify process
* Refactored the sketch to be less monolithic
* Print details and instructions in tables
* Use device unique ID as serial when
* Calculate and store personalization checksum
* Print serial in a copy+paste friendly manner (fixes#804)
* Clarify meaning of UART confirmation (fixes#805)
It now supports both Linux and Windows and checks
both coding style (astyle) and does static code
analysis (cppcheck).
Tested using "Bash on Ubuntu on Windows" and the
git shell (via GitHub for Windows).
Installation is done by executing hooks/install-hooks.sh
Windows users has to execute it in a cygwin based git shell.
Tools:
astyle (2.05.1 or newer)
cppcheck (1.76.1 or newer)
* Add .astylerc with the core coding standard
* Added pre-commit git hook
The hook currently only checks code format using
astyle and will not permit commits which cause
astyle to change the contents of any source file
in the commit.
This is useful to have automatic coding standard
verification done without having to wait for
Jenkins to react to a pull request.
Installation:
Linux:
ln -s ../../tools/hooks/pre-commit.sh .git/hooks/pre-commit
Windows:
copy tools\hooks\pre-commit.sh .git\hooks\pre-commit
* Added editorconfig and updated gitattributes
Unix style line endings are now default.
* Resolved doxygen warning
* Made delay waiting for GW to transmit signing preferences apply
also if signing is disabled since nodes always sends a signing
presentation, and GW always replies with it's own presentation.
This can cause message collition if the node at the same time
proceed with other presentation messages.
* Made the signing backend "consume" signing presentation
messages sent by GW when signing is disabled. These messages
should not be forwarded to the "user".
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.
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.
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.
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
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.
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.
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.
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.
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
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
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.
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.
Project named "MySensors Library & Examples"
Index root is libraries/MySensors with recursive search
No LaTeX generation
Documentation/html added to .gitignore
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.