简单来说,这个m_conn_handle相当于协议栈给连接的对端设备分配的号码,nrf_ble_qwr_conn_handle_assign的作用就是把这个号码与 Queued Writes 模块关联起来,Queued Writes 模块用于处理对端BLE设备在GATT上的操作。 caseBLE_GAP_EVT_CONNECTED: NRF_LOG_INFO("Connected"); err_code=bsp_indication_set(BSP_INDI...
err_code= nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle); APP_ERROR_CHECK(err_code);break;caseBLE_GAP_EVT_DISCONNECTED: NRF_LOG_INFO("Disconnected");//LED indication will be changed when advertising starts.m_conn_handle =BLE_CONN_HANDLE_INVALID;break;caseBLE_GAP_EVT_PHY_UPDATE_...
k_sem_take(&ble_init_ok, K_FOREVER); return err_code; } 复制代码 因为这里我们要确保BLE协议栈使能完成,所以我们可以在bt_ready_callback()中释放这个信号量,这样我们可以通过信号量的同步得知BLE协议栈已经被使能。 复制代码 /*BLE Enable Callback function*/ void bt_ready_callback(int err_code) {...
staticvoidservices_init(void){ret_code_terr_code;ble_lbs_init_tinit={0};nrf_ble_qwr_init_tqwr_init={0};// Initialize Queued Write Module.qwr_init.error_handler=nrf_qwr_error_handler;err_code=nrf_ble_qwr_init(&m_qwr,&qwr_init);APP_ERROR_CHECK(err_code);// Initialize LBS.init.led...
关于application详细介绍查看BLE DFU:Application 1.6 升级包 从SDK 12开始,Nordic为DFU操作增加了签名校验机制,称为Secure DFU。执行Secure DFU,需要使用升级包(zip),而不能直接使用二进制文件(hex/bin)。 升级包包括manifest.json(文件清单)、nrf52832_xxaa.bin(新固件)和nrf52832_xxaa.dat(init packet),其中init...
首先看一下连接的处理函数,相对于以前只支持一个连接的例程,这里新增了一个nrf_ble_qwr_conn_handle_assign函数处理,这个函数的功能是用于将连接句柄分配给 Queued Writes 模块的给定实例。 并且我们需要对当前连接的总数量进行判断,如果以及连接的主机数量少于4个,则继续开启广播,等待其他主机继续发起连接;如果连接的...
case BLE_GAP_EVT_CONNECTED: NRF_LOG_INFO("Connected"); err_code = bsp_indication_set(BSP_INDICATE_CONNECTED); APP_ERROR_CHECK(err_code); m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle; err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle); ...
case BLE_GAP_EVT_CONNECTED: NRF_LOG_INFO("Connected"); err_code = bsp_indication_set(BSP_INDICATE_CONNECTED); APP_ERROR_CHECK(err_code); m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle; err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle); ...
case BLE_GAP_EVT_CONNECTED: NRF_LOG_INFO("Connected"); err_code = bsp_indication_set(BSP_INDICATE_CONNECTED); APP_ERROR_CHECK(err_code); m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle; err_code = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle); ...
{{ message }} xuzhijin / nrf52-ble-image-transfer-demo Public forked from NordicPlayground/nrf52-ble-image-transfer-demo Notifications You must be signed in to change notification settings Fork 0 Star 0 Code Pull requests Actions Projects ...