problem with usbdrive (to be continued..)

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

problem with usbdrive (to be continued..)

Postby iw2evk » Tue Jul 07, 2009 6:13 pm

Hi, i send you the result of inquiery on usbdrive for my usb key 32 Mb with the "empty drive"problem :

SCSI ADDITIONAL SENSE CODE & QUALIFIER HISTORY FOR INT 13h DISK NUMBER 81h
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

SCSI Request 1Eh = Prevent / Allow Media Removal
Sense Key 05h = Illegal Request (Bad Parameter)
ASC/Q Code 2400h = Invalid Field in CDB

CONTENTS OF INQUIRY BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 00 80 02 02 1F 00 00 00-55 53 42 20 20 20 20 20 € USB
0010 46 4C 41 53 48 20 44 49-53 4B 20 20 20 20 20 20 FLASH DISK
0020 30 33 35 31 0351


CONTENTS OF FORMAT CAPACITY BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 00 00 00 08 00 00 FA 00-02 00 02 00 00 00 00 00 ú
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0080 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00F0 00 00 00 00 00 00 00 00-00 00 00 00


CONTENTS OF CAPACITY BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 00 00 F9 FF 00 00 02 00 ùÿ


CONTENTS OF MODE SENSE BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 0B 00 00 08 00 00 FA 00-00 00 02 00 00 00 00 00 ú
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0080 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00


CONTENTS OF SECTOR BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 EB 3C 90 46 52 44 4F 53-34 2E 31 00 02 04 01 00 ë<FRDOS4.1
0010 02 00 02 E0 F7 F8 3E 00-20 00 40 00 20 00 00 00 à÷ø> @
0020 00 00 00 00 80 00 29 E3-17 24 21 4E 4F 20 4E 41 € )ã $!NO NA
0030 4D 45 20 20 20 20 46 41-54 31 36 20 20 20 31 C0 ME FAT16 1À
0040 FA 8E D0 BC 00 7C FB 0E-1F EB 19 5E FC AC 08 C0 úŽÐ¼ |û ë ^ü¬ À
0050 74 09 B4 0E BB 07 00 CD-10 EB F2 31 C0 CD 16 CD t ´ » Í ëò1ÀÍ Í
0060 19 F4 EB FD E8 E4 FF 54-68 69 73 20 69 73 20 6E ôëýèäÿThis is n
0070 6F 74 20 61 20 62 6F 6F-74 61 62 6C 65 20 64 69 ot a bootable di
0080 73 6B 2E 20 50 6C 65 61-73 65 20 69 6E 73 65 72 sk. Please inser
0090 74 20 61 20 62 6F 6F 74-61 62 6C 65 20 66 6C 6F t a bootable flo
00A0 70 70 79 20 61 6E 64 0D-0A 70 72 65 73 73 20 61 ppy and press a
00B0 6E 79 20 6B 65 79 20 74-6F 20 74 72 79 20 61 67 ny key to try ag
00C0 61 69 6E 2E 2E 2E 0D 0A-00 00 00 00 00 00 00 00 ain...
00D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
01A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
01B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 01
01C0 01 00 04 3E 20 1E 20 00-00 00 00 F4 00 00 00 00 > ô
01D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
01E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
01F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 55 AA Uª


Resident USBDRIVE has been updated with new information.

USB HOST INDEX: 0
DEVICE ADDRESS: 2

DEVICE DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 12h 18
Descr Type: 01h Device
USB Release: 0110h 1.10
Device Class: 00h Look at Interface
Device SubClass: 00h None
Device Protocol: 00h None
Max Packet Size EP0: 40h 64
Vendor ID: 0C45h Sonix Technology Co? Microdia?
Product ID: 1060h 4,192
Device Release: 0100h 1.00
Manufacturer String: 00h None
Product String: 01h "USB Mass Storage Device"
Serial # String: 02h "43218765CBA9"
# of Configs: 01h 1

CONFIGURATION DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 09h 9
Descr Type: 02h Configuration
Descr Total Length: 0020h 32
# of Interfaces: 01h 1
Configuration Value: 01h 1
Configuration String: 00h None
Attributes: 80h Valid Historical Attribute 80h
Bus Powered
No Remote Wakeup
Not Battery Powered
Current Draw / 2: 32h 50 (100 mA)

INTERFACE DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 09h 9
Descr Type: 04h Interface
Interface Number: 00h 0
Alternate Setting: 00h 0
# of End Points: 02h 2
Interface Class: 08h Mass Storage
Interface SubClass: 06h SCSI Transparent
Interface Protocol: 50h Bulk-only (Zip)
Interface String: 00h None

END POINT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 07h 7
Descr Type: 05h EndPoint
End Point Number: 81h EndPoint = 1 Direction = In
Attributes: 02h Bulk NonSynchronous Data
Max Packet Size: 0040h 64
Max Poll Interval: 00h 0

END POINT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 07h 7
Descr Type: 05h EndPoint
End Point Number: 02h EndPoint = 2 Direction = Out
Attributes: 02h Bulk NonSynchronous Data
Max Packet Size: 0040h 64
Max Poll Interval: 00h 0

INQUIRY RESPONSES FROM COMPATIBLE SCSI DISKS
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

DSK ANSI DATA
NUM VENDOR PRODUCT REV VERSION FORMAT
ÄÄÄ ÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄ ÄÄÄÄÄÄ
81h SCSI-2 SCSI-2

D
r INT
i 13h Partition Byte
v Dsk ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Boot Per Total Approx
e Num Sector Idx Type Sector Sect Sectors Capacity
ÄÄ ÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ
E: 81h FFFFFFFFh 255 FFh Xenix 00000000h 512 0000FA00h 32768 kB

Unused DOS Drive Letters: F:-I:

Resident USBDRIVE has been updated with new information.

Initialization Delay: 0 seconds
DOS Version: 7.10
Max Bytes per Sector: 512
Mount FAT32 Volumes: Yes
Max Sectors per Xfer: 4


USB INFO DISK/LUN DOS DRIVE
ÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍ
I R W D
n H A I INT m r r
d o d n L 13h v P Sect Byte i
e s d t U Dsk M r Num Num Per Per Total Approx v Approx
x t r f N Num d t Head Cyl Cyl Sect Sectors Capacity e Capacity
ÄÄ ÄÄ ÄÄÄ ÄÄ Ä ÄÄÄ Ä Ä ÄÄÄÄ ÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ ÄÄ ÄÄÄÄÄÄÄÄ
0 0 2 0 0 81h . . 255 3 63 512 0000FA00h 32768 kB E: 32768 kB

Unused USB Dvc/Intf Indexes: 1-3
Unused INT 13h Disk Numbers: 82h-88h
Unused DOS Drive Letters: F:-I:

I remember the problem : after loaded usbuhci and usbdrive the letter it's assignet , but the drive appers empty (but it's full of files).

On my 6 Usb key 4 have this problems (included my Nikkon coolpix digital camera..)

Thanks

Roberto iw2evk
iw2evk
 
Posts: 33
Joined: Sat Jul 04, 2009 5:05 am

Re: problem with usbdrive (to be continued..)

Postby Bret » Wed Jul 08, 2009 3:03 am

I see what the problem is: the output of the D (Drives) option is showing bogus partition information. Unfortunately, I don't know WHY this is happening. Give me a few days to do some troubleshooting, and hopefully I can come up with an updated version of USBDRIVE.

In the mean time, would you try re-partitioning and re-formatting the disk and see if that fixes anything (make sure you back up any critical data first)? Note that if you use the MS-DOS FDISK program, you'll need to install USBDRIVE with the Disks:1 option or FDISK will crash. If you use FreeDOS's FDISK or the Ranish Partition Manager, it shouldn't matter. Ranish will also format the disk for you after partitioning, so you can do everything from one program instead of two. I recommend Ranish instead of FDISK.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby Bret » Wed Jul 08, 2009 3:48 am

I think I see what's going on here, but I need to ask you a question.

The data isn't actually bogus, like I originally thought. Your flash drive is formatted in what is called a "super floppy" or "partitionless" format, rather than a hard drive format (the "EB" at the beginning of the sector buffer tells me that). It also looks like you formatted it with FreeDOS, so I assume you're using FreeDOS (the "FRDOS4.1" in the sector buffer tells me that).

I'm guessing that FreeDOS (or whatever DOS you're using) has a problem with super floppies being set up to look like hard drives (which is how USBDRIVE works). I don't have any super floppies, so can't test any of this. If this is the problem and you re-partition with FDISK or RANISH, it should get fixed.

When you use USBSAPI to access the drive, does it assign it a floppy drive letter (A: or B:), or does it assign a hard drive letter (C:-Z:)?
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby iw2evk » Wed Jul 08, 2009 6:43 am

Hi,

ok i stand for your new release of usbdrive.

I want to suggest you for change patition type on fixed and removable
disks (and also testing/repair) the free program TESTDISK for DOS.
Latest release 6 May 2009 .

Free download from :


www.cgsecurity.org

Iw2evk Roberto
iw2evk
 
Posts: 33
Joined: Sat Jul 04, 2009 5:05 am

Re: problem with usbdrive (to be continued..)

Postby iw2evk » Wed Jul 08, 2009 6:50 am

Hi again,

I've used fdisk for create fat16 partition on usbkey.
But this is not the cause(i think..) because another usbstick with fat32
256 Mb have same problems..

Note : with panasonic usbaspi.sys + di1000dd.sys the same 2 usb pendisk
are reading without problems.

if you want i can make the same test ak by you yesterday on others NON
detecting usb stick.

Also i can formatting fat 16 fat32 fat32 LBA and try to acceding with
usbdrive.

Please contact me via mail (for not waste space on forum..)

Roberto iw2evk
iw2evk
 
Posts: 33
Joined: Sat Jul 04, 2009 5:05 am

Re: problem with usbdrive (to be continued..)

Postby Bret » Wed Jul 08, 2009 8:22 am

Let's not worry about wasting space on the Forum. It will be good for other people to see what we did here, so that they can do it themselves without needing to contact me individually.

When you install the drive with ASBASPI & DT1000DD and it works, what drive letter gets assigned?
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby iw2evk » Wed Jul 08, 2009 6:12 pm

When i use usbaspi+di1000dd the letter assigned it's the same of usbuhci+usbdrive :
E:\(because i use a ramdisk needed from arachne browser called D:\ )
On a fat32 stick of 256 Mb usbdrive+usbuhci work fine, and i can surfing enter directoru, read and copy files in usbdik etc.

Do you want a " scan " of this recognized stick?

Roberto
iw2evk
 
Posts: 33
Joined: Sat Jul 04, 2009 5:05 am

Re: problem with usbdrive (to be continued..)

Postby Bret » Thu Jul 09, 2009 4:33 am

I have several USB disks myself that work and I can get scans of those -- I just need to see what doesn't work. Since USBASPI+DT1000DD assigns the disk to E: like USBDRIVE, the super-floppy format may not be the problem (though I still think it is at least part of the problem).

Would you try re-partitioning and formatting the disk that you sent a scan of into a standard hard disk format (partitioned) and see what happens? The way the disk is formatted now (as a super-floppy) couldn't have been done with any hard disk formatting program (like FDISK) that I know of. It had to be formatted with some special "boot-from-USB" software or something, even though booting from USB doesn't actually require a super-floppy format.

EDIT:
After some further research, I discovered that it is possible to have a Master Boot Record (MBR) that is set up to look like the device is a super-floppy (Volume Boot Record or VBR), when it is actually a hard drive (Partition Boot Record or PBR). They call these things multi-boot records. I hadn't heard of these before, but thatappears to be what you have on this disk. I think I can modify USBDRIVE to make it work. Give me a couple of days.

Incidentally, if you install a standard IPL (Initial Program Loader) on the disk instead of the one it has now, I think it would fix the problem with no changes to USBDRIVE. Unfortunately, I don't think you can use the FDISK /MBR option to do it, because I think that can only be used to install an IPL on the boot disk (C:), but I don't know that for sure. You also probably wouldn't want to use FreeDOS's FDISK, since it will likely just install the same problematic IPL you have now. I would be afraid to try FIDSK /MBR anyway for fear that it would screw up my C: drive instead of fixing my flash drive. You can definitely do it with the Ranish Partition Manager, though. I suggest you do that anyway for now, even if it's just as a test.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby iw2evk » Thu Jul 09, 2009 6:12 pm

ok,

For the moment i send you (for info ) the scanning of another UNRECOGNIZED 256Mb fat32 Silicon Power flash disk :

I'M SURE this disk was formatted fat32 with WIN XP.

This disk it's recognized with usbaspi+di1000dd

Initialization Delay: 0 seconds
DOS Version: 7.10
Max Bytes per Sector: 512
Mount FAT32 Volumes: Yes
Max Sectors per Xfer: 1


USB INFO DISK/LUN DOS DRIVE
ÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍ
I R W D
n H A I INT m r r
d o d n L 13h v P Sect Byte i
e s d t U Dsk M r Num Num Per Per Total Approx v Approx
x t r f N Num d t Head Cyl Cyl Sect Sectors Capacity e Capacity
ÄÄ ÄÄ ÄÄÄ ÄÄ Ä ÄÄÄ Ä Ä ÄÄÄÄ ÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ ÄÄ ÄÄÄÄÄÄÄÄ
0 0 2 0 0 81h . . 16 982 32 512 0007AC00h 257 MB E: 257 MB

Unused USB Dvc/Intf Indexes: 1-3
Unused INT 13h Disk Numbers: 82h-88h
Unused DOS Drive Letters: F:-I:

DOS Driver for up to 8 SCSI-compatible USB Mass Storage Devices.

D
r INT
i 13h Partition Byte
v Dsk ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Boot Per Total Approx
e Num Sector Idx Type Sector Sect Sectors Capacity
ÄÄ ÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ
E: 81h 00000000h 0 0Bh FAT32 <2TB 00000020h 512 0007ABE0h 257 MB

Unused DOS Drive Letters: F:-I:

INQUIRY RESPONSES FROM COMPATIBLE SCSI DISKS
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

DSK ANSI DATA
NUM VENDOR PRODUCT REV VERSION FORMAT
ÄÄÄ ÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄ ÄÄÄÄÄÄ
81h Silicon-Power PMAP ANSI? Common

USB HOST INDEX: 0
DEVICE ADDRESS: 2

DEVICE DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 12h 18
Descr Type: 01h Device
USB Release: 0200h 2.00
Device Class: 00h Look at Interface
Device SubClass: 00h None
Device Protocol: 00h None
Max Packet Size EP0: 40h 64
Vendor ID: 0D7Dh Phison Electronics Corp
Product ID: 1923h 6,435
Device Release: 0100h 1.00
Manufacturer String: 01h " "
Product String: 02h "Silicon-Power "
Serial # String: 03h "956403001B47"
# of Configs: 01h 1

CONFIGURATION DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 09h 9
Descr Type: 02h Configuration
Descr Total Length: 0027h 39
# of Interfaces: 01h 1
Configuration Value: 01h 1
Configuration String: 00h None
Attributes: 80h Valid Historical Attribute 80h
Bus Powered
No Remote Wakeup
Not Battery Powered
Current Draw / 2: 64h 100 (200 mA)

INTERFACE DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 09h 9
Descr Type: 04h Interface
Interface Number: 00h 0
Alternate Setting: 00h 0
# of End Points: 03h 3
Interface Class: 08h Mass Storage
Interface SubClass: 06h SCSI Transparent
Interface Protocol: 50h Bulk-only (Zip)
Interface String: 00h None

END POINT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 07h 7
Descr Type: 05h EndPoint
End Point Number: 81h EndPoint = 1 Direction = In
Attributes: 02h Bulk NonSynchronous Data
Max Packet Size: 0040h 64
Max Poll Interval: 00h 0

END POINT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 07h 7
Descr Type: 05h EndPoint
End Point Number: 02h EndPoint = 2 Direction = Out
Attributes: 02h Bulk NonSynchronous Data
Max Packet Size: 0040h 64
Max Poll Interval: 00h 0

END POINT DESCRIPTOR
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Descr Length: 07h 7
Descr Type: 05h EndPoint
End Point Number: 83h EndPoint = 3 Direction = In
Attributes: 03h Interrupt NonSynchronous Data
Max Packet Size: 0040h 64
Max Poll Interval: 01h 1


CONTENTS OF INQUIRY BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 00 80 00 01 1F 00 00 00-20 20 20 20 20 20 20 20 €
0010 53 69 6C 69 63 6F 6E 2D-50 6F 77 65 72 20 20 20 Silicon-Power
0020 50 4D 41 50 PMAP


CONTENTS OF FORMAT CAPACITY BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 00 00 00 08 00 07 AC 00-02 00 02 00 00 00 00 00 ¬
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0080 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00F0 00 00 00 00 00 00 00 00-00 00 00 00


CONTENTS OF CAPACITY BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 00 07 AB FF 00 00 02 00 «ÿ


CONTENTS OF MODE SENSE BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 23 00 00 00 05 1E F0 00-10 20 02 00 03 D6 00 00 # ð Ö
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0080 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00


CONTENTS OF SECTOR BUFFER
ÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000 EB 58 90 4D 53 44 4F 53-35 2E 30 00 02 04 22 00 ëXMSDOS5.0 "
0010 02 00 00 00 00 F8 00 00-3F 00 FF 00 20 00 00 00 ø ? ÿ
0020 E0 AB 07 00 D3 03 00 00-00 00 00 00 02 00 00 00 à« Ó
0030 01 00 06 00 00 00 00 00-00 00 00 00 00 00 00 00
0040 00 00 29 46 48 0E 0C 4E-4F 20 4E 41 4D 45 20 20 )FH NO NAME
0050 20 20 46 41 54 33 32 20-20 20 33 C9 8E D1 BC F4 FAT32 3ɎѼô
0060 7B 8E C1 8E D9 BD 00 7C-88 4E 02 8A 56 40 B4 08 {ŽÁŽÙ½ |ˆN ŠV@´
0070 CD 13 73 05 B9 FF FF 8A-F1 66 0F B6 C6 40 66 0F Í s ¹ÿÿŠñf ¶Æ@f
0080 B6 D1 80 E2 3F F7 E2 86-CD C0 ED 06 41 66 0F B7 ¶Ñ€â?÷â†ÍÀí Af ·
0090 C9 66 F7 E1 66 89 46 F8-83 7E 16 00 75 38 83 7E Éf÷áf‰Føƒ~ u8ƒ~
00A0 2A 00 77 32 66 8B 46 1C-66 83 C0 0C BB 00 80 B9 * w2f‹F fƒÀ » €¹
00B0 01 00 E8 2B 00 E9 48 03-A0 FA 7D B4 7D 8B F0 AC è+ éH  ú}´}‹ð¬
00C0 84 C0 74 17 3C FF 74 09-B4 0E BB 07 00 CD 10 EB „Àt <ÿt ´ » Í ë
00D0 EE A0 FB 7D EB E5 A0 F9-7D EB E0 98 CD 16 CD 19 î û}ëå ù}ëà˜Í Í
00E0 66 60 66 3B 46 F8 0F 82-4A 00 66 6A 00 66 50 06 f`f;Fø ‚J fj fP
00F0 53 66 68 10 00 01 00 80-7E 02 00 0F 85 20 00 B4 Sfh €~ … ´
0100 41 BB AA 55 8A 56 40 CD-13 0F 82 1C 00 81 FB 55 A»ªUŠV@Í ‚ ûU
0110 AA 0F 85 14 00 F6 C1 01-0F 84 0D 00 FE 46 02 B4 ª … öÁ „ þF ´
0120 42 8A 56 40 8B F4 CD 13-B0 F9 66 58 66 58 66 58 BŠV@‹ôÍ °ùfXfXfX
0130 66 58 EB 2A 66 33 D2 66-0F B7 4E 18 66 F7 F1 FE fXë*f3Òf ·N f÷ñþ
0140 C2 8A CA 66 8B D0 66 C1-EA 10 F7 76 1A 86 D6 8A ŠÊf‹ÐfÁê ÷v †ÖŠ
0150 56 40 8A E8 C0 E4 06 0A-CC B8 01 02 CD 13 66 61 V@ŠèÀä ̸ Í fa
0160 0F 82 54 FF 81 C3 00 02-66 40 49 0F 85 71 FF C3 ‚TÿÃ f@I …qÿÃ
0170 4E 54 4C 44 52 20 20 20-20 20 20 00 00 00 00 00 NTLDR
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
01A0 00 00 00 00 00 00 00 00-00 00 00 00 0D 0A 52 69 Ri
01B0 6D 75 6F 76 65 72 65 20-73 75 70 70 6F 72 74 69 muovere supporti
01C0 2E FF 0D 0A 45 72 72 6F-72 65 20 64 69 73 63 6F .ÿ Errore disco
01D0 FF 0D 0A 50 72 65 6D 65-72 65 20 75 6E 20 74 61 ÿ Premere un ta
01E0 73 74 6F 20 70 65 72 20-72 69 61 76 76 69 61 72 sto per riavviar
01F0 65 0D 0A 00 00 00 00 00-00 AC C2 D1 00 00 55 AA e ¬ÂÑ Uª


Resident USBDRIVE has been updated with new information.

SCSI ADDITIONAL SENSE CODE & QUALIFIER HISTORY FOR INT 13h DISK NUMBER 81h
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

SCSI Request 1Eh = Prevent / Allow Media Removal
Sense Key 05h = Illegal Request (Bad Parameter)
ASC/Q Code 2400h = Invalid Field in CDB

SCSI Request 00h = Test Unit Ready
Sense Key 06h = Unit Attention (Target Reset)
ASC/Q Code 2800h = Not Ready to Ready Transition, Medium Change

Many thanks again!!

Roberto iw2evk
iw2evk
 
Posts: 33
Joined: Sat Jul 04, 2009 5:05 am

Re: problem with usbdrive (to be continued..)

Postby Bret » Fri Jul 10, 2009 2:28 am

There doesn't appear to be anything wrong with the FAT32 disk or with USBDRIVE. However, after experimenting a little bit with my systems, I discovered that FreeDOS 1.0 doesn't work correctly with any FAT32 drives (on my computer, it crashes). MS-DOS 7.10 works just fine with FAT32 drives. I normally use MS-DOS 6.20 or 7.10, because FreeDOS has a lot of little quirks that I don't like, and because MS-DOS is the minimum standard that all other DOS's are supposed to emulate. I thought I had previously tested some FAT32 drives on FreeDOS, but apparently I didn't.

It appears that FreeDOS uses some special mechanism or table to process FAT32 drives that MS-DOS doesn't need. It may take quite a while to track down what exactly that problem is, and I don't know whether it will be something the USBDRIVE needs to fix or that FreeDOS needs to fix. In the mean time, if you want to use that particular disk, you'll need to re-format it to FAT16. Truth be told, disks smaller than 512MB probably shouldn't be formatted as FAT32 anyway (that's the Microsoft default setting).

I'll have the USBDRIVE patch done pretty soon, but unfortunately it won't help with your FAT32 drives.

EDIT: I am attempting to contact a knowledgeable person at FreeDOS to see if I can find out what's going on with FAT32. I will postpone an update to USBDRIVE for at least a little while, in hopes of providing patches to address both problems at the same time (Super-floppies & FAT32 with FreeDOS). If the FAT32 ends up looking like it will take too long to track down, I'll just post the Super-floppy patch.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby Bret » Fri Jul 10, 2009 5:33 pm

I haven't been able to get a response from anyone at FreeDOS yet. I had the Super-Floppy patch ready to go, and had another patch ready to go as well (for USBJSTIK), so I went ahead and uploaded it. Please download the new version of USBDRIVE and let me know if it fixes the problem on the first drive you sent me (the 32MB that was saying there was no data on it). Hopefully, this will fix the problems on all of your drives except the FAT32's.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby Laaca » Tue Jul 14, 2009 7:46 am

Hello! I made more tests with my FAT32 formatted 4GB flashdisk.
As I wrote earlier under FreeDOS (kernel 2038) USBDRIVE (from 10. Jul) assigns not one but two drive letters. First drive letter (in my case F:) is accessible but seems to be empty and shows wrong capacity (cca 124GB) and no directory or file can be created on it. The second letter is not accessible at all.

Next tests I made with MS-DOS 7.1.
Here it behaves diferently but also buggy. It always assigns only one letter (F:) and the first access to it seems to be good. (like DIR F:). But when I access it for second time (f.e. again DIR F:) only garbage is shown. If I unload USBDRIVE and load again everything repeats.
screenshots here:
http://www.laaca.borec.cz/testusbdrive/dir_a1.txt and here http://www.laaca.borec.cz/testusbdrive/dir_a1.txt

USBDRIVE S shows this:
http://www.laaca.borec.cz/testusbdrive/drv_s_ms.txt

This flashdisk works fine under Georg Pottast's DOSUSB in both FreeDOS and MSDOS
BTW: If you want to contact some person about FreeDOS kernel you should write to Eric Auer first.

USBVIEW from DOSUSB package reports about this flashdisk this:
DEVICE DESCRIPTOR:
Length 18
Descriptor type 1
USB specification nr. 512
class code 0 (class code specified by interface)
subclass code 0
protocol code 0
max packet size 64
vendor ID 2385
product ID 5635
device release nr. 512
index of manufacturer 1
index of product 2
index of serial nr 3
nr. of configurations 1

Kingston
Data Traveler 2.0
Laaca
 
Posts: 21
Joined: Sun Jul 05, 2009 10:36 pm

Re: problem with usbdrive (to be continued..)

Postby Bret » Wed Jul 15, 2009 2:53 am

It looks an awful lot like you have a corrupted disk. There's either a second partition on the disk that you don't know about, or there's something funny going on in the Master Boot Record.

The fact that the second DIR in MS-DOS gets screwed up makes me think you might have some cross-linked files in the FAT, and are maybe even referencing some of the data in the second partition when they shouldn't be. Backup the files if you need them, and then run RANISH or FDISK to re-partition the disk (RANISH will also format the disk for you, while FDISK will not). I think that may fix your problem. Also, you can't use FDISK (or maybe even FORMAT) with the other DOSUSB package, you need to use mine, or use the BIOS, or use another OS (Windows or Linux or ...). I would also make sure you didn't have any disk caching software installed, especially while FDISKing or FORMATting.

You might also be able to get by with just running a CHKDSK or SCANDISK, but I think I would re-partition and start from scratch.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby iw2evk » Wed Jul 15, 2009 6:21 pm

Hi,
i've formatted with fat 16 >32 Mb (04 code) the 1st usbpen .now i can access via usbuhcil +usbdrive fine..

I've a suspect regarding this "reconignize problem". I'ts (i thinks..) causated from FAT32 - Fat32 LBA formatting on stiks.
This is a PROBLEM TO PATCH AS A POSSIBLE , because the size of usbdisk increase faster and now more stick are >> 8 GB.
This allows to format it automatically fat32 lba from many Os. and cause many of this problems to users.

In the next day i try to mixing usbuhcil to usbcd from panasonic for testing the access on my cd/rw ... : )

Have a nice day..

Roberto iw2evk
iw2evk
 
Posts: 33
Joined: Sat Jul 04, 2009 5:05 am

Re: problem with usbdrive (to be continued..)

Postby Bret » Thu Jul 16, 2009 12:11 pm

I was finally able to contact somebody from FreeDOS and am working on trying to figure out the problem. Right now, it appears that there is a serious problem with the way FAT32 works in FreeDOS -- it definitely is not MS-DOS compatible like it's supposed to be.

I'm very certain that USBCD won't work with USBUHCIL. A CD driver has not yet been written for USBUHCIL.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby bartoldeman » Sat Jul 18, 2009 2:27 am

Hi,

I am one of the FreeDOS kernel developers. There was a problem with the BPB to DPB translation in FreeDOS for non-builtin FAT32 devices. Other drivers, when not loaded via config.sys, often build the DPB using int21/AH=53, but USBDRIVE relies on the fact that DOS will build the DPB anyway when the drive is first accessed. During that first build FreeDOS used the uninitialized DPB to check for FAT32 and thought it was FAT16. This problem is now corrected in the FreeDOS kernel SVN repository.

However, there is still another issue: USBDRIVE uses FAT16 DPBs but FAT32 DPBs are bigger -- I think they may overflow in memory if you use two FAT32 drives for F: and G:, for instance. The extended DPB format is given by Ralf Brown in table 1787 under INT21/AX=7302.

Yet another issue is that I, randomly (!) got garbage from my KINGSTON 4GB Data Traveller stick. However this was not FreeDOS specific, it also happens with MSDOS 7.1 (but not with Windows XP/Vista and Linux). Sometimes the data was valid, sometimes there was random garbage containing the string "USBC" at regular intervals.

Bart
bartoldeman
 
Posts: 2
Joined: Sat Jul 18, 2009 2:11 am

Re: problem with usbdrive (to be continued..)

Postby Bret » Sat Jul 18, 2009 7:25 am

Bart:

Thanks very much for responding to this!

I am one of the FreeDOS kernel developers. There was a problem with the BPB to DPB translation in FreeDOS for non-builtin FAT32 devices. Other drivers, when not loaded via config.sys, often build the DPB using int21/AH=53, but USBDRIVE relies on the fact that DOS will build the DPB anyway when the drive is first accessed. During that first build FreeDOS used the uninitialized DPB to check for FAT32 and thought it was FAT16. This problem is now corrected in the FreeDOS kernel SVN repository.


I had originally tried to include the INT 21h/AH = 53h in USBDRIVE, but all drives are initialized in USBDRIVE during IRQ processing, making it generally unsafe to request any INT 21h services. INT 21h/AH=53h might be safe to call from inside an IRQ in FreeDOS (I don't know), but there may be other alternative DOS's where it isn't. I also thought of creating my own BPB-to-DPB translator, but since I knew DOS had to do it anyway when the drive was first accessed, I didn't bother -- it would just unnecessarily waste memory.

So, to make sure everyone has a corrected version of the kernel, what exactly do they need to do?

EDIT: Is there an easy, valid way for USBDRIVE to verify that it is in fact running FreeDOS (as opposed to some other DOS), and also verify that the kernel has the correct patch? If so, I would like to add that test into USBDRIVE so that it will not load FAT32 support unless it's running a valid OS.

However, there is still another issue: USBDRIVE uses FAT16 DPBs but FAT32 DPBs are bigger -- I think they may overflow in memory if you use two FAT32 drives for F: and G:, for instance. The extended DPB format is given by Ralf Brown in table 1787 under INT21/AX=7302.


I thought there probably would be a different DPB for FAT32 drives, but never found any sort of reference to it when I looked. I looked in RBIL, but never saw the reference in INT 21h/AX=7302h for some reason. I will adjust USBDRIVE accordingly.

Yet another issue is that I, randomly (!) got garbage from my KINGSTON 4GB Data Traveller stick. However this was not FreeDOS specific, it also happens with MSDOS 7.1 (but not with Windows XP/Vista and Linux). Sometimes the data was valid, sometimes there was random garbage containing the string "USBC" at regular intervals.


The "USBC" is part of the header data (called a USB Command Block Wrapper) that is included in all SCSI requests to the drive. The fact that you're seeing the USBC's indicates that the drive is not responding like it's supposed to all the time.

If you wouln't mind, try using the X:1 option with USBDRIVE and see if the disk still gives you the same random errors. If that fixes the problem (and I think it will), I may need to change the default value in USBDRIVE from 4 to 1. This will make the data transfer rate slower, but will make the drives more reliable.

I'll have a new version of USBDRIVE in the next couple of days that fixes the DPB size issue with FAT32 drives.

Thanks again,

Bret
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby bartoldeman » Sat Jul 18, 2009 10:04 am

Bret wrote:EDIT: Is there an easy, valid way for USBDRIVE to verify that it is in fact running FreeDOS (as opposed to some other DOS), and also verify that the kernel has the correct patch? If so, I would like to add that test into USBDRIVE so that it will not load FAT32 support unless it's running a valid OS.


You can check for FreeDOS using int21/AX=3000, and check for BH=fd.

Rather than checking for a patched version it might be easier to work around the FD bug: if in
ResetDPBBX:
you set
MOV [BX].DPBSectorsPerFAT,0
then unpatched FreeDOS will assume the DPB is FAT32-style (and it'll still work with FAT16/FAT12, as this only pertains to the size of the DPB -- the check was there to avoid overflowing DOS 4-6 DPBs of RAM drives).

Yet another issue is that I, randomly (!) got garbage from my KINGSTON 4GB Data Traveller stick. However this was not FreeDOS specific, it also happens with MSDOS 7.1 (but not with Windows XP/Vista and Linux). Sometimes the data was valid, sometimes there was random garbage containing the string "USBC" at regular intervals.


The "USBC" is part of the header data (called a USB Command Block Wrapper) that is included in all SCSI requests to the drive. The fact that you're seeing the USBC's indicates that the drive is not responding like it's supposed to all the time.

If you wouln't mind, try using the X:1 option with USBDRIVE and see if the disk still gives you the same random errors. If that fixes the problem (and I think it will), I may need to change the default value in USBDRIVE from 4 to 1. This will make the data transfer rate slower, but will make the drives more reliable.


Thanks: I'll try this later and will let you know.

Bart
bartoldeman
 
Posts: 2
Joined: Sat Jul 18, 2009 2:11 am

Re: problem with usbdrive (to be continued..)

Postby Bret » Sun Jul 19, 2009 12:27 pm

Bart:

I tried your suggestion, setting [BX].DPBSectorsPerFAT to 0, and it still doesn't read FAT32 drives correctly. I also tried setting various combinations of [BX].DPBNumFATs and [BX].DPBRootEntries to 0, to no avail. FreeDOS still crashes when I try to access a FAT32 drive.

When exactly does the FAT32 code try to determine when it's looking at a drive? From what I can tell, it appears to be doing some kind of background polling, and if it sees something that it thinks is a FAT32 entry, it immediately modifies it.

Apparently creating a work-around for FreeDOS is going to be more complicated than what you suggested. Any other ideas?

Bret

EDIT: Is it safe under FreeDOS to call INT 21h/AH=53h from inside an IRQ (call it any any time)?
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby Bret » Fri Jul 24, 2009 3:37 am

I just uploaded a new version of USBDRIVE to the web site (http://bretjohnson.us), which hopefully has the issues with FAT32 and FreeDOS resolved. Let me know how it works.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: problem with usbdrive (to be continued..)

Postby Laaca » Fri Jul 24, 2009 8:11 pm

Yeah! Success!
Yesterday I installed new patched FreeDOS kernel and new USBDOS.
This time the USBDRIVE finaly worked OK. I haven't done any changes with my flashdisks and now I normaly see all files and can work with them.
Great work Brett!

It seems that the biggest problem was the default X:4 option. Now when default is X:1 it works fine but when I try to set on command line X:4 it behaves like before.
However - the USBDOS/USBDRIVE is remarkably slower than Georg Potthaust DOSUSB. Espetially reading the content of the directory. Has it something to do with this option and can it be improved?

Second problem is assigning the multiple drive letters. USBDRIVE mounts not only F: drive but also G:, H: and so on until LASTDRIVE variable. Why?

And third thing - how can I disable the message and question "Do you want to install it (Y/N) ?" When starting DOSUHCI/DOSUHCIL?
I would like to place it into my AUTOEXEC.BAT and such messages and need for confirmation is not comfortable.
Laaca
 
Posts: 21
Joined: Sun Jul 05, 2009 10:36 pm

Re: problem with usbdrive (to be continued..)

Postby Bret » Sat Jul 25, 2009 6:44 am

It seems that the biggest problem was the default X:4 option. Now when default is X:1 it works fine but when I try to set on command line X:4 it behaves like before.
However - the USBDOS/USBDRIVE is remarkably slower than Georg Potthaust DOSUSB. Espetially reading the content of the directory. Has it something to do with this option and can it be improved?


Try using different settings for the X option (2,3,5,6,...) and see what happens. I think using anything larger than 4 will only make things worse, but you never know until you try. Your speed probably has something to do with the X option, but other than changing the value of X or using different hardware, I don't know of anything that will improve the speed. I may think of something else to try someday, but don't have any ideas right now.

Second problem is assigning the multiple drive letters. USBDRIVE mounts not only F: drive but also G:, H: and so on until LASTDRIVE variable. Why?


If you leave USBDRIVE with the default settings, it will reserve as many as 8 drive letters (if your LASTDRIVE setting allows that many). If you will never be using more than one USB drive at a time, install USBDRIVE with the Devices:1 Disks:1 Drives:1 options. It will use less memory that way also.

And third thing - how can I disable the message and question "Do you want to install it (Y/N) ?" When starting DOSUHCI/DOSUHCIL?
I would like to place it into my AUTOEXEC.BAT and such messages and need for confirmation is not comfortable.


Install USBUHCI{L} with the DisableLegacySupport option.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM


Return to Programs

Who is online

Users browsing this forum: No registered users and 1 guest

cron