Adventures with Reliance Netconnect and Mac OS X (Updated November 2009 with some information about the MG880+)

January 2008 

 About two weeks ago, I bought a Reliance Netconnect connection and chose a ZTE MG 880 CDMA adapter. The device is a svelte little thing only slightly larger than a thumb drive that has a fold-out antenna. Unfortunately, unlike the Huawei PC Cards and USB adapters that are supported by OS X, this one is only apparently supported on Windows. There's also no information on the Internet about Mac drivers for this device, and the ZTE site is primarily in Chinese and doesn't say anything I could understand.

After a week-long nightmare while I waited for Reliance to activate the connection (supposedly, activating a NetConnect card should only take 24 hours), I called a contact at Reliance Infocomm in Coimbatore to complain and made a passing mention of reconsidering a 2MB leased line contract that we'd recently negotiated. The connection was activated in an hour and I was up and running, but only in Windows on VMWare.

I set up Internet Connection Sharing for the NetConnect interface in Windows, set the default route on Leopard to point to the vmnet interface connecting to the host-only network that I had with the guest, and fired up a browser window in Leopard. This was when I realized that Mac OS treats resolv.conf strangely - /etc/resolv.conf is a symlink to /var/run/resolv.conf, which in turn is created by pppd and other magical elves that set up the Mac's DNS. And, perhaps because the vmware interfaces aren't *really* interfaces that can be managed through System Preferences, creating /var/run/resolv.conf and pointing it to Reliance's name servers didn't have any effect. nslookup, which apparently honors resolv.conf, worked, but any other application that used OS X's lookup mechanism didn't have any effect.

For a day or two, I managed with an entry in /etc/hosts so I could fetch my work email, but it got tiring to fire up Windows every time I wanted to connect to the Internet. Besides, because the device wasn't being managed by Leopard, the MacBook would freeze every time I put it to sleep, with an error from the USB drivers. Every time I shut the lid I'd first have to shut down Windows and pull out the CDMA adapter.

Googling a little, I realized then that the Linux usbserial module worked with the MG880, when it was passed the vendor and product IDs. I tried this with Damn Small Linux running in VMWare, and it worked fine. So I started looking for a similar, generic USB-serial kext for Mac OS X.

It appears that the most common USB-serial chipset - used in the USB cables for most phones - is the Prolific Technology PL2303. I wondered if the MG880 also used the same chipset, and got lucky - yes, it did!

There is an open-source Mac OS driver for this chipset here:

http://osx-pl2303.sourceforge.net/

Download the zip archive and install. You'll be asked to restart; do so.

Download this file to your computer:

http://hari.selvarajan.googlepages.com/Info.plist

This file has USB device ID entries for the MG880 and the MG880+.

Now, copy it over the existing Info.plist in this location:

 /System/Library/Extensions/osx-pl2303.kext/Contents/

Type the following commands into a terminal window:

sudo chown -R root:wheel /System/Library/Extensions/osx-pl2303.kext 

sudo touch /System/Library/Extensions/

sudo kextload -v /System/Library/Extensions/osx-pl2303.kext

If all goes well, you should see a bunch of messages, like this:

bash-3.2# sudo kextload -v /System/Library/Extensions/osx-pl2303.kext
kextload: extension /System/Library/Extensions/osx-pl2303.kext appears to be loadable
kextload: loading extension /System/Library/Extensions/osx-pl2303.kext
kextload: /System/Library/Extensions/osx-pl2303.kext loaded successfully
kextload: sending personalities to kernel:
kextload:     from extension /System/Library/Extensions/IOSerialFamily.kext:
kextload:         IOSerialBSDClientSync
kextload:         IOSerialBSDClient
kextload:     from extension /System/Library/Extensions/osx-pl2303.kext:
kextload:         0745_0001
kextload:         056e_5003
kextload:         056e_5004
kextload:         2303_1659
kextload:         0731_0528
kextload:         04e8_8001
kextload:         2478_2008
kextload:         067b_aaa2
kextload:         0547_2008
kextload:         19d2_fffd
kextload:         04bb_0a03
kextload:         0df7_0620
kextload:         067b_04bb
kextload:         0584_b000
kextload:         067b_aaa0
kextload:         6189_2068
kextload:         11f5_0003
kextload:         078b_1234
kextload:         0557_2008
kextload:         067b_2303
kextload:         1453_4026
kextload:         11f7_02df
kextload:         0eba_1080
kextload: sending 25 personalities to the kernel
kextload: matching started for /System/Library/Extensions/osx-pl2303.kext

At this point, you should unplug the MG 880 if already plugged in, and plug it back in. Mac OS will now recognize the vendor and product IDs of the device and map it to the PL2303 driver.

Go to System Preferences and select Network. Click on the + sign beneath the list of interfaces (Bluetooth, Ethernet, Firewire, etc.) to create a new connection. A dialog will pop up asking for the interface to use for the connection, and the service name. In the list of interfaces, you should see "ZTE CDMA Tech". Choose that as the interface to use, and call the service "Reliance" - you can call it whatever you like; I chose Reliance. Click the "Create" button in the dialog. The "Reliance" connection will now be added to the list of interfaces in the left pane.

In the text field for Telephone Number, type #777. Type your phone number into the "Account Name" and "Password" text fields. Now, click the "Advanced..." button.

In the pane that displays, select "Generic" from the Vendor list box and "Dialup Device" from the "Model" list box. Make sure that the "Enable error correction and compression in modem" check box is checked. Hit Ok, and hit Apply when you are returned to the Connection Settings pane. You should now be able to hit Connect and connect to the Internet!

The ZTE MG880+

I've had many people write and ask about the ZTE MG 880+. The MG880+ is a "flip-flop" USB device. When first plugged in to a computer, it appears as a USB storage device, like a USB stick. The drivers for the modem are stored on the modem itself. Once the drivers are installed, they switch the device into being a modem.

I don't have an MG880+ to test with, so all the information below is based on my research and on correspondence with people who've written to me about the problem. Getting an MG880+ to work, unfortunately, sounds like it needs some technical and command-line know-how.

The MG880+ has two product IDs. The product ID for the USB storage part is 0xfff5; the product ID for the modem part is 0xfffe. Using kextload to load the osx-pl2303 driver when the modem is in USB storage mode has no effect; the driver doesn't detect the modem because there's nothing that matches the USB device ID 0x19d2/0xfffe.

The usb_modeswitch utility from Josua Dietze is a command-line tool to get flip-flop devices to work with Unix-y operating systems. Most manufacturers don't bother releasing drivers for OS X and Linux, so most times the "modem" is stuck being a USB drive with drivers for Windows.

usb_modeswitch uses the libusb library to control usb devices. You can install libusb with darwinports, or there are pre-built binaries and the SDK here: http://www.ellert.se/twain-sane/. If you're going to compile usb_modeswitch yourself, you'll need to install the SDK. If not, you just need the binary package. Make sure to choose the right one for your platform.

Here is a pre-built usb_modeswitch. I built this on leopard against libusb 0.1.4, so it may not work with Tiger or Snow Leopard. It has the configuration file as well. To test it, you'll need to open a Terminal window, go to /Downloads/usb_modeswitch-1.0.5 (assuming that all your downloads to to the Downloads folder), and type:

sudo ./usb_modeswitch -c usb_modeswitch.conf

If all goes well, you should see a message indicating that the device has been switched to modem mode. After this, running kextload as per the instructions above should get the device working as a modem. Remember, I haven't tried this because I don't have an MG880+, but someone (Google Translate link, original article is in Malay) seems to have gotten it to work with usb_modeswitch on Linux.

Acknowledgements:

  • BJA Electronics in Amsterdam, creators of the pl2303 driver for OS X
  • Josua Dietze and all the contributors who created usb_modeswitch
  • Everyone who created and built libusb, and ported it to OS X.

Good luck, and if this works, I'd be happy to hear from you.

Hari Selvarajan

hari (dot) selvarajan (@) gmail (dot) com