Skip to content

get device path / port number #10

Open
@siochs

Description

@siochs

Hi, using following code:

        UsbPort port = usbDevice.getParentUsbPort();
        System.out.println("Connected to port: " + port.getPortNumber());
        System.out.println("Parent: " + port.getUsbHub()); 

I can dump some basic info about the device connection. However, I need to know the physical location of the device. I can see it in dmesg:

[ 1415.390194] usb 1-1.2: Manufacturer: SanDisk

Attaching the device to another port prints

[ 1415.390194] usb 1-1.4: Manufacturer: SanDisk

So how do I retrieve the physical address 1-1.4 using usb4java-javax? The code above always prints the same port information, even when switching the ports.
See also this thread on StackOverflow.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions