-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Update Firmware of D415 #6514
Comments
Hi @raghav1906 It looks as though you are using this script exactly: #4416 (comment) To use this script, you should download the firmware file version referenced in the script and place the file in the same folder location that your script is located in. https://dev.intelrealsense.com/docs/firmware-releases The firmware file version used in the script is quite old, so I would recommend downloading to your script folder a more recent version such as 5.12.3.0. In the script, the change would look like this: dev.as_update_device().update(open("Signed_Image_UVC_5_12_3_0.bin", "rb").read()) Please try running your script again after making this change and see if the camera can be detected in Pyrealsense2 and the firmware updated. As @dorodnic mentions in #4416 though, the recommended way to update the firmware is through the RealSense Viewer or the rs-fw-update tool. |
I have placed the file in the same folder location that my script is located in.I am unable to run this new script as camera is still not detected using pyrealsense2. |
If rs-enumerate-devices can detect the camera then that sounds more hopeful than no detection at all. As a next step, could you try using the recovery mode of the rs-fw-update firmware updater tool with the recent firmware file that you downloaded. https://dev.intelrealsense.com/docs/firmware-update-tool I believe that the recovery would be activated by running the rs-fw-update program using this launch command in the command line: rs-fw-update -r -f Signed_Image_UVC_5_12_3_0.bin |
Before running the python script for firmware update, rs-enumerate-devices and python script was showing the camera is connected but after executing it, rs-enumerate-devices and python script to check number of devices gives the output that no Intel devices connected. |
I should make clear that I am not currently a Python expert. Having said that, the purpose of using sudo in a terminal is apparently to run a command with "super user" admin level permissions. So it is possible that access to the camera from the script is being blocked because it does not have super-user access permissions without sudo. The problem is that granting super user permissions within a script is a huge programming "no" due to security implications. Are you able to run non-RealSense Python scripts successfully? If so, this may suggest that something has broken in your pyrealsense2 installation specifically. |
But before running this script, I was able to access the camera without sudo permissions. |
If you are able to use the camera successfully in non-Python RealSense applications in Ubuntu such as the RealSense Viewer but you are not able to access the camera in Pyrealsense2, that would suggest that the script might have altered something in your Pyrealsense2 installation in a way that broke camera access permissions. |
realsense-viewer is also not working now. |
I have to update the firmware using python script. So if anyone who can help me solve this issue using python script, please help. |
I uninstalled both librealsense and pyrealsense2 and installed them again. dev = ctx.query_devices()[0] import time dev = ctx.query_devices()[0] |
After you reinstalled Librealsense and Pyrealsense2, were you able to access the camera before you ran your firmware update script? If so, it suggests that the script is the cause of the camera detection problem and should not be used again. If the camera goes into recovery mode, please try repeating the firmware recovery instruction in rs-fw-update that I mentioned earlier in this discussion. |
Yes after the reinstallation , I was able to access the camera before I ran that firmware update script. |
The Pyrealsense2 documentation has a section on code for updating with a provided firmware. Please visit the link below and scroll down to the Attributes section at the bottom of the page. https://intelrealsense.github.io/librealsense/python_docs/_generated/pyrealsense2.update_device.html |
Hi @raghav1906 Do you require further assistance with this case please, or can it be closed? Thanks! |
Yes one more help. Actually, I have to run the script through docker. So can you help me with how to give camera(connected through USB) access in docker.Thanks for all the help till now! |
You are very welcome. Docker is not a subject that I have personal experience with, but others have used Docker with librealsense. The discussion comment linked to below, and the subsequent comments below it, seem to provide useful instructions for setting up Docker with librealsense. A recent example of a user-created Dockerfile for librealsense is here: |
Hi @raghav1906 |
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 :)
Issue Description
<Describe your issue / question / feature request / etc..>
import pyrealsense2 as rs
ctx = rs.context()
dev = ctx.query_devices()[0]
dev.as_updatable().enter_update_state()
import time
time.sleep(1)
dev = ctx.query_devices()[0]
dev.as_update_device().update(open("Signed_Image_UVC_5_11_6_250.bin", "rb").read())
I used this code to update the firmware of Intel Realsense D415 but when i executed it, the camera got disconnected and I got an error message saying:
Runtime Error: access denied for 8086:adb uid: 2-3-5.
I am using a ubuntu machine.
Now I am also unable to access the camera using pyrealsense2.
Can someone help me fix this??
The text was updated successfully, but these errors were encountered: