Author Topic: Prolific USB to Serial port adapter driver fix  (Read 667 times)

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 1836
Prolific USB to Serial port adapter driver fix
« 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
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

Nomad1

  • Newby
  • *
  • Posts: 9
Re: Prolific USB to Serial port adapter driver fix
« Reply #1 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 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:

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.
Programmer

mike90045

  • Hero Member
  • *****
  • Posts: 629
    • The Ranch (via facebook re-direct)
Re: Prolific USB to Serial port adapter driver fix
« Reply #2 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
http://tinyurl.com/LMR-Solar

Classic 200| 2Kw PV, 160Voc | Grundfos 10 SO5-9 with 3 wire Franklin Electric motor (1/2hp 240V 1ph )| Listeroid 6/1, st5 gen head | XW6048 inverter/chgr | midnight ePanel & 4 SPDs | 48V, 800A NiFe battery bank | MS-TS-MPPT60 w/3Kw PV