The iPhone 3G doesn't come with any way to tether with a computer by default - a gaping huge missing feature since one of the best uses for a mobile 3G connection is using that to go online with a notebook computer. Fortunately, you can add a tethering function to your iPhone yourself by jailbreaking it, here's how:
- Jailbreak your iPhone 3G.
Jailbreaking may sound dangerous and it actually WAS a dangerous thing to do before the iPhone 3G came out - but it's no longer a dangerous and complicated process. Just update your iPhone 3G to the newest firmware (v2.2 as of today) and use QuickPwn to jailbreak it. Jailbreaking with QuickPwn is a painless process. If you fail (typically by missing the button combo for entering DFU mode), you just try again. I haven't seen anyone bricking their iPhone 3G by using QuickPwn. - Install PDAnet 1.33 and MobileTerminal.
You can find PDAnet from Cydia - one of those new icons installed after jailbreaking. Now, the newest version of PDAnet (v1.40 as of today) has turned into trial software and will become restricted after a certain number of days so don't download that. Instead, you should first add a source repository with PDAnet v1.33 inside - go to Manage->Sources->Edit and add the repository http://www.iphone.org.hk/apt/. Then, search for PDAnet v1.33 and install that.
PDAnet 1.33 has a bug though, which will occasionally (often?) require you to use a UNIX shell to fix. But iPhone doesn't come with a way to let you access its UNIX shell by default... so you'll need to download another app to do it. Search for "MobileTerminal" in Cydia, and install that as well. - Create an Ad-hoc Wifi network in your notebook.
PDAnet works by acting as a software router (or more precisely, NAT gateway) between the 3G network and your notebook, so obviously your notebook will need a way to connect to the iPhone via a private IP network. How can that be done? You do that by creating an Ad-hoc Wifi network from your notebook, and then instructing your iPhone to join your notebook's Wifi network.
It can sometimes happen that both your notebook and your iPhone are seemingly in the same Ad-hoc network but they're actually not. To confirm your iPhone and your notebook are really connected, you can either try to ping your notebook from your iPhone's Terminal or do it the other way round. You should be getting healthy responses for your pings. Otherwise, disconnect both devices from the ad-hoc network and try again. - Fire up PDAnet.
If your notebook and your iPhone 3G are connected via an ad-hoc Wifi network, and your iPhone 3G has 3G connectivity, firing up PDAnet should give you the screen above and your notebook should be able to go on the Internet.
A common problem here is getting a "PDAnet is all setup and ready to go" message instead but no Internet connectivity at your notebook. It happens because your notebook's IP and MAC addresses, for some reason (e.g. you just pinged your iPhone? Bonjour on your MacBook?), is already on your iPhone's ARP table, which screws up PDAnet's detection logic. You'll need to use the mobile terminal to fix that in your iPhone. Quit PDAnet and fire up mobile terminal, and type the following commands:$ su -
Go back to PDAnet after entering the two commands above, and you should see the router screen pronto. If it still doesn't work, reboot your iPhone and try again.
<Enter your root password here, default is 'alpine' if you haven't changed that.>
# arp -ad
If you have an unlimited 3G plan then you may be thinking you now have unlimited mobile Internet access. But there are some caveats that prevent you from doing so:
- Battery life. Even with your iPhone 3G plugged into a power source, PDAnet will still manage to drain the battery slowly. It takes quite a few hours but your iPhone will turn itself off eventually. So the Internet access you can get from tethering isn't really unlimited.
- Latency and bandwidth. Latency on a 3G connection, in my experience, is much worse than a real Wifi connection. Ping times to local sites can easily go up to 400ms or more depending on location and connection quality. Also, most 3G carriers won't give you full HSDPA speeds. The best download speed I've seen from my 3HK carrier was barely over 100KB/s - that's less than 1Mbps, a far cry from the advertised 3.6Mbps and the theoretical maximum of 14.4Mbps for HSDPA.
- No incoming connections. PDAnet doesn't seem to have any port mapping, DMZ or uPnP features. Even if it has - your 3G carrier is most probably giving you NAT-ed IP addresses anyway. So even if you can chat with other people via MSN Messenger in your notebook, you'll find great difficulty in sending and receiving files. And if you're thinking about running a mobile web server, you'll have to find some way of getting around that limitation (e.g. by using a VPN and doing port mapping over the VPN).
0 comments:
Post a Comment