Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D435 linux update FW with C API error #9224

Closed
csp23 opened this issue Jun 15, 2021 · 4 comments
Closed

D435 linux update FW with C API error #9224

csp23 opened this issue Jun 15, 2021 · 4 comments

Comments

@csp23
Copy link

csp23 commented Jun 15, 2021

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model D435
Firmware Version 05.12.07.100
Operating System & Version Linux
Kernel Version (Linux Only) 4.9.37
Platform raspberry
SDK Version 2.42.0
Language C
Segment Robot

Issue Description

<Describe your issue / question / feature request / etc..>

fail with API rs2_update_firmware() from rs_device.h

function using( reference example/C/rs-depth.c ) :
rs2_creat_context()..........create_context
-->rs2_query_devices().........get device_list
---->rs2_create_device()..........get device
------>rs2_update_firmware()....update with device and FW img

  • error message:
    rs_error was raised when calling rs2_update_firmware(device:0xed18a0, fw_image:0x7f72bff010):
    Object does not support "librealsense::update_device_interface" interface!
  • my opinion:
    the object return from function rs2_create_device() dose support update FW
  • ps:
    i could successfully update with tools/rs-fw-update but still hope using API
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jun 15, 2021

Hi @csp23 I do not have a C-specific example of updating firmware through scripting, though some general advice about structuring an updater mechanism that uses update_device() is provided in the link below.

#4416 (comment)

An example of how a firmware updater script may be structured in Python is here:

#4416 (comment)

It is also worth bearing in mind that the firmware file that is being used should be a digitally signed one - a backup firmware file will not be sufficient.

#7093 (comment)

Although checking and updating firmware through scripting is supported, updating with the rs-fw-update tool or the RealSense Viewer are the recommended methods.

@csp23
Copy link
Author

csp23 commented Jun 15, 2021

Thanks a lot

i fix it with cast device first

  • it worked with API using:

rs2_creat_context()..........create_context
-->rs2_query_devices().........get device_list
---->rs2_create_device()..........get device
------->rs2_enter_update_state()......change device state and reconnect realsense on usb
--------->rs2_delete_device();
----------->rs2_delete_device_list();
------------->rs2_delete_context();
==============get reconnected device===========
rs2_creat_context()..........create_context
-->rs2_query_devices().........get device_list
---->rs2_create_device()..........get device
------>rs2_update_firmware()....update with device and FW img

done

@MartyG-RealSense
Copy link
Collaborator

Great to hear that you were successful @csp23 - thanks very much for sharing your C method with the RealSense community!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to solution achieved and no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants