[Question] How to send the report update from a server to connected client? #30
Replies: 3 comments
-
Solved! It seems that you will need to add |
Beta Was this translation helpful? Give feedback.
-
Generally the client device has to enable notifications, otherwise there is no way for you to send them. |
Beta Was this translation helpful? Give feedback.
-
I see. Thanks. Seems like I didn't implement the spec correctly or iOS expects some extra characteristic or something. But after adding the Thank you so much for the library too. Much easier than wrestling with BlueZ source code trying to piece together a server. |
Beta Was this translation helpful? Give feedback.
-
Hi,
This might be a stupid question as I'm not very familiar with Bluetooth in general. I'm so sorry.
I'm trying to emulate a Bluetooth mouse using the library and a Raspberry Pi. I have implement all the required service and characteristic for HID over GATT. The end device, an iPhone, can see and connect to the Pi running the server. It stays connected and read these characteristic:
However, I'm not sure how I can start sending the update to the iOS device, for example new X/Y coordinate. I have a
Characteristic::Report
that has read and notify implement, but it never gets called for some reason. I also have anotherCharacteristic::BootMouseInputReport
with read and write, but that is not called either. After connecting to the iOS device, it just stays there.I looked around a bit and found the example for writing notification using IO, but that still require the iOS device to initiate the notification session first, I think.
So my question is how can I send the update to iOS device after connected? Seems like no way to get the writer without receiving the notification request first.
The services and characteristic I have are:
Please let me know if this is not the appropriate place for this. I will try and remove it asap.
Thank you so much for your time and help.
Beta Was this translation helpful? Give feedback.
All reactions