Skip to content

FW update exception fix - #8018

Merged
ev-mp merged 4 commits into
realsenseai:developmentfrom
nohayassin:DSO_16069
Mar 24, 2021
Merged

FW update exception fix#8018
ev-mp merged 4 commits into
realsenseai:developmentfrom
nohayassin:DSO_16069

Conversation

@nohayassin

@nohayassin nohayassin commented Dec 16, 2020

Copy link
Copy Markdown
Contributor

When FW update runs, the device disconnects when it switches to DFU.
Exception is thrown when FW update calls query devices while device still connected (not switch to DFU already).
In this fix, after sending the command of switching device to DFU, I checked when device is disconnected then continue to next step of querying devices.

Tracked on DSO-16069

@ev-mp ev-mp 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.

SR300 DFU handling should be adjusted as wel, similar to D400 and L515

Comment thread src/ds5/ds5-device.cpp
_hw_monitor->get_gvd(gvd_buff.size(), gvd_buff.data(), ds::GVD);
this_thread::sleep_for(milliseconds(50));
}
throw std::runtime_error("Device still connected!");

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.

Reword with "Device failed to switch to DFU within the predefined time"

Comment thread src/ds5/ds5-device.cpp Outdated
cmd.param1 = 1;
_hw_monitor->send(cmd);
std::vector<uint8_t> gvd_buff(HW_MONITOR_BUFFER_SIZE);
for (auto i = 0; i < 10; i++)

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.

Increase iterations count to cover 1000msec
Comment in code as to how the mechanism is expected to work

Comment thread src/l500/l500-device.cpp
// Stop all data streaming/exchange pipes with HW
stop_activity();
using namespace std;
using namespace std::chrono;

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.

In this case use of explicit std::this_thread... std::chrono:millisec(..) is preferred

Comment thread src/l500/l500-device.cpp Outdated
cmd.param1 = 1;
_hw_monitor->send(cmd);
std::vector<uint8_t> gvd_buff(HW_MONITOR_BUFFER_SIZE);
for (auto i = 0; i < 25; i++)

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.

The counter here and for DS5.cpp should probably be synchronized

@ev-mp ev-mp 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.

To be merged

@ev-mp
ev-mp merged commit d7a1a78 into realsenseai:development Mar 24, 2021
Nir-Az added a commit to Nir-Az/librealsense that referenced this pull request Apr 21, 2021
Nir-Az added a commit to Nir-Az/librealsense that referenced this pull request Apr 22, 2021
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.

2 participants