Tuesday, May 31, 2011

PdaNet Bluetooth DUN setup for tethering a Mac

I just found out that PdaNet, a popular Android application for tethering without root privileges, is free and with no usage restrictions for anyone outside of the US and Canada! Previously, the free version wouldn't allow SSL connections, and the non-free version was $30US, which is too expensive for me.
PdaNet is completely free for users outside of US and Canada. The free/trial edition already contains all the features and will not expire. Please install "PdaNet Free Edition" directly from Android Market.
And the new version "now allows you to hide tether usage," according to the PdaNet site, but this requires use of their PC client for connecting, and this feature is only built-in to the windows version.

[Speaking of Windows, the whole reason I am making this post is that I gave up trying to find a solution for rooting the Docomo Xperia (SO-01B) X10 Android 2.1 Eclair (2.1-update1 build 2.0.1.B.0.19) that doesn't require windows. (I tried running the flashtool utility in wine, but it couldn't find the dependencies like JDK and ADB etc.)]

So here's what I did to connect a Mac to a Sony Ericsson Xperia X10 running Android 2.1 using Bluetooth DUN. I prefer using what is natively included with my OS, rather than install random software, especially when it is going to make changes to network interfaces, so I did not install the PdaNet client for Mac. This means that I do not have the option for USB tethering, only bluetooth DUN.

Disclaimer: Tethering may be in violation of your mobile carrier's terms of service. Users of capped data plans should be aware that a computer generally consumes more bandwidth than a cell phone even when doing the same activities. In general bluetooth is flakey as all hell and this may or may not work for you at first or at all, or only after multiple attempts at pairing and rebooting, or it could just stop working one day for no apparent reason. You've been warned.

Connecting PdaNet to a Mac with bluetooth DUN

Mac version: 10.6.7
Android version: Docomo Xperia (SO-01B) X10 Android 2.1 Eclair (2.1-update1 build 2.0.1.B.0.19)

It goes without saying that a similar procedure should work with your favorite flavor of linux.

It took me several tries to get this to work, and in the end this is what I did, though this procedural order is not strictly required. Making things discoverable may or may not be required. Disconnecting does not work cleanly for me; I have to change the Network Location to get the disconnect script to stop running. (Sorry, couldn't be bothered to crop the background out of the screenshots.)
  • Install PdaNet Free Edition from the Android Market.
  • Turn on bluetooth on the Mac and the handset and make each discoverable. Do not yet pair them.
  • Start PdaNet and "Enable Bluetooth DUN"
  • If your handset doesn't have an internet connection through 3G or wireless, Bluetooth DUN won't start. Confirm that it has started

  • Open System Preferences, select the Network pane, and click the plus (+) to add a new network interface. Choose Bluetooth DUN and call it whatever you like. Hit Create.
  • Now looking at the newly created Bluetooth DUN interface, click "Set Up Bluetooth Device..." and follow the instructions for pairing, which I'll skip here. Confirm that when pairing is complete that "Access the Internet" or perhaps something similar depending on your OS version, is displayed as a service. If it is not, PdaNet will not work; reconfirm that PdaNet Bluetooth DUN is enabled and try to pair again. Reboot and turn stuff off and on if you think it will help. Light some incense. Whatever.

  • Return to the Network preferences window and click advanced to set up the Bluetooth DUN connection. I chose Sony Ericsson as the vendor (though I don't think this really matters) and "Generic Dialup" as the Model. Everything else I left as default.
  • In the main window, enter 777 (not 123 like I've seen elsewhere) for the telephone number, leaving Account Name and Password blank.
  • Hit Connect.
  • Enjoy.

Here is a snippet of my Mac's log where I connected to PdaNet Bluetooth DUN for about a minute before disconnecting. The disconnect script appeared to have hung, though I admittedly only let it go for 45 seconds before I unceremoniously changed to a different network location at exactly 18:27:00.

May 31 18:25:16 SBSnote ccl[3900]: Apple Base Script.ccl Version 3.3
May 31 18:25:16 SBSnote ccl[3900]: Initializing phone: AT&FE0V1
May 31 18:25:16 SBSnote ccl[3900]: Dialing: ATDT777
May 31 18:25:16 SBSnote ccl[3900]: Waiting for connection
May 31 18:25:16 SBSnote ccl[3900]: Connection established
May 31 18:25:20 SBSnote pppd[3897]: Connect: ppp0 <--> /dev/cu.Bluetooth-Modem
May 31 18:25:22 SBSnote pppd[3897]: local IP address x.x.x.x
May 31 18:25:22 SBSnote pppd[3897]: remote IP address x.x.x.x
May 31 18:25:22 SBSnote pppd[3897]: primary DNS address x.x.x.x
May 31 18:25:22 SBSnote pppd[3897]: secondary DNS address x.x.x.x
May 31 18:25:22 SBSnote configd[13]: network configuration changed.
May 31 18:25:22 SBSnote configd[13]: SCNCController: Connected.
May 31 18:25:22 SBSnote configd[13]: network configuration changed.
May 31 18:26:13 SBSnote configd[13]: network configuration changed.
May 31 18:26:13 SBSnote pppd[3897]: Connection terminated.
May 31 18:27:00 SBSnote ccl[3918]: CCLExit: -6008 (Script Canceled)
May 31 18:27:00 SBSnote pppd[3897]: disconnect script failed


  1. Hi, thanks for the help! Quick question though as I don't know terminal commands very well...when Bluetooth disconnects or the virtual DUN hangs, how do you terminate the connection or Chang its network location?? Please email me at moc.elgoog@yrreugj (address is backwards to avoid spam). Thanks in advance!

  2. Finally, I made it. Thank you for your great instructions!!

  3. The pdanet DUN connection worked on my BB storm; prior to this tutorial I kept getting denied access because verizon was intercepting it. Now it works fine and smooth for the most part. Thank you for providing this!!

  4. Instead of "Generic Dialup" as the Model, pick "GPRS (GSM/3G)" It is way much FASTER!!!! Since our phone networks are 3G!!!!

  5. The instructions were good to the dot... awesome ! I was able to get the connection working with my Macbook.. Thanks posting the guide.

  6. CAN YOU PLEASE post the instructions for the USB tethering with a Mac since it will be less demand on the BB battery & possibly faster connection via an USB cable. I have tried the USB option but PdaNet is unable to recongize the attached phone although the phone shows up in the folder list on Finder and recongnized by the BB Desktop software as well. I have tried uninstalling BB Desktop and unloading the RIMUSB.kext (something like it) but without success.

  7. Thank you for your clear instructions that actually WORKED! I've been trying to do this for ages with no luck. You are a lifesaver.