Which USB port is my device plugged into? - SUN

This is a discussion on Which USB port is my device plugged into? - SUN ; My application program needs to read a USB joystick on a Solaris 8 system. How can my program find out which usb port it is using other than: system("ls -l /dev/usb | awk '$0~""input""{print$9}' > file") and then reading that ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Which USB port is my device plugged into?

  1. Which USB port is my device plugged into?

    My application program needs to read a USB joystick on a Solaris 8
    system.
    How can my program find out which usb port it is using other than:

    system("ls -l /dev/usb | awk '$0~""input""{print$9}' > file")


    and then reading that file? Thank you.

    Scott B. Klein
    Northrop Grumman Electronic Sensors
    Baltimore, Maryland 21203-0746
    Telephone (410) 765-0910
    s.klein@ngc.com


  2. Re: Which USB port is my device plugged into?

    s.klein@ngc.com wrote:
    > My application program needs to read a USB joystick on a Solaris 8
    > system.
    > How can my program find out which usb port it is using other than:
    >
    > system("ls -l /dev/usb | awk '$0~""input""{print$9}' > file")
    >
    >
    > and then reading that file? Thank you.
    >
    > Scott B. Klein
    > Northrop Grumman Electronic Sensors
    > Baltimore, Maryland 21203-0746
    > Telephone (410) 765-0910
    > s.klein@ngc.com
    >


    I have no idea how to do it. But I would start reading at
    libdevinfo(3lib). One of the functions available via libdevinfo should
    be able to give you the info you need...

    HTH,
    Tom

+ Reply to Thread