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

Sending configuration data from central to peripheral

Hi,

I am using nRF52840 Preview DK with SDK version 15.3

I want to connect to a peripheral and configure some of its behavior such as Transmission power, Transmission interval and also trigger some functions and write to some variables, how can I go about doing that ?

I have seen some examples where peripheral send data to the central, but I want to know how the reverse works.

  • There are roughly two ways of sending data between two devices in a BLE GATT connection. Depending on the direction of the data flow, the method differ. When sending data from a client to a server, a write is performed, and you are updating the values of a characteristic in the servers GATT table. When sending data from a server to a client, a notification is send, and you are notifying the client about a change in the GATT table.

    Take a look at the ble_app_uart_c (central) example to see how a write is perfomed.

    It is done in: uart_event_handle(..)-->ble_nus_c_string_send(.)-->sd_ble_gattc_write(..)

    The last function is the one of interest to you.

    Best regards,

    Simon

Related