Command to write to a custom characterstic with BLE configured as Client and Central

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi All,

   

I'm looking to write to a custom service with a PSoC configured as a Client/Central that is connected to a Peripheral device. The command that I use for a PSoC configured as a Server/Peripheral to write to a Central, CyBle_GattsWriteAttributeValue(), requires a handle to the service and handles are not generated for the Client/Central configuration. I was wondering if someone could point me in the right direction. My ultimate goal is to be able to write to custom services from either the Peripheral or Central side.

   

Thanks,

   

Nick

0 Likes
1 Solution
Anonymous
Not applicable

Please have a look at AN91162 (http://www.cypress.com/documentation/application-notes/an91162-creating-ble-custom-profile). This has code to write to a client using CyBle_GattsWriteAttributeValue. Also, the central can write to the peripheral device and can be read using the event CYBLE_EVT_GATTS_WRITE_REQ.

   

Another useful project would be the BLE-UART bridge example project:

   

http://www.cypress.com/blog/100-projects-100-days/project-020-uart-ble-bridge

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

Please have a look at AN91162 (http://www.cypress.com/documentation/application-notes/an91162-creating-ble-custom-profile). This has code to write to a client using CyBle_GattsWriteAttributeValue. Also, the central can write to the peripheral device and can be read using the event CYBLE_EVT_GATTS_WRITE_REQ.

   

Another useful project would be the BLE-UART bridge example project:

   

http://www.cypress.com/blog/100-projects-100-days/project-020-uart-ble-bridge

0 Likes