BLE_GATTS_EVT_SYS_ATTR_MISSING: // No system attributes have been stored. err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0); APP_ERROR_CHECK(err_code); break; case BLE_GATTC_EVT_TIMEOUT: // Disconnect on GATT Client timeout event. err_code = sd_ble_gap_disconn...
err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0); APP_ERROR_CHECK(err_code); break; case BLE_GATTC_EVT_TIMEOUT: // Disconnect on GATT Client timeout event. err_code = sd_ble_gap_disconnect(p_ble_evt->evt.gattc_evt.conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_...
APP_ERROR_CHECK(err_code);break;caseBLE_GATTS_EVT_SYS_ATTR_MISSING: err_code =sd_ble_gatts_sys_attr_set(m_conn_handle_peripheral,NULL,0, BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS); APP_ERROR_CHECK(err_code);break;default:// No implementation needed.break; } } 开发者ID:451506709,项目名称:au...
case BLE_GAP_EVT_AUTH_STATUS: if(p_ble_evt->evt.gap_evt.params.auth_status.auth_status == BLE_GAP_SEC_STATUS_SUCCESS){ printf("pair success\r\n"); }else{ sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION); } case BLE_GATTS_EVT_SYS_ATTR_MISSING: //...
case BLE_GATTS_EVT_SYS_ATTR_MISSING: // No system attributes have been stored. err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0); APP_ERROR_CHECK(err_code); break; case BLE_GATTC_EVT_TIMEOUT: // Disconnect on GATT Client timeout event. ...
caseBLE_GATTS_EVT_SYS_ATTR_MISSING: err_code=sd_ble_gatts_sys_attr_set(m_conn_handle,NULL,0); APP_ERROR_CHECK(err_code); break; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX However, this solution doesn't work for me. Any other ideas, please?
*/staticvoidon_sys_attr_missing(ble_evt_t* p_ble_evt){uint32_terr_code;if( (m_master.bond.master_handle == INVALID_MASTER_HANDLE) || !ENCRYPTION_STATUS_GET() || BONDING_IN_PROGRESS_STATUS_GET() ) { err_code = sd_ble_gatts_sys_attr_set(m_conn_handle,NULL,0); ...
send(&m_hrs, m_cur_heart_rate);3132if(33(err_code !=NRF_SUCCESS)34&&35(err_code !=NRF_ERROR_INVALID_STATE)36&&37(err_code !=BLE_ERROR_NO_TX_BUFFERS)38&&39(err_code !=BLE_ERROR_GATTS_SYS_ATTR_MISSING)40)41{42APP_ERROR_HANDLER(err_code);43}44}...
case BLE_GATTS_EVT_SYS_ATTR_MISSING: err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0); APP_ERROR_CHECK(err_code); break; case BLE_GAP_EVT_AUTH_STATUS: m_auth_status = p_ble_evt->evt.gap_evt.params.auth_status; break; case BLE_GAP_EVT_SEC_INFO_REQUEST: p_enc_...
( err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING )) { APP_ERROR_HANDLER( err_code ); } } //PS: 需要再发送一个0,作用类似于释放按键。 //如果不发送这个“释放”,安卓系统有的是没问题,但苹果系统中,音量+发送后相当于一直按住音量+键。