View my account

Firmware update fails with "bad optional access" error on Jetson AGX Orin with D435i

Comments

13 comments

  • MartyG

    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)

    1
    Comment actions Permalink
  • Happydrones123

    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  

    0
    Comment actions Permalink
  • MartyG

    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?

    0
    Comment actions Permalink
  • Happydrones123

    @MartyG Hi, even when I launch RealSense Viewer with sudo/admin permissions, the camera can't be detected. However, when I use the lsusb command, 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 hub  
    

    The 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

    0
    Comment actions Permalink
  • Happydrones123

    When you performed a firmware update with rs-fw-update, had you first downloaded the Signed_Image_UVC_5_16_0_1.bin firmware file from the RealSense firmware releases page?

     

    Yes, I downloaded Signed_Image_UVC_5_16_0_1.bin from 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 access  
    

    Could you please help me resolve this issue?

    0
    Comment actions Permalink
  • MartyG

    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.bin

     

    If you do not know the serial number of the camera then you can try retrieving it with the command rs-enumerate-devices -s

    0
    Comment actions Permalink
  • Happydrones123

    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

     

    0
    Comment actions Permalink
  • Happydrones123

    MartyG I also get the firmware version which is 5.16.0.1  also get  the serial number by my windows10 laptop

    0
    Comment actions Permalink
  • MartyG

    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.

    0
    Comment actions Permalink
  • MartyG

    For anyone else who reads this discussion in future who has a D435f / D435if or D455f, they should not downgrade their firmware to 5.13.0.50 or their camera will become undetectable.  Firmware 5.15.1.0 is the furthest back that owners of those models should downgrade.

    0
    Comment actions Permalink
  • Happydrones123

    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!

    0
    Comment actions Permalink
  • MartyG

    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.

    0
    Comment actions Permalink

Please sign in to leave a comment.