librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Duplicated serial numbers on MacOS

Open emilk opened this issue 8 years ago • 11 comments

My setup: four D435 cameras connect to a MacBook Pro (Retina, 15-inch, Mid 2015) running macOS High Sierra 10.13.4.

The bug: When I list the connected realsense devices I get the serial number '750612070575' repeated four times.

If I check which USB devices are connected to my computer (using other means), I find all four cameras with different serials.

Here is the code I run to list the serials:

#include <iostream>
#include <librealsense2/rs.hpp>

int main()
{
    rs2::context ctx;
    for (auto&& device : ctx.query_devices())
    {
        std::cout << "Camera serial: " << device.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER) << std::endl;
    }
}

And here is the output:

unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
Camera serial: 750612070575
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
Camera serial: 750612070575
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
Camera serial: 750612070575
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
unsupported descriptor subtype: 13
Camera serial: 750612070575

And here are the actual serial numbers:

§ system_profiler SPUSBDataType | grep "RealSense(TM) 430:" -A 10 | grep "Serial Number:"
              Serial Number: 751313020148
              Serial Number: 734613020958
              Serial Number: 751313020574
              Serial Number: 736613021581

emilk avatar Apr 09 '18 14:04 emilk

Btw, connecting just two cameras directly into the Macbook yields the same results, but with the same serial repeated twice instead of four times.

emilk avatar Apr 09 '18 15:04 emilk

Same problem here, only with two d415 cameras

holstenholsten avatar Apr 11 '18 13:04 holstenholsten

I tried to reproduce this issue with various combinations of D435 and D415, with v2.10.3 and v2.10.2 and different cable layouts but was not able to. What about the RealSense Viewer? Are you able to work with the different devices together using that App? Did you try with the latest update (v2.10.3)?

dorodnic avatar Apr 12 '18 10:04 dorodnic

RealSense Viewer shows only one camera. I’ve tried v2.10.3 and latest master.

emilk avatar Apr 12 '18 21:04 emilk

Any other USB devices connected to the machine? Could you share how the cameras are connected?

@EladZucker, do you have any idea what might cause such behavior?

dorodnic avatar Apr 13 '18 07:04 dorodnic

No other USB devices. In the simplest reproducible setup I just have two cameras plugged in directly to my Macbook in two separate sockets.

emilk avatar Apr 13 '18 18:04 emilk

I confirm having the exact same issue as Emil reported

fonskuijk avatar May 14 '18 08:05 fonskuijk

[Realsense Customer Engineering Team Comment] yes, we can reproduce this issue and trying to fix this issue.

I've tested the fix in #1841 and it seems to resolve the problem for me, at least when the cameras are plugged in directly to my computer. When I put two cameras on one USB hub I still get duplicated serial number, but I guess that is a separate issue.

emilk avatar Jun 12 '18 09:06 emilk

I've reported the USB hub issue as a separate issue at https://github.com/IntelRealSense/librealsense/issues/1875

emilk avatar Jun 12 '18 09:06 emilk

[Realsense Customer Engineering Team Comment] hi @emilk,

thanks for confirm the fix, so I think we can close this one and continue discussion on#1875.