- The following settings can be use on the config file:
- verbose=[debug,info,notice,warn,err] - Logging verbosity.
- log_file[0|1] - Enable logging to a file.
- log_filepath=(FILE) - Log file path.
- log_pipe=[0|1] - Enable logging to a named pipe(aka fifo).
Use this option to view your gateway's log messages from the
log_pipe_file (defined below).
To do so, run the following command on another terminal:
- $ cat "log_pipe_file"
- log_pipe_file=(FILE)
- syslog=[0|1] - Enable logging to syslog.
- eeprom_file=[/etc/mysensors.eeprom]
- eeprom_size=[1024]
- Change some mysgw parameters:
- Added:
- -q, --quiet: for quiet mode, disable log messages written to the
terminal.
- Removed:
- -d, --debug: removed, log messages are now enabled by default.
- Replaced:
- -b, --background: replaced by --daemon
- isatty() is no longer used, log messages by default are printed to
stderr unless the gateway is started with --quiet (#1022)
- MY_LINUX_CONFIG_FILE: no longer holds the path to the eeprom file,
but to the configuration file
* New Firmware OTA for NVM/mcuboot (nRF5)
- Support for mcuboot (nRF5)
- Support for run length encoded data
- Support for smaller FIRMWARE_BLOCK_SIZE, if required
* Update NVM
* New MY_LOCK_MCU for NRF5
* Test with Sensebender GW + Sensebender Micro was successful
- The symlink name for the PTY device is set using --my-serial-port
making --my-serial-pty deprecated
- Replace MY_LINUX_IS_SERIAL_PTY with MY_LINUX_SERIAL_IS_PTY
- MY_DEBUGDEVICE can be used to print debug messages from MySensors
(as it is currently in the other architectures)
- Rename SerialSimulator class to StdInOutStream
- Remove old deprecated option --my-radio
MY_SIGNING_SIMPLE_PASSWD is now
called MY_SECURITY_SIMPLE_PASSWD.
MY_SIGNING_SIMPLE_PASSWD only affects signing,
and a new flag, MY_ENCRYPTION_SIMPLE_PASSWD
only affects encryption.
MY_SECURITY_SIMPLE_PASSWD enable both these flags.
The rPi port has been improved to support more
security settings and it is now also possible to
enable encryption for RFM69 transport.
Documentation has been improved to provide a
"Security" section under "Library customisation"
which has a table that summarize all security
related configuration flags, and the corresponding
rPi configuration flags.
The signing personalization documentation has been
updated to include the procedure for rPi.
Fixes#1055
* Add MY_DEBUGDEVICE to redirect debug output
MY_DEBUGDEVICE, if defined, will replace MY_SERIALDEVICE
for the purpose of printing debug messages. This only
applies to debugging.
Jenkins has been updated with new jobs that scan and execute
Jenkinsfiles. These Jenkinsfiles encapsulates all logic for building
and validating the commits in both pull requests and merged pull
requests.
Filestructure is as follows:
.ci/Jenkinsfile - This is the main Jenkinsfile that handles normal
pull request builds as well as merged pull request
post-validation.
Any repository in the MySensors GitHub organization
can implement this file and Jenkins will pick up
and execute it automatically.
.ci/Jenkinsfile-nightly - This perform merged pull request
post-validation using the nightly builds of
the Arduino IDE to provide early compliancy
status of the MySensors library for
upcoming releases of the Arduino IDE
.ci/ - This folder contain all the auxiliary scripts executed by the
Jenkinsfiles as well
Fixes#934
* Fix NRF5_ESB_readMessage, allways enable radio
* NRF5: fixes and improvements
- Compiles with arduino core for nRF52 (primo)
MY_RADIO_NRF5_ESB stays unsupported with primo!
- Split ACK negation flag into
MY_NRF5_ESB_REVERSE_ACK_TX
MY_NRF5_ESB_REVERSE_ACK_RX
- MY_RADIO_NRF5_ESB changes to act more than NRF24
- MY_RADIO_NRF5_ESB better support for powerdown/standby
- Moved initialization from MyMainNRF5 to hwInit()
Even with MY_DISABLED_SERIAL defined, the linker is still adding the
Serial object to the binary.
That's because a) the MySensors *.cpp files are actually included
into the sketch and compiled as part of it (and not compiled
separately and then linked) and b) due the the default(?) behavior of
the linker (https://github.com/arduino/Arduino/issues/4579).
* Signing support with MAX_PAYLOAD>32
Support in the signing backends to handle configurations
where MAX_PAYLOAD is more than 32 bytes.
Fixes#748
* Support big message signatures
Support for signing messages larger than 32 bytes.
This is not fully testable with the current version of
the library but the change would add theoretical support
for signing any sized messages.
Fixes#749
* Have gw properly indicate whitelisting preferences
If the gateway hold a signing whitelist, inform all
nodes of this requirement and not just nodes that hold
whitelists themselves.
Fixes#806
* Harden security
The flag MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL
has been removed. Gateway will now request signatures
from everyone by default.
In addition to this, no nodes in the network will allow
clearing of signing/whitelisting preferences by OTA
commands by default.
If the old behaviour is needed (suitable for gradual
signing roll out and development purposes) a new flag,
MY_SIGNING_WEAK_SECURITY can be set.
Fixes#807
* Signing debug messages rewritten
All signing related debug has been rewritten to
better match other core debug printouts.
Also, backends are updated to have a smaller
implementation delta.
* Simplified signing option implemented
Enable by MY_SIGNING_SIMPLE_PASSWD. Signing, and signing requirements
will be enabled, as will encryption. Whitelisting is optional.
The value provided to MY_SIGNING_SIMPLE_PASSWD is used as HMAC and AES
key. Whitelists use the first 8 bytes of the password and the ninth
byte from the node ID as serial.
Password is required to be at least 8 characters wide. It is zero
padded if it is not long enough to cover the AES (16 bytes) and HMAC
(32 bytes) keys. It is not recommended to have a password shorter than
32 bytes, and there is no need for a password longer than 32 bytes.
* Add documentation section for signing debug
* Add nRF5 encryption to simple signing option
* Restructure MySigning documentation
* Minor fixes for Linux
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.