Menu

Not working with Windws 7

Help
ABG
2013-04-16
2013-05-16
  • ABG

    ABG - 2013-04-16

    I have been using Java libusb successfully on XP and Vista m/cs but cannot get it to work on Windows 7 m/s.

    To test the system, the Java code I am using is

    public static boolean readUSB() {
    boolean usbOK = false ;
    // reset the initial values
    dev = USB.getDevice(vID, pID);
    

    if (dev == null) return usbOK;
    try {
    dev.open(1, 0,-1);
    usbOK = true ;
    int reading = dev.readInterrupt(0x81, usbBuffer, usbBuffer.length, 2000, false);
    measCh = usbBuffer[0];
    dev.close();
    }
    catch (USBException e2) {
    usbOK = false ;
    }
    return usbOK ;
    }

    Any idea what I am doing wrong?

    Alex

     
  • uniederer

    uniederer - 2013-04-16

    Could you please specify what the abbreviations "m/cs" and "m/s" mean? Could you also please describe the effects a bit more detailed than "not working"?

    Could you also please specify the edition of the Windows systems you were using? (32 bit? 64 bit?)

     
  • ABG

    ABG - 2013-04-16

    I have been using Java libusb successfully on PC's wth XP and Vista operating systems but cannot get it to work with Windows 7 32bit.

    I do not have full access to a computer with Win 7 operating system so that I can run a development system.

    With XP and Vista, the call to readUSB returns a boolean value, false if my device is not connected and true is the read is successful.

    On a Windows 7, it would appear that the bolean value is not returned and that the program has crashed.

     
  • uniederer

    uniederer - 2013-04-16

    Is there a stack trace available? - There is either a boolean value returned or an exception thrown. Maybe insert a call to e2.printStackTrace() in order to get some debug information?

     
  • ABG

    ABG - 2013-05-03

    Hi - I have got the system to work on a 32 bit computer but my customers with 64 bit computors do not get it to work. To initial problem was that the installation procedure for the device was not being carried out properly so the the device was not being installed.

    Can I be assured that the JavaLibUSB system does work on a 64 bit machine with no changes to the code and that the problems I am having are to do with the system setup and not the program code.

    Have you and advice on how to tell the 64 bit machine to run only 32 bit code.

    Thanks for your help

    Alex

     
  • ABG

    ABG - 2013-05-16

    Hi - The customer has now got it working on a Win7 64bit machine. He said he had to install Java1,7,0_21 to get it to work.

    Alex

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.