hi on android side of my project i try to disconnect from gatt by this code
mbluetoothGatt.disconnect();
but in nrf51422 this event not trigering
static void on_ble_evt(ble_evt_t * p_ble_evt)
{
uint32_t err_code;
switch (p_ble_evt->header.evt_id)
{
case BLE_GAP_EVT_CONNECTED:
nrf_gpio_pin_set(CONNECTED_LED_PIN_NO);
nrf_gpio_pin_clear(ADVERTISING_LED_PIN_NO);
m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
break;
//this event not trigering at all
case BLE_GAP_EVT_DISCONNECTED:
nrf_gpio_pin_clear(CONNECTED_LED_PIN_NO);
advertising_start();
break;
case BLE_GAP_EVT_TIMEOUT:
if (p_ble_evt->evt.gap_evt.params.timeout.src == BLE_GAP_TIMEOUT_SRC_ADVERTISEMENT)
{
nrf_gpio_pin_clear(ADVERTISING_LED_PIN_NO);
// Go to system-off mode (this function will not return; wakeup will cause a reset).
err_code = sd_power_system_off();
APP_ERROR_CHECK(err_code);
}
break;
default:
// No implementation needed.
break;
}
}
when i disconnect by nrf master control panel it triger this event in nrf51422. in nrf master control panel how u disconnect from gap?