This commit is contained in:
geeksville 2020-01-27 16:58:47 -08:00
parent 456014dd5f
commit d2f6156841
4 changed files with 46 additions and 18 deletions

View file

@ -49,11 +49,11 @@ class SoftwareUpdateService : JobIntentService(), Logging {
sync.connect()
// we begin by setting our MTU size as high as it can go
sync.requestMtu(512)
sync.discoverServices() // Get our services
// we begin by setting our MTU size as high as it can go
sync.requestMtu(512)
val service = sync.gatt.services.find { it.uuid == SW_UPDATE_UUID }!!
val totalSizeDesc = service.getCharacteristic(SW_UPDATE_TOTALSIZE_CHARACTER)