52840+freertos+dfu+ advertising+scan

我的项目使用 nrf52840 和 Freertos。该项目具有蓝牙广播和扫描功能。Bootloader 不使用 Freertos。当我在 nrf connect 中使用软件升级 DFU 时,DFU 功能没有响应。我使用 Freertos 创建了一个刷新任务,该任务一直在持续运行。未执行 DFU 升级。

Parents Reply
  • Hi,

    A short update from me. It seems the problem is that you do not handle the BLE_GATTS_EVT_SYS_ATTR_MISSING event. This is handled by the peer manager if the application use that (as is the case in the buttonless DFU sample application), but as you don't use the peer manager you must handle it yourself. You can do this by adding this snippet to your event handling in ble_evt_handler():

    		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;

Children
Related