Fix Summary: HID Firmware Update for MS2130S
This fix had publish at v0.5.32 version
Commit:
bad30dd
Author: Chow411
Date: October 12, 2026
Scope: Improve reliability of HID-based firmware update for MS2130S video chips
The Problem
When updating firmware on the MS2130S video chip, the device temporarily disconnects from the USB and reconnects. This re-enumeration process takes several seconds — but the existing code didn’t account for this delay, causing “device not found” errors and broken update flows.
What Was Fixed
1. Retry Timing Was Too Short
Before: Retried 3 times with only 100ms delay between attempts — total wait ~300ms.
After: Retries increased to 5 times with 500ms delay — total wait ~2.5s.
Additionally, HID device detection retries were extended to 8 attempts with 500ms delay each (~4s total), giving the device enough time to fully reconnect after a firmware flash.
2. Device Path Wasn’t Synced After Flash
Before: m_currentHIDDevicePath stayed empty or stale even after the transport layer successfully found the device. This caused subsequent chip detection and firmware operations to fail silently.
After: If the device path is missing but the transport has one, it is now automatically synced before proceeding.
3. Recovery Mode Devices Were Not Recognized
Before: The HID fallback enumeration only looked for VID: 0x534D, PID: 0x2109 (MS2109).
After: Extended to support four known chip configurations:
| Chip | VID | PID | Mode |
|---|---|---|---|
| MS2130S | 0x345F | 0x2132 | Normal |
| MS2130S | 0x345F | 0x0001 | Recovery (post-flash failure) |
| MS2109S | 0x345F | 0x2109 | Normal |
| MS2109 | 0x534D | 0x2109 | Normal |
This means devices stuck in recovery mode after a failed flash can now be detected and recovered.
4. Chip Re-detection Added Before Firmware Check
Before: If chip type was UNKNOWN when checking firmware, it was never retried — leading to incorrect firmware selection.
After: If chip type is still unknown, the code now attempts re-detection by syncing the device path from the transport layer first.
Files Changed
| File | Purpose |
|---|---|
video/videohid.cpp |
Retry logic, device path sync, re-detection |
video/transport/WindowsHIDTransport.cpp |
Extended VID/PID enumeration |
video/detection/ChipDetector.cpp |
Minor detection stability |
video/videohid_eeprom.cpp |
EEPROM-related improvements |
Result
Firmware updates on MS2130S devices are now far more resilient to:
- USB re-enumeration delays
- Post-flash device path changes
- Recovery/DFU mode detection
- Transient chip-type ambiguity