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

How to send the data from central to peripheral

Hi,

I am using the nrf51422 controller and other controller which contains Bluetooth .The nrf51422 Bluetooth is central and other controller Bluetooth is peripheral.I am using SDK 12.3 in which i am using ble_central\ble_app_blinky for nrf51 422 Bluetooth .I have tried this example program so the nrf51422 bluetooth is paired with other controller bluetooth by changing the device name in example program instead of "nordic_blinky" to my device name.So as of now it is paired now i need to send the data from the nrf51422 to peripheral  bluetooth so in this example program the data  send function is not there .so i have included the send function in this example program here the problem is data is not sending to peripheral.can you tell me what is the problem.

I thought of using ble_central\ble_app_uart program .In this program the Bluetooth is connecting based on the uuid of the device.Here i don't know what  is the uuid of the peripheral  Bluetooth

so i have tried this  example  ble_central\ble_app_blinky.Soplz can you tell me how to send the data.

void send_ble_data(uint8_t * p_data, uint16_t length)
{
static uint8_t data_array[BLE_NUS_MAX_DATA_LEN];
memcpy(data_array, p_data, length);
ble_nus_c_string_send(&m_ble_nus_c, data_array, length);
NRF_LOG_INFO("sent.\r\n");
}

Parents Reply
  • Can you plz tell me how to send the data through ble_lbs_led_status_send()  function. Bcoz in this function the led status  is there .Then my question is how do i send the data through this function.

    I can't use Nordic UART client/server service bcoz the server side i am using other bluetooth controller i don't know how to connect the bluetooth through the NUS service. Can you plz tell me how to send the data

Children
Related