This commit changes the way random numbers are available
with MySensors.
The AVR platform uses a 32 Bit random seed build from a floating
analog pin. The way of the generation of this seed is FIPS 140-2
compliant.
For support MCU with a fast way to generate random data, the
hwGetentropy() command is now available to allow rapid generation
of random data.
The ESP8266 platform uses the internal random source for randomness
for hwGetentropy() and Arduino's random() function.
The NRF5 platform initializes the pseudo random number generator
from internal hardware number generator. The internal AES-ECB unit
generates random data after filling with HWRNG data by AES-CBC.
On Linux getrandom() is implemented via syscall().
signerAtsha204SoftGetNonce speed:
AVR = ~14000us (sha204Soft)
NRF51 = ~152us (AES-CBC), 1739us (old sha204Soft)
NRF52 = ~31us (AES-CBC), 183us (old sha204Soft)
ESP8266 = ~20us (RANDOM_REG32), 380us (old sha204Soft)
All Nonce results tested for FIPS 140-2 compliance successfully.
* Add NVRAM support
This is an EEPROM replacement based on MCU's internal Flash memory.
The NVRAM class is designed to be stateless. Each operation is
written to flash immediately.
The last 16k(nRF51)/32k(nRF52) of Flash memory are managed by the
VirtualPage class. This class allows writing a single emulated 4k
page up 40,000 times.
The NVRAM class is a log based byte-wise storage allowing up to
40,000,000 writes depending on the number of used addresses. Each
four allocated addresses from the beginning of the NVRAM reduce the
write log by one.
When first 256 bytes of the emulated storage are used, there is an
average writing capacity of 145,000 cycles per byte.
When the write log is full, the NVRAM is compressed into a new flash
page. After a new page is ready, the old page is released. This
process can take up to 4500 ms and cannot be interrupted.
The NVRAM functionality can easily be ported to ESP8266 or SAMD by
providing a Flash interface.
* Add NRF5 platform support
This is the support of the Nordic Semiconductor NRF51 (nrf51822,
nrf51422) and NRF52 (nrf52832) platform. Based on arduino-nRF5
(https://github.com/sandeepmistry/arduino-nRF5).
The included radio driver is compatible with the NRF24 devices.
Using a SoftDevice (BLE)is not supported and must be removed before
flashing MySensors with a "mass_erase" operation.
- use MY_SERIALDEVICE in hwInit
- disable use of MY_SERIALDEVICE.flush() since the current STM32duino
implementation performs a reset instead of an actual flush.
The previous code would clear the proper interrupt flag assuming
interrupt1 was INT0 and interrupt2 was INT1. If interrupt1 was INT1 or
interrupt2 was INT0, the sleep bug would be triggered.
Round requested sleep time up to next multiple of 16ms, to sleep at
least requested time.
Sleep time of 0 will return immediately.
Fixed watchdog sleep time calculation. AVR libc watchdog time
implementation is inconsistent, and requires larger flash/ram usage.
* 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)
* Fix spi flash error when compiling in Arduino IDE 1.6.6
* Bump minor version
* Fixed "invalid suffix on literal" warning
* Fix addressing bug in _doSign bitfield
* 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.
* 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.
* Backport of bugfix (#259) in repeaters when forwarding signed messages
* Bumped version to 1.5.2
* Corrected doSign variable name (was _doSign)
* Bumped version to 1.5.3
* Add NULL termination to payloads
Messages addressed to "this" node, will have a null char
appended to the payload after message verification is
done, because some "getters" assume the message being a
string.
RPi and Linux refactor.
Add GPIO Sysfs for GPIO operations.
Update configure script.
Fix some cppcheck warnings.
Add serial emulation that prints to stdout.
Fix some file headers.