Commit Graph
902 Commits
Author SHA1 Message Date
Kevin Hester 111d61ea0a bleak reads can hang if a device walks out of range, cope with that. 2024-06-30 13:00:12 -07:00
Ian McEwen 93fbc78492 Properly handle missing nodes in traceroute response (fixes #612) 2024-06-30 10:04:54 -07:00
Ian McEwen e331bea4ea make typing a little more 3.8-approved 2024-06-30 09:58:32 -07:00
Ian McEwen 4f1ea5b7da Merge pull request #616 from meshtastic/ble-logging
Adds support for ble logging characteristic
2024-06-30 09:33:05 -07:00
Kevin Hester a04b3498b3 make specifying an argument to --seriallog optional
thanks @ianmcorvidae for telling me about the cool nargs='?' option!
2024-06-30 06:54:29 -07:00
Kevin Hester 5c2851db85 nargs='?' is awesome! get rid of ble_dest. 2024-06-30 06:46:39 -07:00
Kevin Hester 7e440693a3 Merge remote-tracking branch 'root/master' into ble-logging
# Conflicts:
#	poetry.lock
2024-06-30 06:36:11 -07:00
Ian McEwen 18c2d08bf0 protobufs: v2.3.13 2024-06-29 17:36:22 -07:00
Kevin Hester 9004f1ed57 fixes for type checker 2024-06-29 15:18:22 -07:00
Kevin Hester bd767af485 A better way to ensure BLE disconnects:
It turns out that Bleak is kinda racey.  If we call disconnect()
and then immediately close() the disconnect may or may not actually happen
(probably because it was merely queued for dbus).
So instead: When we want to close the BLEInterface we call disconnect()
and then in a preregistered 'on disconnect' handler we actually close
down our interface/datastructures.
2024-06-29 15:08:50 -07:00
Kevin Hester 6194e41baf fix linter warnings 2024-06-29 14:37:50 -07:00
Kevin Hester 532ca54ba4 fix bug: we were never calling BLE.disconnect() which...
on linux breaks all but the first connection attempts.
Also remove unneeded event stuff and arbitrary timeouts, better just to
use thread.join()
2024-06-29 14:25:01 -07:00
Kevin Hester 898018ebf3 yay Bleak works again on Linux! 2024-06-29 13:52:46 -07:00
Kevin Hester 9f015f499a wow Bleak now seems pretty buggy to me (compared to 2 yrs ago) 2024-06-29 10:18:37 -07:00
Kevin Hester a24384cbe2 Merge remote-tracking branch 'root/ble-logging' into pr-fixbluetooth 2024-06-29 09:31:28 -07:00
Kevin Hester adbfb328b2 threads should aways be named (for debugability) 2024-06-29 09:29:29 -07:00
Kevin Hester 6df89f54a7 fix BLE scan with latest Bleak 2024-06-29 09:10:20 -07:00
Ben Meadors 897adfb8c2 Adds support for ble logging characteristic 2024-06-29 09:41:06 -05:00
Kevin Hester 6d846c3a63 manually rebuild the protobuf glue files for now... (see PR for info) 2024-06-26 10:12:24 -07:00
Kevin Hester 88b73611f0 Move protobufs to meshtastic.protobuf python namespace 2024-06-26 10:05:59 -07:00
Kevin Hester 0b9af0dcba remove old protobufs (moving to meshtastic.protobuf) 2024-06-25 19:05:46 -07:00
Ian McEwen b15e27c7b6 Merge pull request #587 from FedericoCeratto/drop-timeago 2024-06-25 18:14:27 -07:00
Ian McEwen 267923fdc5 Add hypothesis fuzzing test for _timeago 2024-06-25 18:14:07 -07:00
Ian McEwen 9ab1b32bdb make pylint happy with a docstring 2024-06-25 18:09:20 -07:00
Kevin Hester 8456f36c6b add NordicSemi Power Profiler Kit 2 device to the USB blacklist 2024-06-23 17:18:04 -07:00
Kevin Hester 81266e756b fixes to make Bleak (BLE) work better 2024-06-23 13:52:32 -07:00
Kevin Hester 62f16d34d4 fix BLE scan and connect to work with latest bleak 2024-06-23 11:56:44 -07:00
geeksville ccfb04720f Add a whitelist of known meshtastic USB VIDs to use a default serial ports.
Initially only RAK4631 and heltec tracker are listed
2024-06-21 14:42:29 -07:00
Federico Ceratto c34d08b0e5 Refactor timeago and add tests
_timeago is not specialized for mesh interfaces so it is factored
out into a private function
2024-06-21 10:28:45 +02:00
Federico Ceratto b5d1b7612f Replace timeago
Replace the timeago library with a simple function
2024-06-21 09:25:39 +02:00
Ian McEwen 23f41bff0a Improve ACK handling: correctly pass them to onAckNak handlers, and add a mechanism for other handlers to request acks as well. 2024-06-20 16:52:01 -07:00
Ian McEwen b06329f47e Remove dotmap and pexpect from setup.py, they shouldn't be required 2024-06-20 16:40:46 -07:00
Ian McEwen 53b0e35b0c protobufs: v2.3.12 2024-06-09 19:30:11 -07:00
Ian McEwen 5441266565 Wait for response with --device-metadata. Fixes #527 2024-06-08 07:26:20 -07:00
Ian McEwen e27d210a71 Test with --dest on setlat/remove-position for the error/exit case 2024-06-05 19:57:40 -07:00
Ian McEwen 16c08b8b47 Add simple --remove-position test 2024-06-05 19:54:12 -07:00
Ian McEwen ebd3c7f5e8 Add test for fromStr base64 branch 2024-06-05 19:48:58 -07:00
Ian McEwen da0312a5b0 more miscellaneous types 2024-06-05 19:44:18 -07:00
Ian McEwen 919ae8c40f make pylint happy, again 2024-06-05 19:32:45 -07:00
Ian McEwen dd4fccbc77 Add a fairly simple property-based test as a starting point 2024-06-05 19:29:55 -07:00
Ian McEwen 9dab76bb64 quell pylint 2024-06-05 18:56:19 -07:00
Ian McEwen e6d61c6603 Allow a faster nodedb-less startup on 2.3.11+ with --no-nodes and the magic value from meshtastic/firmware#3949 2024-06-05 18:52:35 -07:00
Nerdenator 87a4bb0888 quick-coverage: fixing linting issues. 2024-06-04 01:15:10 -05:00
Nerdenator d72cc0e201 quick-coverage: simple test case just to cover uncovered code. 2024-06-04 01:01:32 -05:00
Ian McEwen b350b9eab9 Update the main module docstring to be a bit more accurate, at least 2024-06-01 23:03:56 -07:00
Ian McEwen dc112f2f3a protobufs: v2.3.11 2024-06-01 12:04:01 -07:00
Ian McEwen bbc526d0a8 Merge pull request #584 from ianmcorvidae/improve-fixed-position
Use new fixed position admin messages and add `--remove-position` argument
2024-06-01 00:44:17 -07:00
Ian McEwen e8dfee8454 Fix rounding of position values when converting from integer to float in _fixupPosition. Fixes #572 2024-05-31 18:57:30 -07:00
Ian McEwen 1746ad15d7 Use new fixed position admin messages and add --remove-position argument. Fixes #525 2024-05-31 18:44:33 -07:00
Ian McEwen 4d67e7fc76 Fix up/add some more types 2024-05-30 17:51:42 -07:00