Commit Graph
221 Commits
Author SHA1 Message Date
tekka eaf1b9452b ESP32: Support HW (#865)
This fixes https://github.com/mysensors/MySensors/issues/968
2018-04-07 14:46:01 +02:00
Marcelo Aquino 3c0b2727a5 Linux: Support keys in config file (#1093)
- Signing and encryption keys are set through the configuration file.
- SoftEeprom update.
2018-04-04 20:43:13 +02:00
thucar 4d90c00f98 MY_GATEWAY_TINYGSM support. GSM gateway using a modem module (#1097)
Added TinyGSM driver and GatewayGSMMQTTClient example
2018-04-04 16:40:11 +02:00
Patrick Fallberg eb839464b8 Development version 2.3.0-alpha (#1073) 2018-03-04 17:49:51 +01:00
tekka c805f77f20 AVR: Fix OTA logging (#1074) 2018-03-01 20:27:07 +01:00
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 b51981ab3d Fix MY_CORE_ONLY: Initialize HW (#1070) 2018-02-20 12:32:03 +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
tekka dea0fd50ca Fix smartSleep() (#1060) 2018-02-10 18:49:31 +01:00
Mikael Falkvidd 8fbdca4452 Doxygenize MyMessage / Message manipulation (#1035)
* Fix cppcheck issues

Fixes the following cppcheck issues:
examples/SecretKnockSensor/SecretKnockSensor.ino
305	variableScope	398	style
The scope of the variable 'timeDiff' can be reduced.

examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino
127	variableScope	398	style
The scope of the variable 'led_state' can be reduced.

* Doxygenize MyMessage / Message manipulation

This should replace the static documentation at
http://korturl.nu/stupid

I have enabled existing comments and added new comments where
necessary. Feedback on syntax and contents is welcome.
2018-01-30 20:47:11 +01:00
Patrick Fallberg 52ac498eda Development version 2.2.1-alpha (#1043) 2018-01-25 22:52:57 +01:00
Mikael Falkvidd git@mjo.se 64be32a19a MySensors 2.2.0 release 2018-01-24 20:56:53 +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 b51c77b2bf Update doxygen (#1024) 2018-01-01 12:55:06 +01:00
tekka d557cb3d34 Doxygenize MyGatewayTransport (#1023) 2018-01-01 12:13:18 +01:00
tekka 26232da4d8 MySensors 2.2.0-rc.2 (#1000) 2017-12-06 23:04:22 +01:00
tekka a80879e056 Fix FOTA updates with smart sleep (#999) 2017-12-06 23:02:57 +01:00
tekka a9c49f0210 Harmonize debug outputs (#1002) 2017-12-05 04:03:39 +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
Mikael Falkvidd a23ab14494 Clarify TSM:ID:FAIL message (#984)
As discussed in
http://korturl.nu/gitler-is-a-stubborn-bastard-1
and numerous other forum threads, many people don't understand
that id generation is done by the controller.

Many new users start out their first MySensors network with a
gateway, a single sensor node and no controller. Since MySensors
defaults to AUTO node id, the node gets stuck on TSM:ID:FAIL,
like this:
TSM:ID
TSM:ID:REQ
TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
TSM:ID
TSM:ID:REQ
TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
TSM:ID
TSM:ID:REQ
TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
TSM:ID
TSM:ID:REQ
TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
!TSM:ID:FAIL

This change adds a clarifying note about the controller in the
doxygen documentation.
2017-11-11 10:41:09 +01:00
Patrick Fallberg 2d5404de97 CppCheck cleanup (#975)
* Add support for inline cppcheck suppressions
* Clean out all known cppcheck issues
* Terminate toll-gate on found cppcheck issues
2017-11-07 20:37:36 +01:00
tekka 9663d4c6b7 Harmonize type definitions (#970) 2017-11-04 14:38:33 +01:00
tekka 1f07d7eafe Update debug message table (#965) 2017-10-30 20:22:50 +01:00
tekka a00857a8c2 Update Debug message tables (#962) 2017-10-29 10:19:09 +01:00
Olivier a190034305 MySensors 2.2.0-rc.1 (#959) 2017-10-28 14:35:06 +02:00
Olivier 571947ced9 Minor splash screen tweak (#958) 2017-10-28 13:19:49 +02:00
Mikael Falkvidd 3ebeb4fea1 Add MY_ESP8266_BSSID parameter (#953)
To use this feature, add the following to a sketch, for example
GatewayESP8266MQTTClient:
  const uint8_t bssid[] = {0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00};
  #define MY_ESP8266_BSSID bssid

This feature was requested in
https://github.com/mysensors/MySensors/issues/947
2017-10-27 18:52:21 +02:00
d00616 3ca9b56380 Fix uninitialized state handling (#939) 2017-10-01 09:41:36 +02:00
Olivier 9ee837199e MyCapabilities: Add missing arch identifiers (#936) 2017-09-22 10:55:25 +02:00
Olivier f5dce5b61b Disable splash screen on GW (#931) 2017-09-19 14:33:55 +02:00
d00616 8412a3d360 New OTA debugging and logging feature (#913) (#913) 2017-09-18 20:58:44 +02:00
Olivier 0ed558f1d0 Make debug prints portable (#929) 2017-09-17 20:54:20 +02:00
Olivier 973b4b8423 Fix compiler warning (#922) 2017-09-05 19:35:13 +02:00
Olivier d74e9bd212 Autogenerate release versions (#920) 2017-09-04 22:37:50 +02:00
Patrick Fallberg df34c00118 Skip check personalization with simple passwd flag (#915)
Personalization does not need validation if the simple password
security flag is set.

Fixes #914
2017-08-29 09:32:23 +02:00
Olivier b10cf85eb0 Revert VER removal from CP string (#905) 2017-08-01 08:13:06 +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
Patrick Fallberg 3e75b52c33 Fixed indentations using astyle (#890) 2017-07-07 14:36:14 +02:00
Patrick Fallberg 4ea0c88ac8 Rewrite security personalization data validation (#885)
* Data is not validated on Linux systems
* If encryption is enabled, data is also validated even if signing
  is disabled.
2017-07-04 15:49:57 +02:00
Rainer Clasen ff0953dd05 Add progmem support for String messages (#875)
added variant of MyMessage::set and sendSketchInfo that accept a
string that's stored in PROGMEM.

This avoids the need to (temporarily) store strings in memory to get
them into a message.
2017-06-21 23:41:48 +02:00
Marcelo Aquino 95d7c003cb Fix UDP on Ethernet gateway (#858)
- Fix UDP send
- Add a default value for MY_IP_GATEWAY_ADDRESS and
  MY_IP_SUBNET_ADDRESS, making them optional when using MY_IP_ADDRESS
- Add support for MY_IP_GATEWAY_ADDRESS and MY_IP_SUBNET_ADDRESS to
  W5100
2017-06-13 22:59:01 +02:00
Rainer Clasen 59337b19fe Memory optimizations in signing (#874)
* Sha256 driver cosmetics

cosmetic cleanups:
- use actual define that was used to allocate the array
- remove unused file globals

* Save memory by eliminating sha256_hash array

eliminated sha256_hash array to save memory. Instead pass the
Sha256Class result pointer.

There seems to be no use for the extra sha256_hash array as it was
zeroed exactly at the same time, the Sha256Class result was invalidated
(by calling signerSha256Init)

If the result needs to stay around while another sha is calculated,
it's better to have the user taking care of this.

* Moved hmac methods and buffers to separate class

This allows saving the buffer memory if no hmac is needed ... eg. with
the public Signing API.
2017-06-07 08:25:56 +02:00
Patrick Fallberg 29fd6d6345 Let signing backend validate personalization (#873)
For soft signing, let backend handle checksum verification of
personalization data. This ensures that the backends sha256 library is
used and avoids an unnecessary instanitation of the public library.
For atsha204 signing, no checksum verification is made, just chip
locking flags.

Fixes #872
2017-06-06 09:51:37 +02:00
d00616 e6925f69e8 Update more usage of hwGetentropy() (#869)
* Update more usage of hwGetentropy()

* Add hwGetentropy() to Teensy 3.5/3.6
2017-06-03 21:58:40 +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 4c0661e410 Fix NRF5 radio encryption (#868) 2017-05-29 22:25:43 +02:00
Marcelo Aquino fb3d936d4c Linux: Binds to MY_IP_ADDRESS in client mode (#849) 2017-05-21 14:27:22 +02:00