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

how to use nordic Connect SDK v1.5.0 to creat two ble service for nrf5340dk?

  I use a sample in NCS1.5.0 to start my project . but examples in NCS1.5.0 are single ble service .always like these: bt_conn_cb_register(&conn_callbacks);  bt_enable(bt_ready_cb_t cb); bt_le_adv_start(); and register a ble service .    

  i want to creat two independent separate  ble service .

Parents
  •  Marte Myrvold thank you!!

     i want to register two  ble services ,each ble service have it's own receive function and it's own send data function .sample peripheral_uart regist ble service  by bt_nus_init(&nus_cb);  this ble service receive data by function  void bt_receive_cb();
    send ble data by  ble_write_thread(void) ,in this thread ,using bt_nus_send() to send .   now i registe another ble service using function smp_bt_register(),how can i creat this ble service receive ble data cb and send ble data function or thread .how to distinguish /use different ble service 's receive data cb function and send ble data thread or function?

Reply
  •  Marte Myrvold thank you!!

     i want to register two  ble services ,each ble service have it's own receive function and it's own send data function .sample peripheral_uart regist ble service  by bt_nus_init(&nus_cb);  this ble service receive data by function  void bt_receive_cb();
    send ble data by  ble_write_thread(void) ,in this thread ,using bt_nus_send() to send .   now i registe another ble service using function smp_bt_register(),how can i creat this ble service receive ble data cb and send ble data function or thread .how to distinguish /use different ble service 's receive data cb function and send ble data thread or function?

Children
No Data
Related