Skip to content

does not implement -[peripheral:didModifyServices:] #756

@sdetweil

Description

@sdetweil

relative to #329. from 2016

I have a device that has over the air firmware upgrade support. on a different service from the main ble services.
I do NOT want that service findable except when OTA is started.

so, I write a characteristic on the existing services, and it adds the OTA service, and changes the primary UUID.

but when I try to send to the new service (on the same device) I get error

send data error ={"message":"Service not found","name":"c8:f0:9e:75:25:6a","error":"service","address":"684C6956-37BB-46B0-32E7-369897ABFDCE"}

the write also forces a disconnect.

so, I've added a close() after the write.. to signal the connection is not valid
then a new connect

and then a new discover... but it shows only the old services

To Native Cordova ->  BluetoothLePlugin close BluetoothLePlugin491036025 ["options": [{
    address = "684C6956-37BB-46B0-32E7-369897ABFDCE";
}]]
⚡️  [log] - start ota after write
⚡️  [log] - disconnected rc={"name":"c8:f0:9e:75:25:6a","address":"684C6956-37BB-46B0-32E7-369897ABFDCE","status":"closed"}
To Native Cordova ->  BluetoothLePlugin connect BluetoothLePlugin491036026 ["options": [{
    address = "684C6956-37BB-46B0-32E7-369897ABFDCE";
}]]
⚡️  [log] - startOTA after reconnect
To Native Cordova ->  BluetoothLePlugin discover BluetoothLePlugin491036027 ⚡️  [log] -  calling discover after OTA started
["options": [{
    address = "684C6956-37BB-46B0-32E7-369897ABFDCE";
}]]
⚡️  [log] - discover results OTA={"status":"discovered","services":[{"characteristics":[{"descriptors":[],"properties":{"write":true},"uuid":"9A61"},{"descriptors":[],"properties":{"write":true},"uuid":"9A62"},{"descriptors":[],"properties":{"write":true,"read":true},"uuid":"9AFF"},{"descriptors":[{"uuid":"2902"}],"properties":{"notify":true,"read":true},"uuid":"2A05"},{"descriptors":[],"properties":{"read":true},"uuid":"9A63"},{"descriptors":[],"properties":{"write":true},"uuid":"9A64"}],"uuid":"21010001-27B9-42F0-82AA-2E951747BBF9"},{"characteristics":[{"descriptors":[],"properties":{"write":true},"uuid":"9A61"},{"descriptors":[],"properties":{"write":true},"uuid":"9A62"},{"descriptors":[],"properties":{"write":true,"read":true},"uuid":"9AFF"},{"descriptors":[{"uuid":"2902"}],"properties":{"notify":true,"read":true},"uuid":"2A05"},{"descriptors":[],"properties":{"read":true},"uuid":"9A63"},{"descriptors":[],"properties":{"write":true},"uuid":"9A64"}],"uuid":"21010011-27B9-42F0-82AA-2E951747BBF9"}],"name":"c8:f0:9e:75:25:6a","address":"684C6956-37BB-46B0-32E7-369897ABFDCE"}

nrfconnect shows the new service
Screenshot_20230616_093116_nRF Connect
Screenshot_20230616_093102_nRF Connect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions