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)
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.
Actually not connection handle..i need the peripheral bluetooth id or device id something like that..so that i need to transfer the value received from peripheral to central and from central to server..
Hi,
The Peer address can be stored after a BLE_GAP_EVT_CONNECTED has been generated. You can find the peer address in the ble_evt_t event structure. Note that most SoftDevice functions do not use the peer address to refer to the peer but rather the connection handle. The connection handle is assigned to the link of the peer during a connection event.
regards
Jared
Hi,
The Peer address can be stored after a BLE_GAP_EVT_CONNECTED has been generated. You can find the peer address in the ble_evt_t event structure. Note that most SoftDevice functions do not use the peer address to refer to the peer but rather the connection handle. The connection handle is assigned to the link of the peer during a connection event.
regards
Jared
Hi jared..my central is connecting to multiple peripheral but the value is received from only the first connecting peripheral..what to do
What is the application on the central doing after it has received the first value? Try using the debugger and debug your application.
hi jared, am using fanstel BW832 as central device..as it receives value from the peripheral it is passed through uart to the esp module connected to it.
Could you use a debugger and check what the central is doing after it has received the first value?
hi jared, after first device connected it goes to ble_nus_c_evt handler and enters into BLE_NUS_C_EVT_DISCOVERY_COMPLETE and enable nus service but when the the 2nd peripheral is on it is only connected and not enters into BLE_NUS_C_EVT_DISCOVERY_COMPLETE and nus service is not enabled..how to solve the issue.thats y i am not able to read and wriite into 2nd peripheral.how to solve the issue