Ok, first, I think your device is just a USB-to-RS232 adapter, right? Here is my suggestion: you don't want to use javax.usb, you want to use Linux's standard USB-to-RS232 driver and in java you want to use javax.comm. Do a google search on javax.comm and you'll find plenty of info on it. One of the Linux implementations is "rxtx" (google search again) or there are others you can use. Also see the javax.usb FAQ (linked from http://javax.usb) which covers this.
Moving on, if you _really_ want to talk to your device in USB instead of RS232, you'll need to implement the entire device protocol. You CANNOT just send ASCII bytes over the bulk pipe to talk to the device. Note that the C++ stuff you sent me includes a binary-only shared library that has the code to do the "real" work of managing the device. The "interface" defined there is the interface to the shared library code, NOT the USB-to-RS232 device. Finally, if you really, really, really still want to talk to this device using USB and not RS232 (javax.comm), then getting to your point of wanting to know if your device (meaning the USB-to-RS232 adapter, NOT YOUR RS232 DEVICE) is getting your bytes, I will first say that if you don't get any error result from submitting the UsbIrp, you can assume that the USB-to-RS232 adapter did get the bytes. However to be certain, your next step can be using Linux's built-in "monitor" code that will output what's going through the Linux kernel stack. Then, the next (and last) thing you can do is use a USB bus tracing device which will show you with 100% certainty if your USB-to-RS232 adapter is getting the data, however USB bus tracers are pretty expensive. Search on google for them, the range in price (and tracing software quality), the highest cost ones are more than $20,000 (yes, really) while I think there are some low cost ones for "only" several hundred (US) dollars. If you still think you know what you are doing, and still want to talk direct USB to the adapter instead of talking RS232 to whatever's connected to the adapter (and using Linux's built-in driver for the adapter), I suggest you enable Linux's USB monitor code and take a look at all the data getting transferred to/from your USB adapter. I think you will find that it's a lot more than just ASCII going over the bulk pipe. On 8/21/07, Oscar Ocampo <[EMAIL PROTECTED]> wrote: > > Thanks for you reply > > vendorID=0x0403. ProductID=0xffa8 > the attached file .tgz is the code in C and the drive instruccions for the > device > my code in java for send data is ComUSB.JAVA (ATTACHED FILE) > > Only (in this moment), interesting by me is I know if the data arrive in > the device > > Thank you very much for you help > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ javax-usb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
