fix packet size issue
This commit is contained in:
@@ -240,6 +240,8 @@ export default class Updater {
|
|||||||
|
|
||||||
// write file length
|
// write file length
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
// set mtu
|
||||||
|
this.bleObject.requestMtu(this.bleDeviceId, this._packetSize, (mtu: number) => { this._packetSize = mtu}, () =>{ })
|
||||||
// start notify
|
// start notify
|
||||||
this.bleObject.startNotification(this.bleDeviceId, this._updaterServiceUUID, this._updaterCommandCharacterisitcUUID,
|
this.bleObject.startNotification(this.bleDeviceId, this._updaterServiceUUID, this._updaterCommandCharacterisitcUUID,
|
||||||
(rawData: ArrayBuffer): void => {
|
(rawData: ArrayBuffer): void => {
|
||||||
|
|||||||
Reference in New Issue
Block a user