iOS 4.0 Official Tethering

Discussion in 'Jailbreaks and iOS Hacks' started by Bottswana, Aug 7, 2010.

  1. Bottswana macrumors newbie

    Joined:
    Aug 7, 2010
    #1
    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 ;)
    http://forums.macrumors.com/showthread.php?t=984943

    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:

    [​IMG]
    [​IMG]
    [​IMG]
     
  2. Mystikal macrumors 68020

    Mystikal

    Joined:
    Oct 4, 2007
    Location:
    Irvine, CA
    #3
  3. illutionz macrumors 65816

    Joined:
    Oct 2, 2007
    Location:
    Rhode Island
    #4
    huh?

    I understand he get the stuff from the other thread. I figure we may be able to append this to that other thread for O2 users instead of creating 2 different threads.
     
  4. guicane macrumors regular

    guicane

    Joined:
    Jul 11, 2008
    Location:
    London, UK
    #5
    Alternatively get a contract with 3 and you get tethering "free". :)
     
  5. seanwebb68 macrumors 6502

    Joined:
    Jul 27, 2010
    #6
    Thanks that worked great after resetting my network settings
     
  6. Scarlet Fever macrumors 68040

    Scarlet Fever

    Joined:
    Jul 22, 2005
    Location:
    Bookshop!
    #7
    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
     
  7. retroneo macrumors 6502a

    Joined:
    Apr 22, 2005
    #8
    Vodafone, Three and Virgin have always had it free.
    Telstra have had it free for a while.
    Optus just made it free last month.
     
  8. crawfish963 macrumors 6502

    crawfish963

    Joined:
    Apr 16, 2010
    Location:
    Texas
    #9
    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.
     
  9. Maverick1337 macrumors 65816

    Maverick1337

    Joined:
    Nov 4, 2008
    #10
    That was the way I did it. It looks and seems a lot easier and quicker to do it the CommCenter patch way in the other thread. However, good job OP!
     
  10. crawfish963 macrumors 6502

    crawfish963

    Joined:
    Apr 16, 2010
    Location:
    Texas
    #11
    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.
     

Share This Page