This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

get the "BLE_GAP_EVT_DISCONNECTED" event when connecting

Hi All: I'm working on ios ble midi proj. I have modified ble_nus code for my proj, I was modified the correct service uuid ,characteristic uuid , connection_interval ,latency etc... But now I'm always connection failed.

After get BLE_GAP_EVT_CONNECTED event, I also received the following event: BLE_GAP_EVT_SEC_INFO_REQUEST When get this event ,the ble_nus proj have related code to respond.

BLE_GATTS_EVT_WRITE When get this event, Run into on_write() ,but wouldn't run into follow judgedment statement: "p_evt_write->handle == m_conn_params_config.start_on_notify_cccd_handle" and "p_evt_write->handle == p_nus->midi_io_handles.cccd_handle"

BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST When get this event, The ble_nus proj haven't related code , I'm add code and data for it. There will be point of issue. I look for doc and Web, I add it like follow: ble_gatts_rw_authorize_reply_params_t rwData; rwData.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; rwData.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; sd_ble_gatts_rw_authorize_reply(m_conn_handle,&rwData);

Then I receive "BLE_GAP_EVT_DISCONNECTED" event, It's awful. Anyboy know something ,Please help .

PS: there are more information of connection need:image description

Parents
  • Hi Wanglei,

    Which example project did you test with ? Was it ble_app_uart ?

    Please be noted that this example doesn't support pairing. sd_ble_gap_sec_params_reply() response with BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP. When the MIDI profile requires bonding and pairing.

    I would suggest you to use another example as the base (any example that use device manager/peer manager).

Reply
  • Hi Wanglei,

    Which example project did you test with ? Was it ble_app_uart ?

    Please be noted that this example doesn't support pairing. sd_ble_gap_sec_params_reply() response with BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP. When the MIDI profile requires bonding and pairing.

    I would suggest you to use another example as the base (any example that use device manager/peer manager).

Children
Related