mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
transmit write packets to the radio
This commit is contained in:
parent
6cebf063d7
commit
456014dd5f
3 changed files with 32 additions and 12 deletions
|
|
@ -48,6 +48,10 @@ class SoftwareUpdateService : JobIntentService(), Logging {
|
|||
val firmwareSize = firmwareStream.available()
|
||||
|
||||
sync.connect()
|
||||
|
||||
// we begin by setting our MTU size as high as it can go
|
||||
sync.requestMtu(512)
|
||||
|
||||
sync.discoverServices() // Get our services
|
||||
|
||||
val service = sync.gatt.services.find { it.uuid == SW_UPDATE_UUID }!!
|
||||
|
|
@ -57,9 +61,6 @@ class SoftwareUpdateService : JobIntentService(), Logging {
|
|||
val crc32Desc = service.getCharacteristic(SW_UPDATE_CRC32_CHARACTER)
|
||||
val updateResultDesc = service.getCharacteristic(SW_UPDATE_RESULT_CHARACTER)
|
||||
|
||||
// we begin by setting our MTU size as high as it can go
|
||||
sync.requestMtu(512)
|
||||
|
||||
// Start the update by writing the # of bytes in the image
|
||||
logAssert(
|
||||
totalSizeDesc.setValue(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue