I think your question is answered in the FAQ,
http://javax-usb.org/faq.html#mass_storage

Specifically in regard to finding the name of a storage device connected to
a specific USB port; no, that has nothing to do with the USB specification
(nor javax.usb).

Further, I suspect you don't want to actually implement the mass storage
protocol, since you are asking about a block device name (e.g. "/dev/sdf1"),
which is at the block level, not the USB level, and so USB no longer has
anything to do with what you are asking.

If you *do* plan on implementing the USB mass storage protocol, then the
Linux device node name no longer is relevant since you will have to remove
the standard Linux mass storage driver from the device before you can talk
to it.

I suggest you look at the java.io package since that is probably what you
should be using, whether you want to mount the device in Linux and access
files that way (which is the normal way and what I highly suggest), or if
you want to actually access the raw block device and write your own
filesystem driver to "mount" the device in java.  You would not use
javax.usb in either of those cases.

On Wed, Sep 2, 2009 at 4:33 PM, Glen Carter <
glencar...@users.sourceforge.net> wrote:

>
> Message body follows:
>
> Hi Dan.
>
> When using the javax.usb APIs, is there a way to get the
> name of a USB port that a storage device is connected to
> (/dev/sdf1, etc.)?
>
> I need the name to mount a thumb drive (within Java code)
> and would prefer not to parse fdisk output (or similar).
>
> I've looked through the APIs, FAQs, and Googled with no
> success.
>
> Thanks,
>
> Glen
> ter...@mindspring.com
>
>
> --
> This message has been sent to you, a registered SourceForge.net user,
> by another site user, through the SourceForge.net site.  This message
> has been delivered to your SourceForge.net mail alias.  You may reply
> to this message using the "Reply" feature of your email client, or
> using the messaging facility of SourceForge.net at:
> https://sourceforge.net/sendmessage.php?touser=2617974
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to