1 Reply Latest reply on Oct 10, 2016 9:54 AM by jeffr_71

    Reading and writing to peripheral from central

      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.

        • 1. Re: Reading and writing to peripheral from central

          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.