Commit Graph

2323 Commits

Author SHA1 Message Date
dim5x
3ea1994cf5 Refactor the Meshtastic TCP pub/sub example to ensure proper resource cleanup and clearer exception handling. 2026-02-05 13:42:37 +03:00
Sergio Conde
4de19f50d9 fix: add tests 2026-02-01 21:25:49 +01:00
Sergio Conde
4d8430d360 fix: throw propper exceptions and cleanup code 2026-02-01 11:39:09 +01:00
Ben Meadors
bf580c36ae Update meshtastic/__main__.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-31 18:15:25 -06:00
Sergio Conde
1eb13c9953 feat: Add ESP32 WiFi Unified OTA update support 2026-01-31 16:44:03 +01:00
Ian McEwen
cdf893e618 Merge pull request #893 from lexfrei/fix/ble-race-condition
fix(ble): resolve BLE connection hangs on macOS without --debug flag
2026-01-25 15:24:06 -07:00
Aleksei Sviridkin
9b9df9e585 fix(ble): resolve BLE hangs on macOS without --debug flag
This fixes two issues that caused BLE connections to hang on macOS
when not using the --debug flag:

1. Race condition in BLEClient event loop initialization
   - The event loop thread was started but asyncio operations were
     submitted before the loop was actually running
   - Added threading.Event synchronization to ensure the event loop
     is running before any operations are submitted
   - The ready signal is sent from within the loop via call_soon()
     to guarantee the loop is truly active

2. CoreBluetooth callback delivery on macOS
   - On macOS, CoreBluetooth requires occasional I/O operations for
     callbacks to be properly delivered to the main thread
   - Without --debug, no I/O was happening, causing callbacks to
     never be processed and operations to hang indefinitely
   - Added sys.stdout.flush() call before waiting for async results
     to trigger the necessary I/O

The --debug flag masked these issues because:
- Debug logging introduces timing delays that let the event loop start
- Logger I/O triggers the necessary callback delivery mechanism

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-01-25 03:06:58 +03:00
github-actions
b26d80f186 bump version to 2.7.7 2.7.7 2026-01-24 16:34:15 +00:00
Ian McEwen
da559f0e37 protobufs: v2.7.18 2026-01-24 09:31:04 -07:00
Ian McEwen
a73f432f42 Merge pull request #888 from dandrzejewski/node-favorites
Show favorite nodes in --nodes
2026-01-09 13:09:31 -07:00
David Andrzejewski
c3c5ce64dd Copilot had a few suggestions on code review, implemented them. 2026-01-08 19:08:18 -05:00
David Andrzejewski
683dd23d63 Fix a few pylint things. 2026-01-08 18:53:55 -05:00
David Andrzejewski
57d43b84e4 Merge branch 'master' into node-favorites 2026-01-08 18:40:43 -05:00
David Andrzejewski
4f6d183ed1 Show favorite nodes in --nodes 2026-01-08 18:13:03 -05:00
github-actions
9a72e36ca6 bump version to 2.7.6 2.7.6 2026-01-05 02:25:14 +00:00
Ian McEwen
4d54ee7431 protobufs: v2.7.17 2026-01-04 19:21:54 -07:00
Rob
c8b1b8ea6f Filter --reply based on specified channel index
Ensures that automatic replies are sent back on the same channel index the message was received on. Previously, all replies defaulted to the primary channel (0), even if the incoming message arrived on a secondary channel. Additionally it ensures incoming messages match the specified channel index.

E.g:  meshtastic --ch-index 1 --reply .

Modified the `onReceive` handler to extract the `channel` index from received packets. This ensures `interface.sendText` targets the originating channel rather than always defaulting to the primary channel. Added a filter to ensure that only the specified channel index is being replied to.
2025-12-26 15:17:46 -05:00
Lluís Batlle i Rossell
d9057c0aaf Fix traceroute timeout for case of 0-hops
It was not waiting any time.
2025-11-29 15:40:33 +01:00
Ian McEwen
5cc0dae394 protobufs: v2.7.15 2025-11-20 14:30:39 -07:00
Ian McEwen
1a50377d34 Merge pull request #865 from ianmcorvidae/device-metadata-details
Add a bunch more detail to --device-metadata output, from fields we weren't formerly using in the output.
2025-11-20 14:29:20 -07:00
Ian McEwen
2a44be9269 Add a bunch more detail to --device-metadata output, from fields we weren't formerly using in the output. 2025-11-20 11:42:57 -07:00
github-actions
776debcc86 bump version to 2.7.5 2.7.5 2025-11-18 19:48:40 +00:00
Ian McEwen
1088cc607e Merge branch 'revert-close-refactor' 2025-11-13 12:10:46 -07:00
Ian McEwen
aeec5447ed Revert "Merge pull request #841 from SpudGunMan/master"
This reverts commit b4662251ed, reversing
changes made to 2065598754.
2025-11-13 12:08:42 -07:00
Ian McEwen
096fec95c8 Revert "Wrap double-close in a try-catch. Slightly ugly but oh well."
This reverts commit dbc0101a7a.
2025-11-13 12:07:48 -07:00
Ian McEwen
dea5f788a2 Revert "Add more exception logging, fix some additional stream read/write issues"
This reverts commit f15a0bdc0b.
2025-11-13 12:07:32 -07:00
Ian McEwen
f15a0bdc0b Add more exception logging, fix some additional stream read/write issues 2025-11-13 11:38:00 -07:00
Travis-L-R
1214d5010b Linting adjustment for change to StreamInterface non-abstract use check 2025-11-13 07:38:25 +10:30
Ian McEwen
0906fc6bc0 Merge pull request #858 from Travis-L-R/conf_work
Splitting out true_defaults for moduleConfig in export_config()
2025-11-12 10:16:19 -07:00
Travis-L-R
ccb530574b Splitting true_defaults for moduleConfig out in export_config() 2025-11-11 21:03:01 +10:30
Travis-L-R
76418b8e57 Reorganising connect method calls for when connectNow is false 2025-11-11 19:25:51 +10:30
Travis-L-R
3be73b42e2 Removing unnecessary initialization of self.stream in TCPInterface 2025-11-11 19:19:44 +10:30
Travis-L-R
2245ac8d97 Shifting serial interface connection parts from __init__() into connect() method 2025-11-11 19:18:00 +10:30
Travis-L-R
040f332078 Updating test for change of deprecation exception 2025-11-11 19:14:42 +10:30
Travis-L-R
f3f17a7d50 Removing superfluous setting of noProto in init() 2025-11-11 19:02:54 +10:30
Travis-L-R
79334e83e6 Adjusting old deprecation test and exception for non-abstract use of StreamInterface 2025-11-11 18:57:52 +10:30
Ian McEwen
dbc0101a7a Wrap double-close in a try-catch. Slightly ugly but oh well. 2025-11-10 13:58:12 -07:00
Ian McEwen
debbb8caeb Update some dependencies 2025-11-10 13:09:44 -07:00
github-actions
3c6dba78a3 bump version to 2.7.4 2.7.4 2025-11-06 22:50:41 +00:00
Ian McEwen
8a3b114153 protobufs: v2.7.13 2025-11-06 15:37:32 -07:00
Ian McEwen
0bb04100e1 Merge pull request #843 from SpudGunMan/channel-hash-info
Add Channel Hash Utility to Node class
2025-11-06 15:35:36 -07:00
Ian McEwen
ad04c26d13 split out constant, improve logic some, add tests for channel_hash and generate_channel_hash 2025-11-06 15:19:12 -07:00
Ian McEwen
0e67ef37aa Return hash from channel_hash function 2025-11-06 14:55:41 -07:00
Ian McEwen
e924afd140 Merge branch 'master' into channel-hash-info 2025-11-06 14:51:32 -07:00
Ian McEwen
87682c153b Merge pull request #834 from NillRudd/feat/cli-ignore-formats
CLI: normalize lora.ignore_incoming IDs (dec/!hex/0x), dedupe, YAML [] clear, fix bytes→int crash
2025-11-06 14:19:57 -07:00
Ian McEwen
e6c276fe96 Fix trailing whitespace 2025-11-06 14:17:07 -07:00
Ian McEwen
b4662251ed Merge pull request #841 from SpudGunMan/master
refactor close()
2025-11-06 13:24:59 -07:00
SpudGunMan
a17cfe9d2b rename to generate_channel_hash 2025-11-06 12:01:53 -08:00
SpudGunMan
471e3ce145 generate_hash to util 2025-11-06 12:00:16 -08:00
SpudGunMan
39c9864682 move and rename hash function
this function, xor_hash, and a variable for the default key (as bytes, I think, rather than the base64 version) really all belong in meshtastic.util rather than here.
There's multiple forms of hashing in firmware so this should be named to denote that, perhaps channel_hash. If we later want to add the frequency-slot-style hash, better if it's distinguished better from the start.
2025-11-06 11:49:57 -08:00