Commit Graph
1308 Commits
Author SHA1 Message Date
github-actions fee2b6ccbd Update protobufs 2026-02-14 16:48:14 +00:00
Aleksei SviridkinandClaude 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
Ian McEwen da559f0e37 protobufs: v2.7.18 2026-01-24 09:31:04 -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
Ian McEwen 4d54ee7431 protobufs: v2.7.17 2026-01-04 19:21:54 -07:00
Ian McEwen 5cc0dae394 protobufs: v2.7.15 2025-11-20 14:30:39 -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
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 ccb530574b Splitting true_defaults for moduleConfig out in export_config() 2025-11-11 21:03:01 +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 8a3b114153 protobufs: v2.7.13 2025-11-06 15:37:32 -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
Niklas Roslund 1d3a7d39f7 Move to_node_num to util and updated function calls 2025-11-06 19:05:34 +01:00
Ian McEwen 2065598754 Merge pull request #825 from trose/feature/tdeck-support
Add T-Deck device support
2025-11-06 11:00:56 -07:00
pdxlocations 9285f7d13f add waypoint parameter 2025-10-29 08:58:25 -07:00
SpudGunMan f6f1b748dc hashGen fix
using from https://raw.githubusercontent.com/pdxlocations/mudp/refs/heads/main/mudp/encryption.py

@pdxlocations
2025-10-22 14:21:46 -07:00
SpudGunMan d2d9c03bc8 tidy up the autobot 2025-10-22 14:19:52 -07:00
SpudGunMan c44f9b1bb4 Add Channel Hash Utility to Node class
### Summary

- Added a new method `get_channels_with_hash()` to the `Node` class.
- This method returns a list of dictionaries, each containing the channel index, role, name, and a hash value derived from the channel name and PSK.
- The hash is calculated using the existing `generate_hash` utility, ensuring consistency with other parts of the codebase.
- This utility makes it easier to programmatically access channel metadata, including a unique hash, for scripting, debugging, or integration purposes.

### Motivation

- The protobuf `Channel` objects do not include a hash value by default.
- This addition provides a Pythonic, easy-to-use way to access channel info and a unique hash for each channel, which can be useful for diagnostics, scripting, or UI display.

### Example Usage

```python
channels = node.get_channels_with_hash()
for ch in channels:
    print(f"Index {ch['index']}: {ch['role']} name='{ch['name']}' hash={ch['hash']}")
```

### Impact

- No breaking changes; existing APIs and CLI output remain unchanged.
- The new method is additive and can be used where needed for enhanced channel introspection.
2025-10-22 10:42:54 -07:00
Kelly 6f35eb3923 Merge branch 'meshtastic:master' into master 2025-10-22 09:40:37 -07:00
SpudGunMan da416fcd20 refactor flush
The double flush() is not the root cause; the real issue is that code is trying to use the serial port after it has been closed.
The error occurs both in close() (during flush()) and later in _writeBytes() (during write()), indicating the port is closed or invalid at those times.
2025-10-14 07:54:37 -07:00
SpudGunMan 93da1da386 flush() is only called if the stream is open
This ensures flush() is only called if the stream is open, and logs (but ignores) any exceptions during flush. This should prevent the "Bad file descriptor" error.

I see this error a lot on a rak unit, I dont know this is the way but .. you be the judge.
2025-10-14 07:42:27 -07:00
horrible-knots 2de7c30a27 Plumb timeout from --timeout through MeshInterface
Fix C0301: Line too long

Ignore the pylint for 6 positional arguments
2025-10-13 17:35:30 -04:00
Niklas Roslund 43a685f012 cli: notmalize ignore IDs for dec, hex and 0x. support YAML [] clear
Signed-off-by: Niklas Roslund <nroslund@kth.se>
2025-10-05 12:55:59 +02:00
Ian McEwen 7554c03a26 protobufs: v2.7.10 2025-09-24 21:20:49 -07:00
Taylor Rose 49783d9108 Add T-Deck device support to Meshtastic CLI
- Add T-Deck device definition with verified USB IDs (303a:1001)
- Add T-Deck to supported_devices list
- Uses t-deck firmware identifier and ESP32 device class
- Supports Linux (ttyACM), macOS (cu.usbmodem), and Windows (COM) ports
- Update .gitignore to exclude virtual environment files

T-Deck is now fully supported and automatically detected by the CLI.
2025-09-18 14:39:46 -06:00
Ian McEwen 14ff3eb9c4 Merge branch 'master' into loggingHandler2 2025-09-18 09:26:32 -07:00
Ian McEwen 47e5b04d3b protobufs: v2.7.9 2025-09-18 09:24:33 -07:00
Ian McEwen 593b05dbcd protobufs: v2.7.8 2025-09-12 09:46:52 -07:00
pdxlocations 7e3d347b63 remove trailing whitespaces 2025-08-29 23:19:22 -07:00
pdxlocations c6efccdbd2 init 2025-08-29 23:11:26 -07:00
shukari fe093ac34b fix errors and better linux/windows handling in tests 2025-08-21 15:56:10 +02:00
shukari dd238dcbe3 ignore pathlib import 2025-08-19 22:03:37 +02:00
shukari e330afc899 more paths to os.path.join 2025-08-19 13:38:59 +02:00
shukari a63f3f6e94 use os.path.join for path 2025-08-19 11:23:22 +02:00
shukari 52eb112b95 new Parameter --debuglib for only meshtastic debug, more termios fixes for windows tests
(cherry picked from commit 4fc4d41d3d29998bb7b697bf412be5c1449ea950)
2025-08-19 11:14:38 +02:00
Ian McEwen f5ecd28705 protobufs: v2.7.5 2025-08-18 09:52:48 -07:00