Code Monkey home page Code Monkey logo

Comments (4)

gegomu avatar gegomu commented on July 1, 2024 3

it still happends

from usb4java-javax.

qiukeren avatar qiukeren commented on July 1, 2024

+1 for this issue.
jdk8 with win10

    private short[] getLanguages() throws UsbException
    {
        final DeviceHandle handle = open();
        final ByteBuffer buffer = ByteBuffer.allocateDirect(256);
        final int result = LibUsb.getDescriptor(handle, LibUsb.DT_STRING,
            (byte) 0, buffer);
        if (result < 0)
        {
            throw ExceptionUtils.createPlatformException(
                "Unable to get string descriptor languages", result);
        }
        if (result < 2)
            throw new UsbException("Received illegal descriptor length: "
                + result);
        final short[] languages = new short[(result - 2) / 2];
        if (languages.length == 0) return languages;
        buffer.position(2);
        buffer.order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(languages);
        return languages;
    }

here throws this exception

from usb4java-javax.

kayahr avatar kayahr commented on July 1, 2024

usb4java 1.3.0 was released today which now uses libusb 1.0.22 which may have fixed this issue. Please try again with this new version and give feedback here if the exact same problem still occurs. If it still doesn't work but it is not the exact same result then please open a new issue.

from usb4java-javax.

scubajorgen avatar scubajorgen commented on July 1, 2024

Usb4java 1.3.0 solved the issue that the library sometimes doesn't work under Windows 10 (for my TomTom Watch project).
I encountered the Overflow issue described here as well. What did work for me was to replace the HidUsb driver by the WinUsb driver using the Zadig driver tool: http://zadig.akeo.ie.
Refer to my blog page, the Installation section

from usb4java-javax.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.