Solved

Using Java to communicate to a USB device from browser

Posted on 2008-06-15
4
1,005 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
maven project error 5 55
rhino JavaScript import, load 25 84
jboss wildfly 10.1 10 92
Facing this issue for maven proxy setting 2 12
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

777 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