Commit Graph
35 Commits
Author SHA1 Message Date
Alex WoldenandClaude Opus 4.6 5e9cb559e7 Use firmware suggested_timeout for login and path discovery sync methods
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 21:42:21 -07:00
Alex Wolden ed96df197a Fix 16 failing unit tests to match current source behavior
- Update mock dispatcher to use subscribe-before-send pattern matching
  the rewritten CommandHandler.send() method
- Use 32-byte pubkeys in tests for commands that now require
  prefix_length=32 (login, logout, statusreq, reset_path, share/export/remove contact)
- Fix send_trace test path format to match flags=1 (2-byte path hashes)
- Update LPP current test to expect signed wrap for values > 32.767
- Fix BinaryReqType import (moved from meshcore.parsing to meshcore.packets)
- Fix register_binary_request call signature (added pubkey_prefix param)
- Update timeout test to expect 'no_event_received' instead of 'timeout'
2026-04-05 18:38:16 -07:00
Alex Wolden 20f3bccb58 Deprecate fire-and-forget mesh request methods
Add warnings to send_login, send_statusreq, send_telemetry_req, and
send_path_discovery pointing users to their _sync counterparts. The
fire-and-forget versions bypass the mesh request lock and can cause
silent response drops due to firmware clearPendingReqs() behavior.
2026-04-05 18:38:06 -07:00
Alex Wolden ab3e507e1f Add mesh request lock to serialize firmware-bound mesh commands
The companion firmware can only track one outstanding mesh request at a
time — clearPendingReqs() zeros all pending response flags before each
outgoing mesh request. Overlapping mesh commands cause silent response
drops.

Adds _mesh_request_lock to CommandHandlerBase and wraps all _sync
methods with it. Also adds send_login_sync and send_path_discovery_sync
for complete round-trip serialization of those commands.

Local commands (get_bat, get_channel, set_time, send_msg, etc.) are
unaffected — they don't trigger clearPendingReqs() on the firmware.
2026-04-04 23:18:21 -07:00
Alex Wolden 8abe7c5ed8 Export binary req type 2025-09-07 12:28:26 -07:00
Alex Wolden ccb1d6eb9e Revert "Refactor command system to be queue based"
This reverts commit 28957a4b60.
2025-09-04 15:08:08 -07:00
Alex Wolden 9aeffb41a1 Move binary process to reader for consistent eventing 2025-08-29 11:54:55 -07:00
Alex Wolden 28957a4b60 Refactor command system to be queue based 2025-08-29 11:40:03 -07:00
Alex Wolden 7e74c02a00 Add the pubkey prefix as a filterable attribute in the reader 2025-08-28 13:08:35 -07:00
Alex Wolden 43e2cfc724 timing and test fixes 2025-08-05 23:08:17 -07:00
Alex Wolden 1ead55b5b5 Update serial cx to more smartly await for connection 2025-08-05 20:45:32 -07:00
Alex Wolden f9f7b11f46 Fix event loop deadlock issue 2025-08-05 20:39:22 -07:00
Alex Wolden 968e42c6c8 Add testing workflow 2025-08-05 13:21:30 -07:00
Alex WoldenandGitHub 1674274929 Merge pull request #15 from ventz/main
Fix: Improved BLE Connection Logic on macOS
2025-08-05 13:04:26 -07:00
Alex Wolden dabc3437dd Add better connection management 2025-06-30 20:23:35 -07:00
Alex Wolden dc5c9f6c96 Add noise floor to repeater status response 2025-06-13 13:20:23 -07:00
Alex Wolden cca0ca90e9 Add channel commands and fix a lint error 2025-06-01 20:31:37 -07:00
Alex Wolden fda20e623e Add copy to event handling to avoid cross mutations 2025-05-15 11:52:15 -07:00
Alex Wolden 68dda3aba2 update login script and drastically reduce chattiness of debug logs for setups with a lot of subscriptions 2025-05-12 22:52:13 -07:00
Alex Wolden 8d805de78d add the ability to subscribe to LOGIN_SUCCESS event 2025-05-12 22:35:53 -07:00
Alex Wolden b3cf2ba7b4 Fix typing on MC top level subscribe method 2025-05-12 21:52:28 -07:00
Alex Wolden 9563a871f1 Fix issue where transports were not disconnecting 2025-05-12 21:51:25 -07:00
Alex Wolden 6fbf15885d Change contract for commands to return full event 2025-04-14 11:23:10 -07:00
Alex Wolden 52553a41bd Handle error events properly in commands 2025-04-14 09:03:56 -07:00
Alex Wolden 3f7155d913 Added in some unit tests 2025-04-13 22:55:39 -07:00
Alex Wolden 84de232f4b Added additional typing and typing fixes 2025-04-13 22:37:00 -07:00
Alex Wolden a1fb931200 Added contact based dest 2025-04-13 22:19:08 -07:00
Alex Wolden 6dc87bafbb Add event filtering to support ACK tracking 2025-04-13 12:03:47 -07:00
Alex Wolden 478bcd92c1 remove some dead code 2025-04-12 14:02:00 -07:00
Alex Wolden cbfc940de6 Fix example 2025-04-12 13:56:44 -07:00
Alex Wolden b700ae75e9 Fix example 2025-04-12 13:53:37 -07:00
Alex Wolden 55af0b2e61 Improve log tracking event 2025-04-12 13:36:03 -07:00
Alex Wolden ea2f17025f Add trace packet type 2025-04-12 13:04:23 -07:00
Alex Wolden a5f1ec5c26 Refactor to event system 2025-04-12 13:04:19 -07:00
Alex Wolden 8f0ecd7d75 Refactor to event system 2025-04-12 00:26:25 -07:00