简体   繁体   中英

Reading/writing Device Name characteristic of BLE Device in iOS 7

I want to rename the device name of BLE Device. In iOS 6.1.3, I am able to write the "Device Name" Characteristic of Generic Access Profile Service. But in iOS 7 and later, CBPeripheral is unable to discover the Generic Access Profile Service(1800).

My Question is that Is it possible to read/write Device Name characteristic of BLE Device in iOS 7? If it is possible, then how can I do that? If apple has removed this support in iOS7 and greater, then what is alternate to do this?

iOS prevents that Service from being usable by a developer. Section 3.12 (page 24) documents the fact iOS does not let a developer use that Service (and a couple others) https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf

I ended up making a custom Characteristic that an app could write to. The firmware would handle that write request and then update the device name and advertising packet. It's seems hacky, but I wasn't able to find a better solution. It's unfortunate that iOS blocks this because it makes it impossible to make a device that is compatible with other apps unless someone makes a separate 'custom device name' standard or something...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM