OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: karotlopj on April 21, 2016, 10:50:52 am

Title: USB
Post by: karotlopj on April 21, 2016, 10:50:52 am
I can never get USB working on OS/2. I have read numerous guides and tried lots of versions of drivers but don't seem to get anywhere....

Should the stock USB drivers with ACP2 allow me to access a pen drive or USB hard disk?

From what I've read I should only need to unREM the USB statements which appear in config.sys after installation. When I do this LVM tells me that one of my disks is corrupt but I'm unable to access it.
Title: Re: USB
Post by: Martin Iturbide on April 21, 2016, 02:37:08 pm
Hi JohnP.

There is the option to use Lar's USB drivers updated on 2016/02/13:
http://hobbes.nmsu.edu/h-viewer.php?dir=/pub/os2/system/drivers/misc&file=usbdrv202.zip

I never use those with ACP2, but I guess they should work without issues.

Just to know more about it, did you have some simpler device like a USB mouse running fine on the USB port? Can you validate that the USB port is working and recognized on OS/2?

Once you have the USB stock (base) driver working, the key driver for USB storage is USBMSD.ADD.
Here it is more info about it.
http://www.edm2.com/index.php/The_Config.sys_Documentation_Project/BASEDEV_Statements#BASEDEV.3DUSBMSD.ADD

Also it is interesting to see what USB Resource Manager tells your about what is plugged on the machine:
http://hobbes.nmsu.edu/h-viewer.php?dir=/pub/os2/apps/misc&file=usbres.wpi

Regards

Title: Re: USB
Post by: karotlopj on April 21, 2016, 03:38:27 pm
This is interesting....

I just connected up a USB mouse to my ThinkPad T42 and it started working ....

Then I looked at config.sys since I only just installed OS/2 (ACP2) on this system and didn't recall enabling any USB drivers and sure enough they were all REMed out!!

I'm not sure what to think.... Why does my USB mouse work?

I won't be using an external mouse with this system because I prefer the ThinkPad trackpoint, but I'd like to know just why it works without any drivers.
Title: Re: USB
Post by: ivan on April 21, 2016, 04:06:17 pm
Legacy USB mouse may be built into the bios as part of the trackpoint.

To check which USB drivers you need run HCIMONIT in a command window.  It will tell you how many host controllers you have and what types.  You need a driver for each controller, for example, hcimonit on my workstation shows:

You have 5 PCI USB OHCI host controller(s)
You have 2 PCI USB EHCI host controller(s)

And the Config.sys USB entries are:
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBD.SYS
BASEDEV=USBHID.SYS
BASEDEV=USBMSD.ADD /REMOVABLES:9 /FLOPPIES:1

If your USB stick is formatted as FAT32 you will also need the FAT32 IFS in your config.sys (and installed on your system):
IFS=C:\OS2\BOOT\FAT32.IFS /CACHE:2048 /H /Q


Title: Re: USB
Post by: Pete on April 21, 2016, 04:43:50 pm
Hi JohnP

You may want to try my little USB configuration application which simply "visualises" the config.sys usb statements allowing you to see what is installed with what options and make changes without hunting through the config.sys file using an editor - also includes a Help file with a USB MSD FAQ. You can find the app on hobbes http://hobbes.nmsu.edu/h-search.php?key=usbcfg&pushbutton=Search

You want the latest, 082, in either Warpin or Zip package.


As to what builds of USB drivers you should be using: -

1] I notice from other posts that you have an Arca Noae subscription so there are a lot of the drivers you should be using  :-)

2] for drivers not in the Arca Nae package use the last iBM supplied drivers; I guess that is mainly Drives (usb floppy/hard/flash/DVD/CD) so is build 10.162

Alternatively there are "experimental" packages available from Lars, I think this is the current release http://hobbes.nmsu.edu/download/pub/os2/system/drivers/misc/usbdrv202.zip


Regards

Pete
Title: Re: USB
Post by: karotlopj on April 21, 2016, 05:39:46 pm
Legacy USB mouse may be built into the bios as part of the trackpoint.

To check which USB drivers you need run HCIMONIT in a command window.  It will tell you how many host controllers you have and what types.  You need a driver for each controller, for example, hcimonit on my workstation shows:

I've searched my hard disk as well as Hobbes but no HCIMONIT. Where can I find it?

Quote

You have 5 PCI USB OHCI host controller(s)
You have 2 PCI USB EHCI host controller(s)

And the Config.sys USB entries are:
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBOHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBD.SYS
BASEDEV=USBHID.SYS
BASEDEV=USBMSD.ADD /REMOVABLES:9 /FLOPPIES:1

If your USB stick is formatted as FAT32 you will also need the FAT32 IFS in your config.sys (and installed on your system):
IFS=C:\OS2\BOOT\FAT32.IFS /CACHE:2048 /H /Q

Which versions are these, as there seem to be quite a number floating around. I have the ones from ACP2 installed but REMed out in config.sys. I presume they should suffice...

Though having said that, I've just looked, and have neither USBOHCD.SYS or USBEHCD.SYS on my system, but I do have USBUHCD.SYS and USBUHCD2.SYS

As I said I find this all very confusing.
Title: Re: USB
Post by: ivan on April 21, 2016, 07:17:12 pm
See the attachment for hcimonit.

Depending on which controllers your computer has your list of drivers in config.sys will be different to mine.

All of our computers use the USB drivers in the USBDRV202.ZIP package from hobbes.
Title: Re: USB
Post by: Pete on April 21, 2016, 07:58:41 pm
Hi

Also be aware that hcimonit.exe has problems on some systems and returns incorrect results; USBcfg does not use hcimonit.exe but queries the hardware directly and, so far, no one has reported incorrect results.


Regards

Pete
Title: Re: USB
Post by: ivan on April 21, 2016, 09:52:23 pm
Sorry Pete, I keep on forgetting your program because we use it so infrequently (last time was about 12 months ago when I setup a new workstation).
Title: Re: USB
Post by: karotlopj on April 21, 2016, 10:50:15 pm
Hi

Also be aware that hcimonit.exe has problems on some systems and returns incorrect results; USBcfg does not use hcimonit.exe but queries the hardware directly and, so far, no one has reported incorrect results.


Regards

Pete

've just installed USBcfg and on rebooting was greeted with the msg

USBMSD.ADD: USBD.SYS driver not loaded

I'm using the IBM 10.58 USBMSD.ADD driver

There is no BASEDEV statement for USBD.SYS. Should there be?
Title: Re: USB
Post by: guzzi on April 22, 2016, 01:24:35 am
USBMSD.sys is the mass storage device driver. It is needed for, well, mass storage devices).
Generally, the old (IBM supplied) USB drivers have a host of problems and defects in detecting and enumerating devices. Go for the AN package or Lars's drivers on Hobbes. The latest releases are stable and so+ve most issues.
Title: Re: USB
Post by: Pete on April 22, 2016, 03:32:25 am
Hi JohnP

You need USBD.SYS for all USB devices except mouse and keyboard which require USBDHID.SYS.

Looks like I should put a check into USBcfg so that when a driver is selected by the user USBcfg checks that USBD.SYS, or USBHID.SYS in the case of mouse and keyboard, is already selected and if not displays a message warning the user - maybe even offers to "automatically" select the needed driver.


I'm guessing that was bldlevel 10.158 which worked for me but did not work or work as well for other people.

Ideally you want to get hold of the iBM USB updates that include USBMSD.ADD and USBCDROM.ADD buildlevel 10.162 as they are the IBM builds that work best. Sorry, not having purchased Warp4.5+ from IBM I do not know where to get those updates...


Regards

Pete
Title: Re: USB
Post by: karotlopj on April 22, 2016, 10:13:12 am
The bldlevel of the IBM ACP2 USB drivers is 10.058.

I have now updated a couple of drivers - USBD.SYS USBMSD.ADD USBUHCD.SYS by Lars Erdmann to 10.202

There was no USBRESMG.SYS in the original so I didn't I didn't include - maybe a mistake.

In any case I still can't mount a 128 MB FAT formatted USB stick.

In CONFIG.SYS I have

BASEDEV=USBMSD.ADD /A_USAGE:2 /REMOVABLES:2 /V
Title: Re: USB
Post by: ivan on April 22, 2016, 11:59:09 am
Do you have the FAT32.IFS line in your config.sys and the FAT32.ifs in os2\boot as well as UFAT32.DLL in os2\dll?  You will not be able to see a FAT32 formatted drive without them.
Title: Re: USB
Post by: Lars on April 22, 2016, 01:02:06 pm
A couple of things:
1) you always need USBD.SYS for ALL devices, no matter what device class. USBD.SYS is the "mediator" that interconnects the client drivers for the various device classes (USBHID.SYS, USBMSD.ADD, USBPRT.SYS, USBCOM.SYS, USBAUDIO.SYS, USBETHR.OS2 etc.) with the host controller drivers that do the "real data movement" work (USBUHCD.SYS, USBOHCD.SYS, USBEHCD.SYS)
USBHID.SYS has the special job that it is serving the "HID" device class which encompasses any USB device the user directly interacts with and by itself is the "mediator" for USBKBD.SYS and USBMOUSE.SYS which serve specific HID device types (keyboard and mouse respectively).

2) use HCIMONIT.EXE to tell you what host controllers you have and what type they are (UHCI, OHCI or EHCI). Then, supposing you have 5 UHCI controllers and 1 EHCI controller you need this as a minimum in config.sys to operate up to 4 USB mass memory devices:
BASEDEV=USBD.SYS
BASEDEV=USBUHCD.SYS
BASEDEV=USBUHCD.SYS
BASEDEV=USBUHCD.SYS
BASEDEV=USBUHCD.SYS
BASEDEV=USBUHCD.SYS
BASEDEV=USBEHCD.SYS
BASEDEV=USBMSD.ADD /REMOVABLES:4

And as ivan has correctly pointed out you of course need to install the file system drivers for all file systems you use.

Title: Re: USB
Post by: Lars on April 22, 2016, 04:23:09 pm
To add:
1) don't just install some drivers of my package. Just install ALL of them, the contained readme hopefully explains well enough how to do that. Also follow the hints regading USBCALLS.DLL and USBRESMG.SYS (which are not part of the IBM driver set but serve very useful purpuses around USB for all kinds of USB related things)

2) post the output of hcimonit.exe

3) post your config.sys

That should allow to give some help on what you need to change in config.sys in order to make it work.

By the way: I am working on version 10.203. It tries to solve some USBMSD issues that still exist. USB mass memory devices (like pen drive, USB hard drive) are very diverse and some of them don't properly follow the relevant USB specs. You might have a device that is problematic in which case there is no cure except for buying a different one.

Lars
Title: Re: USB
Post by: Sergey Posokhov on April 22, 2016, 04:26:48 pm
I always check settings in "Config.sys".
I once noted that they're point to previous USB drivers (installed with operating system).
Title: Re: USB
Post by: Sergey Posokhov on April 22, 2016, 04:29:06 pm
I always check settings in "Config.sys".
I once noted that they're point to previous USB drivers (installed with operating system).
Title: Re: USB
Post by: karotlopj on April 22, 2016, 04:44:44 pm
Do you have the FAT32.IFS line in your config.sys and the FAT32.ifs in os2\boot as well as UFAT32.DLL in os2\dll?  You will not be able to see a FAT32 formatted drive without them.

I'm using  128 MB USB stick which is partioned FAT....

I assume I should be able to format USB sticks with any FS OS/2 supports... That is if I ever get this working...
Title: Re: USB
Post by: Dave Yeo on April 22, 2016, 05:54:11 pm
A 128 MB FAT formatted stick should just work. And yes you should be able to use any file system that OS/2 supports though only DFSee can format a FAT32 drive under OS/2.
Title: Re: USB
Post by: guzzi on April 22, 2016, 07:00:15 pm
Ecosoft also sells a fat32 format utility called reformat. Haven't used it myself though.
Title: Re: USB
Post by: karotlopj on April 23, 2016, 10:12:54 am
To add:
1) don't just install some drivers of my package. Just install ALL of them, the contained readme hopefully explains well enough how to do that. Also follow the hints regading USBCALLS.DLL and USBRESMG.SYS (which are not part of the IBM driver set but serve very useful purpuses around USB for all kinds of USB related things)

2) post the output of hcimonit.exe

3) post your config.sys

That should allow to give some help on what you need to change in config.sys in order to make it work.

By the way: I am working on version 10.203. It tries to solve some USBMSD issues that still exist. USB mass memory devices (like pen drive, USB hard drive) are very diverse and some of them don't properly follow the relevant USB specs. You might have a device that is problematic in which case there is no cure except for buying a different one.

Lars

Thanks for your help, Lars. I have it working now, at least on one USB stick :) but it's a start.

Now lots of questions....

How do you unmount a drive? It doesn't seem to disappear from the filesystem when the stick is removed.

I couldn't read an external hard drive - I don't know if I should expect to.

If I want to install your drivers automatically I would need to replace the USB bundle in \OS2IMAGE\DISK_5 Not sure how to do that.
Title: Re: USB
Post by: ivan on April 23, 2016, 12:10:11 pm
Unmounting a USB drive:  Open drives object, mouse button 2 (right click?) on the USB drive, select Eject disk. wait until it disapears and any LED indicator on the stick stops flashing then remove it.

Things like external USB hard drives require the use of DFSee to have the LVM information installed.  Once that is done it is a case of just plugging them in and they are available.

Adding and updating the original WSeB CD 2, and making it bootable, is the reason that UPDCD (UpdateCD) was created.  It does all the work for you and you end up with a single bootable CD that has all the updates built in.  Not sure where you can get it from at the moment though. 

Edit:  UPDCD260.ZIP is obtainable from http://www.os2site.com/sw/upgrades/util/index.html (http://www.os2site.com/sw/upgrades/util/index.html) you can also get the updcd261.zip which updates that there as well.
Title: Re: USB
Post by: Andreas Schnellbacher on April 23, 2016, 02:31:11 pm
If I want to install your drivers automatically I would need to replace the USB bundle in \OS2IMAGE\DISK_5 Not sure how to do that.
Use unpack2.exe and pack2.exe:
Code: [Select]
start view cmdref unpack2
start view toolsref unpack2
start view toolsref pack2
toolsref.inf and pack2.exe are in the Developer's Toolkit.
Title: Re: USB
Post by: karotlopj on April 23, 2016, 05:42:35 pm
I was aware of unpack although not sure what the difference is between unpack and unpack2, and I'm sure there is some pack program for creating these packages, although there is no pack.exe on the CD.... unless, of course, it's 'packed' somewhere :)
Title: Re: USB
Post by: ivan on April 23, 2016, 06:18:58 pm
unless, of course, it's 'packed' somewhere

Yes, in the updcd zip.
Title: Re: USB
Post by: Dave Yeo on April 23, 2016, 06:42:55 pm
You can also eject a disk from the command line, eject d: and wait a couple of seconds
Title: Re: USB
Post by: Andreas Schnellbacher on April 23, 2016, 09:36:38 pm
I was aware of unpack although not sure what the difference is between unpack and unpack2,
IIRC pack2 and unpack2 have higher compression and fully replace and include pack and unpack. pack and unpack are just available for compatibility.