441 Commits
Author SHA1 Message Date
Florent ee987216b3 fix contact retreival issue (CONTACTS event was doing a timeout) 2026-10-29 10:18:27 -04:00
Florent 105f407b85 v2.3.17 v2.3.17 2026-10-16 13:34:47 -04:00
fdlamotteandGitHub 6bf0428ab1 Merge pull request #115 from agessaman/fix/python-310-311-messaging-import
Fix Python 3.10/3.11 import failure in messaging commands
2026-10-16 09:06:25 -04:00
agessaman 8acf669c7b Fix Python 3.10/3.11 import failure in messaging commands 2026-10-16 06:00:12 -07:00
Florent 3ef9dfc06f v2.3.16 v2.3.16 2026-10-14 11:16:13 -04:00
Florent c379142c6b support path_hash_len in send_channel_data 2026-10-14 10:08:11 -04:00
Florent 1e6fdd47a3 add a type field to CHANNEL_DATA v2.3.15 2026-10-03 16:43:57 -04:00
Florent 02add9d356 prepare for next version 2026-10-03 15:19:47 -04:00
Florent d75a85b40f start using CommandType instead of raw values 2026-10-03 15:18:17 -04:00
fdlamotteandGitHub 990f6536f1 Merge pull request #113 from maxburto/fix/get-msg-channel-data
Wait for CHANNEL_DATA_RECV in get_msg()
2026-10-03 15:11:31 -04:00
fdlamotteandGitHub c376c7b62a Merge pull request #114 from maxburto/feat/send-channel-data
Add send_channel_data() for CMD_SEND_CHANNEL_DATA (0x3E)
2026-10-03 15:10:14 -04:00
Maxwell Burton 8b08f0feb1 Add send_channel_data() for CMD_SEND_CHANNEL_DATA (0x3E)
Sends a binary channel datagram: flood by default, or along a given path. Validates data_type (1..0xFFFF), payload length (<= 163) and channel index (one byte), like send_raw_data.
2026-10-02 18:45:04 +00:00
Maxwell BurtonandClaude Sonnet 5.5 9f22c05b0c Wait for CHANNEL_DATA_RECV in get_msg()
The companion protocol lists PACKET_CHANNEL_DATA_RECV (0x1B) as an
answer to GET_MESSAGE (0x0A). PR #88 added the CHANNEL_DATA_RECV
event and parser, but get_msg() still waited only for
CONTACT_MSG_RECV, CHANNEL_MSG_RECV, ERROR and NO_MORE_MSGS. When the
next queued message is a channel datagram, get_msg() therefore ignored
the device's answer and returned ERROR (reason "timeout") after
default_timeout, which also stops the auto-fetch loop.

Add CHANNEL_DATA_RECV to the expected events and cover it with a test
that runs a real CHANNEL_DATA_RECV frame through MessageReader and
EventDispatcher.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-02 17:03:17 +00:00
fdlamotteandGitHub e84f9a32b7 Merge pull request #112 from jpettitt/fix-connect-leak
Stop the dispatcher when connect() fails or is cancelled
2026-09-27 14:16:44 -04:00
John PettittandClaude Opus 5.5 40e0dd321e Stop the dispatcher when connect() fails or is cancelled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed-by: John Pettitt @jpettitt
2026-09-26 16:18:28 -07:00
fdlamotteandGitHub f4427bc316 Merge pull request #111 from johnterickson/special-carnival
Fix direction LPP values being encoded as lists
2026-09-22 13:35:40 -04:00
johntericksonandCopilot 8161c0f675 Fix direction LPP values being encoded as lists
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-22 15:29:04 +00:00
Florent b32d8203ae v2.3.14 v2.3.14 2026-09-19 18:48:31 -04:00
fdlamotteandGitHub 6d60f63873 Merge pull request #109 from kylemanna/fix-test-issues
Fix send_cmd destination handling and ADVERT_PATH test fixture
2026-09-19 18:06:28 -04:00
Kyle Manna 170f94e0bd tests: Fix ADVERT_PATH packet fixture
- Use packet type 0x16 and include the four-byte timestamp so the
  fixture exercises ADVERT_PATH parsing instead of PRIVATE_KEY handling.
- Preserve the embedded zero byte and existing path assertions.
2026-09-19 12:17:02 -07:00
Kyle Manna d48b941d56 messaging: Fix send_cmd destination type handling
- Fall back to repeater commands when a destination has no contact type.
- Keep an explicit dst_type instead of overwriting it with REPEATER.
2026-09-19 12:16:39 -07:00
Florent 7e5f2ab470 v2.3.13 v2.3.13 2026-09-19 13:46:39 -04:00
fdlamotteandGitHub 12e93fb127 Merge pull request #108 from agessaman/fix/send-msg-retry-ack
Fix send_msg_with_retry reporting delivered messages as failed
2026-09-19 13:42:25 -04:00
agessaman 9c65f60c23 Fix send_msg_with_retry reporting delivered messages as failed
send_msg_with_retry could return None for a message the recipient received and ACKed:

- The ACK subscription was registered only after send_msg returned. If the ACK was queued right behind MSG_SENT (both frames in one read, or the event loop busy for the round trip), it was dispatched with no listener.
- Each attempt waited only for its own ACK code. A late ACK for an earlier attempt, which the device still reports from its expected-ACK table, was ignored.

The ACK subscription now spans the whole call and accepts the code of any attempt sent so far. All attempts also share one timestamp—the attempt byte already makes each packet unique—so receivers can tell a retry from a new message.
2026-09-19 10:18:10 -07:00
Florent 5e38117671 v2.3.12 v2.3.12 2026-09-19 13:10:07 -04:00
Florent fc7e797e41 send_msg_with_retries: now fetches contacts before resetting path 2026-09-19 10:59:26 -04:00
Florent fa93dc66cb fix send_msg_with_retry so it gets flood status from the send result 2026-09-19 10:35:03 -04:00
Florent 825de8a5de v2.3.11 v2.3.11 2026-09-15 11:25:22 -04:00
Florent 1145c08bcf try to invert dtr and reconnect if serial connection fails 2026-09-15 08:46:28 -04:00
Florent ec0582df22 make dtr configurable and true by default (rts false by default) 2026-09-15 08:11:00 -04:00
Florent f757e2b2f6 let user specify rts state upon connect 2026-09-14 12:37:28 -04:00
Florent 6ffb875c28 v2.3.10 v2.3.10 2026-09-13 17:10:50 -04:00
fdlamotteandGitHub 1bfd8385d5 Merge pull request #102 from joeyleake/fix/58-dont-configure-root-logger
Stop configuring the root logger on import
2026-09-12 11:43:10 -04:00
fdlamotteandGitHub 10b4f74305 Merge pull request #104 from PY5HC/fix/serial-dtr-handling
Fix serial DTR handling
2026-09-12 11:36:26 -04:00
fdlamotteandGitHub 3d8a8a6c85 Merge pull request #103 from joeyleake/docs/84-document-path-hash-mode
Document set_path_hash_mode / get_path_hash_mode in README
2026-09-12 11:34:18 -04:00
fdlamotteandGitHub 23ccdecb75 Merge pull request #101 from joeyleake/fix/95-serial-fd-leak-on-timeout
Fix serial fd leak in SerialConnection.connect() on timeout
2026-09-12 11:34:00 -04:00
fdlamotteandGitHub 832bec72d3 Merge pull request #100 from joeyleake/fix/97-ble-reconnect-duplicate-notify
Fix BLE reconnect leaving stale notification registration (duplicate notifications)
2026-09-12 11:32:51 -04:00
Hipólito Luiz 9676f0f4b8 Fix serial DTR handling 2026-09-11 14:29:37 -03:00
fdlamotteandGitHub 837ac53e77 Update MeshCore URL in README 2026-09-03 11:37:05 -04:00
Joey Leake df72e95603 Document set_path_hash_mode / get_path_hash_mode in README
Both commands already existed in commands/device.py but had no entry in
the README's command reference table, so users had no way to discover
them (reported as "missing"). Add rows under Advanced Configuration
explaining that mode controls how many bytes of each hop's node ID are
stored per hop in advertised/logged paths (bytes per hop = mode + 1),
matching the plen >> 6 / hash_mode + 1 logic in reader.py and
commands/base.py.

Fixes #84
2026-08-31 13:25:01 -04:00
Joey Leake 9163efa4f3 Stop configuring the root logger on import
logging.basicConfig() at import time in __init__.py silently clobbered the
embedding application's own logging setup. Replace it with a NullHandler so
the library stays silent by default without touching global config.

Also stop MeshCore.__init__ from unconditionally forcing the "meshcore"
logger to INFO when neither debug= nor only_error= is passed - only set a
level when the caller explicitly asks for one, otherwise leave whatever the
app already configured alone.

Document the idiomatic logging setup for consumers in README.md.

Fixes #58
2026-08-31 13:18:23 -04:00
Joey Leake 42627f09c6 Fix serial fd leak in SerialConnection.connect() on timeout
Fixes #95
2026-08-31 13:04:59 -04:00
Joey Leake 585833690d Fix BLE reconnect leaving stale notification registration (Fixes #97) 2026-08-31 12:42:10 -04:00
fdlamotteandGitHub 664ba0c99e Merge pull request #99 from ErikBrown2/fix-advert-path-zero-bytes
Fix ADVERT_PATH parsing of embedded zero bytes
2026-08-30 07:50:20 -04:00
ErikBrown2andGitHub e5a82eba5b Add regression test for ADVERT_PATH zero bytes
Verify that embedded 0x00 bytes in multi-byte ADVERT_PATH hashes are preserved during parsing.
2026-08-30 13:14:51 +02:00
ErikBrown2andGitHub 35e483e312 Fix ADVERT_PATH parsing of zero bytes
Preserve valid 0x00 bytes in ADVERT_PATH data by reading the exact number of path bytes instead of stripping all zero bytes.
2026-08-30 12:45:01 +02:00
fdlamotteandGitHub af64ace4d7 Merge pull request #98 from aluminique/fix/rxlog-keyerror-message
Fix KeyError: 'message' when a duplicate of an undecryptable channel frame is parsed
2026-08-29 17:50:23 -04:00
Aluminique 85fc311652 Do not raise KeyError copying an undecryptable channels_log entry
parsePacketPayload copies message/msg_hash/sender_timestamp/attempt/txt_type from a
prior channels_log entry matched by pkt_hash. When that prior entry was logged while
the channel could not be decrypted it has none of those keys, so a later duplicate of
the same transmission raises KeyError: 'message' and aborts handle_rx for the whole
packet, dropping its RX_LOG_DATA. It triggers when a channel-table refresh lands
between two copies of a flooded channel message.

Copy with .get() so the fields are simply absent instead of raising. Adds a regression
test that reproduces the crash (fails on main, passes here).
2026-08-29 02:07:07 +01:00
Florent dd5502b968 fix issue when sending a cli cmd to room or sensor 2026-08-25 15:25:13 -04:00
Florent d2aca51296 send raw packets v2.3.9 2026-08-24 08:13:34 -04:00