Solved

DOS drivers for USB

Posted on 2009-07-07
33
1,674 Views
Last Modified: 2013-12-01
I'm looking to use a small form factor PC (see PDF) that runs code under DOS 6.22. There is no windows or other OS installed. What I would like to do is to use a memory stick on one of the USB ports to off load data from the system.

I currently use a ZIP drive on an IDE interface for the same function (which works well) but getting rid of the ZIP drive would be a move in the right direction and would reduce power consumption.

I have looked around and there seems to be several ways of potentially doing this. One uses USBASPI.SYS and DUSE.EXE but all the examples I can find on the net all veer off towards CDROM drives and I'm having trouble de-cyphering what's going on in the config.sys and autoexec.bat file examples.

Anybody got any experience of this sort of stuff?
VSX-6152.pdf
0
Comment
Question by:Mark Preston
  • 15
  • 13
  • 5
33 Comments
 
LVL 8

Expert Comment

by:JT92677
ID: 24794654
The motherboard has USB 2.0 support, so you might find that the BIOS has "legacy USB support" and the ability to allow you to boot from a USB drive.

Maybe this will allow you to make some progress.

0
 

Author Comment

by:Mark Preston
ID: 24794708
I don't want to boot from the USB drive - I'll have 512M of disc on module for that. The system gathers data over a period of time (It's a remote logging system - solar powered) and on periodic visits I want to pop a data stick in the usb port (reboot probably) and copy the data off the system and remove the data stick.
0
 
LVL 8

Expert Comment

by:JT92677
ID: 24795055

The warning/caveat seems to be these do NOT support hotplug, so you have to boot with the USB device attached, or so they say.

In config sys
device=USBASPI.SYS /w /v   (put in the right path to USBASPI.SYS)

/w

Wait, displays prompt message to allow swapping/attaching of target USB device

/v Verbose, shows USB details - excellent troubleshooting tool

In verbose mode. USBASPI displays details on controller type and USB devices it detects. It displays the vendor & product ID codes, the controller address range (memory map or I/O port map) of controllers, and the connection speed code for each device.

The link to download the Panasonic version 2.20 driver is
http://hddguru.com/download/software/USBASPI-MS-DOS-Driver/usbaspi-v2.20.zip

More information is here:
http://www.computing.net/answers/dos/usb-mass-storage-driver-for-dos/15416.html

Maybe this will help.

Jeff
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24802127
A USB stick booted to DOS, can be removed and plugged back in without any issues because it is not polled unless the user runs a command.

To work, you will need to stop the system from trying to access the stick when it is unplugged OR add error handling.
0
 

Author Comment

by:Mark Preston
ID: 24802302
Well something is working... I get the screen shot as shown but it doesn't give me a drive letter as I was expecting. The light on the datastick flashes so DOS is seeing the device. How do I get a drive letter for the device?

Thanks

Mark
DSCN2524.JPG
0
 

Author Comment

by:Mark Preston
ID: 24802310
The 'bad command or file name' at the end is just a rem'd out batch file that boots the actual logging application.
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24802514
check if it is emulating the a: drive
0
 

Author Comment

by:Mark Preston
ID: 24802630
No it isn't - it just hits the floppy drive if you type a:
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24802914
Let me think about this.
You want the OS on the pc's ram not the stick.
When we boot the key to dos we map a drive to the key.
I wonder if we can do this when booted to the pc.

I use a program called Himalaya to enumerate attached USB sticks and map them to a drive letter.
I cannot upload the utility i use because it is a *.exe but I wonder if you can find one in the wild.

You could try booting the system with the USB key attached so that it assigns a drive letter (hopefully) or try this in config.sys
device=Boot\emm386.exe noems
device=Boot\USB\USBASPI.SYS
device=Boot\USB\Di1000dd.SYS
0
 

Author Comment

by:Mark Preston
ID: 24802970
When I boot the system I have the stick attached - and it comes up as per the screen shot further up the page. No drive letter assigned.

What is Di1000dd.sys?
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24803015
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24803174
ASPI DISK DRIVER
0
 

Author Comment

by:Mark Preston
ID: 24803268
I get 'bad or missing file' for the three lines

device=Boot\emm386.exe noems
device=Boot\USB\USBASPI.SYS
device=Boot\USB\Di1000dd.SYS

I put Di1000dd.SYS in the root
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24803300
I could give you the Dell utility Himalaya but I cannot upload exe's
0
 

Author Comment

by:Mark Preston
ID: 24803397
Can you not re-name it? Maybe that's not allowed either. Alternatively I could post my email address - but is that allowed? I don't want to break any rules. I have had a quick search on the web and didn't come up with anything.

Why do you think I am getting the 'bad or missing file'? What exactly is device=Boot\....... trying to do?
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24803401
Sorry, I was in a rush there:

USBASPI maps mass storage devices to ASPI devices
Di1000dd maps the USB hard drive to a drive letter in DOS

Add the following to the CONFIG.SYS file on the PC.
Try it first with only the last three lines

FILES=30
BUFFERS=30
STACKS=9,256
DEVICE=USBASPI.SYS /v /noprt /L=6
DEVICE=DI1000DD.SYS /h0
LASTDRIVE=Z
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:Mark Preston
ID: 24803666
Now we seem to be getting somewhere...

Now what I get is

read error in partition read
read error in boot sector read

I think that is because the drive is an 8G one and formatted in FAT32.

I'll dig about tonight and see if I can find a small stick and format it in FAT and see if that changes anything
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24803686
512MB or less
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24803732
eg this should allow you to access a USB cd drive mapped to d:

config.sys
  DOS=HIGH,UMB
  lastdrive=Z
  device=HIMEM.SYS
  devicehigh=USBASPI.SYS /v /w /e
  devicehigh=DI1000DD.SYS
  devicehigh=USBCD.SYS /d:USBCD001

autoexec.bat
LH MSCDEX /d:USBCD001
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24803748
0
 

Author Comment

by:Mark Preston
ID: 24812011
Right... got a 256M data stick and formatted it in FAT. DOS sees it OK and even assigns it a drive letter (D:) so all looks good. However if I try and access the drive then the PC crashes and re-boots.
DSCN2528.JPG
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24812219
Try formatting the stick as a bootable drive in FAT16.
Do you have a partition utility like gdisk to examine the partitions?
0
 
LVL 3

Expert Comment

by:jjjtuohy
ID: 24812424
For the stick, look up the HP utility SP27213.exe
0
 

Author Comment

by:Mark Preston
ID: 24839764
The utility works fine  however I still can't access the drive - does exactly the same as when formatted under XP
0
 
LVL 8

Expert Comment

by:JT92677
ID: 24839913
In the BAT file with MSCDEX, add the switch /L:  to give the device a "Logical drive letter"  -- for example

LH MSCDEX /d:USBCD001  /L:F

The default is the "Next available block device letter" but you can change that with the /L:x   switch  where x is the drive letter.

As another pointed out, DOS is most likely going to work best (or only) with FAT16 formatted devices.

After the device is mounted to a drive letter, can you use the DOS FDISK to see the partition(s) on the stick? If so, you might be able to delete the non-dos partition, create a partition, and format it with the DOS FORMAT utility.


0
 

Author Comment

by:Mark Preston
ID: 24849961
I dont have MSCDEX in the bat file. It sounds like a CD driver - and I don't have a CD drive
0
 

Author Comment

by:Mark Preston
ID: 24850547
DOS FDISK just puts up a banner saying 'Waiting for system shutdown' and hangs there forever. So does Format d:

I've included the Autoexec.bat and config.sys in case there are things in there that there shouldn't be.
AUTOEXEC.TXT
CONFIG.TXT
0
 
LVL 8

Expert Comment

by:JT92677
ID: 24851968
Mopor wrote " I dont have MSCDEX in the bat file. It sounds like a CD driver - and I don't have a CD drive"

jjjt... suggested:

config.sys
  DOS=HIGH,UMB
  lastdrive=Z
  device=HIMEM.SYS
  devicehigh=USBASPI.SYS /v /w /e
  devicehigh=DI1000DD.SYS
  devicehigh=USBCD.SYS /d:USBCD001

autoexec.bat
LH MSCDEX /d:USBCD001

Notice the reference to MSCDEX here. It looks like a fakeout to treat the USB drive referenced in USBCD.SYS as another kind of block device that can be handled by MSCDEX.

My comment was to add a logical device letter to the MSCDEX command.

MSCDEX is referenced in other articles discussing the interfacing of a USB device in DOS, but you're right, it USUALLY refers to a CD, but a CD is just a block device, the real work is done by USBCD.SYS.

Anyway, just trying to help.

Jeff
0
 

Author Comment

by:Mark Preston
ID: 24905446
Got tied up with other stuff... hopefully will be back on to this tomorrow.... Thanks
0
 

Author Comment

by:Mark Preston
ID: 24959127
Sorry for the delay - work is getting in the way of work

That just gives me a 'bad or missing HIMEM.SYS' and an 'error in config.sys line 3'
0
 
LVL 8

Accepted Solution

by:
JT92677 earned 250 total points
ID: 24966612
You can remove the HIMEM.SYS line  (put a REM at the beginning of the line)

Then change all the "Devicehigh=" to simply "Device="

The himem.sys and devicehigh parts are not critical, just trying to push as much code into high memory as possible, but you can test without worrying about memory issues.

Jeff
0
 
LVL 3

Assisted Solution

by:jjjtuohy
jjjtuohy earned 250 total points
ID: 24968315
Sorry, I was away from this thread for so long.

I found a superb article on:
http://www.computing.net/answers/dos/usb-driver-for-dos-usbaspisys/15568.html
It covers switches, driver links, examples and roubleshooting.


Here are useful excerpts: To detect your USB Mass storage device (.e.g. a USB 2.0 external hard drive) put this line in your boot diskette CONFIG.SYS file
device=USBASPI.SYS /w /v

If you want specify the "L" drive letter for a storage
device, try:
device[high]=[{path}]di1000dd.sys /dL

If the USB devices are already plugged upon power up and you want to enable only the high-speed USB controller and external hard disk drives, try
device=USBASPI.SYS /e /v
device=DI1000DD.SYS



If you have only a single USB port and no internal floppy, use this CONFIG.SYS combination:
device=RAMFD.SYS
device=USBASPI.SYS /w /v /r


If you have a notebook with a USB optical drive, install the ASPI CD-ROM device driver after loading USBASPI.SYS in CONFIG.SYS like this:
device=USBASPI.SYS /w
device=USBCD.SYS /d:USBCD001


and in AUTOEXEC.BAT:
MSCDEX /d:USBCD001


If you want to connect a USB 2.0 optical drive and a USB 2.0 external hard disk simultaneously, put these in the CONFIG.SYS file: device=USBASPI.SYS /e /w
device=USBCD.SYS /d:USBCD001
device=DI1000DD.SYS

and in AUTOEXEC.BAT:
MSCDEX /d:USBCD001

For troubleshooting USB connections, install all your devices and boot from your diskette with this in CONFIG.SYS:
device=USBASPI.SYS /v







0
 

Author Closing Comment

by:Mark Preston
ID: 31600578
Thanks for trying guys, the more I play the more errors I get and am certainly getting no closer to a working  solution. I don't think I understand enough about what's going on to make best use of your suggestions so I think for now I'm going to have to admit defeat and see if I can find a working solution somewhere and modify it.

Thanks again for trying

mopr
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now