Commit Graph

47 Commits

Author SHA1 Message Date
Jonathan Bennett
74afd13171
Re-implement PKI from #1509 (#4379)
* Re-implement PKI from #1509
co-authored-by: edinnen <ethanjdinnen@protonmail.com>

* Set the key lengnth to actually make PKI work.

* Remove unused variable and initialize keys to null

* move printBytes() to meshUtils

* Don't reset PKI key son reboot unless needed.

* Remove double encryption for PKI messages

* Cleanup encrypt logic

* Add the MESHTASTIC_EXCLUDE_PKI option, and set it for minimal builds. Required for STM32 targets for now.

* Use SHA-256 for PKI key hashing, and add MESHTASTIC_EXCLUDE_PKI_KEYGEN for STM32

* Fix a crash when node is null

* Don't send PKI encrypted packets while licensed

* use chIndex 8 for PKI

* Don't be so clever, that you corrupt incoming packets

* Pass on channel 8 for now

* Typo

* Lock keys once non-zero

* We in fact need 2 scratch buffers, to store the encrypted bytes, unencrypted bytes, and decoded protobuf.

* Lighter approach to retaining known key

* Attach the public key to PKI decrypted packets in device memory

* Turn PKI back off for STM32 :(

* Don't just memcp over a protobuf

* Don't PKI encrypt nodeinfo packets

* Add a bit more memory logging around nodeDB

* Use the proper macro to refer to NODENUM_BROADCAST

* Typo fix

* Don't PKI encrypt ROUTING (naks and acks)

* Adds SecurityConfig protobuf

* Add admin messages over PKI

* Disable PKI for the WIO-e5

* Add MINIMUM_SAFE_FREE_HEAP macro and set to safe 1.5k

* Add missed "has_security"

* Add the admin_channel_enabled option

* STM32 again

* add missed configuration.h at the top of files

* Add EXCLUDE_TZ and RTC

* Enable PKI build on STM32 once again

* Attempt 1 at moving PKI to aes-ccm

* Fix buffers for encrypt/decrypt

* Eliminate unused aes variable

* Add debugging lines

* Set hash to 0 for PKI

* Fix debug lines so they don't print pointers.

* logic fix and more debug

* Rather important typo

* Check for short packets before attempting decrypt

* Don't forget to give cryptoEngine the keys!

* Use the right scratch buffer

* Cleanup

* moar cleanups

* Minor hardening

* Remove some in-progress stuff

* Turn PKI back off on STM32

* Return false

* 2.5 protos

* Sync up protos

* Add initial cryptography test vector tests

* re-add MINIMUM_SAFE_FREE_HEAP

* Housekeeping and comment fixes

* Add explanatory comment about weak dh25519 keys

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-08-10 13:45:41 -05:00
Ben Meadors
eb6bd3a06f
Update NimBLE to 1.4.2 (#4163) 2024-06-22 08:49:55 -05:00
Mike
f138eaa970
Fix original esp32 boot init panic (#3985)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-05-30 10:59:10 -05:00
Mike
0c9da9aec7
Update platformio/espressif32 to the latest 6.7.0 (#3899)
* Bump platfomio/espressif32 version to latest 6.7.0

* Fix deprecated constants

* Remove pin defs already defined by the framework

* ESP_EXT1_WAKEUP_ALL_LOW is deprecated for any target except esp32

* Enable LTO and use newlib nano flavor

* Make trunk happy

* Respect build_unflags of base env

* Recover float printfing

* Disable BLE_SM_PAIR_AUTHREQ_SC

* Distribute BLE_SM_PAIR_KEY_DIST_ID too

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-05-21 21:02:09 -05:00
David Ellefsen
30d4c3a945 Updates for esp32s2 build 2024-04-22 11:01:13 +02:00
Jonathan Bennett
e174328de3
Native Webserver (#3343)
* Added WebServer/WebServices for Native Linux Meshtastic and web gui

* Fix bug in login functionality

* Added customized config of portdunio.ini with LovyannGFX from marelab repro

* Compile Problem resolved with developer version of LovyanGFX.git

* Compile against dev version

* Fixes to fit into main branch

* Update variant.h, main.cpp, .gitignore, WebServer.cpp, esp32s2.ini, WebServer.h, ContentHandler.cpp, rp2040.ini, nrf52.ini, ContentHelper.cpp, Dockerfile, ContentHandler.h, esp32.ini, stm32wl5e.ini

* Added linux pi std /usr/include dir

* Adding /usr/innclude for Linux compile against native libs that are not hadled by platformio

* Review log level changes & translation

* Update Dockerfile

* Fix Typo & VFS ref. Part1

* Fix Typo & VFS ref.

* Dev Version for ulfius web lib

* Update platformio.ini

* Free VFS path string

* Remove unintended changes

* More unintentional changes

* Make the HTTP server optional on native

* Tune-up for Native web defaults

* Don't modify build system yet

* Remove more unneeded changes

---------

Co-authored-by: marc hammermann <marchammermann@googlemail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2024-03-06 16:23:04 -06:00
Thomas Göttgens
add78a459b Include Libpax - WIP 2023-12-17 18:30:38 +01:00
Thomas Göttgens
72b4fe51b1 radiolib is stable
just use one definition for all targets
2023-12-04 11:33:32 +01:00
Thomas Göttgens
6fa026a78b fix radiolib API for 6.3.0 release 2023-11-30 10:59:01 +01:00
Jonathan Bennett
bd2675caf1 Temporarily Pin RadioLib to 6.2.0 2023-11-29 20:19:10 -06:00
Ric In New Mexico
6d211815d9
Temp fix for S3 bluetooth (#2809)
Need to roll back espressif to v6.3.2
2023-09-18 14:26:19 +02:00
Ben Meadors
fcf798df98
Experiment with moving gps init (#2780)
* Move it move it

* Moving to the end of the main setup method

* NimBLE version
2023-09-07 16:01:35 -05:00
Ben Meadors
fb23e479ac
Update ESP32 platform (#2770) 2023-09-04 20:20:20 -05:00
Jonathan Bennett
c44986127e
More GPS work (#2711)
Increase GPS buffer on esp32
Check for and flush GPS buffer when overfilled and corrupted.

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-08-12 09:29:44 -05:00
Manuel
ad5de5a724
increase BT NIMBLE task stack size by 1k (#2618) 2023-07-17 06:23:27 -05:00
Ben Meadors
97606cd382
New platform updates (#2593) 2023-07-07 18:58:49 -05:00
Ben Meadors
9e2b86b92c
Bump RadioLib to 6.1.0 (#2577)
* Bump RadioLib to 6.1.0

* RP2040

* More excludes

* Jan added a lot of stuff apparently

* Stay back a version on portduino for now

* It wasn't this. I need to remove the docker build from ci
2023-06-27 07:08:32 -05:00
Ben Meadors
7711b03bd8
Update nrf and esp32 platform versions (#2486) 2023-05-12 08:38:53 -05:00
Thomas Göttgens
1d90096cba rearrange pio build system dependencies
also update trunk
2023-05-08 14:40:10 +02:00
Thomas Göttgens
10fac072bb move codec2 repo to org 2023-04-12 14:39:25 +02:00
Thomas Göttgens
75db8c2d2e the target starts up and works for a few seconds before crashing. Good enough for others to continue the work :-) 2023-03-21 16:24:24 +01:00
Thomas Göttgens
4573db4665
Merge branch 'master' into ESP32C3-RISC 2023-03-12 20:19:43 +01:00
Ben Meadors
e737a22120
Platform updates (#2340)
* 6.1.0

* Update libs

* Update nrf52 while we're at it

* Remove temporary heltec platform packages

* Update install scripts to flash s3 ota partition bin
2023-03-09 12:45:38 -06:00
Thomas Göttgens
b249970a12 add rudimentary exception decoder for RISC-V CPU 2023-03-05 14:55:12 +01:00
Thomas Göttgens
82b14fe07c Leaving this here in case someone ever needs int :-) 2023-02-23 22:54:07 +01:00
Thomas Göttgens
dc6f6af7fb Update to Espressif32 Platform 6.0 and ESP-IDF 5.0 2023-02-10 00:21:15 +01:00
Ben Meadors
7936c7c8ae Remove the D! 2023-01-12 10:07:17 -06:00
Ben Meadors
c89ca50cc4 Remove DEBUG_HEAP flag from esp32 pio config on release 2023-01-12 09:33:55 -06:00
Thomas Göttgens
cab5fcf5ae no excessive heap debugging on release builds 2023-01-03 22:35:24 +01:00
Thomas Göttgens
055146602a support ESP32-S2 CPUs
Note: these don't have Bluetooth and only a single physical core.
2022-12-21 13:28:28 +01:00
Thomas Göttgens
7d1b6f63b5 Definition cleanup and AudioModule WIP 2022-12-21 13:27:00 +01:00
Thomas Göttgens
ab6b6514cb this define is arch specific 2022-12-21 13:26:59 +01:00
Thomas Göttgens
f5120a29ec WIP: audio module still does not work, but enabled for all regions where audio is permitted.
# Conflicts:
#	variants/tlora_v2_1_18/platformio.ini
2022-12-21 13:26:13 +01:00
Thomas Göttgens
a33325f90f update web server reference to latest commit 2022-11-21 13:46:22 +01:00
Thomas Göttgens
b7ebe03ca8 API Server and DHCP Lease Management 2022-10-26 11:09:59 +02:00
Thomas Göttgens
f3fee5f4fb first murmurs of ethernet support 2022-10-22 16:29:50 +02:00
Thomas Göttgens
f8982ddaf8 Best Practise Platformio 6.x dependency definitions 2022-10-10 15:42:05 +02:00
Thomas Göttgens
b2ff628cec add versioning to all lib depends (compatible upgrade allowed) and move as many as possible off github and into PIO registry.
Also add a script to check for lib updates (maybe in CI?)
2022-10-04 08:40:39 +02:00
Thomas Göttgens
6b40f9d95c
Unfork this lib, we're done here now. 2022-10-01 15:27:13 +02:00
Thomas Göttgens
c53434539b use the native littlefs builder of newer framework 2022-09-27 00:16:12 +02:00
Ben Meadors
ae311c838e
Try to decode mqtt packets first (#1705)
* Try to decode first

* Remove GPS pins from TLoRAv1 so that it can boot

* Use release version of radio lib

* Use fixed versions of esp framework and tool chain
2022-09-25 09:39:50 -05:00
Thomas Göttgens
5775c390f3
Merge branch 'master' into ESPIDF-Rollup 2022-09-23 21:19:19 +02:00
Thomas Göttgens
b4f75ad042 use exception decoder 2022-09-23 19:52:07 +02:00
Thomas Göttgens
fae6693f8f fix (or better suppress) another compiler warning 2022-09-23 12:37:59 +02:00
Thomas Göttgens
afcc7b6a56 Always use the latest framework for ESP32 2022-09-19 16:18:01 +02:00
Thomas Göttgens
2d81d359b8
Update esp32.ini
Update arch by hand
2022-09-19 09:36:13 +02:00
Thomas Göttgens
eac2613743 make platformio.ini even more modular 2022-09-12 14:02:21 +02:00