Hi all,
I am not sure that this is the right place to write this place,but i'll do it anyhow.
I want to send a signal to one of my usb ports so that it will reach the device connected to that port.
How can I send signal to usb port using java?
10x
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hi all,
I am not sure that this is the right place to write this place,but i'll do it anyhow.
I want to send a signal to one of my usb ports so that it will reach the device connected to that port.
How can I send signal to usb port using java?
10x
What do you mean by a send a signal exactly?
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.
I mean that I got a device that is connected to a usb port, and I need to send a number to that device(thats the signal)
10x
I would consider this more of a native level job, which may be handled via the JNI. However, depending on the operating system that you're using, all you may need to do is create a FileOutputStream. What I mean by this is that in Linux, everything is a file. All devices have a file equivalent. So all you would need to do is (permissions permitting) create a FileOutputStream to that file, write the data to it, and you should be done. An example of this would be
FileOutputStream output = new FileOutputStream("/dev/bus/usb/002"); output.write(someData); output.flush();
But, this only works on Linux/Unix systems.