Giter Site home page Giter Site logo

Pl2303UsbSubmitUrb fails about pl2303 HOT 1 OPEN

thfabba avatar thfabba commented on July 21, 2024
Pl2303UsbSubmitUrb fails

from pl2303.

Comments (1)

ThFabba avatar ThFabba commented on July 21, 2024

c0000004 is USBD_STATUS_STALL_PID, which seems to indicate the device didn't like the request it was sent.

It's possible that your device has a chip that I haven't tried before (I have 3 of them, which is probably more than most people, but far from all that's out there ;]), and there's a bug in the driver that prevents this version from working.

Looking at the debug output, the DataBits value of 0 seems odd, so does StopBits=0. Your device might be sensitive to this and refuse the request. You could try if changing the defaults in Pl2303StartDevice to be more sensible makes a difference:

    DeviceExtension->StopBits = 1;
    DeviceExtension->Parity = 0;
    DeviceExtension->DataBits = 8;

If this doesn't work, it might be sensible to issue a GET_LINE request to get the device's current settings instead of trying to initialize it with a default. Linux issues such a request here:
https://github.com/torvalds/linux/blob/master/drivers/usb/serial/pl2303.c#L496

I've also never tried the driver on Windows 10, as I haven't worked on it for a few years. That means there may be an incompatibility there.
Finally, please note that the driver is quite incomplete and only supports basic read/write and line settings changes -- no timeouts or most of the other ioctls a serial port is supposed to react to. So it may not work great even if you get it to work. Depending on your use case, it may of course be worth a try though.

Thanks.

from pl2303.

Related Issues (2)

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.