iOS 4.0 Official Tethering

Bottswana

macrumors newbie
Original poster
Aug 7, 2010
1
0
After spending much time reading around various places on the iPhone inbuilt tethering, and the problems people seem to be having between carriers with the current patches, I have finally been able to get it going on my 3GS with O2-UK (My local carrier).

Here is the information I have been able to gather from my extensive 2 hour attempt to enable tethering.

The file, /private/var/mobile/Library/Preferences/com.apple.MobileInternetSharing.plist, stores the current state of tethering. Changing the value in this file will enable the tethering menu, but as some users have seen, this does not actually enable tethering. Instead, when attempting to connect via Bluetooth, the device will simply not connect to anything, and if connecting via USB, the value magically reverts, thus displaying "Please visit xxx to enable tethering", or in some cases, the option completely vanishes.

The states mean the following.
1020 - No tethering
1021 - Purchase tethering bolt-on
1022 - Tethering enabled but switched off
1023 - Tethering enabled and switched on

To enable tethering on my 3GS, I had to do the following.

1) Patch commcenter as per this thread
Note: This patch will only work if you are on 4.0.1
As yet, im not sure if simply editing the plist will make it's signature no-longer valid. If someone wants to try without patching then please be my guest ;)
https://forums.macrumors.com/threads/984943/

1. Jailbreak your iPhone on the jailbreak website.
2. Open Cydia and install OpenSSH. (Follow the instructions to change your root password!)
3. Download wortel's Patch for Commcenter 4.0.1 2G/3GS/4G 1.1-3 (Link below)
4. Use Cyberduck or another SFTP client to log into your iPhone.
5. In the Directory /System/Library/Frameworks/CoreTelephony.framework/Support, Back up your CommCenter to your PC/Mac in case things go sour.
6. Browse to /var/tmp and upload the file ccp401_1.1-3_wortel.deb
7. SSH into your iPhone and run the patch by typing:
dpkg -i /var/tmp/ccp401_1.1-3_wortel.deb
8. Reboot your phone

Patch: http://www.multiupload.com/E5Q62T1K2R
(Credit to original poster)
After this, I needed to manually edit my carrier file. This is where things got complicated for O2. Unlike the above thread, it was not as easy as editing a few numbers.

After much trial and error, i noticed there was a whole APN just for tethering. You can tell because the apn was (modem.o2.co.uk), and the type mask only allowed for tethering.

To enable tethering, I deleted the whole apn for tethering, and changed the type mask for my standard data/vvm/mms to allow tethering. After reboot, tethering was enabled.

Step-by-step:

1. SSH into your phone with root access.

2. Navigate to /private/var/mobile/Library/Carrier Bundle.bundle
(It's a symlink and should redirect you to your primary carrier bundle, in my case, I end up at /private/var/mobile/Library/Carrier Bundles/O2_UK.bundle)

3. Copy the carrier.plist to your Desktop.

4. If the plist is encoded in Binary (Ie, you are unable to read the file when opened in notepad/wordpad/textedit) use the online converter located here

5. Open the converted plist (Normally named xml.plist) in your favourite text editor, and navigate down to the apns key.

6. Identify the tether-only connection and delete it, including the <dict> and </dict> tags before and after it. (Tether only type-mask is 48)

Code:
Before:
	<array>
		<dict>
			<key>apn</key>
			<string>idata.o2.co.uk</string>
			<key>password</key>
			<string>password</string>
			<key>signature</key>
			<data>(removed)</data>
			<key>type-mask</key>
			<integer>7</integer>
			<key>username</key>
			<string>vertigo</string>
		</dict>
 (This one is the tether one. You can see as the apn string is different, and the type-mask allows for only tether data.)
		<dict>
			<key>apn</key>
			<string>modem.o2.co.uk</string>
			<key>password</key>
			<string>password</string>
			<key>signature</key>
			<data>(removed)</data>
			<key>type-mask</key>
			<integer>48</integer>
			<key>username</key>
			<string>vertigo</string>
		</dict>
		<dict>
			<key>apn</key>
			<string>idata.o2.co.uk</string>
			<key>password</key>
			<string>password</string>
			<key>signature</key>
			<data>(removed)</data>
			<key>type-mask</key>
			<integer>6</integer>
			<key>username</key>
			<string>vertigo</string>
		</dict>
	</array>

After:
	<array>
		<dict>
			<key>apn</key>
			<string>idata.o2.co.uk</string>
			<key>password</key>
			<string>password</string>
			<key>signature</key>
			<data>(removed)</data>
			<key>type-mask</key>
			<integer>7</integer>
			<key>username</key>
			<string>vertigo</string>
		</dict>
		<dict>
			<key>apn</key>
			<string>idata.o2.co.uk</string>
			<key>password</key>
			<string>password</string>
			<key>signature</key>
			<data></data>
			<key>type-mask</key>
			<integer>6</integer>
			<key>username</key>
			<string>vertigo</string>
		</dict>
	</array>
7. Now you need to change the type-mask of your primary connection to allow for tethering. This requires a detective mind. In my case, the 7 indicated that the first apn is my data connection. The second is my mms connection. (See http://img171.imageshack.us/img171/9234/typemask.png)

To work out what you need to change and what to change it to, look for the apn that is used for data. This will be a 1,3,5 or 7. Then change the number so it allows for exactly the same services + tethering.
To do this, add 48 to the number. See below for examples.

Original -> What to change to.

1 -> 49
3 -> 51
5 -> 53
7 -> 55

8. Save the plist and upload it back to your device. (If you used the converter, you will need to rename it from XML.plist to carrier.plist)

9. Reboot your device.
(I did not need to reset network settings, but if it dosen't work first time then do so. Settings > General > Reset > Reset Network Settings)

As a final point. If the carrier file does not exist in /private/var/mobile/Library then use the one in /System/Library/Carrier Bundles. The ones in /private/var take presidence over the bundles in /System/Library.
If you think that you are editing the wrong plist, edit the key TetheringURL to something like google.co.uk, upload, reboot and go into Settings > General > Network. If you click on "set up internet tethering" and it attempts to direct you to "google.co.uk" then you are editing the right plist!

(Also, I removed the long keys from my carrier file in the quote above. 1, because they are long and in the way, and 2, to discourage copying instead of manual editing. It seems that using someone else's carrier.plist can result in it not working!)

Screenshots:



 

Scarlet Fever

macrumors 68040
Jul 22, 2005
3,262
0
Bookshop!
IIRC, all the TelCos here in Australia allow tethering for free. I've been tethering for about a year, with no additional costs on my contract :D
 

retroneo

macrumors 6502a
Apr 22, 2005
719
89
IIRC, all the TelCos here in Australia allow tethering for free. I've been tethering for about a year, with no additional costs on my contract :D
Vodafone, Three and Virgin have always had it free.
Telstra have had it free for a while.
Optus just made it free last month.
 

crawfish963

macrumors 6502a
Apr 16, 2010
583
436
Texas
This is primarily aimed at AT&T customers who have been raked over the coals and asked to pay $50+ for tethering and data. Cool hack, I wish I had seen it before I bought mywi.
 

crawfish963

macrumors 6502a
Apr 16, 2010
583
436
Texas
This makes me wonder if AT&T will somehow know that official tethering has been enabled on the phone and see that you're not on a tethering program.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.