Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOException for Prolific PL2303GT (prodId 9155 / 0x23c3) #57

Open
elynden opened this issue Feb 29, 2024 · 1 comment
Open

IOException for Prolific PL2303GT (prodId 9155 / 0x23c3) #57

elynden opened this issue Feb 29, 2024 · 1 comment

Comments

@elynden
Copy link

elynden commented Feb 29, 2024

Device in title is not recognized as the correct device type of HXN, but rather type T. This results in an IOException. It's because it does not do the TestHxStatus() check if deviceVersion == 0x300 & usbVersion ==0x200. The original Java code does do this check.

Method is Open(UsbDeviceConnection connection). Currently lines 373 to 392.

The following code in ProlificSerialDriver.cs needs to be replaced:
if (mDevice.DeviceClass == UsbClass.Comm || maxPacketSize0 != 64) { mDeviceType = DeviceType.DEVICE_TYPE_01; } else if (deviceVersion == 0x300 && usbVersion == 0x200) { mDeviceType = DeviceType.DEVICE_TYPE_T; // TA } else if (deviceVersion == 0x500) { mDeviceType = DeviceType.DEVICE_TYPE_T; // TB } else if (usbVersion == 0x200 && !TestHxStatus()) { mDeviceType = DeviceType.DEVICE_TYPE_HXN; } else { mDeviceType = DeviceType.DEVICE_TYPE_HX; }

Replace with:
if (mDevice.DeviceClass == UsbClass.Comm || maxPacketSize0 != 64) { mDeviceType = DeviceType.DEVICE_TYPE_01; } else if (usbVersion == 0x200) { if ((deviceVersion == 0x300 || deviceVersion == 0x500) && TestHxStatus()) { mDeviceType = DeviceType.DEVICE_TYPE_T; // TA & TB } else { mDeviceType = DeviceType.DEVICE_TYPE_HXN; } } else { mDeviceType = DeviceType.DEVICE_TYPE_HX; }

@anotherlab
Copy link
Owner

If your suggested change works with your hardware, please submit a pull request for that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants