Solved

Using Java to communicate to a USB device from browser

Posted on 2008-06-15
4
1,006 Views
Last Modified: 2013-12-29
Hi Experts,
We have a ASPNET web application and now we have a new request: the client wants to communicate with their USB device using our application. They plug the device into their PCs, open a page of our web application and the page will communicate with the device to get some input. Of course the device must already have proper driver. Comunication here means reading some input from the device.

Someone said that we can use JAVA to do this. So I'd like to get more information about it. Can someone give me a guide or a link which tells me how to do?
Thank you for reading.
0
Comment
Question by:thuannguy
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
Meritor earned 300 total points
ID: 21788616
Accessing USB using java is possible:
Please read through the following link:
http://www-128.ibm.com/developerworks/library/j-usb.html
and you can write applet which will run in browser.
for the detail please visit:
http://java.sun.com/applets/
http://www.dgp.utoronto.ca/~mjmcguff/learn/java/

Feel free to revert back in case of any doubts
0
 
LVL 6

Author Comment

by:thuannguy
ID: 21890808
Hi,
Sorry for my late response. I have learned the links you gave me. I found out that the javax.usb library only works on Linux. It is not good for me :(
However, it seems that the library aims to help us access usb devices directly regardingless drivers, doesn't it? What about if a driver is ready? Is it easier to access it?
Thank for you help :)
0
 
LVL 3

Assisted Solution

by:softwarepearls_com
softwarepearls_com earned 200 total points
ID: 22018972
Whether via an applet, or a JavaWebStart application, the simplest approach is to reach into the host OS' filesystem. For example on UNIX/Linux/OSX hosts, you would go to the mount points of drives, and simply locate the mounted USB drive there. For Windows, you'd need to deal with its drive letters, etc..

Personally, I would try to avoid USB-specific Java libraries at all costs, and try to create a solution based on the above approach. Sticking to standard JRE APIs is sticking to tried-and-tested, supported classes.
0
 
LVL 6

Author Closing Comment

by:thuannguy
ID: 31478772
We are waiting for more input from our clients. Although your posts don't give me what I was looking for, which might not really exist, they are still good hints for me. Thank you all :)
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
java stored proc example 9 44
Android development question 2 54
Selenium docs api java index 3 48
Bot application - advice 3 38
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question