firmwareUpdateV2
Firmware update (V2)
Next‑gen firmware update flow. Supports downloading and updating Main firmware and BLE firmware. You must explicitly pass a platform.
const res = await HardwareSDK.firmwareUpdateV2(connectId, {
platform: 'desktop', // 'native' | 'desktop' | 'ext' | 'web' | 'web-embed'
updateType: 'firmware', // or 'ble'
// Option A: version-based update (recommended)
version: [2, 10, 0],
// Option B: custom binary (use with caution)
// binary: ArrayBuffer,
// Optional flags
forcedUpdateRes: false,
isUpdateBootloader: false,
});Params
platform- required"native" | "desktop" | "ext" | "web" | "web-embed"execution environmentupdateType- required'firmware' | 'ble'update target (main firmware or BLE)version- optionalnumber[]target version as a 3‑part array; downloads official firmware for that versionbinary- optionalArrayBuffercustom firmware binary; use with cautionforcedUpdateRes- optionalbooleanforce updating resource packageisUpdateBootloader- optionalbooleaninclude Bootloader update
Result
{
success: true,
payload: {
// success indicator from lower layer
}
}Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}Last updated
Was this helpful?