mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-29 11:13:41 -04:00
Fix autobug: some BLE implementations might not be completed
with service enumeration by the time they call the discover services callback. Therefore be careful to not touch "service" until after the 500ms delay everyone on stackoverflow says these buggy drivers need.
This commit is contained in:
@@ -376,7 +376,7 @@ class RadioInterfaceService : Service(), Logging {
|
||||
// FIXME - no need to discover services more than once - instead use lazy() to use them in future attempts
|
||||
safe!!.asyncDiscoverServices { discRes ->
|
||||
discRes.getOrThrow() // FIXME, instead just try to reconnect?
|
||||
debug("Discovered services! Service size=${service.characteristics.size}")
|
||||
debug("Discovered services!")
|
||||
|
||||
// we begin by setting our MTU size as high as it can go
|
||||
safe!!.asyncRequestMtu(512) { mtuRes ->
|
||||
|
||||
Reference in New Issue
Block a user