Kevin Hester
5b653d29f8
reformat per coding conventions
2021-03-29 20:33:06 +08:00
Kevin Hester
2c75d0dee7
WIP add concept of interface factories
2021-03-29 20:29:38 +08:00
Kevin Hester
2ec15bf7b1
remove support for the old address prefs key (deprecated pre 1.0)
2021-03-29 19:56:32 +08:00
Kevin Hester
ae402e8fd2
add warning text for downrev apps
2021-03-02 13:22:55 +08:00
Kevin Hester
d11e7674f6
fix autobug: don't spam crashlytics when we expect position sending to fail
2021-02-04 23:39:44 +08:00
Kevin Hester
7d846461e4
mock interface now pretty completely simulates a real device
2021-02-01 11:53:22 +08:00
Kevin Hester
a0160cadf9
WIP to improve simulator
2021-02-01 10:31:39 +08:00
Kevin Hester
f754a19c95
bug #206 - also add reportException to make non fatal and report bug
...
via analytics (in case my theory is wrong)
2020-12-12 11:09:17 +08:00
Ken Van Hoeylandt
8219ef42ed
improved readability on BluetoothStateReceiver
...
and renamed `intent` to `intentFilter` to properly reflect type
2020-09-17 20:47:54 +02:00
geeksville
7b46046af6
cancel all jobs when we shutdown interface (an autobug)
2020-07-18 14:23:58 -07:00
geeksville
979c7f407f
fix a couple of places where we were leaking macaddrs into logs (kinda PII)
2020-07-07 10:44:06 -07:00
geeksville
777e0f6775
fix autobug on a "redmi 5 plus" phone. This phone repeatedly (and rapidly) tells the phone the BLE device is bonded...
...
which was cause the RadioInterfaceService to screate two instances of of the BluetoothInterface (ouch). So now rather than checking for isConnected when
changing device addresses, we check for 'isStarted' which is a new state we've added. Interfaces progress from !started to started to started+connected. When an interface disconnects it goes !connected. When the user stops an interface it goes !started.
annotated crashlytics log follows
419 | Mon Jul 06 2020 18:21:34 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.BTScanModel: BTScan component active
420 | Mon Jul 06 2020 18:21:34 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.BTScanModel: starting scan
421 | Mon Jul 06 2020 18:21:35 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.BTScanModel: onScanResult DeviceListEntry(name=...a14, addr=...:16)
422 | Mon Jul 06 2020 18:21:35 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.BTScanModel: onScanResult DeviceListEntry(name=...ad8, addr=...:DA)
423 | Mon Jul 06 2020 18:21:35 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.SettingsFragment: We have location access
424 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.SLogging: Received bond state changed 12
425 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.SLogging: Bonding completed, state=12
426 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.BTScanModel: Changing device to ...:16 *** bond complete occurred so we started service and tried to connect
427 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: Passing through device change to radio service: xCC:50:E3:B6:0A:16
428 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.analytics.GoogleAnalytics: Analytics: track mesh_bond
429 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.RadioInterfaceService: stopping interface com.geeksville.mesh.service.BluetoothInterface@b3a5506
430 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Closing BluetoothInterface
431 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Closing our GATT connection
432 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: new bluetooth connection state 0, status 0
433 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Got disconnect because we are shutting down, closing gatt
434 | Mon Jul 06 2020 18:21:36 GMT-0700 (Pacific Daylight Time) | mesh_bond
435 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Failing 0 works, because Connection closing
436 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.RadioInterfaceService: Broadcasting connection=false
437 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.RadioInterfaceService: Setting bonded device to xCC:50:E3:B6:0A:16
438 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.RadioInterfaceService: Starting radio xCC:50:E3:B6:0A:16
439 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Creating radio interface service. device=...:16
440 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: connect
441 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: connect
442 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: Discarding NodeDB
443 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService$Companion: Trying to start service
444 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: new bluetooth connection state 2, status 0
445 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.SLogging: Received bond state changed 12 ** BONDED
446 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: work connect is completed, resuming status=0, res=kotlin.Unit
447 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Connected to radio! *** in connect callback
448 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.SLogging: Bonding completed, state=12
449 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.BTScanModel: Changing device to ...:16 *** bond complete occurred so we started service and tried to connect SECOND TIME
450 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: Passing through device change to radio service: xCC:50:E3:B6:0A:16
451 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.analytics.GoogleAnalytics: Analytics: track mesh_bond
452 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.RadioInterfaceService: stopping interface com.geeksville.mesh.service.BluetoothInterface@fe0fede
453 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Closing BluetoothInterface
454 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Closing our GATT connection
455 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: new bluetooth connection state 0, status 0
456 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Got disconnect because we are shutting down, closing gatt
457 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | mesh_bond
458 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Failing 0 works, because Connection closing
459 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.RadioInterfaceService: Setting bonded device to xCC:50:E3:B6:0A:16
460 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.RadioInterfaceService: Starting radio xCC:50:E3:B6:0A:16
461 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Creating radio interface service. device=...:16
462 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: connect
463 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: connect
464 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: Discarding NodeDB
465 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService$Companion: Trying to start service
466 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: new bluetooth connection state 2, status 0
467 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: work connect is completed, resuming status=0, res=kotlin.Unit
468 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Connected to radio!
469 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: Received broadcast com.geeksville.mesh.CONNECT_CHANGED
470 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: onConnectionChanged=DISCONNECTED
471 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.analytics.GoogleAnalytics: Analytics: track mesh_disconnect
472 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.analytics.GoogleAnalytics: Analytics: track num_nodes
473 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: Requesting foreground service=true *** TWO REQUEST FOREGROUND
474 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.ui.BTScanModel: onScanResult DeviceListEntry(name=...a14, addr=...:16)
475 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.MeshService: Requesting foreground service=true
476 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.MainActivity: Received from mesh service Intent { act=com.geeksville.mesh.MESH_CONNECTED flg=0x10 (has extras) }
477 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: reqMtu
478 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: reqMtu
479 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Starting failsafe timer 10000
480 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.MainActivity: connchange DISCONNECTED
481 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | mesh_disconnect
482 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | num_nodes
483 | Mon Jul 06 2020 18:21:37 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: reqMtu
484 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: reqMtu
485 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Starting failsafe timer 10000
486 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: work reqMtu is completed, resuming status=0, res=kotlin.Unit *** TWO MTU RUNNIGN!!!
487 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: MTU change attempted
488 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: discover
489 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: discover
490 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: work reqMtu is completed, resuming status=0, res=kotlin.Unit
491 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: MTU change attempted
492 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: discover
493 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: discover *** we have TWO DISOVERS RUNNING!!!!
494 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: work discover is completed, resuming status=0, res=kotlin.Unit
495 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Discovered services!
496 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: work discover is completed, resuming status=0, res=kotlin.Unit
497 | Mon Jul 06 2020 18:21:38 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Discovered services!
498 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Scheduling reconnect because Unexpected error in initial device enumeration, forcing disconnect com.geeksville.mesh.service.RadioNotConnectedException: BLE service not found
499 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Forcing disconnect and hopefully device will comeback (disabling forced refresh)
500 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Closing our GATT connection
501 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Scheduling reconnect because Unexpected error in initial device enumeration, forcing disconnect com.geeksville.mesh.service.RadioNotConnectedException: BLE service not found
502 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Forcing disconnect and hopefully device will comeback (disabling forced refresh)
503 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Closing our GATT connection
504 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: new bluetooth connection state 0, status 0
505 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Got disconnect because we are shutting down, closing gatt
506 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Failing 0 works, because Connection closing
507 | Mon Jul 06 2020 18:21:39 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Failing 0 works, because Connection closing
508 | Mon Jul 06 2020 18:21:40 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Attempting reconnect
509 | Mon Jul 06 2020 18:21:40 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth: Enqueuing work: connect
510 | Mon Jul 06 2020 18:21:40 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.SafeBluetooth$BluetoothContinuation: Starting work: connect
511 | Mon Jul 06 2020 18:21:40 GMT-0700 (Pacific Daylight Time) | com.geeksville.mesh.service.BluetoothInterface: Attempting reconnect
512 | Mon Jul 06 2020 18:21:40 GMT-0700 (Pacific Daylight Time) | com.geeksville.util.Exceptions: MeshService-coroutine coroutine-exception (exception currentWork was not null: Work:connect)
Non-fatal Exception: java.lang.AssertionError: currentWork was not null: Work:connect
at com.geeksville.mesh.service.SafeBluetooth.asyncConnect(SafeBluetooth.java:531)
at com.geeksville.mesh.service.BluetoothInterface.startConnect(BluetoothInterface.java:464)
at com.geeksville.mesh.service.BluetoothInterface.retryDueToException(BluetoothInterface.java:342)
at com.geeksville.mesh.service.BluetoothInterface$retryDueToException$1.invokeSuspend(BluetoothInterface.java:11)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:665)
0.7.90
2020-07-07 10:39:26 -07:00
geeksville
bae1a124d2
Don't bounce the interface if the UI changes to a device we are already using
2020-07-04 16:54:48 -07:00
geeksville
b3f0ef6b09
now that BLE and UART are equal peers, much cleaner to look for
...
BLE disable/enable in the general RadioInterfaceService
2020-06-20 14:50:15 -07:00
geeksville
7cca69be0d
properly mark when we are disconnected
2020-06-14 16:43:36 -07:00
geeksville
65294fd638
Return "n" if user has selected device none - fixes autoselect of
...
the first BLE device that shows up
2020-06-14 09:24:51 -07:00
geeksville
e4223d6476
prevent race condition if meshservice starts running before radiointerface
2020-06-11 11:20:51 -07:00
geeksville
005ab16283
except for dynamic device probing USB serial works pretty good now #38
2020-06-09 09:53:32 -07:00
geeksville
4ba7acc307
don't filter devices that are not currently connected
2020-06-09 07:46:19 -07:00
geeksville
ad71602b7d
#38 USB reading now somewhat works WIP
2020-06-08 19:15:18 -07:00
geeksville
0c8e2ca1ac
USB device port support WIP
...
https://github.com/meshtastic/Meshtastic-Android/issues/38
2020-06-08 18:24:36 -07:00
geeksville
303fb86aa6
oops - we want to compare aganst the old interface, not the new one
2020-06-07 22:39:57 -07:00
geeksville
6a71e6c414
0.7.0 my robotester script found a bug in my previous change!
...
properly map bluetooth addresses to the new transport independent address
2020-06-07 20:39:51 -07:00
geeksville
ce14fde33b
Fix #36 - allow users to select 'none' for the preferred radio
...
If none is selected, we do not leave our service running. And we do
not start it on boot.
2020-06-07 18:55:08 -07:00
geeksville
30137efc68
WIP - cleaned up BLE vs serial interface approximately works
2020-06-07 17:11:30 -07:00
geeksville
cecc369598
split out common code for USB and BLE links
2020-06-04 12:34:34 -07:00
geeksville
d526d11d20
Fix #32
...
+ // Note: To workaround https://issuetracker.google.com/issues/36995652
+ // Always call BluetoothDevice#connectGatt() with autoConnect=false
+ // (the race condition does not affect that case). If that connection times out
+ // you will get a callback with status=133. Then call BluetoothGatt#connect()
+ // to initiate a background connection.
2020-06-04 09:35:25 -07:00
geeksville
ef61c9acff
add note about https://github.com/meshtastic/Meshtastic-Android/issues/32
2020-06-04 08:02:36 -07:00
geeksville
ed4236d8e3
only use the new api now, old device loads have been out a while
2020-05-30 16:23:42 -07:00
geeksville
67d95039bf
begin support for message status
2020-05-30 14:38:16 -07:00
geeksville
238ae9a06c
fix autobug, if we don't have a gatt currently, treat as a BLEException
2020-05-24 11:15:13 -07:00
geeksville
74449be999
don't spam with autobugs if we just fail because the device is off
2020-05-24 10:46:27 -07:00
geeksville
a191dac0f4
stay with old api for now, because too much change hurts reliaiblity ;-)
2020-05-24 10:12:12 -07:00
geeksville
4efd25d009
Possible fix #26 . It seems some phones don't quite have the services
...
list populated at the time they say service discovery has completed.
Make the nasty 500ms delay a 1000ms delay instead
2020-05-24 09:51:25 -07:00
geeksville
bba9def20e
it has been a couple of weeks since new API rolled out, now just
...
always use it
2020-05-24 08:47:36 -07:00
geeksville
3c338aec61
firmware update progress bar kinda works
2020-05-14 11:47:24 -07:00
geeksville
6576f5eab5
backend updated to reneable firmware update
2020-05-13 14:47:55 -07:00
geeksville
877006f26b
temp code for testing failures
2020-05-10 21:39:23 -07:00
geeksville
5822dddc6c
Fix #23 : autobug, if we get mystery BLE error 133 while reading messages
...
drop the BLE link and reconnect and try again.
2020-04-26 13:03:35 -07:00
geeksville
e302848607
0.5.5 only try to set max MTU once, if it fails consider phone buggy
2020-04-24 15:49:34 -07:00
geeksville
3e89510f52
Some phones have buggy race conditions wrt finding services or characteristics
...
This workaround is: If we fail in that way during initial device connection
we disconnect() and try again 500 ms later.
2020-04-24 15:22:54 -07:00
geeksville
a3db3eca06
We now detect and use the newapi if the device doesn't offer the old one
2020-04-23 12:08:34 -07:00
geeksville
a5eaa057a1
new ble api approximately works for reading
2020-04-23 11:24:57 -07:00
geeksville
6f5c7b2452
move logging to the IO thread
2020-04-22 08:20:57 -07:00
geeksville
8ec8b038b6
Increase MTU _before_ discovering services, because it will speed up the link
2020-04-22 08:10:23 -07:00
geeksville
b194659e8a
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.
2020-04-22 07:25:07 -07:00
geeksville
671bafa05f
don't leak macaddrs into logs - could be possibly personally identifying
2020-04-21 08:21:42 -07:00
geeksville
c00ca9b3db
move notify later, to see if the autobug is _all_ BLE transactions or just notfiies
2020-04-21 07:57:07 -07:00
geeksville
2a52b707ee
fix autobug: some phones call gatt connected but with an error status code
2020-04-20 10:37:46 -07:00
geeksville
34aa4cde05
if bluetooth was disabled when we started, reattempt device connect later
2020-04-20 09:56:38 -07:00