This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sending Data from Central to Peripheral in ble_app_hrs_c to ble_app_hrs

Hello, 

I want to send data from central device to peripheral device. I am currently using nRF52DK.

While sending data from peripheral to central device, data is sent successfully. but while sending data from central to peripheral device, I am unable to do so and could not get any way to do so. Kindly help me in this regard.

I am using ble_app_hrs_c for central and ble_app_hrs for peripheral.

Parents
  • If you would like to send data from a central (client) to a peripheral (server) while in a connection, you would need to write to one of the characteristic which the peripheral has implemented. In order to write to a characteristic, it needs to have a WRITE property, and none of the characterstics in the ble_app_hrs peripheral examples have that.

    You can solve your problem by adding an additional charactertistic to one of the services in the ble_app_hrs peripheral example (Heart Rate or Battery Service). Another solution is to create a custom service in the peripheral code, and modify the central code accordingly. Here is a nice tutorial that goes through the steps of how to create your own custom service

    Best regards,

    Simon

Reply
  • If you would like to send data from a central (client) to a peripheral (server) while in a connection, you would need to write to one of the characteristic which the peripheral has implemented. In order to write to a characteristic, it needs to have a WRITE property, and none of the characterstics in the ble_app_hrs peripheral examples have that.

    You can solve your problem by adding an additional charactertistic to one of the services in the ble_app_hrs peripheral example (Heart Rate or Battery Service). Another solution is to create a custom service in the peripheral code, and modify the central code accordingly. Here is a nice tutorial that goes through the steps of how to create your own custom service

    Best regards,

    Simon

Children
No Data
Related