Skip to content

fix: use correct DFU downgrade counter opcode and fix flash-lock detection - #14833

Merged
Nir-Az merged 2 commits into
realsenseai:developmentfrom
ipilchin1:RSDSO-21295_fw-update-flash-lock-fix
Mar 25, 2026
Merged

Nir-Az merged 2 commits into
realsenseai:developmentfrom
ipilchin1:RSDSO-21295_fw-update-flash-lock-fix

Conversation

@ipilchin1

@ipilchin1 ipilchin1 commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor
  • Replace get_update_counter (FRB opcode 0x09 at wrong offset) with get_downgrade_counter using DFU_READ_CNT opcode 0x93
  • Rename reset_update_counter to reset_downgrade_counter for clarity
  • Fix camera_locked check: compare against 'YES' instead of 'UNLOCKED' (device returns 'YES'/'NO', not 'UNLOCKED')
  • Reset downgrade counter when flash-lock detected after FW update
  • Add D500 skip support in counter functions
  • RSDSO-21295

Copilot AI review requested due to automatic review settings March 18, 2026 10:00
@ipilchin1
ipilchin1 requested a review from Nir-Az March 18, 2026 10:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the firmware update unit test to use the correct DFU opcode for reading/resetting the downgrade counter and to correct flash-lock detection behavior.

Changes:

  • Replace update-counter logic with downgrade-counter logic using DFU_READ_CNT (0x93) and rename helpers accordingly.
  • Fix flash-lock detection by treating camera_locked == 'YES' as locked and resetting the downgrade counter in that case.
  • Add explicit D500 handling (no downgrade counter support) in the counter helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread unit-tests/test-fw-update.py Resolved
Comment thread unit-tests/test-fw-update.py Resolved
Comment thread unit-tests/test-fw-update.py Resolved
Comment thread unit-tests/test-fw-update.py Resolved
Comment thread unit-tests/test-fw-update.py Resolved
@ipilchin1
ipilchin1 force-pushed the RSDSO-21295_fw-update-flash-lock-fix branch from 1820e6e to 2304be4 Compare March 18, 2026 10:20
…ction

- Replace get_update_counter (FRB opcode 0x09 at wrong offset) with
  get_downgrade_counter using DFU_READ_CNT opcode 0x93
- Rename reset_update_counter to reset_downgrade_counter for clarity
- Fix camera_locked check: compare against 'YES' instead of 'UNLOCKED'
  (device returns 'YES'/'NO', not 'UNLOCKED')
- Reset downgrade counter when flash-lock detected after FW update
- Add D500 skip support in counter functions
@ipilchin1
ipilchin1 force-pushed the RSDSO-21295_fw-update-flash-lock-fix branch from 2304be4 to 31ba4d1 Compare March 18, 2026 10:32
Comment thread unit-tests/test-fw-update.py Resolved
@Nir-Az
Nir-Az merged commit cad4e66 into realsenseai:development Mar 25, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants