Duplicate USB device Address

Hi, 

I have 2 Nikon cameras connected to an intel NUC via ethernet with VirtualHere. 2x Raspberry Pis run the Virtual Here server and have a physical USB connection to each camera. The two ethernet cables connect to a switch with one ethernet cable to the NUC running windows 10. 

However, on windows they both have the same bus number and device address. Is it possible to make these unique?

I ask because we are using a windows port of libgphoto2 to control our two cameras, and it requires a unique bus and port number string eg "usb:001,000" to connect to a camera. We can connect to the first but not the second.

Regards

George 

#2

VirtualHere will use hostname to determine part of the address. When you setup a linux server you should set a unique hostname. For example in the raspberry pi you can do this with raspi-config see here https://www.tomshardware.com/how-to/raspberry-pi-change-hostname


Setup each pi with a different hostname and then the address will be unique

#3

Thanks for the quick response!
Our hostnames were already raspberrypi1 and raspberrypi2
I also tried changing the config.ini file on each, appending 

ServerName=rasberrypi1

Hostname=raspberrypi1

and the equivalent on the other and rebooting in case it might make a difference 

unfortunately, both USB devices still have the same bus number 0x01 and device address 0x00




The following output is from the windows SDK debugging tool USBView if it at all helps 
 

[Port1]  :  NIKON DSC Z 50


Is Port User Connectable:         yes
Is Port Debug Capable:            no
Companion Port Number:            17
Companion Hub Symbolic Link Name: USB#ROOT_HUB30#1&2b53a856&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
 USB 1.1:                         yes
 USB 2.0:                         yes
 USB 3.0:                         no

Device Power State:               PowerDeviceD0

       ---===>Device Information<===---
English product name: "NIKON DSC Z 50"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: High (is not SuperSpeed or higher capable)
Device Address:                    0x00
Open Pipes:                           3

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0x00  -> This is an Interface Class Defined Device
bDeviceSubClass:                   0x00
bDeviceProtocol:                   0x00
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x04B0 = Nikon Corporation
idProduct:                       0x0444
bcdDevice:                       0x0250
iManufacturer:                     0x01
     English (United States)  "NIKON"
iProduct:                          0x02
     English (United States)  "NIKON DSC Z 50"
iSerialNumber:                     0x03
     English (United States)  "0000007425705"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x02  -> Direction: OUT - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0008 = 1 transactions per microframe, 0x08 max bytes
bInterval:                         0x09

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0027  -> Validated
bNumInterfaces:                    0x01
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0xC0  -> Self Powered
MaxPower:                          0x02 =   4 mA

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x03
bInterfaceClass:                   0x06  -> This is an Image USB Device Interface Class
bInterfaceSubClass:                0x01
bInterfaceProtocol:                0x01
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x02  -> Direction: OUT - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0008 = 1 transactions per microframe, 0x08 max bytes
bInterval:                         0x09





 

 

[Port2]  :  NIKON DSC Z 50


Is Port User Connectable:         yes
Is Port Debug Capable:            no
Companion Port Number:            18
Companion Hub Symbolic Link Name: USB#ROOT_HUB30#1&2b53a856&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
 USB 1.1:                         yes
 USB 2.0:                         yes
 USB 3.0:                         no

Device Power State:               PowerDeviceD0

       ---===>Device Information<===---
English product name: "NIKON DSC Z 50"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: High (is not SuperSpeed or higher capable)
Device Address:                    0x00
Open Pipes:                           3

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0x00  -> This is an Interface Class Defined Device
bDeviceSubClass:                   0x00
bDeviceProtocol:                   0x00
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x04B0 = Nikon Corporation
idProduct:                       0x0444
bcdDevice:                       0x0250
iManufacturer:                     0x01
     English (United States)  "NIKON"
iProduct:                          0x02
     English (United States)  "NIKON DSC Z 50"
iSerialNumber:                     0x03
     English (United States)  "0000007424702"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x02  -> Direction: OUT - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0008 = 1 transactions per microframe, 0x08 max bytes
bInterval:                         0x09

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0027  -> Validated
bNumInterfaces:                    0x01
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0xC0  -> Self Powered
MaxPower:                          0x02 =   4 mA

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x03
bInterfaceClass:                   0x06  -> This is an Image USB Device Interface Class
bInterfaceSubClass:                0x01
bInterfaceProtocol:                0x01
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x02  -> Direction: OUT - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0200 = 0x200 max bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0008 = 1 transactions per microframe, 0x08 max bytes
bInterval:                         0x09

#4

OK i thought you meant the virtualhere address.

Actually that bus number/device address are not actually valid values and you cant distinguish devices that way like you can with linux.

What you can do is use https://www.uwe-sieber.de/usbtreeview_e.html to view the devices. "Location Info" is OK to distinguish them but is not completely reliable. The "Port Chain" is slightly better but i dont know if libphoto supports those fields