Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2005 10:36:07 -0700
From:      Daniel Rudy <dr2867@pacbell.net>
To:        freebsd-hackers@freebsd.org
Subject:   Accessing USB Mass Storage Device
Message-ID:  <43553287.4030907@pacbell.net>

next in thread | raw e-mail | index | archive | help

When the umass driver is compiled into the kernel, and one inserts a USB
mass storage device, how does one access the device descriptors (serial
number) while the device is listed as a da device?  I would perfer to
have the OS do all the work of accessing the hardware.  But if it cannot
be done, then I have the following questions:

How does one read and write data to the device using /dev/ugen?

I have a reasonable idea as to how something like that would work as the
following steps illustrate:

1. open bulk descriptor in for read.
2. open bulk descriptor out for write.
3. send CBW read data to device via write.
4. read result from device via read.
5. read CSW from device.
etc..

I have the standards documents on the SCSI commands, the USB data
structures, and other information, but at this point, I'm kinda stuck.
Will the above method work?  Or is there something else that needs to be
done to program data access against /dev/ugen?  Or am I entirely wrong.

I have tried using google, but I just keep getting back junk which is of
little value.

-- 
Daniel Rudy




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43553287.4030907>