You are here

Reading and writing to peripheral from central | Cypress Semiconductor

Reading and writing to peripheral from central

Summary: 1 Reply, Latest post by jrow on 10 Oct 2016 09:54 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
Gerald Brennan's picture
User
1 post

I was under the impression that the CyBle_GattsReadAttributeValue and CyBle_GattsWriteAttributeValue functions were used by the central to read and write values of the peripheral but it seems they only interact with the local values on the system. My scenario is:

I have 2 pioneer kits, one acting as central and another acting as a peripheral. I just want the central to read the peripheral's values and then update them. I figure its a relatively simple answer but I've been going down the wrong path for a while now and I figure just asking the question is easier.

jrow's picture
Cypress Employee
37 posts

You're almost on the right path; the GATT server methods (CyBle_Gatts...) work with data in the local GATT server, as you have found. The ones that you want are GATT client methods (CyBle_Gattc...) instead. Specifically, refer to:

  • CyBle_GattcReadCharacteristicValue()
  • CyBle_GattcWriteCharacteristicValue()

These are documented in the API reference material.

Log in to post new comments.