HI..i am trying to implement multilink central with nus service..but it is getting error at lbs_c_init();.what is the reason..can anyone help..i also changed the central link count..still no change
HI..i am trying to implement multilink central with nus service..but it is getting error at lbs_c_init();.what is the reason..can anyone help..i also changed the central link count..still no change
Hi,
What error are you getting?
Jared
Hi..now am trying ble_central and peripheral connection..ble_central sending data over ble_nus_c_string_send and it is receivd at peripheral and after that am sending a packet from peripheral to central and it is not receiving(BLE_NUS_C_EVT_NUS_TX_EVT,not receiving anything in central side)
Are you sure that you're providing it with the correct connection handle? What does the function return? And can you share your sdk_config.h file?
I doesnt do anything in connection handle..how to provide connection handle for each peripheral to central
I checked conn_handle in peripheral side..connection handle is alredy placed in m_conn_handle and it is passed in ble_nus_data_send
Yes but are you providing it with the correct one? When you have multiple links you'll also have multiple handles for each link. Meaning that you have to provide the ble_nus_data_send() with the correct one. The handle is assigned to the central/peripheral after a CONNECTED event.
So how i send using correct handle when there are multiple peripherals..can u give me a snippet or sample code for that
So how i send using correct handle when there are multiple peripherals..can u give me a snippet or sample code for that
First you would need to know which connection handle to use. When you merge multilink central with ble_app_nus_c example then you would have to define a NUS instance for each link. You should therefore use BLE_NUS_C_ARRAY_DEF instead of BLE_NUS_C_DEF. Each NUS instance is assigned to a specific link/connection handle. This should be done in a CONNECTION event. You would then have to pass that specific NUS instance to ble_nus_c_string_send() when you want to send to a specific peripheral.
Merging ble_app_uart_c and multilink has already been done by one of our engineers. You can find the project here. Note that the project is apart of the playground repository, which means that it's not supported.
best regards
Jared
Hi jored, i hav solved the issue myself..my current problem is,is there amy way to identify from which peripheral the data is received when we hav multiple connections..thanz for ur help
You can find the connection handle in the ble_nus_c_evt_t event structure after a BLE_NUS_C_EVT_NUS_TX_EVT event is generated.