Ok.  You already read the FAQ on this, but I'll repeat it again.

USB carries chunks of data back and forth between your USB device and
the "driver" on your computer.  With "normal" USB drivers are in the
kernel or otherwise lower down, and talk directly to the system USB
stack.  For example, the USB "Mass Storage" driver is a rather large
and complicated driver that talks to a USB device by sending buffers
back and forth with the USB storage key/drive, and providing a "block"
access interface to upper level drivers.  Those upper level drivers
then use the "block" interface as a "normal" storage device that you
put a normal filesystem on, and you can then access files in that
filesystem, etc.  Note all the layers between the raw USB
communication and the actual, top level file read-write access.  I
don't know anything about Zigbee, but I assume it's similar.

With javax.usb, you remove all those drivers and talk directly to the
USB device.  So for example if you wanted to talk to a USB mass
storage key that was formatted with, for example, the FAT filesystem,
you would have to implement a full "Mass Storage" driver in Java on
top of javax.usb, as well as an entire FAT filesystem driver on top of
that.  Then, you would be able to read and write a file on the key.

A simple google for "linux zigbee" returned:
http://zigbuzz.sourceforge.net/

You almost certainly will want to use that, or other normal Linux
driver stacks, to talk to this device.  I really don't think you want
to implement the zigbee driver stack on top of javax.usb.  If you
really do, then you should read the entire ZigBee stack and understand
it, and then start developing it in Java on top of javax.usb.

On Thu, Mar 12, 2009 at 4:53 PM, wind sh <[email protected]> wrote:
> tks for your great help.
>
> I was just assigned an project at work, an wireless remote scan device will
> send remote wireless data to an local receiver(an usb device attach to SUSE
> linux), the protocol being used is called Zigbee.
>
> as u told me for the past reply, javax-usb is just transfer protocol. if so,
> could you tell me  how javax-usb API interact with Zigbee or other wireless
> protocol? any example will be greatly appreciated.
>
>
> tks in advance
>
> john
>
>
>
>
>
>
> --- On Thu, 3/12/09, Dan Streetman <[email protected]> wrote:
>
> From: Dan Streetman <[email protected]>
> Subject: Re: how to mimic the sender and receiver?
> To: [email protected]
> Cc: [email protected]
> Date: Thursday, March 12, 2009, 10:45 AM
>
> USB is ONLY a data transfer protocol.  It doesn't specify actual
> device protocols.  So no, I can't possibly tell you how to talk to
> your specific device(s).  You need to know your device protocol.  You
> haven't even told us what your device is.
>
> Read this also.
> http://javax-usb.org/faq.html#talk_to_device
>
> On Thu, Mar 12, 2009 at 10:57 AM, wind sh <[email protected]>
> wrote:
>> tks for your quick feedback.
>>
>> Maybe i did not express my question clearly.
>>
>> My question is:
>>
>> Following the provided API/example, i do think i can write an program to
>> send data to attached USB device, but how to test attached USB device
>> capture/receive the data, and vice versa.
>>
>> Do you have good example for this?
>>
>> tks in advance
>>
>> john
>>
>> --- On Thu, 3/12/09, Dan Streetman <[email protected]> wrote:
>>
>> From: Dan Streetman <[email protected]>
>> Subject: Re: how to mimic the sender and receiver?
>> To: [email protected]
>> Cc: [email protected]
>> Date: Thursday, March 12, 2009, 9:18 AM
>>
>> I don't know what it is that you want to do, but if you are hoping to
>> use javax.usb to talk to a USB flash drive (which is a USB "Mass
>> Storage" device), I will tell you that you really don't want to
> do
>> that.
>> http://javax-usb.org/faq.html#mass_storage
>>
>> On Wed, Mar 11, 2009 at 10:32 PM, wind sh <[email protected]>
>> wrote:
>>> Hi,
>>>
>>> I am new to javax-usb, i successfuly download, compiled  source
> sample
>> code
>>> so far.
>>>
>>> But, have no idea for how to establish the test environment for mimic
> the
>>> sender and receiver.
>>>
>>> Should i write a progam by using provided API to send some data to
> usb
>> flash
>>> drive, then goto /proc/usb/xxx to use unix 'ls','cat'
>> command to check the
>>> received data?
>>>
>>> Vice versa, first create an file on /proc/usb/xxx, and write program
> to
>> read
>>> data from usb flash drvier for testing reading?
>>>
>>> if the above thought are wrong, how to mimic the sender and receiver?
>>>
>>> The provied sample code shows how to send out the data, but how to
> capture
>>> the data? need to write different program to listen and running as
> demon?
>>>
>>> Need additional device to act as sender or receiver?
>>>
>>> any help is greatly appreciated.
>>>
>>> john
>>>
>>
>>
>
>

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
javax-usb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to