Commit Graph

26 Commits

Author SHA1 Message Date
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
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
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
Ian McEwen
1ebea53703 make pylint happy with import order 2024-05-11 22:28:50 -07:00
Ian McEwen
ba2d6c9d93 continue progressively typing things (SerialInterface/BLEInterface initializations) 2024-05-11 22:27:31 -07:00
Ian McEwen
9b5943192d Make pylint happy with ble_interface.py 2024-03-19 13:18:15 -07:00
Wolfgang Nagele
4ebb928400 Make BLE connections a bit more resilient 2024-03-13 14:08:32 +01:00
Wolfgang Nagele
0a8a193081 BLE Support 2024-01-15 21:33:53 +01:00
Thomas Göttgens
7e6f13f0a2 establish trunk format 2023-03-31 20:09:59 +02:00
Mike Kinney
0f89baa36e fix the pylint unused-argument warnings 2022-01-12 14:41:49 -08:00
Mike Kinney
bc17e9b389 fixes for working on mac air 2022-01-11 16:36:39 -08:00
Mike Kinney
5c662822b9 need to fully qualify imports so projects consuming the library will work 2022-01-05 11:16:08 -08:00
Mike Kinney
2fcfdeb04f minor formatting; added unit tests for Node() 2021-12-16 09:10:45 -08:00
Mike Kinney
ef9a97d1f7 initial test_ble_interface; add another unit test 2021-12-15 16:15:46 -08:00
Mike Kinney
6d2a187d38 fix pylint warnings 2021-12-06 23:01:34 -08:00
Mike Kinney
b40eb08c5c refactor classes into respective files 2021-12-06 22:19:26 -08:00