- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I Have defined a Custom service "Acc", with custom characteristic "Data". This characteristic has 3 fields X,Y,Z (Readings from Accelerometer uint16).
I'm unable to figure out how to put the Readings I get into these fields. I'm looking for the specific API or set of API's that do this.
Also I also want to display the fields on my phone. What will be the best way to do that?
PFA Screenshot of this
Regards,
Viraj
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want the data to be persistent on the sending/server side, then you will want to write it to the GATT database on the server with: CyBle_GattsWriteAttributeValue(&handle_value_pair, 0, &cyBle_connHandle, CYBLE_GATT_DB_PEER_INITIATED);
otherwise, like hima said, it would be simplest to not track any data on the accelerometer/server sending the data, but rather to send the data as notifications, and then track/store it on the phone. (Assuming you are constantly receiving the accelerometer data)
As far as phone application/display...you're on your own for that I don't know anything about phone development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can send these details as notifications. You can look at any custom profile example.
(Eg: Project #047: PSoC 4 BLE - Accelerometer Controlled Car | Cypress Semiconductor )
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want the data to be persistent on the sending/server side, then you will want to write it to the GATT database on the server with: CyBle_GattsWriteAttributeValue(&handle_value_pair, 0, &cyBle_connHandle, CYBLE_GATT_DB_PEER_INITIATED);
otherwise, like hima said, it would be simplest to not track any data on the accelerometer/server sending the data, but rather to send the data as notifications, and then track/store it on the phone. (Assuming you are constantly receiving the accelerometer data)
As far as phone application/display...you're on your own for that I don't know anything about phone development