Commit Graph

38104 Commits

Author SHA1 Message Date
Jukka Laitinen 6cae4c92e7 Add a header to logfile encryption key exchange file
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 9a4ef709ca Add parameters for configuring the logfile encryption
SDLOG_ALGORITHM for selecting the crypto algorithm
SDLOG_KEY for selecting the key in keystore to use with the algorithm.
  for symmetric algorithms which are currently supported, this is just a free
  slot to be used, the key is generated at logging start
SDLOG_EXCH_KEY for selecting an RSA2048 key for encrypting the SDLOG_KEY

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 1687cab56c FMUv5: Add a build target for crypto interface testing, px4_fmu-v5_cryptotest
To avoid messing with existing targets, and to automatically set the test keys
for the keystore.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen ce76380051 Add a simple script to decrypt ulog files
This now only decrypts xchacha20 encrypted logs, where keys are
exchanged with rsa_oaep_sha256 and nonce appended to the end of the
key

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 9472f79307 Take crypto interfaces into use in logger, to encrypt ulog data
- Generate a symmetric encryption key and a nonce value
- Use a public key in keystore to encrypt the symmteric key
- Write the encrypted key and the nonce value to disk into .ulgk, name matching with the encrypted log file
- use quick stream encryption to crypt the .ulg file contents

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 6b22fe99b7 Globally define -DPX4_CRYPTO when the board defines some crypto backend
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 3db76d88fe Add crypto key generation functions
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 4c6779812d Add keystore_put_key interface function for storing keys permanently
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen fc2668cba1 Add encryption function for the crypto_backend and px4_crypto
Take into use libtomcrypt library to add RSA and some other algorithms
for SW ecnryption use case

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 634d911b74 Add a test key for RSA2048
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen 40063bd54b Add libtomcrypt and libtommath submodules
These provide e.g. rsa_oaep, which can be used for sw crypto

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen be4f7cabf9 Add compilation of nuttx_crypto
NuttX has lots of usable functionality for crypto, such as rng with entropy pool

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen d36a91ceaf Add generic px4 interface for crypto features
Add common functions, implemented for nuttx, and link to architecture specific libraries

Make a separate library to wrap nuttx random number generator as "os_random".

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen aa61bc4942 Add functions for initializing empty crypto backend handles
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Julian Oes 9290ea974e commander: allow force disarming
Allows to do commander disarm -f to disarm no matter what.
2021-09-27 09:58:03 -04:00
Daniel Agar 333f539900 mavlink: add simple incoming message stats to status 2021-09-27 09:48:00 -04:00
PX4 BuildBot feff564882 Update submodule jMAVSim to latest Mon Sep 27 00:38:51 UTC 2021
- jMAVSim in PX4/Firmware (592885480e): 0a5375a706
    - jMAVSim current upstream: 0a5a8c6d9d
    - Changes: 0a5375a706...0a5a8c6d9d

    0a5a8c6 2021-09-02 Julian Oes - Merge pull request #130 from PX4/pr-udp-connection
2590b24 2021-09-01 Julian Oes - UDPMavLinkPort: add debug output around wait
7255b28 2021-08-31 Julian Oes - src: enable UDP connection in client and host mode
2021-09-27 08:05:48 +02:00
Daniel Agar 592885480e boards: ark_can-gps_debug disable perf to save flash 2021-09-26 12:29:11 -04:00
Daniel Agar 9a3fa6199b uorb top report total publication rate 2021-09-26 12:29:11 -04:00
Julian Oes e81214a22f mavlink: avoid double trigger using sequence
By adding the sequence number we can avoid double triggering due to
command retransmissions. This is according to the mavlink spec for
MAV_CMD_IMAGE_START_CAPTURE.
2021-09-25 20:18:07 -04:00
bresch 76615f8df3 VTOL: set HTE horizontal speed sensitivity threshold low 2021-09-25 20:07:28 -04:00
bresch 904ed57aba HTE: decrease sensitivity with speed
VTOL planes are getting lift from the wing when flying in MC mode at
high speed. They (and some other drones) also get extra drag when
climbing and descending at high speed, corrupting the hover thrust
estimate.

To avoid this, two speed thresholds (vertical and horizontal) are defined
above which the sensitivity of the estimator is decreased by linearly
increasing the observation noise.
2021-09-25 20:07:28 -04:00
achim c67d943158
boards: mro_ctrl-zero-h7-oem board.h fix SPI5 (#18294)
- fix spi pin missmatch PF9=GPIO_SPI5_MOSI_2
2021-09-25 20:05:18 -04:00
Daniel Agar e4b0fa25a2 systemcmds/tests: remove px4io conv test 2021-09-25 19:15:05 -04:00
Beat Küng 1b0bfd6381 dataman: remove nonexisting SYS_RESTART_TYPE param 2021-09-25 19:15:05 -04:00
Daniel Agar 089c962d92 px4io: moving mixing to FMU side
Using mixers on the IO side had a remote benefit of being able to
override all control surfaces with a radio remote on a fixed wing.
This ended up not being used that much and since the original design
10 years ago (2011) we have been able to convince ourselves that the
overall system stability is at a level where this marginal benefit,
which is not present on multicopters, is not worth the hazzle.

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-09-25 19:15:05 -04:00
PX4 BuildBot f772b0f45d Update submodule sitl_gazebo to latest Sat Sep 25 12:38:57 UTC 2021
- sitl_gazebo in PX4/Firmware (e800e7c27663ae0a08ae1e377cbccd2272657ad0): 53d606b32f
    - sitl_gazebo current upstream: d8366bf238
    - Changes: 53d606b32f...d8366bf238

    d8366bf 2021-09-19 Mohamed ElDewany - Fix gazebo plugin for laser sensor
37a3a64 2021-09-16 Julian Oes - camera: fix stream URI
2561ff0 2021-09-01 Julian Oes - mavlink_interface: enable HITL over UDP
9216dab 2021-09-01 Julian Oes - mavlink_interface: remove poll before writing
8e9eb3f 2021-09-01 Julian Oes - mavlink_interface: clean up switch case
a009174 2021-09-01 Julian Oes - mavlink_interface: use flag from mavlink_interface
6f1243a 2021-09-01 Julian Oes - mavlink_interface: remove redundant inline keyword
2021-09-25 11:56:50 -04:00
David Sidrane f01cab3be1 px4io:Ensure proper lifecycle of registration of cdev 2021-09-24 19:01:54 -04:00
Igor Mišić 9ad0e5b357 mavlink_receiver: updated sens flow parameters to be dynamically handle 2021-09-23 09:23:22 +02:00
Beat Küng e73172b537 hrt: remove hrt_elapsed_time_atomic
There's no protection on posix
2021-09-23 09:23:08 +02:00
Beat Küng 6f902e54f9 mavlink: correctly lock radio status
- hrt_elapsed_time_atomic is not atomic on posix
- other fields like _radio_status_mult need protection as well
2021-09-23 09:23:08 +02:00
Beat Küng 0bfb1a983b px4iofirmware: avoid using hrt_elapsed_time_atomic
It's only ever read and written in controls_tick() after startup
2021-09-23 09:23:08 +02:00
Beat Küng eec94965f2 serial: add pixhawk payload bus option 2021-09-23 09:23:08 +02:00
Igor Mišić 682db4b8ac dshot: timeout if commands are not processed 2021-09-23 09:22:49 +02:00
bresch e53d2907d7 AutoSmoothVel: adjust controller constraints in emergency braking
When engaging auto mode at high vertical speed, we don't want to cut the velocity
trajectory setpoint in order to create a smooth deceleration.
2021-09-23 09:22:32 +02:00
bresch 316e0dfeb5 AutoLineSmoothVel: add emergency braking mode
Currently only for the Z axis. If the current downward velocity is more
than twice the maximum allowed value, the emergency braking mode is
activated. In this mode, a higher vertical acceleration and jerk is used
until the vehicle stops moving.
2021-09-23 09:22:32 +02:00
Igor Mišić 92696b589f sdp3x: stop continuous measurement while reconfig 2021-09-23 09:22:09 +02:00
Igor Mišić 3a148bc777 camera_trigger: remove camera trigger secondary
camera_trigger: publish trigger when capture feedback is not enabled
2021-09-23 09:21:56 +02:00
Hamish Willee f41e5985e8 vehicle_local_position: clarify origin of system 2021-09-22 10:14:23 +02:00
Thomas Debrunner 43ece74fa0 ina238: Do not expose raw adc config to user, make specific to ina238 2021-09-22 10:02:17 +02:00
Thomas Debrunner b8d0bb44c4 ina23X: Support for ina23X power monitors 2021-09-22 10:02:17 +02:00
Daniel Agar cf5da66e9f Jenkins: hardware disable gyro auto cal and FFT before running tests 2021-09-21 19:13:30 -04:00
Daniel Agar 87db18c1a0 Jenkins: hardware don't allow board cleanup commands to fail build 2021-09-21 19:13:30 -04:00
Daniel Agar a92e44c90e Tools/HIL/run_nsh_cmd.py: echo success cmd twice to avoid missing dropouts 2021-09-21 19:13:30 -04:00
Julian Oes faca2b17d0 camera_trigger: only get param if available 2021-09-17 12:23:30 +02:00
Daniel Agar 7af5a33ff3 commander: don't play failsafe tune if disarmed 2021-09-16 09:17:00 -04:00
Matthias Grob ecb1264832 vscode: do not disable autocomplete on enter 2021-09-16 09:11:52 -04:00
Julian Oes c779946e05 setup: Use available Java version for Ubuntu 20.04
14 was not available for me, 16 would have been.
2021-09-16 13:59:27 +02:00
Julian Oes addb978364 setup: Let's not ignore errors
Otherwise the script finishes and you don't know if it worked.
2021-09-16 13:59:27 +02:00
Daniel Agar 3d56836850
boards: nxp_fmurt1062-v1 disable extra barometers to save flash 2021-09-15 12:59:36 -04:00