View my account

D435 USB connection issues

Comments

10 comments

  • Alexandra Ciuriuc

    Hi Thomas,

     

    Thank you for your interest in the Intel RealSense D435 cameras. 

    Did you use the cameras on a different PC? Did you see the same issue?

     

    Regards,

    Alexandra

     

    0
    Comment actions Permalink
  • Erdynieve

    yeah, we have exactly the same problem too

    0
    Comment actions Permalink
  • MartyG

    @Thomas. If the problem is occurring with many cameras, the source of the problem may be an issue with the specific computer or some aspect of its USB connection, rather than an issue with the cameras.  Have you been able to try it with a different computer as Alexandra suggested?

    Please make sure that your cameras are updated to a recent firmware instead of the one that came with the camera, since stability fixes have been added to the firmware over time.

    In regard to resetting without USB unplug-replug, the SDK has a scripting instruction called hardware_reset that you can put near the start of a script to automate resets.

    https://forums.intel.com/s/question/0D50P0000490SC4SAM/d435-streams-work-once-then-crash?language=en_US

    Another approach, if you are using Linux, is to use a USB reset script.  This method was recently used successfully by a RealSense user with the same problem.  Please google for 'linux USB port reset script' for more details.

    In regard to using your own choice of cable, it should ideally be a premium grade (industrial grade) cable if a connection longer than 2m is required, otherwise the camera connection may degrade or fail.  This is due to the high volume of data transmitted through the USB cable by RealSense cameras.  The prices I have seen for an industrial grade 5 m USB cable are in the range of $45. 

    Here is an example of such a cable:

    https://www.amazon.co.uk/Tether-Tools-USB-USB-C-orange/dp/B0794B1SDR/ref=sr_1_7?keywords=usb+c+15ft&qid=1557493905&s=computers&sr=1-7

    Newnex are also a supplier of such equipment that has been shown to work with 400 Series cameras.

    https://m.youtube.com/watch?v=GLQgR1jT04M

    Alternatively, range can be extended by constructing an Ethernet network for the cameras such as the EtherSense project.

    https://github.com/krejov100/EtherSense

    If the camera is being used with a single board computing device such as Up Board or Raspberry Pi, or an industrial board such an FPGA, there may be issues with supplying the  camera with enough power if the camera is attached via an adapter to a micro size USB port rather than a full size port.  In these circumstances, attaching the camera to a mains powered USB hub may provide the camera with sufficient power for stable operation.

    Some RealSense users with camera detection problems have resolved it by performing a recalibration of the camera using the Dynamic Calibrator tool. 

    The likelihood of it being a calibration related issue are reduced though if multiple cameras are experiencing the detection problem, unless the cameras are being used in an environment where the chances are high of them receiving physical shocks such as hard knocks, drops on the ground or severe vibration (e.g when mounted to a robot that is vibrating or navigating rough terrain such as agricultural land).

    https://downloadcenter.intel.com/download/28517/Intel-RealSense-D400-Series-Calibration-Tools-and-API

    If you are using Linux, instructions for installing the tool on Linux can be found on page 14 onward of the calibrator user guide.

    https://www.intel.co.uk/content/www/uk/en/support/articles/000026723/emerging-technologies/intel-realsense-technology.html

    0
    Comment actions Permalink
  • Thomas

    Hi @MartyG and @Alexandra,

    Thank you for your prompt and detailed reply. 

    To clarify, I am able to reproduce this issue fairly easily across different computers (both Mac and Linux) with different D435 cameras using the Intel RealSense Viewer as well as a short USB 3.0 cable (like the one provided with the camera). I would expect this to work pretty consistent due to the simple conditions (i.e. using Intel's own software, using a short cable, etc). However, even in these circumstances, the connection is inconsistent. It also seems to manifest in different ways. For instance, sometimes it doesn't show up as a connected device (on the left hand side of the Viewer) and other times there's an error related to failure to connect. 

    I've been digging into this more, and I suspect that part of the issue is that the RealSense SDK isn't able to identify all connected devices on the computer? This is because I can see all the D435 cameras that I expect when I run lsusb on Linux, however, when my code calls the query_devices function from the rs::context class (defined here), it sometimes doesn't return the correct number of connected devices -- which is the fundamental issue I'm trying to fix. With regards to your mention of the hardware_reset function, I am actually already using this, but the issue I'm facing precedes this step because I'm not able to hardware reset a camera if the query_devices function isn't able to find it in the first place? 

    Regarding the firmware version, we're fairly confident that the cameras are running recent versions of the firmware, but is there a way to check this using the librealsense SDK? For instance, a command to the camera that would return the current firmware version? I'm asking because we are managing these devices remotely.

    Additionally, I'm curious whether these kinds of questions are more appropriate here or in the Librealsense SDK Github page? Should I be posting this there as well?

    1
    Comment actions Permalink
  • MartyG

    You are welcome to post a question at the RealSense GitHub and get input from the RealSense staff there, though you may not get a very different set of suggestions than those given here.  

    The firmware update tool rs_fw_update can return the firmware version when the -v condition is used.

    https://dev.intelrealsense.com/docs/firmware-update-tool

    It sounds as though you have multiple cameras connected to one computer and not all of them are showing up on lsusb.  If this is correct, I have had a similar case to this on the GitHub (I do tech support on both this forum and the GitHub):  A definitive solution was not found at the end of this case (it was closed due to lack of further responses from the customer) but it is quite a lengthy discussion and may provide useful insights.

    https://github.com/IntelRealSense/librealsense/issues/3829

    0
    Comment actions Permalink
  • Thomas

    Hi @MartyG, 

    Thank you again for your response. Yes, it is correct that we have multiple cameras connected to one computer and not all of them are showing up on lsusb. Thank you for sharing the related issue from other developers. Our cable lengths are not very long and we're also handling fewer cameras simultaneously than the aforementioned example. We've also attempted using reboots to reestablish connections with the missing USB devices, but to no success. I understand that using multiple RealSense cameras should be supported by Intel (as per the white paper here). Is this an issue that you and your team have investigated in the past? 

    In your previous responses, you mentioned "another approach, if you are using Linux, is to use a USB reset script.  This method was recently used successfully by a RealSense user with the same problem". I presume this approach doesn't apply in this scenario since the computer can't even detect the USB (not showing up in lsusb), so it wouldn't know which USB device to reset?

    Based on your domain knowledge of USB connections for the RealSense, is there a reliable way to to re-attempt a connection (where rebooting hasn't been effective) in the scenario where it is not showing up on lsusb? Are there more low-level ways in Ubuntu to achieve this? 

    1
    Comment actions Permalink
  • MartyG

    I am not an Intel employee, so strictly speaking are not an official part of a RealSense team.   I am also a Windows specialist, so my exposure to the workings of Linux and its functions such as lsusb are limited.  I will do my best to assist though.

    Yes, RealSense supports the use of multiple cameras simultaneously.  Typically that will be less than ten cameras, though some organizations have used many more than ten in exotic configurations involving Ethernet networking.

    Normal stream operations with the pipeline are usually carried out through a high-level API.  RealSense SDK 2.0 does also support a low-level API though, where you can take control of individual sensors.  That may be a route for you to investigate if you want to customize an extreme depth of control over the hardware.

    https://dev.intelrealsense.com/docs/api-architecture#section-low-level-device-api

    If you would prefer to try to solve the problem through Ubuntu, members of the RealSense support team on the RealSense GitHub have sometimes attributed problems with lsusb non-detection to uvcvideo not loading properly.  Some example advice for this can be found in the link below.

    https://github.com/IntelRealSense/librealsense/issues/1553#issuecomment-381938101

     

    0
    Comment actions Permalink
  • Alexandra Ciuriuc

    Hello Thomas,

     

    This code shows how to find the firmware of the camera:

    https://github.com/IntelRealSense/librealsense/blob/master/tools/fw-update/rs-fw-update.cpp

    Can you please tell me what is the current firmware on the cameras?

    Please make sure you updated the firmware to the latest version, which is available here:

    https://downloadcenter.intel.com/download/28568/Latest-Firmware-for-Intel-RealSense-D400-Product-Family

     

    Regards,

    Alexandra

     

     

    0
    Comment actions Permalink
  • Pratik

    We found the issue. The issue is related to the specs of the USB cable. RealSense is rated at 2 Amps and most of the USB cables on the market are rated for 0.9 Amps. The moment we switched to a cable rated at 3 Amps, the issue went away. We have stress tested it with the new cables and we couldn't break the system, so far it's been robust. One more thing we did is to make sure to not have to use extension cables, so we have custom ordered 3 Amp USB C to USB A cables from Newnex for our needs.

    Some good cables to look for:
    https://www.amazon.com/gp/product/B076CV7MPB
    https://www.newnex.com/usb-type-c-cables-legacy.php (Look for power delivery 3 A)

    Don't order general purpose cables like CableMatters or AmazonBasics, examples below:
    https://www.amazon.com/gp/product/B00DMFB5OK
    https://www.amazon.com/gp/product/B01GGKYR2O

    0
    Comment actions Permalink
  • Brandinslonski

    @pratik we are having the same issues, about to upgrade our cables as suggested but just curious where it is specified that realsense is rated at 2 amps? The docs say 700ma

    0
    Comment actions Permalink

Please sign in to leave a comment.