Hi
I am coding a s130 NUS example.
-
The base example is sdk8.1.0 ble_app_uart peripheral example.
-
I added central part from Github sdk8.0.0 ble_app_uart_c example .
After I combinedd these two, I tried two PCA10028 with Andorid apps "nRF UART2.0".
These two PCA10028 has same fimrware.
-
Connect one PCA10028 (Sample A) by Android apps.
-
Sample A will then connect to another PCA10028 (Sample B). Sample A is central rol fro sample B.
-
Sample A finished discovering and writing notification enable sample B.
-
Then, Sample B sent a notification packet to sample A. Sample A did received this packet.
-
If sample A tried to deliver this notification packet to Android, it failed at
error"BLE_ERROR_GATTS_SYS_ATTR_MISSING".
err_code = ble_nus_string_send(&m_nus, &u_pkt_buffer[OFFSET],u_pkt_len[u_pop_pkt_cnt]);
if (err_code != NRF_SUCCESS)
{
if (err_code == BLE_ERROR_GATTS_SYS_ATTR_MISSING){
err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0);
}
APP_ERROR_CHECK(err_code); return; }
}
I found it seems attribute handle conflicted.
For sample A as a peripheral role, when Android discovered it, it responsed handle number 11 and 14 for NUS RX and TX characteristics.
For sample A as a central role to sample B, since sample B has same firmware as sample A, when sample A discovered sample B, sample B also responded handle number 11 and 14 for NUS RX and TX characteristis.
Any way to solve this problem. Thanks.