Java USB API
Does anyone know where to find some example source code for communicating with USB devices via Java ?
I downloaded the Java USB API version 0.10 and compiled the jsr80.jar file using ANT but the system seems unable to recognise the jar file as I can't use the properties of the API. There is also no sample code snippets available for comparison.
I tried using the Java Communications API but it apparently only works for serial ports and not USB ports.
I would be grateful for any guidance. Thanks.
[526 byte] By [
dchansa] at [2007-9-28 11:30:15]

try extracting the Jar file.
I downloaded the API from http://javax-usb.org and extracted the JAR file using ANT but the JAR file is not being recognised. I am using Windows 2000 and perhaps I may need usb.windows package in order for it to function.
Anybody got any idea on how to communicate with a USB device using this API?
I think this API is currently only supported on Linux.
Please Help Me,
I am new to USB , I want to develop an application which will communicate the Phillips PDIUSBD11 USB controoler chip.
I am using windows 2000, I have downloaded the javax-usb_0.10.0
but did not find any jar file in it, and it seems to it is for Linux only,
Please help me for that, How we can communicate with windows, where can i get the samples , packages ,
Ur reply will highly appri.
Thank you,
Pramod
If you have to communicate with USB devices from a Java program, and the javax.usb package does not support Windows yet, you might want to try JNI wrappers around the native Windows system calls.Paul
From where did you downloaded the jar file, If not how did you created the jar fileregardssigamani
Hi all,I am also new with working java and usb ports and looking for more info.Not sure if you already tried these links already....jphoto.sourceforge.netwww.jsyncmanager.orgjusb.sourceforge.netGeoff
Hi ,
I am try to communicate with USB device in Linux as i found more resources for this platform , however, somethings still dont work.
I download and successfully compile the following files:
javax-usb_0.10.0.tar.bz2
javax-usb-ri_0.10.0.tar.bz2
javax-usb-ri-linux_0.10.0.tar.bz2
however, when I try to compile the test program and exmaple program.. There is compliation error ? Does anyone face the same problem ?
or does anyone got any example problem on it ( simple can detect the device is already enough ).
Thanks
Hi my friend Please click here http://www.steelbrothers.ch/jusb/api/usb/windows/package-summary.htmlto found jusb for windowsbye
hello there
it will be kind of you to help me in my problem and aswering my question.
i'm new to usb and not professional in java...
this is my problem :
me and a team try to make control system -small one- but we want to use the USB port for communication between the system and the computer.
my questions :
1- what is the hardware of newparts that we need to add to our control system to use USB?
2- how could i use the USB API to from my computer to understand the external system and to deal with it.
thanks for any help you will offer to me as sample codes, advices, docs or sites.
Mostafa M. Hashem
I've already download the jusb package and run the RunJUSBControllerTester.java successfully
but still some questions distrub me:
1.If the device is the nonjusb device ,could I use this package to develop a program in java which can
read/write the device?
2.I'm new to java , are there some ways to read/write device on port, not using the jusb package?
my enviroment is j2sdk1.4.2, windowsXP. thanks for any help!
Hello,
I'm trying to work with the JSR 80 (javax.usb) API, however i am unable to compile the .jar. seems to be alot of bad references in the seperate packages, mainly in the util package.
I am running linux (kernel 2.6.6), can somebody point me in the right direction.
thanks
i m using MA620 IR adaptor .I download files jusb api from net and just smallchanging i access it driver name it packet and some other information .it use nonjusb driver from which i cannot communication from ir adaptor please tell me that how i cummnicate from that adaptor
hi all,
me too trying for video confencing project to be implemented on internet and want to detect usb port on windows platform. Please mail me if any one got any ideas.Javax.usb is not for windows.I just want to detect a usb port and read input from it i.e thru a web cam.Thanks for everything
chirag
For windows, you can look at one of these sites: http://www.steelbrothers.ch/jusb/ http://javax-usb.org/I just found these, so I haven't tested it yet.
neroba at 2007-7-18 20:31:01 >

i think currently this package is only for linux.if u get any more information plz send it to me
I still don't understand how to use jUSB for windows. Any one can help me, any example.. i new to java.
I'm in a similar situation. I'm doing my senior design project, using the jUSB Windows package in Windows XP. Our IDE is Eclipse, but I'm about to try NetBeans just in case. We're trying to interface a USB GPS receiver, and it's not being very friendly.
Using jUSB for WIndows, I've never plugged in a device that was identified as a JUSB device. I always get NonJUSB, so I can't do anything with it. I tried hacking up the test program that came with the package, but I haven't been able to actually access the device. I can only identify it.
But here's what I understand: jUSB has a type DeviceImpl that extends Device. It looks like Device is a base class, and DeviceImpl provides some sort of additional support. Can't figure out what, though. Anyway, from there, it looks like the types JUSB and NonJUSB are extensions of DeviceImpl. JUSB is the type that's at least somewhat implemented in Windows. If you're able to use the JUSB class, then you can interface with your device. But here's where I lose grasp. It appears that, if you install the jusb driver correctly, then your device will be recognized as a JUSB device. I'm not sure, though, because I followed the directions, and I get nothing. Every one of my devices shows up as NonJUSB. Has anyone gotten this to work?
According to the Doc I have, you have to ID the device you want to access and then make changes to windows by either altering and installing a .inf file and/or making registry changes. I followed the instructions to the letter and my PC BlueScreens and reboots whenever I try this. If you manage to get this working let me know. I'm running into the same problem as you, where I need raw acces to a custom USB device.
On a side note...... I'm getting frustrated at the way Sun pushes Java as a multiplatform language when they can't pull their finger out and create usefull APIs to interact with something like USB.
There is a complete solution for Java -API 4 Windows for USB programming available under http:/www.bubensoft.de.Its directly communicating with USB-Hostcontrollers and not under simulation of a serial port.
There is a complete solution for Java -API 4 Windows for USB programming available under http:/www.bubensoft.de.Its directly communicating with USB-Hostcontrollers and not under simulation of a serial port.
I have tried sucessfully by usb.core.* use native dll
you can have a look at http://www.steelbrothers.ch/jusb/api/usb/windows/related-docs/chp8-developerinstallation.pdf
tell you step by step.
But all,
I have met a problem on java Communication API to call COM
there is no windows edition , so there is no win32com.dll and javax.properties, anyone can help me. Please connect to me talentYouFH@hotmail.com
bubensoft? Can't find a webpage...get an error.
I tried jusb too, but not with the expected success. I get the available busses (printout) but i don't now how i use devices. I not firm in "usb" programming, but i want to connect a webcam or something of the camera equipment.
Thanks for further replies!
poekel
Where can one get it? bubensoft.de is NOT WORKINGIs it a TRUE FULL implementation?
It is really disappointing.
I checked the situation with USB under Java two years ago (in 2004).
For Linux there was already a well-working javax (jsr80) package.
For Windows almost nothing.
Since last two years there was NOTHING DONE by SUN towards any useable implementation.
THIS IS A REAL SHAME FOR SUN.
For a Java USB API for Windows XP take a look at http://www.icaste.com
Hi,Get the jar file for java.usb APIs from : http://javax-usb.org/and get the examples from: http://www.cafeaulait.org/books/javaio2/ioexamples/23/index.html Hope this will help, all the best.regards,Dilip
I may send you the downloads of bubensoft, but I suggest you to use javax.media framework api for video and imageing processing under Java. Than there is no need to handle around with USB.answer towebmaster at bubensoft.de
XBubea at 2007-7-18 20:31:01 >

Try again www.bubensoft.deSometimes the server is down. If you fail again, send me a note and I may send you the downloads. (webmaser at bubensoft.de)
XBubea at 2007-7-18 20:31:01 >

I'm in the same situation like u
I have the jusb api and tested the mouse via RunUSBControllerTest.java
the program can see there is a mouse but says nonJUSB device
why?
what can I do to reconize it as a JUSB device in order to read data from it
my project will to read data from a scanner
thanx for any help
Goto http://www.icaste.com, try the free JCommUSB trial, you may have more luck.Chris
Hello friends,I want to access usb port using javax.usb...can it be possible to access the usb device/port by writing files using FileWriter facility in java and giving the address of usbport?Please Guide me for that.
Can anyone send me the downloads from this http://www.bubensoft.de/ website? Thanks.
I need to work with USB port in Java with XP. Could you help me, please?I am a starter in this area.Thanks a lot!pedro@torremocha.com
> Can anyone send me the downloads from this
> http://www.bubensoft.de/ website? Thanks.
Hi Kevin,
If you've obtained a copy of the usb api for windows frm bubensoft.de, could you please forward me a copy. I too am working on the host end usb, which needs to be totally platform independent.
thanks,
Jagadish
Well, I use javax.usb:
You have to download the files form http://javax-usb.org/
There are 3 jars needed:
# javax-usb : The API to prgramm
# javax-usb-ri : Indepent OS API
# javax-usb-ri-linux : This is the Linux implementation. (complete)
# javax-usb-ri-windows : Windos implementation (beta)
In each case you need to install 3 jars. You can build them with ant or download directly form this page.
If you use eclipse you can simply add the jars to build path, the properties file to the proyect and (in linux) the .so file to the correct place.
(with this way you can avoid editing the classpath).
Then you have to try the samples and to understand them. Now Im trying to work with HID dispositive.
Anyone have some example?
Regards.
Hello:
I'm just about to start a project, I'm designing a system that gets some audio files, from a USB storage device, stores them and manipulates them.
I really like the Java sound API, but this USB business is a true nightmare.
For instance on VB.NET, detecting a USB device is much easier there are inbuilt functions within .NET (then again audio support in .NET is a joke)....
Now I'm getting really desperate, as my whole project might have to be radically changed.
So what is the problem really with detecting a USB drive in windows using JAVA?
Someone told me to design a module in C++ using the MFC and connect it to my Java program, but I would have no idea on how you do that as I don't use pearl or Python or any glueing languages...
At this stage I might just write everything in C++, as it seems the most reliable way to tap into the Win32 API...
This is a huge problem , c'mon SUN do something about it, you don't wanna see us all going Ruby on Rails do you (Ruby does the USB detection quite elegantly)?
hello i am starting a project in which i have to communicate b/w a host and a USB Device. is there any java api in windows(complet and stable) ? if yes please send me the link and some code examples.thanks in advance