Problem of Central_multilink data manage

Hi,nordic team

I am programming with ncs v2.9.0,nrf52833

And i am doing central multilink whick should support max 6 peripheral devices connected.Now it can connect to multi peripherals but I dont know how to manage data from peripherals.

Peripherals is base on sample\peripheral_hid_keyboads.

I wonder what should I do to get data from ble in central code,which configs should be done?And what API should i call to get data from ble?These seem not be contented in central_multilink sample.

Best regard

Parents
  • Hi Martin, 


    I would suggest to take a look at other central samples in the SDK to see how it works. For example you can take a look at the peripheral_uart and central_uart .

    If you want to use HID, I would suggest to take a look at the central_hids sample. 

    Please try to test with one single link first before you move to support multiple peripherals. 


    Basically to receive data from the peripheral you would need to subscribe to a characteristic to receive a notification, or you do a read from the central to the peripheral. 
    After you are familiar with that, you can move to the next step which is handling multiple connections. This requires you to handle different connection handles. When a peripheral connects to a central it will have a connection handle. You will need to use the connection handle to access each of the peripheral. 

  • Thanx Hung Bui

    I know central_hids cz My central is based on it.

    central_hids data is from bt_hogp_reo_subscribe in hids_on_ready()

    But if there are two device connected, I cannot call this subscribe twice,which will report EBUSY(Mount deice busy),it must be one API(hogp_notify_cb)that is func of subscribe cannot be register more than once.

    As you mentioned i will need to use handle to access each peripherals,but can you give me whick API i will call to access?

    Thanx again

    Best regard

Reply
  • Thanx Hung Bui

    I know central_hids cz My central is based on it.

    central_hids data is from bt_hogp_reo_subscribe in hids_on_ready()

    But if there are two device connected, I cannot call this subscribe twice,which will report EBUSY(Mount deice busy),it must be one API(hogp_notify_cb)that is func of subscribe cannot be register more than once.

    As you mentioned i will need to use handle to access each peripherals,but can you give me whick API i will call to access?

    Thanx again

    Best regard

Children
No Data
Related