A Forum run by Enthusiasts of MidNite Solar

The Open Source software/hardware corner => General info => Topic started by: ClassicCrazy on January 16, 2016, 09:10:25 PM

Title: Prolific USB to Serial port adapter driver fix
Post by: ClassicCrazy on January 16, 2016, 09:10:25 PM
Don't know why something like this actually worked  so easy but this fixed up my Prolific chip usb to serial port adapter driver and now it works on Windows 10.
http://www.ifamilysoftware.com/news37.html

Larry
Title: Re: Prolific USB to Serial port adapter driver fix
Post by: Nomad1 on September 07, 2018, 08:20:36 AM
Well, sorry for necroposting, but I want to share some interesting information on PL2303 and Midnite devices.
So, first of all, there are tons of fake PL2303 chips, most of them are called PL2303HX. Prolific itself never produced HX chips, only HXD. To cut some tails they managed to change latest Windows drivers rendering them incompatible with fakes. It could be easily fixed using old drivers, as with the link above or here:
http://wp.brodzinski.net/hardware/fake-pl2303-how-to-install/

There is completely other story with Linux drivers. To handle HX series there was a patch in pl2303.c driver around kernel 4.2 adding a thing called TYPE_HX mode. Previous driver could possibly work with 'cheap UART TTL 2303' converter, but most of the time it refuses to.

I spent a day backporting 4.19 driver to old kernel and recompiling, bricked and restored my Linux PC several times and finally got it working, but not with Midnite KID. I was shocked and overwhelmed - it works with Mac, works with Windows 8 and 10 PCs, but not on Linux, even with latest kernels and drivers. After several liters of coffee I realized that on Mac and Windows I had to revert RX and GND for uknown reason, otherwise message text was garbled. However I was able to see the pattern in that message and it could be possibly decoded. It seems like those cheap PL2303 boards are designed for TTL 3.3v signal levels and while they can handle UART 5v voltage, data becomes inverted. It could be fixed by swapping RX and Ground wires, but... My Linux device was powered from the same Midnite KID, having the same ground already! That means swapping RX and GND just made a short-circuit between data wire and real ground resulting in zero signal! Powering the same Linux PC from external power supply made it work like a charm.

At this stage my last PL2303 got burned and I looked around for something else. And then I suddenly spotted a data cable (http://ae01.alicdn.com/kf/HTB1xp.YgeSSBuNjy0Flq6zBpVXam.jpg) for EPSolar Tracer that has Exar USB-SERIAL chip inside. The cable comes with RJ45 connector on one side and luckily I got RJ45 coupler by the hand:
(https://www.belkin.com/images/product/R6G089-S/372.jpg)
So now my cable for Midnite KID looks like this:
[Kid Master socket] <= RJ11 = (CAT5 cable) = RJ45 => [coupler] <- RJ45 - (EPSolar cable) -> USB

And yes, Exar cable works with Linux default cdc_adm driver perfectly.

I spend $5 on EPSolar cable, RJ11/RJ45 jacks are about $0.05 each, CAT5 is dirt cheap, coupler is about $2, so I got working and stable cable for my KID for less than $10. With zero soldering, duct tape and other spaghetti-style connections. Even more, I can cut the RJ45 from Exar cable and put RJ11 here, resulting in $5 native RJ11->USB cable. I already ordered the replacement cable from AliExpress and will update the topic when I'll have something more to report.
Title: Re: Prolific USB to Serial port adapter driver fix
Post by: mike90045 on September 07, 2018, 11:03:05 AM
Thanks for the link to revert to a working driver.

I've always used the USB/RS232 adapter Morningstar calls out in their tech support, that has the proper level translators built in
https://www.tripplite.com/support/u209000r