Commit Graph
121 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
tekka 2994d83e53 RF24: Minor power optimization (#1069) 2018-04-04 20:48:36 +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
Marcelo Aquino b5a2fc226f Linux: RF24 interrupt trigger workaround (#1094)
Fix #870
2018-03-27 23:07:57 +02:00
Marcelo Aquino fb95a84e6f Linux: Minor log fix (#1092)
Use colored log messages only on the terminal.
2018-03-25 15:51:41 -03:00
Marcelo Aquino ea6d07cb79 Linux: Fix stability problem with ethernet (#1091)
- Fix a problem where mysgw stops working and consumes a lot of cpu.
- Fix bug with tcp sockets where socket descriptor wasn't being
  freed.
2018-03-24 08:16:44 +01:00
Marcelo Aquino 2175c993ef Linux: Use config file for gateway settings (#1061)
- 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
2018-03-23 11:00:34 +01:00
kvoit 3d093e6bed Fix default IRQ pins on ESP8266 that prevent MCU from boot (#1076)
* Derive default interrupt from configured instead of default pin

Derive DEFAULT_RFM69_IRQ_NUM from MY_RFM69_IRQ_PIN instead of
DEFAULT_RFM69_IRQ_PIN so that _NUM does not have to be defined
if _PIN is redefined

* Change default IRQ pin for RFM69/95 on ESP8266 to GPIO5=D1

The originally defined pin GPIO2 prevent ESP8266 from booting,
since it has to be pulled high for booting and DIO0 from the
RFM69 is defaul low.
For this reason, it is improbably that anyone is using the default
and would be affected by this change.
2018-03-08 17:56:22 +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 57eca4f4af Transport code harmonization (#1072) 2018-02-20 12:32:17 +01:00
tekka 345d6d7d11 Fix variable names, minor updates (#1071) 2018-02-19 13:26:14 +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
Mikael Falkvidd ca73ae20d6 Linux/SerialPort: Log success message (#1021)
This log message makes the Serial gateway print the serial port path,
similar to how the Ethernet gateway prints IP and port.

Example log output:
mysgw: Serial port /dev/MyCoolTTY (115200 baud) created
2018-01-07 14:52:08 +01:00
tekka 6434d2fa99 Linux: Fix null ptr exception (#1025) 2018-01-07 14:51:28 +01:00
tekka 292dc849cc RFM69: Fix compiler warnings (#1020) 2017-12-28 13:07:09 +01:00
d00616 e39b2be7af NRF5 ESB fix two states (#996) 2017-11-19 13:48:29 +01:00
d00616 aabddc841c NRF5 ESB fix Errata #78,#102,#106 (#995) 2017-11-18 17:02:38 +01:00
Mikael Falkvidd 1e3305959e BCM driver: include inttypes (#983)
This makes it possible to compile the Raspberry Pi gateway on
Raspbian 9 (stretch), even without adding
--extra-cxxflags="-D__STDC_FORMAT_MACROS"
(as was suggested in
https://github.com/mysensors/MySensors/issues/955 but was
insufficient for remediating this problem)

The compile problem was inadvertently introduced in
2d5404de9.

This change fixes the problem discussed in
https://github.com/mysensors/MySensors/issues/980
2017-11-17 21:16:01 +01:00
tekka d44ecd95dd RF24: Fix logical operator (#990) 2017-11-12 11:12:06 +01:00
tekka 3830c5dde0 RFM69: Add missing SPI namespace (#987) 2017-11-11 18:26:14 +01:00
tekka 4f0a4ee021 Use dedicated namespace for radio SPI (#985) 2017-11-11 15:59:54 +01:00
tekka d43c755508 Fix RFM95 reset (#982)
I've verified that the datasheet says to go low, and checked that the commit history does not indicate a reason for doing otherwise.
2017-11-10 18:23:36 +01:00
d00616 0042cd4bee NVM: consideration of SoftDevice memory layout (#977) 2017-11-07 21:54:00 +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 e2ac85afbb Reshuffle arch files (#974) 2017-11-06 21:24:38 +01:00
tekka b892aef6c3 Jenkins: Add STM32F1 support (#972) 2017-11-05 14:19:42 +01:00
tekka 1f07d7eafe Update debug message table (#965) 2017-10-30 20:22:50 +01:00
tekka e6cef8ba63 Implement RFM95 sanity check (#963) 2017-10-29 15:08:39 +01:00
d00616 8cb9b26920 NRF24 disable DYN_ACK support (#940) 2017-10-01 22:39:09 +02: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
Olivier 0ed558f1d0 Make debug prints portable (#929) 2017-09-17 20:54:20 +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
Marcelo Aquino d291a3661b RPi: Fix GPIO Layout detection (#895) (#906) 2017-08-12 08:58:02 -03:00
bilbolodz d17b9dd6f1 Added posibility to use non standard SPI Flash (#899)
Added possibility to tune flash commands and parameters
in case off use non standard SPI flash for OTA
2017-08-03 09:01:05 +02:00
Patrick Fallberg f3ab329ad3 Refactor the Doxygen structure (#880) 2017-07-31 18:42:26 +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
Mikael Falkvidd git@mjo.se b85c11c383 Move pubsubclient files to PubSubClient (case sensitive) 2017-07-24 15:01:20 +02:00
Mikael Falkvidd a941827157 Use bool instead of boolean in drivers (#888)
In the Arduino IDE, boolean is an alias for bool.
The Arduino IDE might deprecate boolean in the future. See
https://github.com/arduino/Arduino/issues/4673 for details.

Command:
find drivers -type f | xargs sed -i 's/boolean/bool/g'
2017-07-05 16:23:27 +02:00
Olivier 4820475e5c NRF5: Enable critical section (#879) 2017-06-13 18:49:14 +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
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
Olivier 60aab1b87b Fix ext. EEPROM update() (#866) 2017-05-27 21:13:30 +02:00
Olivier b5595e870d Teensy3: Define default radio pins (#857) 2017-05-21 22:22:01 +02:00
Olivier b74805251e Fix RFM69 driver (#855) 2017-05-21 21:39:44 +02:00
Marcelo Aquino fb3d936d4c Linux: Binds to MY_IP_ADDRESS in client mode (#849) 2017-05-21 14:27:22 +02:00
Olivier b479a0cf3f Support for Teensy3 boards (#850) 2017-05-21 08:43:26 +02:00
Olivier e041bf4d74 NRF5: Updates for Jenkins verifier (#852) 2017-05-21 08:41:11 +02:00