Commit Graph
87 Commits
Author SHA1 Message Date
tthandClaude Opus 5 1614cb3e48 fix(contacts): zero ContactInfo before a partial fill
ContactInfo is filled field by field in three places, and none of them
writes every member:

- CMD_ADD_UPDATE_CONTACT, for a contact the node does not know yet
  (companion_radio/MyMesh.cpp): the frame's lat/lon/lastmod are optional,
  and clients omit them when the contact has no location -- so
  gps_lat/gps_lon keep whatever was on the stack.
- DataStore::loadContacts(), and the same loop in simple_secure_chat: the
  on-disk record carries no shared_secret/shared_secret_valid, so those
  two members are never written. For every contact, on every boot.

shared_secret_valid is the dangerous one. getSharedSecret() computes the
secret only while the flag is false, so a non-zero byte there makes it
hand out an uninitialised buffer as the ECDH shared secret, and DMs to
that contact go out encrypted with garbage -- no error, no log.

populateContactFromAdvert() already memsets for exactly this reason; do
the same at the other three sites.

Found in the field: a room server whose advert carries no location showed
up at 0.255433, 0.0 in two independent companion clients. 255433 is
0x0003E5C9, straight off the stack. Verified the advert itself is clean by
decoding it in a third, unrelated tool.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 12:27:43 +02:00
Scott Powell 49319023e5 Merge branch 'dev'
# Conflicts:
#	docs/payloads.md
2026-08-09 14:36:53 -04:00
Scott Powell 8903b907d1 * Refactor: removed duplicated radio_rng_seed(), radio_set_params(), radio_set_tx_power() 2026-05-01 14:47:07 +10:00
ripplebiz 71e1e63dfd Merge pull request #1297 from ViezeVingertjes/feature/duty-cycle-token-bucket
Implement token bucket duty cycle enforcement
2026-03-08 23:54:32 +11:00
Scott Powell 62320b64c5 * refactor of Contact/Client out_path_len (stored in files), from signed to unsigned byte (+2 squashed commits)
Squashed commits:
[f326e25] * misc
[fa5152e] * new 'path mode' parsing in Dispatcher
2026-02-21 19:35:51 +11:00
Wessel Nieboer 20e71ebc53 Allow negative tx power
Like SX1262 allows -9 dBm lowest, some allow lower but that probably
isn't useful
2026-02-06 02:24:51 +01:00
liamcottle c8992ae5b6 added build flag to enable/disable boot advert 2026-01-26 22:39:39 +13:00
ViezeVingertjes 40a09e9450 Implement token bucket duty cycle enforcement 2026-01-04 21:33:46 +01:00
Scott Powell 7ff483ab74 * Fix for VolatileRTCClock wrapping around to initial synced time every 49 days 2025-10-30 16:45:50 +11:00
Scott Powell a5b7fe3fdb * proposed change for re-trying reciprocal path transmit 2025-09-08 19:22:59 +10:00
Scott Powell 28c0be48eb * companion: new CMD_GET_ADVERT_PATH -> RESP_CODE_ADVERT_PATH 2025-06-18 16:02:09 +10:00
Scott Powell 9ea6f91c09 * workaround for nRF + LittleFS glitch with seek/truncate 2025-05-20 16:29:09 +10:00
Scott Powell 2745f73f50 * new: SensorManager
* BasChatMesh: new onContactRequest(), for PAYLOAD_TYPE_REQ handling.
* companion, repeater and room_server: now with basic 'plumbing' to handle REQ_TYPE_GET_TELEMETRY_DATA (0x03).
* dependency: added CayenneLPP to libdeps
* all target.* modules now with a stub 'sensors' object.
2025-05-03 13:14:03 +10:00
Scott Powell 264f51d510 * RP2040 IdentityStore begin(), to ensure mkdir() 2025-04-22 15:26:04 +10:00
AeroXuk eba02b1915 Correct opens to use "w" filemode instead of "w+" filemode. 2025-04-21 21:49:41 +01:00
AeroXuk 6b34a94fb3 Added Pi PIcoW support in the following modes:
- Companion Radio over USB Serial
- Repeater
- Room Server
- Terminal Chat
2025-04-21 21:17:03 +01:00
Scott Powell 7d731e82f5 * ID hash 0x00 and 0xFF now reserved for future. 2025-04-06 12:34:09 +10:00
Scott Powell 06684438b3 * refactor: rtc_clock now defined by variants/*/target modules 2025-03-27 21:28:06 +11:00
Scott Powell c8fa816dfc * new ESPNOWRadio driver
* refactored the examples/*/main.cpp modules, moving radio specifics to variants/*/target modules
* new Generic_ESPNOW_* target envs
2025-03-27 19:34:16 +11:00
Scott Powell 696dbded26 * experiment: enabling forwarding in terminal chat 2025-03-26 03:57:36 +11:00
Scott Powell 83138bd39a * fix for double radio.begin(). RNG seed from pressing ENTER 2025-03-25 17:40:36 +11:00
Scott Powell e12d7bf699 * wifi power max 2025-03-25 15:13:07 +11:00
Scott Powell c97c27561a * more experiments 2025-03-25 01:26:46 +11:00
Scott Powell 7fff6dfe5c * ESP-NOW experiment with terminal-chat 2025-03-24 21:16:00 +11:00
Scott Powell 41918efd6d * BIG refactor: 'board' and 'radio' objects now defined in 'target.h/.cpp'
* mesh::RTCClock class moved to MeshCore.h
2025-03-21 18:57:12 +11:00
ripplebiz b2c393ff58 Merge pull request #114 from lincomatic/pr-llcc68
Add ProMicroLLCC68 builds
2025-03-18 13:45:03 +11:00
Scott Powell 3aa7cf5652 * redesigned TRACE packet structure 2025-03-17 17:56:12 +11:00
lincomatic 28fb5875b2 add ProMicroLLCC68 for Faketec w/ LLCC68 2025-03-16 17:48:52 -07:00
Scott Powell a63a6ec6d4 Merge branch 'dev' into trace
# Conflicts:
#	examples/companion_radio/main.cpp
#	src/Dispatcher.cpp
2025-03-15 15:12:50 +11:00
oltaco 84dbc284ad Merge branch 'ripplebiz:main' into faketec-support 2025-03-13 16:22:02 +11:00
Scott Powell 60982b3821 * companion: channel names 2025-03-11 17:58:12 +11:00
taco aada976237 Faketec board support, including build targets 2025-03-11 09:34:52 +11:00
Scott Powell 2df1820424 * trying setCRC(1) 2025-03-09 22:15:58 +11:00
Scott Powell c1f51e8996 * companion: FIRMWARE_VER_CODE now bumped to 3.
* companion: new RESP_CODE_CONTACT_MSG_RECV_V3, and _CHANNEL_MSG_RECV_V3. (now with packet SNR included)
2025-03-07 14:17:37 +11:00
Scott Powell 8379a785cc Merge branch 'dev' into trace
# Conflicts:
#	src/Dispatcher.cpp
#	src/Mesh.cpp
#	src/helpers/BaseChatMesh.cpp
2025-03-07 12:14:26 +11:00
Alex Wolden 8d09e0f5c0 Merge remote-tracking branch 'origin/dev' into awolden/t3lora 2025-03-04 23:23:03 -08:00
Alex Wolden 22b3d7c435 Refactor naming 2025-03-04 22:00:48 -08:00
Alex Wolden 30e0047809 Add support for LilyGo T3 with SX1276 module
- Add custom partition table for fitting larger firmware
- Create LilyGoT3S3Board.h for board-specific functionality
- Update all example files to support the T3 board with SX1276
- Configure build environment for optimizing firmware size
- Set up the right pin configuration for SX1276 on LilyGo T3
2025-03-04 00:07:36 -08:00
Scott Powell ee1fd75150 * companion radio: support for TXT_TYPE_SIGNED_PLAIN 2025-03-02 13:57:50 +11:00
Scott Powell aab1326516 * various changes for CLI support via companion radio 2025-02-27 12:51:00 +11:00
Scott Powell 395b026e6c * strncpy() refactor/fix 2025-02-22 19:41:24 +11:00
ripplebiz 706bc0cf48 Merge pull request #23 from fdlamotte/t1000e_code
T1000e code
2025-02-19 17:49:36 +11:00
Scott Powell bea3ccb116 * new Packet type: PAYLOAD_TYPE_TRACE 2025-02-17 19:22:31 +11:00
Scott Powell ce20ec8f13 * repeater, room server and terminal chat: default to rxdelay off 2025-02-17 10:56:41 +11:00
Scott Powell e01ee62c72 * companion radio: new CMD_EXPORT_CONTACT, CMD_IMPORT_CONTACT 2025-02-15 15:57:02 +11:00
Florent 04553004af add T1000e conditionals to examples 2025-02-14 07:17:46 +01:00
Scott Powell 4048d1bd90 * BaseChatMesh: sendLogin(), onContactResponse()
* companion radio: contacts file, new 'sync_since' field
2025-02-14 07:52:43 +11:00
Scott Powell 0ff94be3b3 * new target/envs: Heltec_v2_repeater, Heltec_v2_companion_radio_usb 2025-02-11 15:50:10 +11:00
Scott Powell fe9fa4766a * new target/env: Heltec_v2_terminal_chat 2025-02-11 12:36:26 +11:00
Scott Powell afd6889557 Merge branch 'main' into rx_delay
# Conflicts:
#	examples/companion_radio/main.cpp
#	examples/simple_secure_chat/main.cpp
2025-02-09 13:06:01 +11:00