Firmware update fails with "bad optional access" error on Jetson AGX Orin with D435i
Environment:
- Hardware: Jetson AGX Orin, Intel RealSense D435i
- Operating System: Ubuntu 22.04 Jammy Jellyfish
- Kernel Version: 5.15.148-tegra
- Python Version: 3.10.12
- CUDA Version: 12.6.68
- Jetpack Version: 6.2 (L4T 36.4.3)
Steps to Reproduce:
-
Initial Connection:
The D435i is connected and displays images correctly in the realsense-viewer. -
Firmware Update Initiation:
Click the firmware update button located in the top-right corner of realsense-viewer. The update process begins. -
DFU Stalling:
The firmware update appears to get stuck at the DFU stage. After a few minutes, the camera suddenly disappears from realsense-viewer. -
Post-Update Check:
After unplugging and reconnecting the USB cable, executing:sudo rs-fw-update -l
oscar@ubuntu:~/Downloads/d400_series_fw_5_16_0_1/Signed_Image_UVC_5_16_0_1$ sudo rs-fw-update -r -f Signed_Image_UVC_5_16_0_1.bin
Update to FW: Signed_Image_UVC_5_16_0_1.bin
01/03 17:14:53,315 WARNING [281473607349344] (ds-motion-common.cpp:455) No HID info provided, IMU is disabled
01/03 17:14:53,316 ERROR [281473607349344] (rs.cpp:256) [rs2_create_device( info_list:0xaaaafe6074e0, index:0 ) UNKNOWN] bad optional access
01/03 17:14:53,316 ERROR [281473607349344] (rs.cpp:256) [rs2_delete_device( device:nullptr ) UNKNOWN] null pointer passed for argument "device"
01/03 17:14:53,316 WARNING [281473607349344] (rs.cpp:392) null pointer passed for argument "device"
RealSense error calling rs2_create_device(info_list:0xaaaafe6074e0, index:0):
bad optional access -
Forced Update Attempt:
Attempting a forced update with:sudo rs-fw-update -r -f Signed_Image_UVC_5_16_0_1.bindoes not resolve the issue; the camera remains unrecovered.
Additional Information:
I've verified that the firmware file (Signed_Image_UVC_5_16_0_1.bin) is the correct version for the D435i. Despite multiple attempts and ensuring the USB connection is stable, the issue persists. Any assistance or guidance on resolving this problem would be greatly appreciated.
Thank you!
-
Hi Happydrones123 Which version of the RealSense SDK / RealSense Viewer are you using, please?
Are you using the official 1 meter long USB cable supplied with the camera or a cable of your own choice?
Does it make a difference if you unplug the micro-sized end of the USB cable from the side of the camera, turn the connector around the other way and re-insert it (USB-C cables are two-way insertion at the micro-sized end)
-
hi MartyX GroverI am not using the original cable, but everything was working fine before I clicked on "Update Firmware". The cable is USB 3.2. showed in realsense-viewer , the RealSense SDk version is librealsense2-.56.3
-
Thank you. It is recommended that firmware updates are performed with the 1 meter official cable if possible rather than a long cable of your own choice.
Firmware 5.16.0.1 is correct for use with a D435i and SDK version 2.56.3.
Is the camera detected in the RealSense Viewer if you launch it in sudo admin permissions mode with sudo realsense-viewer
When you performed a firmware update with rs-fw-update, had you first downloaded the Signed_Image_UVC_5_16_0_1.bin firmware bin file from the RealSense firmware releases page?
-
@MartyG Hi, even when I launch RealSense Viewer with sudo/admin permissions, the camera can't be detected. However, when I use the
lsusbcommand, the terminal shows:oscar@ubuntu:~/Downloads/d400_series_fw_5_16_0_1/Signed_Image_UVC_5_16_0_1$ lsusb Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub Bus 002 Device 013: ID 8086:0b3a Intel Corp. Intel(R) RealSense(TM) Depth Camera 435i Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 012: ID 04ca:0061 Lite-On Technology Corp. USB Optical Mouse Bus 001 Device 011: ID 258a:002a SINO WEALTH Gaming KB Bus 001 Device 003: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub Bus 001 Device 002: ID 13d3:3549 IMC Networks Bluetooth Radio Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubThe first time I tried updating the camera firmware by clicking the "Update Firmware" button in RealSense Viewer (GUI) on Linux, it got stuck.
After a few minutes, I unplugged the cable
-
When you performed a firmware update with
rs-fw-update, had you first downloaded theSigned_Image_UVC_5_16_0_1.binfirmware file from the RealSense firmware releases page?Yes, I downloaded
Signed_Image_UVC_5_16_0_1.binfrom the official website.I have tried multiple times, but it still doesn't work.
The terminal shows the following output:
oscar@ubuntu:~/Downloads/d400_series_fw_5_16_0_1/Signed_Image_UVC_5_16_0_1$ sudo rs-fw-update -r -f Signed_Image_UVC_5_16_0_1.bin Update to FW: Signed_Image_UVC_5_16_0_1.bin 01/03 21:13:23,679 WARNING [281473744008288] (ds-motion-common.cpp:455) No HID info provided, IMU is disabled 01/03 21:13:23,680 ERROR [281473744008288] (rs.cpp:256) [rs2_create_device( info_list:0xaaaaf9fe2560, index:0 ) UNKNOWN] bad optional access 01/03 21:13:23,680 ERROR [281473744008288] (rs.cpp:256) [rs2_delete_device( device:nullptr ) UNKNOWN] null pointer passed for argument "device" 01/03 21:13:23,680 WARNING [281473744008288] (rs.cpp:392) null pointer passed for argument "device" RealSense error calling rs2_create_device(info_list:0xaaaaf9fe2560, index:0): bad optional accessCould you please help me resolve this issue?
-
Have you tested the D435i's IMU recently to see whether it was working correctly before this firmware update occurred? I ask this because I note that the error message refers to not being able to access the IMU of the camera. This is a known problem when using IMU-equipped RealSense cameras with JetPack 6 on Jetson boards.
If your camera had an existing problem with accessing the IMU on JetPack 6, this might be affecting the ability to perform a firmware update.
Do you have the option to attempt updating the firmware on a non-Jetson computer with Ubuntu or Windows installed?
Also, please try removing the -r from the rs-fw-update firmware update instruction in case the camera is not actually in recovery mode if you have not tried this already. Also include the serial number of the camera in the instruction. For example:
sudo rs-fw-update -s 725112060411 -f Signed_Image_UVC_5_16_0_1.binIf you do not know the serial number of the camera then you can try retrieving it with the command rs-enumerate-devices -s
-
Have you tested the D435i's IMU recently to see whether it was working correctly before this firmware update occurred? I ask this because I note that the error message refers to not being able to access the IMU of the camera. This is a known problem when using IMU-equipped RealSense cameras with JetPack 6 on Jetson boards
I have not used the IMU data of the RealSense D435i yet.
Do you have the option to attempt updating the firmware on a non-Jetson computer with Ubuntu or Windows installed?
This reminded me, so I installed Intel.RealSense.SDK-WIN10-2.56.3.7838.beta.exe on my Windows 10 PC and found that everything works fine on this platform. I can even read the serial number
but in agx orin the realsense-viewer can't detect the carmera -
MartyG I also get the firmware version which is 5.16.0.1 also get the serial number by my windows10 laptop
-
I'm pleased to hear that the camera works fine on Windows. This demonstrates that the camera has not had a firmware installation failure that prevents the camera from operating.
Because the firmware is stored inside the camera hardware and not on the computer, you can update the firmware on your Windows laptop and it will be carried inside the camera to whatever other computer / computing device you attach the camera to, such as your Jetson.
If you are unable to change your JetPack version, some JP6 users have found that installing the SDK from source code with the libuvc backend installation method and downgrading the camera firmware to version 5.13.0.50 enables the camera to work correctly on Jetson.
-
Thank you, this indeed proves that my camera is functioning properly.
If you are unable to change your JetPack version, some JP6 users have found that installing the SDK from source code with the libuvc backend installation method and downgrading the camera firmware to version 5.13.0.50 enables the camera to work correctly on Jetson.
However, I don't quite understand what you mean by installing the SDK from source code using the libuvc backend installation method. My installation process is as follows: Github_issue. Do I need to reinstall librealsense? If so, could you tell me whether I need to uninstall it first? If uninstallation is required, is there a tutorial link you could provide? Thank you so much!
-
Yes, the libuvc backend procedure would require reinstalling librealsense. I would definitely recommend uninstalling the previous one first.
You should be able to uninstall and reinstall by going to the 'build' directory of your librealsense source code folder and using the same CMake build instruction that you used before, but adding the flag -DFORCE_LIBUVC=true
cmake .. -DBUILD_EXAMPLES=true -DBUILD_PYTHON_BINDINGS=bool:true -DPYTHON_EXECUTABLE=/usr/bin/python3.10 -DBUILD_DOCUMENTATION=false -DFORCE_LIBUVC=true
Then input the CMake command below, which will uninstall the previous librealsense installation in the 'build' folder, clean up CMake and then build the same librealsense version again, but based on the libuvc backend this time.
sudo make uninstall && make clean && make && sudo make install
I would also recommend trying the firmware downgrade to version 5.13.0.50 first though before uninstalling and reinstalling, in case librealsense can work on your Jetson without changing librealsense.
Please sign in to leave a comment.
Comments
13 comments