hi,everyone. I try to use ble urat sample for bonding by passkey entry. and connection established and to bond. i try to entry passkey by uart. but when i key the passkey and go to service discovery . it can't work correctly. (see follow attachment file), can't send string ble to device.
how to i revise this ? is the service Characteristics need to do some thing? not go to ble_nus_on_ble_evt() BLE_GATTS_EVT_WRITE event,
2.what is O.O.B? how to use this?
code :
//init
#define SEC_PARAM_BOND 1 /**< Perform bonding. */
#define SEC_PARAM_MITM 1 /**< Man In The Middle protection not required. */
#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_KEYBOARD_ONLY
//ble event handle
case BLE_GAP_EVT_AUTH_KEY_REQUEST :
simple_uart_putstring("BLE_GAP_EVT_AUTH_KEY_REQUEST...\n");
while(iCount<6)
{
while (NRF_UART0->EVENTS_RXDRDY != 1)
{
// Wait for RXD data to be received
}
NRF_UART0->EVENTS_RXDRDY = 0;
auth_key[iCount++]= (uint8_t)NRF_UART0->RXD;
}
simple_uart_putstring("exit...\n");
err_code=sd_ble_gap_auth_key_reply(p_ble_evt->evt.gap_evt.conn_handle,BLE_GAP_AUTH_KEY_TYPE_PASSKEY ,auth_key);
APP_ERROR_CHECK(err_code);
break;