Technical article 127021

How to use the usbprobe command?

OpenServer 6.0.0OpenServer 5.0.7UnixWare 7.1.3UnixWare 7.1.4

Written · Last revised

Problem

How do I use the 'usbprobe' command?

Solution

For OpenServer5:
---------------
usage: /etc/usbprobe [-h] [[-f] filename]  [-I digit][-v]
                     [-d] [-C] [-c] [-i] [-e] [-a] [-p]

-h: This help message -f filename: File to parse instead of the default /dev/udi/usbprobe0 -I X: Shortening for -f /dev/udi/usbprobeX, where X is a digit -d: Device info and device descriptors -C: USBDI child instances -c: Configuration descriptors (includes -d) -i: Interface descriptors (includes -c and -d) -e: Endpoint descriptors (includes -i, -c, and -d) -A: Iterate across all host controllers (ignores -a and -p) -v: Verbose output (all of the above) -a: Limit output to the device with the specified address (incompatible with -p) -p: Limit output to the device with the specified path (incompatible with -a)

The path for a device is the sequence of the port numbers between the root hub and the device, separated with dots

For example 2.5 means that the device is connected to port #5 of a hub connected to port #2 of the root hub The path for the root hub is 0

For example:
# usbprobe -cev

There is no 'man' page for 'usbprobe' under OpenServer5.

For OpenServer6:
---------------
usage: usbprobe [-D][-I file][-O file][-b busnum][-d][-C][-c][-i][-e]
                [-v][-a address][-p path]

-D: debug -O file: output a usbprobe file -I file: use a usbprobe file (from -O) as input instead of /dev/usbprobeXX -h: display this help -b busnum: limit output to a specific bus -d: Display device and device descriptor info -C: Display USBDI child instance info -c: Display configuration descriptor info (includes -d) -i: Display interface descriptor info -e: Display endpoint descriptor info (includes -i) -v: Verbose output (same as -e and -C) -a address: Limit output to devices with a specific address -p path: Limit output to devices with a specific path

The path for a device is the sequence of the port
numbers between the root hub and the device,
separated with dots.  For example, 2.5 means that
the device is connected to port #5 of a hub
connected to port #2 of the root hub.  The path for
the root hub is 0 Note: -a and -p cannot be used
together
For example:
# usbprobe -Dcev
For UnixWare7:
-------------
There is no 'usbprobe' command currently available on UnixWare7 and
is scheduled to be implemented in Maintenance Pack 4 of UnixWare
7.1.4.

However, the binary can be taken and run from an OpenServer6 system.

USAGE:
-----
So how to use 'usbprobe' pratically. For example is it possible
(without the output of sdiconfig -l on UW7/OSR6) to find out what
device to mount?
Assume you have a USB device (memory stick) plugged in and you want
to know which device to mount.  Further assume there is a valid and
suported filesystem on the device.
Following the "usbprobe" and "sdiconfig" output below, as you can
see Address=2 (usbprobe) refers to controller 2 from the sdiconfig
output.  Now you know that you have to mount a device on controller
2 (c2).  It is always recommended to fstyp the devices to check
whether there is a valid filesystem or not.
OpenServer6 Example:
-------------------
bash-3.2# usbprobe
Path - Address - Description
----------------------------
+++++++ BUS #0
0 - 1 - HUB "UHCI Root Hub"
1 - 2 - HUB "Freecom Technologies USB Embedded Hub"
1.1 - 3 - Mass-Storage "Freecom Technologies USB Mass Storage Device"
sdiconfig -l
bash-3.2# sdiconfig -l
...
2:0,7,0: HBA     : (usb_msto,1) USB     USB HBA
  0,0,0: DISK    : Freecom FM-10 Pro Disk  PROL
# fstyp /dev/dsk/c2b0t0d0pa
dosfs
# mount /dev/dsk/c2b0t0d0pa /mnt
NOTES:    Troubleshooting:
          ---------------
          - When I try to mount I get:

UX:dosfs mount.svr5: ERROR: /dev/dsk/c3b0t0d0p0 is not an dosfs file system, or /mnt is busy.

Check that this is the correct partition to mount.  To see what is
available try:
# for i in `ls /dev/dsk/c3*` ; do echo $i ; fstyp $i ; done

- When I try to check the disk type I get:

fstyp: cannot read </dev/dsk/c2b0t0d0pa>

In this example, the device is removed and replaced several times:

Jan  6 09:12:35 tiger3 2:0,7,0: HBA          : (usb_msto,1) USB     USB HBA
Jan  6 09:12:35 tiger3   0,0,0: DISK         : USB 2.0 SD MMC Reader
Jan  6 09:13:21 tiger3 3:0,7,0: HBA          : (usb_msto,1) USB     USB HBA
Jan  6 09:13:21 tiger3   0,0,0: DISK         : USB 2.0 SD MMC Reader
Jan  6 09:21:13 tiger3 4:0,7,0: HBA          : (usb_msto,1) USB     USB HBA
Jan  6 09:21:13 tiger3   0,0,0: DISK         : USB 2.0 SD MMC Reader
So the device enumeration is incorrect.
For SCO OpenServer6, use the "/bin/getlclfsdev" command and this
should tell you what filesystems are mounted and which can be
mounted.  For example:
# getlclfsdev
/dev/boot EAFS MOUNTED
/dev/root vxfs MOUNTED
/dev/u vxfs NOT-MOUNTED
/dev/hd11 dosfs NOT-MOUNTED
and mount with:
# mount /dev/hd11 /mnt
Then run:
# getlclfsdev
/dev/boot EAFS MOUNTED
/dev/root vxfs MOUNTED
/dev/u vxfs NOT-MOUNTED
/dev/hd11 dosfs MOUNTED

Alternatively for UnixWare7, try using the "devattr" command with:

----- cut from here -----
for i in `getdev type=disk`
do
        echo "$i = `devattr $i cdevice` - \"`devattr $i inquiry`\""
done
----- to here -----

Failing that, you must check /dev/dsk to ensure the correct c2 devices have been created there.

If not, you may find the device controller has been incremented to the next available number, for example, c3.

To workaround this issue: see "man mkdev"
Known Problems:
It is possible for mkdev hd to display information for disks that
have been physically disconnected from the system. This typically
happens when a disk that was not configured is disconnected; or,
when a configured disk is intentionally erased (e.g., using the
dd command) and then disconnected. mkdev hd may still display
information for the disconnected disk. The sdiconfig -l command
may also show duplicate disk entries for existing disks. Note
that existing disks and any duplicate entries for existing disks
perform correctly no matter which entries you choose; the
duplicate and non-existent entries are the only problem. The
workaround is as follows:
1. Run the following command repeatedly until it fails:
   # resmgr -r -m vtoc
2. Enter the following commands:
# /etc/conf/bin/idconfupdate -f
# reboot
NOTES:    Remember removing a USB Stick Pen without a "umount" first is not
          supported.
NOTES:    FURTHER OUTPUT EXAMPLES:
# ./usbprobe
Path - Address - Description
----------------------------
+++++++ BUS #0
0 - 1 - HUB "OHCI Root Hub"
# ./usbprobe -v
+++++++ BUS #0
Device - 0 - 1 - HUB "OHCI Root Hub"
    Path: 0
    Port: 0
    Speed: 2
    Tier: 1
    Address: 1
    State: 2
    Configuration Value: 1
    Configuration Number: 0
    Self Power Capable: 1
    Power On: 1
    Suspended: 0
    Number of Logical Devices: 0
Device Descriptor
    Length: 18
    Type: 0x01
    bcdUSB: 0x0100
    Class: 0x09 [HUB]
    Subclass: 0x00 []
    Protocol: 0x00 []
    Max Packet Size: 32
    Vendor ID: 0x1166
    Product ID: 0x0220
    bcdDevice: 0x0005
    Manufacturer: "N/A"
    Product: "OHCI Root Hub"
    Serial Number: "N/A"
    Number of Configurations: 1
Configuration Descriptor
    Length: 9
    Type: 0x02
    Total Length: 25
    Number of Interfaces: 1
    Configuration Value: 1
    Configuration String: "N/A"
    Attributes: 0x40
    Max Power: 0
Interface Descriptor
    Length: 9
    Type: 0x04
    Interface Number: 0
    Alternate Setting: 0
    Number of Endpoints: 1
    Class: 0x09 [HUB]
    Subclass: 0x00 []
    Protocol: 0x00 []
    Interface String: "N/A"
Endpoint Descriptor
    Length: 7
    Type: 0x05
    Address: 0x81
    Attributes: 0x03
    Max Packet Size: 8
    Interval: 255
Driver Instance
    Child ID: 1
    Configuration Number: 0
    Bind Interface Number: 0
    For Whole Device: 2
    Driver Bound: 1
Driver Instance
    Child ID: 2
    Configuration Number: 0
    Bind Interface Number: 0
    For Whole Device: 1
    Driver Bound: 1
# usbprobe -Ousb.out -Dcev
output file = usb.out
Checking /dev/usbprobe0 ...FOUND
  opened
  read: DEVICE:c501e018:0:0:2:1:1:2:1:0:1:1:0:0:0:0:ca492508:c7efd358:c50015ac:c
57f56d8:0
  LINE TYPE = DEVICE
  read: DDESC:c501e060:c501e018:18:0x01:0x0100:0x09:0x00:0x00:32:0x1166:0x0220:0
x0005:0:1:0:1
  LINE TYPE = DDESC
  read: CDESC:c501e634:c501e060:9:0x02:25:1:1:0:0x40:0
  LINE TYPE = CDESC
  read: IDESC:c501e650:c501e634:9:0x04:0:0:1:0x09:0x00:0x00:0
  LINE TYPE = IDESC
  read: EDESC:c501e8b8:c501e650:7:0x05:0x81:0x03:8:255
  LINE TYPE = EDESC
  read: SDESC:c50376b8:c501e018:0:0904
  LINE TYPE = SDESC
  read: SDESC:c50376c0:c501e018:1:4f00480043004900200052006f006f0074002000480075
006200
  LINE TYPE = SDESC
  read: CHILD:c5001298:c501e018:c501e060:1:0:0:0:0:2:0:0:1
  LINE TYPE = CHILD
  read: CHILD:c5001218:c501e018:c501e060:2:c5990b08:c57f4898:0:0:1:1:0:1
  LINE TYPE = CHILD
NOTES:    UCHI/OHCI (USB 1.1) and EHCI (USB 2.0) standards are supported.

See also

http://osr600doc.xinuos.com/en/man/html.ADM/usbprobe.ADM.html
http://osr600doc.xinuos.com/en/man/html.HW/usb.HW.html

From the Xinuos technical article database, record 127021. Reproduced with permission. The original is at www.sco.com/ta/127021, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.