Friday, July 4, 2014

Getting the ATEN USB Serial Adapter Working with Mac OSX Lion / Mavericks


ATEN USB Serial Adapter
I’ve had this USB Serial adapter for many years which I use to attach to network equipment consoles for initial configuration and setup. I have never had an issue using it with Windows machines. However, I had tried using it on my Macbook running OSX Lion and noticed that it did not show up in my device list in ZTerm. I had a VM running Windows XP and I was not able to get it to work properly in that environment either. So, I was determined to figure out how to get it to work, as I no longer have any physical machines running Windows or with serial ports. It took me a few weeks of trial and error and searching around to finally resolve the issue. So, I thought I would add a post here covering the details.
The first challenge was that I did not even know the manufacturer or part number of this particular USB Serial adapter. That was solved easily enough by plugging it into my Macbook and opening up the ‘About This Mac’ option on the Apple menu and clicking the More Info… button and then the System Report button. I drilled into the USB menu option and found the device listed as ‘Composite Device’. I highlighted it in the USB Device Tree and found this:
Composite Device:
Product ID: 0×2008
Vendor ID: 0×0557 (ATEN International Co. Ltd.)
Version: 0.01
Speed: Up to 12 Mb/sec
Location ID: 0xfd120000 / 4
Current Available (mA): 500
Current Required (mA): 100
So, now I know that it is made by ATEN International Co. Ltd. So I do a quick Google search looking for any info on this product. I find out that ATEN has basically disappeared. However, I did discover a number of posts referring to a company by the name of Prolific having a product that was 100% compatible if not identical to this particular ATEN device.
So, I did some more searching, looking for people having problems getting this working with Mac OSX Lion. I find a post that mentions that because this particular adapter was only supported with the original 32 bit drivers that Lion essentially disabled support because of the default 64 bit subsystem. So, now I know why it isn’t working. The question is can I actually get a driver that supports Lion in 64 bit mode for this adapter. Thankfully, the answer is yes. Prolific Technology’s PL2303 device is essentially the same product as the ATEN UC232A adapter. So, you can use the same Mac OSX driver they distribute which happens to support Lion.
Download and Install Drivers
  1. Go to Prolific’s download page and download the latest Mac OS X drivers.
  2. Open the Zip File
  3. Mount the Disk Image
  4. Open the Installer Package and install the drivers
  5. Reboot
Change Kernel Extension Property List
  1. Plug your USB adapter into any available USB port on your Mac
  2. Open the System Profiler/System Information, in /Application -> Utilites
  3. Click USB in the Contents pane
  4. Select the GUC232A in the Device Tree; usually it will be listed under USB-Serial Controller or in my case it was listed as Composite Device
  5. Remember the ProductID and VendorID, or keep the System Profiler window open
  6. Open the Terminal, in /Application -> Utilites
  7. Use the following command to open the Property List of the Prolific driver:
    sudo nano /System/Library/Extensions/ProlificUsbSerial.kext/Contents/Info.plist
  8. Enter your admin password when asked. This is necessary; the ProlificUsbSerial kernel extension is owned by root.
  9. Scroll down and find the ProductID and VendorID in the plist file which are labeled idProduct and idVendor
  10. Change the ProductID and VendorID to match your GUC232A’s ProductID and VendorID
  11. The plist file needs the numbers as integer values, but System Profiler reports the numbers as hex. Use the Calculator to convert the numbers. System Profiler reports the Product ID as 0×2008 and the Vendor ID as 0×0557. The integer value of ProductID is 8200 and the integer value of VendorID is 1367
  12. Save the changes and quit (Control-X) nano
Reload Kernel Extension
  1. Unplug the GUC232A
  2. Use the following command to load the kernel extension:
    sudo kextload /System/Library/Extensions/ProlificUsbSerial.kext
  3. Plug the GUC232A into any available USB port on your Mac
Once you’ve completed these steps and you have the adapter plugged in, you should see a file called tty.usbserial in your /dev folder. Now the adapter should be functional. I use ZTerm to access the serial devices. The USB Serial device shows up in the drop down list of devices under the Modem communications menu.

No comments: