About: control USB device with Java

Any body know how to control USB device with Java?
Does JDK provide a package for USB?
Is there any web site concerning USB programming?
Thank you! ^_^

Look at www.prosyst.com. There is an usb bundle (linux
and windows pltforms).I looked on this site and cannot find the bundle you are talking about. Do you know more specifically where to find out about controlling USB devices with Java?

Similar Messages

  • Controlling eletronic devices with JAVA ( LEDS, MOTORS...)

    All this week I try to find some help about how to control eletronic devices like leds using the parallel or serial port using JAVA. Using C it's very simple, but with JAVA, I guess that NOBODY do this kind of application... If I'm wrong, please, tell me.... ( I know that I need to use javax.comm or JNI, but I want to see a real application that works ...

    First thing to note is that using javax.comm you cannot set pin outputs
    levels directly (you can set some pin levels directly such as CTS and
    RTS on a serial port). There are ways around this such as writing the correct byte value to the parallel port (depends on port type though)
    Therefore the device you wish to communicate with should be able
    to talk to parallel or serial ports. If this is the case you just send
    messages to the device and it lights up you leds.
    A, perhaps better, solution would be to write, or obtain from the
    internet, some native lib that allows bit bashing on the port of your
    choice. Then write a wrapper class for it an call its methods (JNI).
    This is only worth while if you have some reason to use java rather
    then another language, such as C or C++, to talk to you device. This
    whole thing would probably be easier in one of those languages.
    matfud

  • Using USB device with Virtual Com port

    I have an actisys IR USB device that creates a virtual serial port. I can read from it using VISA, however it will not write. I have the same setup working on LV 6.1 running windows 2000. I need to make it work on my system running XP and LV 7.1.

    Hello,
    Does your Windows 2000/LabVIEW 6.1 system work correctly or do you see the same behavior?  It sounds like there may be something wrong with the termination of the command.  What termination method are you using?  Is your instrument set for that method?  You may also want to try using the NI-488.2 Interactive Control.  A tutorial on how to use it is located here if needed.  This will bypass VISA and LabVIEW.  If this works, you may want to update to the latest version of VISA (if you don't already have it) to see if that fixes the issue.
    Chris R.
    Chris R.
    Applications Engineer
    National Instruments

  • NI-VISA as default driver for USB device with another manufacturer's driver?

    Hi Labview Developers or AE,
    I have read the tutorial, "USB Control Tutorial Device" at link.
    I read a paragraph "If you do not know the USB vendor ID and product ID, to get them, plug
    the device into the computer and allow the computer to recognize the
    new device. Cancel out of the Found New Hardware Wizard if it starts.
    Open the Device Manager from the Control Panel and find your device on
    the list, usually under "Other Devices". It may show a yellow
    exclamation mark indicating it is an unknown device. Double click the
    device to open the properties. Select the Details tab and ensure that
    "Device Instance Id" shows in the attribute dropdown box. A string of
    characters will be displayed similar to Figure 3. The four characters
    to the right of "VID_" and "PID_" are your vendor ID and product ID,
    respectively. Write down the characters for your device, close the
    Device Manager, and unplug the device from the computer. Alternatively,
    you can contact your device vendor to obtain this information."
    I am wondering if it is okay to install two drivers together and do labview with two of them simultaneously. I am using Advantech USB-4716. I installed Advantech driver so that I can use Advantech-labview functions to control and measure. unfortunately, , there's no advantech function like reset.vi  in case of problem reading. So I wondering if it is okay to use NI-VISA driver by wizard as mentioned above and advantech-Labview functions together. I have not figured out  how to reset Advantech USB-4716.
    Pls  advise. Thanks
    Clement

    Hi Nicholas,
    I found the drivers in those links.
    First of all the customer must install our Device manager ( DAQ Tool ) and Driver
    http://support.advantech.com.tw/support/DownloadSRDetail.aspx?SR_ID=1-246K8V
    That's he needs to do always before using our devices.
    For LabVIEW he also needs to install in addition the LabVIEW driver
    http://support.advantech.com.tw/support/DownloadSRDetail.aspx?SR_ID=1-29WTFD
    It is the LabVIEW or LabVIEW DAQ , it depends on customer LabVIEW software that he is using
    After installation he will get in LabVIEW ready made VI ( examples ) to use from Advantech and also the Manual

  • Controling another program with java

    hi. i have some problems about java. i'm trying to control a program with my java codes.i'm trying to explain that i will write a program and this program will send some keys to another choosen program. forexample i will say my program that i want you to send "A" key to a game for 500 times and at the game my program will write AAAAAAA....... .i look for some examples in c++. c++ uses findwindow and postevent methods for this work but i couldn't find anything.
    so i want some help about this
    what can i do or where can i find some help
    sorry about my little english.
    thanks...

    look up the Robot object in Java 1.31 (I think) or later.

  • About control flow graph on java

    i want to ask if there are some papers about control flow graph based on java or another object oriented language.
    thanks

    > i have search already on google. the problem is that i
    didnt find anything usefull on this.
    Once again, we have no idea what may or may not be useful to you or why the Google search results don't meet your satisfaction.
    > i have to do a research on this subject.
    Okay.
    so i asked if u have already
    found some papers about control flow graph based on
    java or with some other object oriented language.
    And the answer is, "Yes, I have found many". I found them easily with Google. Again, I have no idea which ones may or may not be useful to you, so it doesn't make much sense to just start posting a bunch of links only to have you say, "Nope, that's not what I'm looking for".
    Keep researching, and best of luck.
    ~

  • How do I use more than one USB device with Airport Extreme?

    I would like to plug a shared hard drive into my new airport extreme and still be able to plug in a shared printer as well. How am I supposed to do this with only one USB port. Do I use a USB hub???
    Is it possible to connect a hard drive using one of the ethernet ports?

    To use multiple USB devices you would use a powered USB hub.
    You can connect a hard drive to one of the Ethernet ports providing the hard drive is a NAS and supports Ethernet connections. In that situation the NAS hard drive is just like any other Ethernet client and the AirPort Extreme base station (AEBS) does not handle the file sharing services. The drive itself would provide the file sharing services.

  • Cannot print on a USB printer with Java PrintService in Windows 2000. Why?

    I want to print a simple ASCII file on a USB printer under Win2K and
    found 2 problems. Here is the 2nd one.
    Even though
    PrintServiceLookup.lookupPrintServices(<DocFlavor>, <AttributeSet>)
    returns nothing when I specify any AttributeSet, I can still print on the default printer, which I get by
    PrintService defServicedefService = PrintServiceLookup.lookupDefaultPrintService();
    but only on a parallel printer (HP Laserjet 4 Plus), either directly attached or over the network. When I try the very same code on a locally USB-attached printer, the printer is obviously reacting, but nothing is printed.
    In case of a Lexmark 730 (an ink printer), the driver even lies, it has printed 100%,
    on a Samsung CLP-510 (a color laser) the ready light flashes twice, that's all.
    The file to be printed has 5 lines and a "0C"X at the end in order to force a page eject at the end.
    I tried it with JDK 1.4.2 and with Java 6, same problem.
    I should mention that I can print that little file out of the editor Textpad without any problem.

    Thanks a lot for the quick hint, but it did not help.
    I used BasicPrint.java and PrintJobWatcher.java of the samples for testing.
    Printing a GIF file works both to a parallel printer and a USB printer.
    Then I changed only the DocFlavor from DocFlavor.INPUT_STREAM.GIF to DocFlavor.INPUT_STREAM.AUTOSENSE, and that one works with my parallel printer, but on the USB printer the Ready light flashes twice, that's all.
    The ASCII file must have a "0C"X at the end to force a page eject on the parallel printer
    Maybe it is a matter of the DocFlavor, but which one?
    DocFlavor("application/octet-stream", "java.io.InputStream") works like DocFlavor.INPUT_STREAM.AUTOSENSE.
    DocFlavor.INPUT_STREAM.TEXT_PLAIN_HOST and DocFlavor.INPUT_STREAM.TEXT_HTML_US_ASCII cause sun.print.PrintJobFlavorException, and with DocFlavor.INPUT_STREAM.TEXT_PLAIN_US_ASCII just nothing happens on either printer, not even an error message.
    I am getting the impression that nobody of the developers ever cared for testing such a simple thing as a plain ASCII file under Windows.
    My printers I am using for the tests are
    1. an old parallel-attached HP Laserjet 4 Plus and
    2. a borrowed USB-attached Samsung CLP-510 color laser

  • Cannot print on a USB printer with Java PrintService in Windows 2000

    I want to print a simple ASCII file on a USB printer under Win2K and
    found 2 problems. Here is the 2nd one.
    Even though
    PrintServiceLookup.lookupPrintServices(<DocFlavor>, <AttributeSet>)
    returns nothing when I specify any AttributeSet, I can still print on the default printer, which I get by
    PrintService defServicedefService = PrintServiceLookup.lookupDefaultPrintService();
    but only on a parallel printer (HP Laserjet 4 Plus), either directly attached or over the network. When I try the very same code on a locally USB-attached printer, the printer is obviously reacting, but nothing is printed.
    In case of a Lexmark 730 (an ink printer), the driver even lies, it has printed 100%,
    on a Samsung CLP-510 (a color laser) the ready light flashes twice, that's all.
    The file to be printed has 5 lines and a "0C"X at the end in order to force a page eject at the end.
    I tried it with JDK 1.4.2 and with Java 6, same problem.
    I should mention that I can print that little file out of the editor Textpad without any problem.
    Edited by: eSchobbert on Jan 24, 2008 11:34 AM
    By mistake I entered the same message another time after modifying the Subject instead of replacing the message. Sorry for that. If I knew how to delete it, I would. So please just ignore this one

    Thanks a lot for the quick hint, but it did not help.
    I used BasicPrint.java and PrintJobWatcher.java of the samples for testing.
    Printing a GIF file works both to a parallel printer and a USB printer.
    Then I changed only the DocFlavor from DocFlavor.INPUT_STREAM.GIF to DocFlavor.INPUT_STREAM.AUTOSENSE, and that one works with my parallel printer, but on the USB printer the Ready light flashes twice, that's all.
    The ASCII file must have a "0C"X at the end to force a page eject on the parallel printer
    Maybe it is a matter of the DocFlavor, but which one?
    DocFlavor("application/octet-stream", "java.io.InputStream") works like DocFlavor.INPUT_STREAM.AUTOSENSE.
    DocFlavor.INPUT_STREAM.TEXT_PLAIN_HOST and DocFlavor.INPUT_STREAM.TEXT_HTML_US_ASCII cause sun.print.PrintJobFlavorException, and with DocFlavor.INPUT_STREAM.TEXT_PLAIN_US_ASCII just nothing happens on either printer, not even an error message.
    I am getting the impression that nobody of the developers ever cared for testing such a simple thing as a plain ASCII file under Windows.
    My printers I am using for the tests are
    1. an old parallel-attached HP Laserjet 4 Plus and
    2. a borrowed USB-attached Samsung CLP-510 color laser

  • Can I use a virgin mobile internet USB device with OS X?

    Is there a way to use the USB virgin mobile internet device with OX M??

    I cannot say for sure if the g/b vs n is the cause, but if all other devices like the AE and that one device does not, you go with the odds.  Others will have to chime-in on that.
    And I recommend NetGear (not necessarily *above* LinkSys) because my 3-year-old NetGear router has been serving my MBP fine for 3 months ... no glitches.

  • USB Devices with DLL librairies

    Hello,
    I am working on a project that uses a custom made USB device. I use a USB serial converter chip that emulates a serial port on my computer. The problem is that I need to use some of the functions included in the DLL that came with the device and I also want to monitor interrupts on the device. I was wondering if it was possible to monitor the USB using an interrupt from Windows or to monitor the interrupts from the device using VISA, but be able to talk to the USB device using the Windows driver.
    Thanks,
    Benjamin

    You can also charge your iPod Shuffle...
    iPod shuffle: Using AirPort Express to charge
    http://docs.info.apple.com/article.html?artnum=300872
    iFelix

  • Using a mtech hiface usb device with macbook air is producing a lot of static. when i touch the mac air it stops then starts when i remove my hand. Help?

    Im using a mtech hiface usb device for audio on my Mac Air. If i disconnect it from its ac and disconnect the hiface from the usb then take the Mac Air to a new location to work then return it I have an awful lot of static. im assuming its static electricity from the move or something. ive tried to ground it with my body by touching the mac air while touching something grounded. The static stops at that point but starts all over when i move my hand away from the computer. Any suggestions, could it be a setting in the USB? Thanks.

    how long have you had your ipod? mine did the same but after a while you need to get a new one because of the battery...

  • How to control tcp connection with java tcp socket programing ??

    Hi,
    I am connecting a server as using java socket programming.
    When server close the connection (socket object) as using close() method ,
    I can not detect this and My program continue sending data as if there is a connection with server.
    How to catch the closing connection ( socket ) with java socket programming.
    My Client program is as following :
    import java.io.PrintWriter;
    import java.net.Socket;
    public class client
      public client()
       * @param args
      public static void main(String[] args)
        Socket socket=null;
        PrintWriter pw=null;
        try
                          socket = new Socket("localhost",5555);
                          pw = new PrintWriter(socket.getOutputStream(),true);
                          int i=0;
                          while (true)
                            i++;
                            pw.println(i+". message is being send.");
                            Thread.sleep(5000);
        } catch (Exception ex)
                          ex.printStackTrace();
        } finally
                          try
                            if(pw!=null)pw.close();
                            if(socket!=null)socket.close();
                          } catch (Exception ex)
                            ex.printStackTrace();
                          } finally
    }

    I changed the code as following. But I couldn't catch the EOFException when I read from the socket. How can I catch this exception ?
    import java.io.BufferedReader;
    import java.io.EOFException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class client
      public client()
       * @param args
      public static void main(String[] args)
        Socket socket=null;
        PrintWriter pw=null;
        BufferedReader bufIn=null;
        InputStreamReader inRead=null;
        InputStream in=null;
        try
                          socket = new Socket("localhost",5555);
                          in = socket.getInputStream();
                          inRead = new InputStreamReader(in);
                          bufIn = new BufferedReader(inRead);
                          pw = new PrintWriter(socket.getOutputStream(),true);
                          int i=0;
                          while (true)
                            i++;
                            try
                              bufIn.readLine();
                              pw.println(i+". message is being send.");
                              System.out.println(i+". message has been send");
                            } catch (Exception ex2)
                              System.out.println(ex2.toString());
                              System.out.println(i+". message could not be send");
                            } finally
                            Thread.sleep(5000);
        } catch (EOFException ex)
                          ex.printStackTrace();
        } catch (InterruptedException ex)
                          ex.printStackTrace();
        } catch (IOException ex)
                          ex.printStackTrace();
        } finally
                          try
                            if(pw!=null)pw.close();
                            if(socket!=null)socket.close();
                          } catch (Exception ex)
                            ex.printStackTrace();
                          } finally
    }

  • USB Devices with Airport Express

    Hello all,
    Are there any limitations on the types of USB devices that can be connected to an Airport Express? I am a musician looking for a truly wireless workspace, and if I would be able to connect my MIDI controller to the Airport as opposed to my powerbook, that would be excellent!
    Cheers,
    Spencer Jones
    Powerbook G4   Mac OS X (10.4.6)  

    You can also charge your iPod Shuffle...
    iPod shuffle: Using AirPort Express to charge
    http://docs.info.apple.com/article.html?artnum=300872
    iFelix

  • Multiple USB devices with LKIF.dll

    I am successfully using a single USB Keyence LK-G3001 laser displacement controller with 2 heads and making function calls to LKIF.dll
    The next step is to implement a second controller.
    According to Keyence, the LKIF.dll will only support a single device. They suggested disabling the 1st USB port and then enabling the 2nd port.
    How can I programmatically
      determine which device is attached to which port?
      enable/disable the USB port?

    If you're running on a Windows machine you can try using devcon. It's a command-line based utility. For other operating systems you would need to use the old Google to find an equivalent utility.

Maybe you are looking for

  • PHDs on multiple computers, NHDs on others

    I'd like to set up a system in which each user has one (or perhaps more than one, if possible) computer on which they use a portable home directory, but I'd like to allow them to log in from other people's main machines using their network directory.

  • Combine Files dialog and File Size

    In the Combine Files dialog box, in the lower right corner, the File Size icons are Small, Default, and Large. These settings are very vague. Does anyone know what the actual settings are that these icons use?

  • Use cached exchange mode for new and existing outlook profiles

    Hi, I've noticed a difference in the behavior of this setting in Outlook 2010 vs 2013 In 2010, when the gpo is set, everything is greyed out for the user, but in 2013, the user can change the setting. Has anyone else noticed this? Is this something t

  • Nested Queries in SQL Utility/Prod versions

    Can you tell which XML product versions are in production.... we are implementing a custom XML solution for a B2B client, and are using the 8i and the tools from oracle with quite a bit of custom code... I have a couple of questions. 1. as suggested

  • Command prompt execution memory error

    Hello, I have a problem, I have written a program which uses 2 very large vectors. I edit it in edit plus and then run it from there via the user tools I created and it works great. However when I go in the DOS prompt and execute it 'java DataMatch'