DFU 진행 watchdog
- 앱만 멈추고 BLE 링크가 유지되는 경우 대비 - DFU 업로드 중 30초동안 CHUNK가 오지 않는 경우 강제 disconnect 후 SMP로 재광고(초록 LED 점멸, 10분 타임아웃) - 초록 LED 무한 점등 상황 방지
This commit is contained in:
@@ -806,11 +806,23 @@ int ble_dfu_advertising_enable(void)
|
||||
return ble_advertising_start();
|
||||
}
|
||||
|
||||
/* DFU 진입용 disconnect */
|
||||
bool ble_dfu_advertising_is_enabled(void)
|
||||
{
|
||||
return dfu_advertising_mode;
|
||||
}
|
||||
|
||||
/* DFU watchdog */
|
||||
int ble_disconnect_active(void)
|
||||
{
|
||||
if (current_conn == NULL)
|
||||
{
|
||||
return -ENOTCONN;
|
||||
}
|
||||
|
||||
return bt_conn_disconnect(current_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN);
|
||||
}
|
||||
|
||||
int ble_data_send(const uint8_t *data, uint16_t len)
|
||||
{
|
||||
int err;
|
||||
|
||||
Reference in New Issue
Block a user