Tethering on AT&T with my BlackBerry BoldC

Tomorrow, I will be needing Internet connectivity at a cafe where there is none: so I decided to switch my BlackBerry data plan from unlimited to 5GB limit with tethering.

Once I made the switch on the at&t site, I searched the web and found the following instructions that seemed to suit my needs:
http://forums.crackberry.com/f83/tethering-bold-9000-mac-over-bluetooth-4-6-0-247-a-180975/
There were the worrisome posts about people failing to connect, but I forged ahead, and whaddya know, I was getting the same error message that everyone else was getting.

I did the usual debugging stuff, such as turning on verbose logging, and searching for the error that I was encountering, namely:

Mon Oct 12 03:00:55 2009 : rcvd [IPCP ConfNak id=0xf ]
Mon Oct 12 03:00:55 2009 : IPCP: Maximum Config-Requests exceeded
Mon Oct 12 03:00:55 2009 : sent [LCP TermReq id=0x3 "No network protocols running"]
Mon Oct 12 03:00:55 2009 : rcvd [LCP TermAck id=0x3]
Mon Oct 12 03:00:55 2009 : Connection terminated.

Unfortunately, all I found were complaints about the error above, and no solutions.

Then, I found this post:
http://blogs.itmedia.co.jp/komata/2009/02/blackberry-bo-4.html

It’s about not being able to connect in Japan, but what the heck, I gave it a shot, and it worked! Here are the steps I took:

  1. Copied /usr/sbin/pppd to my home folder and created a backup copy just in case:
    cp /usr/sbin/pppd ~
    sudo cp /usr/sbin/pppd /usr/sbin/pppd.bak
  2. chown-ed and chmod-ed the local copy so I can write to it:
    chown kamiya:staff pppd
    chmod u+w pppd
  3. Used HexEdit to change the hard-coded DEFMAXREQLOOPS (an Apple specific change in pppd):
    (in the post above, Mr. Kokubo changes the 0×0f000000 at offset 0xa891, but that is not where I found mine, even though our versions seem to be the same, namely  pppd version 2.4.2 with file size 535472)
    Changed 0×0f000000 at offset 0×0000A889 to 0xffff0000
  4. Copied local copy to /usr/sbin/
    sudo cp pppd /usr/sbin

Now I can connect without a problem. According to Mr. Kokubo, it seems that the pppd servers are taking a long time allocating an IP to the device, and the fix above allows pppd to  wait longer than the default 15 loops.

Please note that I do not use pppd for other purposes on my machine (I use OpenVPN), so please make sure that you have the backup copy of pppd handy just in case you need to go back to the original version.

I hope this “bug” is fixed in some later version of OS X. Hopefully this will help someone with connection problems out there.

P.S. I found a similar but different track to the same problem in the post below:
http://www.setera.org/projects/blackberry-bold-pppd-replacement/