Commit Graph

46 Commits

Author SHA1 Message Date
Frantisek Repkovsky
27849cbc88 Fix mysgw configure script and building RFM69 gw on 64-bit OS (#1552)
* Fix configure script errors on 64-bit OS (#1550)

Use only gcc flags relevant to aarch64 for 64-bit RPI SoCs on 64-bit
OS version

* Fix mysgw build errors on 64-bit OS (#1551)

Force data type for the parameter of min() function to avoid conflicts
2023-10-13 20:52:35 +02:00
Vita
423b9d790a ROCK Pi 4 (RK3399) support (#1499)
* ROCK Pi 4 (RK3399) support

* Code style
2022-04-18 08:21:14 +02:00
Mikael Falkvidd
263ea26363 Mysgw configure: Exit on illegal parameters (#1519)
The user probably made a mistake. Let the user correct the mistake
before continuing.

Ref: https://github.com/mysensors/MySensors/issues/1518

Example output after this change:
$ ./configure --my-transport=laser
[SECTION] Detecting target machine.
[OK] machine detected: SoC=unknown, Type=unknown, CPU=x86_64.
[SECTION] Checking GPIO Sysfs.
  [WARNING] /sys/class/gpio/export not found.
[SECTION] Detecting SPI driver.
  [WARNING] No supported SPI driver detected. Using SPIDEV.
[SECTION] Gateway configuration.
  [OK] Type: ethernet.
[ERROR] Invalid transport type laser.
$ ./configure --my-mqtt-username=user
[ERROR] Unknown option detected: --my-mqtt-username=user
2022-04-07 14:16:05 +02:00
Olivier
409b079b69 RPI: Add support for RPI4 (#1364) 2019-11-23 09:59:14 +01:00
Mikael Falkvidd
3a4544bae1 Add CXXFLAGS to configure output (#1305)
Printing the CXXFLAGS might help people notice when they are
not including all parameters on one line.

Printing of CPPFLAGS was added in cd4acb2b8.
2019-07-13 09:56:26 +02:00
Mikael Falkvidd
ac18b0266a Append instead of overwrite CXXFLAGS (#1304)
This should fix https://github.com/mysensors/MySensors/issues/1303
2019-07-13 09:56:04 +02:00
Olivier
a1282f358a Code maintenance (#1279)
* Code maintenance

* Code maintenance
2019-04-20 16:22:12 +02:00
Marcelo Aquino
1c33609556 Fix SPIDEV on Armbian Stretch (#1200)
Fix #1195
2018-09-04 07:59:32 +01:00
tekka
6ffe29cb5f Code maintenance (#1186) 2018-08-22 20:50:16 +02:00
Jeeva Kandasamy
c8d951d3df Update #1184, RFM69 frequency band support for India (#1185) 2018-08-21 19:31:10 +02:00
Mikael Falkvidd
d0d0ee7e5e Add CPPFLAGS to configure output (#1168)
Printing the CPPFLAGS might help people notice when they are
not including all parameters on one line.
2018-08-06 19:15:47 +02:00
Marcelo Aquino
b84cd6ac4e Linux: Add rfm95 configure options (#1135) 2018-06-16 19:19:32 +02:00
Patrick Fallberg
bbaa9399d6 Add software AES encryption to RFM95 transport HAL (#1054)
Also clean up capabilities flags a bit and fix test-sketch
for rfm95 to use proper encryption flag.
2018-05-30 00:09:24 +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
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
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
adfd9f36f1 Generate Doxygen from configure (#952)
* Generate Doxygen from configure

Use case: view the ./configure help text on the web.
This has been requested in
https://forum.mysensors.org/post/77751

Manually putting the help text in the forum or on mysensors.org
would lead to diverging documentation, no version management and
extra maintenance burden. This commit attempts to auto-generate
the documentation and use existing Doxygen infrastructure to
add the help text to the rest of the MySensors documentation.
2017-10-27 18:39:25 +02:00
Marcelo Aquino
d291a3661b RPi: Fix GPIO Layout detection (#895) (#906) 2017-08-12 08:58:02 -03: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
Marcelo Aquino
14766382d3 Linux: Default SPI driver set to SPIDEV (#847) 2017-05-16 08:00:24 +02:00
Marcelo Aquino
95f719b604 Linux: Fix interrupt handler (#835)
Minor fix to configure.
2017-05-11 15:20:57 +02:00
Marcelo Aquino
66ff5b2880 Linux: Add support for RFM69 (#823) 2017-04-19 22:40:21 +02:00
Marcelo Aquino
4c31e22d6f Restructure RPi files (#827)
- Restructure SPi files for linux and RPi
- Update RPi revision detection (#826)
2017-04-19 22:03:10 +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
Marcelo Aquino
72926527be Linux: Configure script update (#797)
Incorporates #756
- Documentation improvements.
- Fix bash warning.
2017-03-21 19:42:58 +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
Marcelo Aquino
62b74bb88a RPi: Improve board revision detection (#681)
Revision detection is done at runtime, the configure script has been
simplified to reflect this.
2016-12-07 21:17:59 +01:00
Bram Oosterhuis
0fe9df1a77 Buildroot integration possible using autotools
* Add option to not install a init script

* Added autotools default install prefix

* Add autotools ${DESTDIR} to the install paths

* Add option to specify platform type
2016-12-03 13:25:25 -02:00
Marcelo Aquino
c23b7d563e RPi: Add signing and encryption to configure (#655) 2016-11-24 21:25:14 +01:00
Marcelo Aquino
9ef1df5407 RPi: Fix RFM95 build (#654) 2016-11-24 15:59:01 +01:00
Marcelo Aquino
330a910f3d RPi: Improve build process
Add option to set an external arduino libraries directory.
All libraries from this folder will be compile and available for use
in the gateway.
Some Arduino libraries can be used on Linux/RPI with minor adjustments,
but there are some that will have to be completely rewritten.

The build process uses a separate folder for objects and binary files
which can be set by the user.

Initialize the bcm2835 inside a class constructor to fix cases where
pin operations are used before hwInit().

Fix SPI pins default values.

Fix activation interrupt functions.

Fix some headers.

Rename gateway binary and services to mysgw.
2016-11-19 11:49:18 -02:00
Marcelo Aquino
7a969670ac RPi: Add warning msg for deprecated option 2016-10-21 17:17:28 -02: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
Marcelo Aquino
0a9351988f Update configure script
Add options to set status leds.

Support controller ip address separated by dots.

Fix controller url address option set.
2016-09-30 17:12:52 -03:00
Marcelo Aquino
fab2112f9b Use mysensors built-in nrf24 library for RPi 2016-09-14 23:26:12 -03:00
Marcelo Aquino
4175a5f423 Cleanup configure script 2016-09-09 14:02:24 -03:00
Marcelo Aquino
09103e9c04 Add run time options to RPi gateway 2016-09-08 15:56:37 -03:00
Marcelo Aquino
b4f4e28545 Add support for PTY to RPi serial gateway 2016-09-03 12:39:37 -03:00
Marcelo Aquino
f0c5a993d5 Fix Rpi config file corruption
* Add uninstall to Makefile
2016-08-22 21:26:44 -03:00
Marcelo Aquino
412e41967f Add support for serial gateway to Rpi 2016-08-21 21:01:26 -03:00
Marcelo Aquino
cb8c98431e Fix compilation errors for MQTT gateway 2016-08-19 13:45:51 -03:00
Marcelo Aquino
b8d4a6a943 Improve build process for Linux 2016-08-17 23:42:27 -03:00
Marcelo Aquino
14e5c9bf4c Fix RX message buffering for Rpi 2016-08-16 15:37:51 -03:00
Marcelo Aquino
c4b2a809aa Move init system detection to configure 2016-08-16 13:43:17 -03:00
Marcelo Aquino
6b756335d0 Refactor RaspberryPi port 2016-08-16 13:42:51 -03:00