This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How is iOS's support for BLE write request?

A little background with this question

So, long story short:

To send data using notification, in android, you must first enable CCCD descriptor of matching attribute (which is usually a characteristic)

The proper way to do that is using some sort of "write request".

Problem: it is often confused with "write".

Now you are asking: then use "write request"? Here's the problem: official android API does not support write request, it only has "write".

Now again you are asking, then override some parent method/class and use "write request" afterwards? Here's another problem: you can, but you would be using a different android library/bluetooth framework, a non-official one which is prone to problems OR you will have to tap right into some lower level android properties, which may or may not be legal, and usually is very, very complicated.

So here I'm trying to ask, does iOS have the same problem? Does it distinguish "write" and "write request" per ble specs well?

Parents
  • I'm pretty sure you are still barking up a very wrong tree. Android phones have been successfully subscribing to notifications since CCCDs existed and they've been doing it on stock android OS and with stock android code. If android phones en-masse weren't able to subscribe to notifications, someone would have noticed.

    The only difference between write requests and write commands is the fact or not of a response. So any write effectively works as well as any other, it writes the characteristic. And doesn't android, vile little phone os that it is, have a setWriteType method to specify what kind of write it's going to do on that characteristic the next time you write it? iOS has two methods for writing, same effect, different approach.

    I'm fairly sure the problem you've been struggling with for weeks has nothing to do with this.

Reply
  • I'm pretty sure you are still barking up a very wrong tree. Android phones have been successfully subscribing to notifications since CCCDs existed and they've been doing it on stock android OS and with stock android code. If android phones en-masse weren't able to subscribe to notifications, someone would have noticed.

    The only difference between write requests and write commands is the fact or not of a response. So any write effectively works as well as any other, it writes the characteristic. And doesn't android, vile little phone os that it is, have a setWriteType method to specify what kind of write it's going to do on that characteristic the next time you write it? iOS has two methods for writing, same effect, different approach.

    I'm fairly sure the problem you've been struggling with for weeks has nothing to do with this.

Children
No Data
Related