Commit Graph
68 Commits
Author SHA1 Message Date
d00616 fe42dbdcca Nvm fota (#1018)
* 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
2018-02-28 20:03:34 +01:00
tekka a0af38a0d8 RFM69: Updates and optimizations (#1049)
* RFM69: Updates and optimizations

* RFM69: Updates and optimizations
2018-02-18 21:06:28 +01:00
tekka 0bc3ac9cb3 RFM95: Updates and optimizations (#1063) 2018-02-18 21:05:25 +01:00
Marcelo Aquino 54fb250ab2 Linux: Serial minor update (#1053)
- 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
2018-02-13 13:22:27 +01:00
Patrick Fallberg 8a1f5f4cf9 Revamp the simple password flag and rPi fixes (#1056)
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
2018-02-11 11:22:48 +01:00
Mikael Falkvidd 467b7e000a Add MY_INCLUSION_LED_PIN (#1030)
Thanks to @TokTias for this idea and a starting point for the code.

This PR replaces https://github.com/mysensors/MySensors/pull/1029
2018-01-23 10:26:01 +01:00
tekka af3452f91c Correct misspells (#1028) 2018-01-11 22:26:08 +01:00
tekka 1feae06d7f SignalReport disabled by default (#1027) 2018-01-11 07:46:43 +01:00
rejoe2 b148d828ad Add MY_RS485_SOH_COUNT option (#1014) 2017-12-18 16:57:53 +01:00
tekka a9c49f0210 Harmonize debug outputs (#1002) 2017-12-05 04:03:39 +01:00
Lee Nelson bfcb125e72 Add MY_DEBUGDEVICE to redirect debug output (#1006)
* 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.
2017-12-03 19:34:58 +01:00
d00616 aabddc841c NRF5 ESB fix Errata #78,#102,#106 (#995) 2017-11-18 17:02:38 +01:00
Patrick Fallberg 1f8d810ff4 Add documentation for MyCapabilities (#989)
Also fixed spelling error in the MySigning documentation.

Fixes #902
2017-11-13 12:34:50 +01:00
d00616 1b1cf8ff9c Nrf5 improvements (#938)
* 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()
2017-09-30 22:55:55 +02:00
d00616 8412a3d360 New OTA debugging and logging feature (#913) (#913) 2017-09-18 20:58:44 +02:00
Patrick Fallberg 9e5a1e32cb Correct NRF24 PA levels docs (#924)
Fixes #907
2017-09-14 10:49:58 +02:00
Olivier 067519c500 Fix sanity check option (#923) 2017-09-07 18:10:55 +02:00
Patrick Fallberg f3ab329ad3 Refactor the Doxygen structure (#880) 2017-07-31 18:42:26 +02:00
Olivier 10ef62307b MySensors splash screen (#889) 2017-07-24 21:42:44 +02:00
Krister W 8f58b18e1a I2C EEPROM support for OTA using dual Optiboot #802 (#834)
* Added support for I2C EEPROM OTA

* EEPROM OTA now uses extEEPROM as driver

* Compiler warning fix

* Style check fixes

* Fix doxygen warnings of I2CEeprom

* Use bool instead of boolean in I2CEeprom shim

* Fix re-merged style problem
2017-07-24 21:32:47 +02:00
Marcelo Aquino 28c4f3f19e Signing improvements package (#871)
* 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
2017-05-31 17:13:29 +02:00
d00616 726a20dad9 Add nrf5 platform (#830)
* 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.
2017-05-14 11:53:01 +02:00
Olivier 818f887926 Polishing code (#803) 2017-04-02 20:03:59 +02:00
Olivier b132a8a81e Transport update (#722)
* Major transport rework

* Adjust signal report calculations

* Minor driver optimizations

* Implement sanity check in legacy RFM69 driver

* Additional RFM69 rework

* RFM95 encryption

* Polishing
2017-03-28 20:31:08 +02:00
Olivier cde5d8f7c3 Add STM32F1 HW support (#795) 2017-03-25 20:01:31 +01:00
Dustin ef42b3b534 MQTT Client Retain Feature (#793)
Optionally allow MQTT client to publish specific messages with
the retain flag set.

default/current behavior should not be impacted.
2017-03-21 14:47:07 +01:00
Olivier 61a415c422 Code cleanup (#787)
* Cleanup Core

* SAMD adjustments
2017-03-15 19:05:17 +01:00
Olivier 4380d6618f Workaround for AVR-specific compiler issue (#759) 2017-02-01 20:45:42 +01:00
Marcelo Aquino 2e0f6b6229 Linux: Add support for SPIDEV (#734)
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.
2017-01-14 23:50:21 +01:00
Olivier 61e6cecb3f Fix regression, adjust parameters, typos (#699) 2016-12-20 23:15:11 +01:00
Patrick Fallberg 8e1ef13804 Repo restyled using astyle (#683)
The rules are in .tools/astyle/config/style.cfg
and can also be reviewed at
https://www.mysensors.org/view/260#coding-guidelines-core-library
2016-12-07 23:44:29 +01:00
Patrick Fallberg ea65c5b150 Move Doxyfile to repository root (#674)
This makes most tools/plugins for Doxygen work without
much adjustment.
Also resolved some Doxygen warnings.
2016-11-29 11:18:49 +01:00
tekka007 aff8deb8bf Merge development 2016-11-24 21:01:08 +01:00
Patrick Fallberg 45b671457d Coding style related changes (#653)
* 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
2016-11-24 16:43:04 +01:00
Olivier 37b7885c7e Merge development & additional optimizations 2016-11-20 21:09:00 +01:00
Henrik Ekblad 9037924f06 Merge pull request #621 from tekka007/TransportRFM95
Implement RFM95 transport layer
2016-11-16 20:40:34 +01:00
tekka007 ba80a7e7b1 Core optimizations 2016-11-14 22:53:30 +01:00
Olivier 144c7b9d2f Implement RFM95 transport layer 2016-11-14 21:33:11 +01:00
Olivier 58e9d5864f Merge development 2016-11-14 12:34:31 +01:00
Olivier 92cbd2ac8f Allow node to enter loop() if transport is NOK 2016-11-14 12:24:27 +01:00
Olivier c6ff9122b4 Harmonize definition ins core (#628) 2016-11-05 09:50:18 +01:00
Marcelo Aquino 76dea1532c RPi: Add support for RS485 transport
Remove serial print from MyTransportRS485.cpp to increase speed.
2016-10-21 09:01:37 -02:00
Patrick Fallberg afd7b7abbb Add MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL flag
This flag, when set in a gateway sketch will make the gateway
require all nodes to sign messages sent to it.
2016-10-18 22:02:19 +02:00
tekka007 a31eff112e Merge development branch 2016-10-01 14:04:33 +02:00
Marcelo Aquino 9f798994fe Merge branch 'development' into dev-raspberrypi 2016-09-29 22:40:33 -03:00
tekka007 f148a9940b Various MyTransport optimisations p2 2016-09-26 00:00:25 +02:00
tekka007 efc71165c7 Various MyTransport optimisations 2016-09-25 12:46:58 +02:00
Henrik Ekblad 75a100f4e9 Merge pull request #570 from marceloaqno/development-serialmode
Add ESP8266 Serial modes
2016-09-20 09:12:01 +02:00
Henrik Ekblad e89e411571 Merge pull request #558 from tekka007/SleepRework
Redesign sleep() functions
2016-09-19 21:35:54 +02:00
tekka007 a6cdec2008 Redesign sleep() functions
- unified sleeping function _sleep(), including smartSleep
- prevent sleeping if transport is not ready
- add debug log messages
2016-09-19 19:17:08 +02:00