Fixing the Prolific Driver on OS X

Prolific USB to Serial Adapter

Prolific USB to Serial Adapter

There are a couple different USB to serial adapters that you might use as a network engineer. The one pictured in the article is manufactured by Prolific, but sold by multiple different vendors. There’s also another manufactured by FTDI, which I’ve heard good things about, and of course the one built into recent Cisco hardware. The driver for the chip used by Cisco is conveniently included in OS X, but the FTDI and Prolific chips require their own drivers. Myself, I have used the Prolific cables for years and have been generally happy with them.

The best drivers for the Prolific come directly from the manufacturer, not the vendors that resell them. This is because the vendor provided drivers always seem to be out of date. However, the drivers from Prolific don’t work with all cables out of the box. I’m going to show you how to fix that.

1. Get the Driver

If you haven’t already, hop over to the Prolific site to download the driver and install it. Here’s the URL at the time of this writing:

http://www.prolific.com.tw/us/showproduct.aspx?p_id=229&pcid=41

If you are running OS X Yosemite, you may need to read this article to get the driver working: OS X Yosemite and Prolific USB Drivers.

2. Discover Magic Numbers

OK, the numbers aren’t really magic, but the driver will need them so that it can be associated with your USB device. Head to Apple -> About This Mac and and choose System Report. Select USB and scroll until you find your Prolific USB device. It should look something like this:

Watch for the Manufacturer (circled in blue). Then note the Product ID and Vendor ID (circled in red). We will be adding these to the driver.

3. Hex to Decimal Conversion

Calculator in hex mode

Calculator in hex mode

We need to convert the hex numbers to decimal. An easy way to do that is to run Calculator and hit Command-3. Click the “16” above the clear button to switch to hex and enter the number you want to convert (like 0x2008 from the example). Now click the 10 and you have the hex to decimal conversion. If you used 0x2008, you should get 8200. You need to convert both the product and vendor IDs.

4. Edit the Driver

Fire up your favorite terminal emulator and head here:

cd /System/Library/Extensions/ProlificUsbSerial.kext/Contents

At this point, you will need to either fire off a root shell or sudo everything.[1]

Safety First! Backup your Info.plist so you can fix the driver if you break it.

Edit Info.plist with your editor of choice. Scroll down and you will find a section that looks like this:

<key>0557_2008</key>
<dict>
        <key>CFBundleIdentifier</key>
        <string>com.prolific.driver.PL2303</string>
        <key>IOClass</key>
        <string>com_prolific_driver_PL2303</string>
        <key>IOProviderClass</key>
        <string>IOUSBInterface</string>
        <key>bConfigurationValue</key>
        <integer>1</integer>
        <key>bInterfaceNumber</key>
        <integer>0</integer>
        <key>idProduct</key>
        <integer>8200</integer>
        <key>idVendor</key>
        <integer>1367</integer>
</dict>

What you want to do is copy and paste that section. I don’t think the <key> actually matters, but you can change it to match the hex version of the vendor and product ID. So if your vendor ID was 0x2478 for Tripplite with a product ID of 0x2008, you can change the key for your new section to:

<key>2478_2008</key>

Then you will want to put the decimal version of that you converted before into the idProduct and idVendor sections. So for the Tripplite example you only need to change the idVendor and it would look like this:

        <key>idVendor</key>
        <integer>9336</integer>

So the final product for my Tripplite version of the Prolific adapter works when I have this section added:

                <key>2478_2008</key>
                <dict>
                        <key>CFBundleIdentifier</key>
                        <string>com.prolific.driver.PL2303</string>
                        <key>IOClass</key>
                        <string>com_prolific_driver_PL2303</string>
                        <key>IOProviderClass</key>
                        <string>IOUSBInterface</string>
                        <key>bConfigurationValue</key>
                        <integer>1</integer>
                        <key>bInterfaceNumber</key>
                        <integer>0</integer>
                        <key>idProduct</key>
                        <integer>8200</integer>
                        <key>idVendor</key>
                        <integer>9336</integer>
                </dict>

5. Kick the Driver

Now you need to unload and reload the driver to load the new settings:

$ kextload /System/Library/Extensions/ProlificUsbSerial.kext
$ kextunload /System/Library/Extensions/ProlificUsbSerial.kext

You should now have a working USB device! This is a bit of a hassle. I recently found another way to solve this problem, but it’s not free and it’s another blog post.

FIN

Is Windows Rubbish? Is Mac the Solution?

[This is a lightly edited comment I made in response to Greg Ferro’s blog post, Windows Tools Aren’t Worth Selling. In a nutshell, Greg argued that Windows and Microsoft software are known to be defective and you should switch to Mac for security, stability, and cost savings.]

On by Guillermо via flickr

I will not argue that the Mac is not fant­astic, but I will argue with this gen­eral sen­ti­ment that everything Microsoft/​Windows is rub­bish. I won’t bother arguing the qual­ity of pre­vi­ous ver­sions of the soft­ware, but Windows 7 is stable and fast. While Windows may lack some of the eleg­ance of MacOS X, the secur­ity and sta­bil­ity of these two mod­ern oper­at­ing sys­tems is com­par­able. In 2 years I have had 2 crashes across 4 Win7 machines. None have had the need to be rein­stalled (such as seemed neces­sary every 6 months with XP). Both crashes were related to bad drivers, which is the source of most prob­lems on Windows boxes.

Windows 7 does not crash every day. It very rarely crashes. This seems sim­ilar to MacOS.

Windows 7 also has a quite good backup mech­an­ism built in. Totally dif­fer­ent than the garbage in earlier versions.

Win7 certainly does have the limit of not having the full suite of extremely use­ful UNIX tools and a POSIX envir­on­ment. I spend a lot of time in a ter­minal win­dow con­nec­ted to a Linux box or on a Linux VM. I find this preferable to having to run most of my tools in a VM (since most of my tools are written for Windows) as I would have to on a Mac. This, of course, depends on per­sonal taste and how your apps run in a VM as well as how many apps you would need in a VM. Having to run Windows in a VM is going to cost you a lot more RAM than running a Linux box in a VM.

The hard­ware to run Windows is cheaper than equi­val­ent Mac hard­ware. On the other hand, the quality of the Windows hard­ware is not as good and you will occa­sion­ally run into issues with drivers. MacOS should not have that problem.

Use the tool that works best for your needs. Weigh your options and needs, and choose the tool that works best for you. Fear of chan­ging to the unknown is a lousy reason to stick with Windows. If the tool isn’t work­ing for you, try a dif­fer­ent tool. Anti-​​Microsoft/​Windows FUD is an equally lousy reason to switch to Mac. Curiosity is a per­fectly good reason and I’d encour­age that, but expect a learn­ing curve and frus­tra­tion with the Mac Way.

That state­ment regard­ing com­pan­ies stick­ing with known defect­ive products for fear of the unknown and fear of cost when things could be improved by switch­ing to Mac is FUD. That will totally depend on the organ­iz­a­tion and is hardly a valid gen­er­al­iz­a­tion. I’ve seen admins try­ing to man­age thou­sands of Macs. It’s no easier or cheaper than man­aging Windows boxes. You often end up hav­ing to deploy VMs to sup­port Windows applic­a­tions. You have a train­ing night­mare because at this point most people know Windows, but a small (but growing) minor­ity knows the Mac. I can see the poten­tial for a small or highly tech­nical organ­iz­a­tion to save money in the long run with Apple, but I think that’s the exception right now.

I’m not a con­sult­ant or field engin­eer, so I can’t speak to policies regard­ing con­nect­ing the prohibition of connecting Windows laptops to other net­works, but I would say this requirement falls under use the right tool for the job.

FIN