Tether iPhone 3G to AA1 - WORKING

Discussion in 'Networking' started by cheops, Oct 10, 2008.

  1. cheops

    cheops

    Joined:
    Oct 10, 2008
    Messages:
    12
    Likes Received:
    0
    How to tether the iPhone 3G to the AA1 for 3G web access

    This is working nicely for me at the moment.

    YOU WILL NEED A JAILBROKEN IPHONE WITH '3PROXY' AND 'MOBILETERMINAL' INSTALLED VIA 'CYDIA' FOR ANY OF THIS TO WORK.

    Part one - On the AA1 (in a terminal):

    1. type 'su' and respond with the password

    2. enter the following one line at a time hitting the [enter] key in between.

    Code:
    /etc/rc.d/init.d/NetworkManager stop
    ifconfig ath0 down
    wlanconfig ath0 destroy
    wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
    iwconfig ath0 essid "netshare"
    ifconfig ath0 up
    ifconfig ath0 10.3.3.1
    Part two - On the iPhone:

    1. Switch on both WiFi and 3G!

    2. Open Safari and navigate to any web page you like - it's just to verify that your 3G is connecting to the web properly.

    3. open MobileTerminal and type in the word 'SOCKS' and hit return. That fires up the 3proxy server. Press the home key to get back to the iphone desktop.

    4. open [Settings]>[WiFi] and select the [>] at the righthand side of the 'netshare' network.

    5. select [Static] and set [IP Address = 10.3.3.2] and [Subnet Mask = 255.255.255.0]. Leave the other fields blank.

    6. Go back one screen to [WiFi Settings] and tap on the 'netshare' network - and it should connect OK

    Part 3 - In Firefox on your AA1:

    1. enter 'about:config' in the address bar

    2. search for 'socks'

    3. change 'network.proxy.socks_remote_dns' to TRUE by double-clicking on it (you should only have to do this once)

    4. Go to [Edit]>[Preferences]>[Network]>[Settings] and select 'Manual Proxy Configuration'

    5. Set the following:-

    Socks Host: 10.3.3.2
    Port: 1080
    SOCKS v5

    Leave everything else unchanged and click [OK] and close back to the main FF window.

    6. Select [Tools]>[Clear Private Data] and clear the data to empty the FF cache (not always necessary - but advisable)

    7. Restart Firefox (not always necessary - but advisable)

    8. Surf :D

    If it stops working at some later point then repeat Part 3 Step 3 as the setting may have reverted back to the default of FALSE. Install something like the FoxyProxy extension for single click switching between proxy settings.

    The following short scripts make the process less inconvenient - don't forget to make them executable by right-clicking in File Manager and selecting [properties]>[permissions] and ticking 'Allow this file to run as a program'

    Also - these scripts WILL NOT WORK USING 'SUDO' - you must invoke them using the superuser account by first keying 'su' into the terminal and providing the password to open a superuser terminal session.

    ipon.sh

    Code:
    #!/bin/sh
    #
    ## Script to make ad-hoc wifi connection to iPhone
    #
    ## Usage (AS ROOT): ./ipon.sh
    
    /etc/rc.d/init.d/NetworkManager stop
    
    ifconfig ath0 down
    
    wlanconfig ath0 destroy
    
    wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
    
    iwconfig ath0 essid "netshare"
    
    ifconfig ath0 up
    
    ifconfig ath0 10.3.3.1
    ipoff.sh

    Code:
    #!/bin/sh
    #
    ## Script to take down ad-hoc wifi connection to iPhone
    #
    ## Usage (AS ROOT): ./ipoff.sh
     
    ifconfig ath0 down
    
    wlanconfig ath0 destroy
    
    wlanconfig ath0 create wlandev wifi0 wlanmode managed
    
    ifconfig ath0 up
    
    /etc/rc.d/init.d/NetworkManager start
    HTH :)
     
    cheops, Oct 10, 2008
    #1
  2. cheops

    le12epilote

    Joined:
    Oct 17, 2008
    Messages:
    1
    Likes Received:
    0
    Thanks, it works really well.

    Now I'm just wondering : is there a way to create an encrypted wifi network with a password ?

    If I tether my connection in the train, I don't want anybody to be able to see what I'm doing and to use my precious bandwidth.
     
    le12epilote, Oct 27, 2008
    #2
  3. cheops

    cheops

    Joined:
    Oct 10, 2008
    Messages:
    12
    Likes Received:
    0
    Just set the ad-hoc network up with WEP/WPA at the PC end and you should be presented with the key-entry dialogue box when you connect from the iPhone...

    If this does not work for you then can you report back here?
     
    cheops, Oct 27, 2008
    #3
  4. cheops

    dirk

    Joined:
    Aug 25, 2008
    Messages:
    63
    Likes Received:
    0
    I just had a quick go at this and didnt get it working, I'm running Ubuntu on the AAO though so that may be the problem, also, I find the method too cumbersome.

    I see that this involves creating an adhoc connection on the laptop and then connecting the phone to it. Is it not possible to make the phone into an access point, so the laptop see's the phone's SSID and connects to it? Then it'd juts be a case of starting the app on the iPhone that performs the 'magic' and pointing the AAO to the new wireless network that just appeared. No settings would need to be changed on the laptop that way.

    There will be a valid reason why this cant be done, but I dont know what it is, does anyone care to enlighten me?
     
    dirk, Oct 28, 2008
    #4
  5. cheops

    profilerat

    Joined:
    Oct 19, 2008
    Messages:
    3
    Likes Received:
    0
    i got the same result as dirk......i am running ubuntu on my AAO as well.....created an ad-hoc network.....connected to it with my iphone and followed all the steps.....in addition, i confirmed the iphone is connected through pinging it......everytime i try to open a website in firefox it asks me to save as Bin file....its really weird.....but no internet connection.....i guess we're missing something....anyone with a bright idea?
     
    profilerat, Nov 8, 2008
    #5
  6. cheops

    ctguy

    Joined:
    Oct 17, 2008
    Messages:
    1
    Likes Received:
    0
    ctguy, Nov 8, 2008
    #6
  7. cheops

    profilerat

    Joined:
    Oct 19, 2008
    Messages:
    3
    Likes Received:
    0
    ok guys...heres the profilerat method to tether your iphone 2g/3g with your AAO running Ubuntu.

    for simplicity and smootheness you should download WICD and use it instead of network manager.
    on your iphone, download pdanet from cydia....if you cant find it then PM me and ill send you the deb and instructions on how to install it on your iphone.

    after everything is installed : open wicd click on the arrow pointing downwards and create a new adhoc network.

    lets name it pdanet for now

    empty any entry in IP address and change the channel to 11(seems to work better this way)

    then click ok

    on your iphone goto settings wifi and join the network you just made(pdanet)

    then open pdanet and make sure network router is switched on.

    wait till it confirms your internet connection then itll say something like go back to your wifi settings and join the network....IGNORE IT!!!

    on your AAO refresh the network list on WICD and you will see pdanet....Connect to it......

    immediately you will see that pdanet on your iphone says your connected!!!!

    open your web browser and "BOOM, youre online"!!!

    enjoy!

    lemme know if you have any issues with this guide....maybe ill be able to help you out.
     
    profilerat, Nov 18, 2008
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.