Can Central and Peripherals receive AND send data?

Hello everyone,

I am working with the SDK v17.1.0 with the DK nRF52832 with the examples of ble_app_uart and ble_app_uart_c.

I managed to implement a multilink communication of BLE over UART with two peripherals and a central. 

What I have now is a nrf52832 central only receiving data from its nrf52832 peripherals.

These nrf52832 peripherals are programmed to send commands to another card and retrieve data. Once the data is being retrieved, each peripheral send 62 bytes through BLE to the central.

What I would like is the central to send the commands over BLE to each peripheral. That implies the central and the peripherals to send and receive packets. Is it possible?

Thank you for your time and help!

Vincent

Parents
  • Hello, 

    When the Central sends, use sd_ble_gattc_write(uint16_t conn_handle, ble_gattc_write_params_t const *p_write_params), and obtain the conn_handle of different Peripherals when connecting, which is used to distinguish different Peripherals devices and the characteristic value parameters of the Peripherals.

    To get the Peripherals notification data, you can get it in BLE_GATTC_EVT_HVX in ble_evt_handler().

    If you want to use the official demo, can refer to \examples\ble_central\ble_app_uart_c

    Hope it helps.

    Thanks and best regards

    Zara Wu (RF-star technology)

Reply
  • Hello, 

    When the Central sends, use sd_ble_gattc_write(uint16_t conn_handle, ble_gattc_write_params_t const *p_write_params), and obtain the conn_handle of different Peripherals when connecting, which is used to distinguish different Peripherals devices and the characteristic value parameters of the Peripherals.

    To get the Peripherals notification data, you can get it in BLE_GATTC_EVT_HVX in ble_evt_handler().

    If you want to use the official demo, can refer to \examples\ble_central\ble_app_uart_c

    Hope it helps.

    Thanks and best regards

    Zara Wu (RF-star technology)

Children
No Data
Related