Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: iPhone and PdaNet

  1. #1
    Join Date
    Oct 2008
    Beans
    2

    iPhone and PdaNet

    For those with an iPhone who want to utilize it as a tethered modem June Fabrics has an app for jail broken iPhones.

    The application is a wireless router with DHCP support so you don't have to use static addresses or proxy servers.

    The instructions only cover Windows and Mac, but it is possible to make pdanet work with Ubuntu, Hardy in my case. Basically, the steps are:
    Configure an ad-hoc wireless network
    Connect the iPhone to the wireless network
    Start pdanet, ensure that the router functionality is on
    Use acquire an IP Address from pdanet

    Since network manager does not support ad-hoc networks you have to configure the wireless device via the command line (the script I use is posted below).

    At first things seemed to be going well. Pdanet informed me that my laptop was connected and had acquired an IP address. But I could not browse the web.. I could ping the iPhone's wireless IP address and the phones IP address on AT&T's network, so routing appeared to be working. I could ssh by IP to a remote host, but DNS queries always timed out with dig reporting that no servers could be reached. DHCP updated my /etc/resolve.conf as expected but nothing could resolve.

    I tried pdanet with a Windows system and a Mac, and both worked without a hitch. So I figured there must be an issue with my Ubuntu configuration.

    It seems I had to “prime the pump.”

    Once I was assigned my IP address, I checked /etc/resolv.conf:
    search localdomain
    nameserver 68.28.114.91


    Then executed dig @68.28.114.91 www.google.com

    It worked.. and from then on I could resolve normally. Any ideas why this could be the case?

    This is the script I use to start using pdanet:
    #!/bin/sh
    # pdanet_on
    sudo /etc/dbus-1/event.d/25NetworkManager stop
    sudo ifconfig eth1 down
    sudo iwconfig eth1 mode ad-hoc
    sudo iwconfig eth1 channel 4
    sudo iwconfig eth1 essid 'iPhone 3G'
    sudo iwconfig eth1 key somekey
    sudo ifconfig eth1 up
    echo Press Enter when iPhone is connected to Network and PDANet is started
    read foo
    sudo dhclient eth1
    DNS=`grep nameserver /etc/resolv.conf | head -1 | awk '{print $2}'`
    dig @$DNS www.google.com


    When I am done with pdanet I run this script (Network Manager does not put your wireless back into “managed” state):
    #!/bin/sh
    # pdanet_off
    sudo ifconfig eth1 down
    sudo iwconfig eth1 mode managed
    sudo ifconfig eth1 up
    sudo /etc/dbus-1/event.d/25NetworkManager start


    I hope this helps anyone looking to use pdanet with Ubuntu.

    For those interested, I have an Windows XP SP3 VMWare image running in Player 2.5.0 build-118166 and it sees the iPhone with no problem. I was able to jailbreak the phone using the VM. My music lives on Ubuntu so I use VMWare's shared folder capability and iTunes Library Updater to keep iTunes current.

  2. #2
    Join Date
    Aug 2007
    Location
    Tbilisi, Georgia
    Beans
    7
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: iPhone and PdaNet

    Do you know how to do this trick with Ibex???

    I guess you can create ah-hock network from GUI in Ibex but it never connects. I can see the connection from PDA NET but connection is not seen in Ubuntu I can only see it's trying to connect

    As I guess there is no /etc/dbus-1/event.d/25NetworkManager
    in Ibex so I'm kind of confused

  3. #3
    Join Date
    Aug 2008
    Beans
    3

    Re: iPhone and PdaNet

    I'm having mixed results in Intrepid Ibex.

    Since there is no /etc/dbus-1/event.d/25NetworkManager, usually i just killall NetworkManager and then goes with the oters commands. Sometimes the connection with pdanet goes ok, but most of the times I just keep upping and downing interface and sometimes I get the right way.... problem is, I don't know which is the correct and easiest way, assuming the gui way is broken.

    PLEASE HELP!

  4. #4
    Join Date
    Oct 2006
    Location
    Seattle, WA
    Beans
    59
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: iPhone and PdaNet

    In Ibex I was having trouble getting the laptop to connect to the ad-hoc network. So I had to change the ipv4 settings to DHCP
    • right click on the network manger and choose edit connections
    • On the wireless tab choose the ad-hoc network and select edit
    • On the IPv4 Settings tab change the method dropdown to "Automatic (DHCP)"


    I imagine this was because Ibex was not getting any IP address from the network, so if you assigned a static IP using "Manual" rather then "Automatic (DHCP)" you would have success as well.

    This worked for me.

  5. #5
    Join Date
    Aug 2006
    Beans
    38

    Re: iPhone and PdaNet

    I'm struggling with the ad-hoc network settings on my Dell XPS 1330. I'm trying to get my jailbroken iPhone 3G connected.

    I took the scripts above and turned them into a single script that can be called with the options "start" or "stop" to start or stop the ad-hoc network... I'll attach it to the end of this post.
    The problem is that it still doesn't work right.

    My Network Manager stops as requested, and the ifconfig and iwconfig commands all complete without any complaints. But when it gets to the "connect the iPhone to the [ad-hoc] network" setting, my iPhone can't find any new networks.

    Any help appreciated...

    Here's my script (~/pdanet):

    Code:
    #!/bin/sh -e
    # script to start/stop wireless in ad-hoc mode for iPhone
    
    case "$1" in
        start)
    	sudo /etc/init.d/NetworkManager stop
    	sudo ifconfig eth1 down
    	sudo iwconfig eth1 mode ad-hoc
    	sudo iwconfig eth1 channel 4
    	sudo iwconfig eth1 essid 'iPhone 3G'
    #	sudo iwconfig eth1 key somekey
    	sudo ifconfig eth1 up
    	echo Press Enter when iPhone is connected to Network and PDANet is started
    	read foo
    	sudo dhclient eth1
    	DNS=`grep nameserver /etc/resolv.conf | head -1 | awk '{print $2}'`
    	dig @$DNS www.google.com
    	;;
        stop)
    	sudo ifconfig eth1 down
    	sudo iwconfig eth1 mode managed
    	sudo ifconfig eth1 up
    	sudo /etc/init.d/NetworkManager start
    	;;
        *)
    	echo "Usage: /etc/init.d/pdanet {start|stop}"
    	exit 1
    	;;
    esac
    
    exit 0

  6. #6
    Join Date
    Nov 2008
    Beans
    1

    Re: iPhone and PdaNet

    Quote Originally Posted by SnowflakeRV7 View Post
    I'm struggling with the ad-hoc network settings on my Dell XPS 1330. I'm trying to get my jailbroken iPhone 3G connected.
    Hi mate, I just recently got my M1330 (with 8.10 64bit) connecting to iPhone with PdaNet.

    My problem was that the M1330 wouldn't connect to any ad-hoc networks.
    M1330's have the Intel 3945ABG wireless adapter, so I switched to the old ipw3945 driver (instead of iwl3945) and now connect to ad-hoc networks fine.

    However, now with ipw3945 I have terrible performance with encrypted networks... but I'm treating that as a new issue hahah.

    Your situation sounds different, since my m1330 would still create the ad-hoc network, visible to the iPhone, and would these hang when trying to actually establish an IP on the network.

    Sounds like you're not even able to create the ad-hoc network.
    What do you get from iwevent while your 'up' script runs?

    Ps - this is a good post regarding the iwl3945 driver: http://www.ubuntugeek.com/using-ipw3...-in-hardy.html

  7. #7
    Join Date
    May 2006
    Beans
    20

    Re: iPhone and PdaNet

    Just as a warning, the latest kernel update broke this method of connecting to PdaNet on the iPhone 3G. I switched back to kernel 2.6.24-22 and everything works as expected. Tomorrow I'll post the error the script gives, but essentially it's not creating an Ad Hoc network, as one never shows up for the iPhone to connect to. I'm using a Dell XPS M1530 with the Intel 3945ABG Wireless adapter. I'll post more once I've delved into the problem a bit more.

  8. #8
    Join Date
    Oct 2007
    Location
    Athens, GA
    Beans
    3
    Distro
    Xubuntu 7.10 Gutsy Gibbon

    Post Success for Me!

    Hi all,

    Just figured it might help others to state I just had success connecting the ad-hoc network.

    My hardware is:

    iPhone 3G, jailbroken, firmware 2.2 (modified by pwnage tool)
    HP Pavilion dv4 laptop with Broadcom BCM4312 Wireless

    Software is:
    Ubuntu 8.10

    Things I did:
    Used killall NetworkManager
    replaced the essid and key entries with network name and key of my choosing (probably obvious to most of you)

    I still got an error involving SET (forgot exactly what after closing terminal) but I was able to ignore it and complete the rest of the script.

    Good luck!

  9. #9
    Join Date
    May 2007
    Beans
    15

    Re: iPhone and PdaNet

    Quote Originally Posted by marcog42 View Post
    Just as a warning, the latest kernel update broke this method of connecting to PdaNet on the iPhone 3G. I switched back to kernel 2.6.24-22 and everything works as expected. Tomorrow I'll post the error the script gives, but essentially it's not creating an Ad Hoc network, as one never shows up for the iPhone to connect to. I'm using a Dell XPS M1530 with the Intel 3945ABG Wireless adapter. I'll post more once I've delved into the problem a bit more.

    I have to second this experience of PdaNet failing on 2.6.24-23. It works fine on on 2.6.24-22. I've got a Dell Latitude D420 using the same Intel 3945ABG Wireless Adapter. I posted the same script as SnowflakeRV7, which I slightly modified for my Dell hardware.

    When I run this script, I get 2 seconds of connection on PdaNet and then it disconnects. Not sure what's happening.

    If anyone can figure it out I'd be very appreciative.

    Code:
    #!/bin/sh -e
    # script to start/stop wireless in ad-hoc mode for iPhone
    
    case "$1" in
        start)
    #	sudo /etc/init.d/NetworkManager stop
    	sudo /etc/dbus-1/event.d/25NetworkManager stop
    	sudo ifconfig wlan0 down
    	sudo iwconfig wlan0 mode ad-hoc
    	sudo iwconfig wlan0 channel 4
    	sudo iwconfig wlan0 essid 'iphone3g'
    #	sudo iwconfig wlan0 key abadbadbad
    	sudo ifconfig wlan0 up
    	echo Press Enter when iPhone is connected to Network and PDANet is started
    	read foo
    	sudo dhclient wlan0
    	DNS=`grep nameserver /etc/resolv.conf | head -1 | awk '{print $2}'`
    	echo $DNS
    	dig @$DNS www.google.com
    	;;
        stop)
    	sudo ifconfig wlan0 down
    	sudo iwconfig wlan0 mode managed
    	sudo ifconfig wlan0 up
    	sudo /etc/dbus-1/event.d/25NetworkManager start
    	;;
        *)
    	echo "Usage: /etc/init.d/pdanet {start|stop}"
    	exit 1
    	;;
    esac
    
    exit 0

  10. #10
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: iPhone and PdaNet

    Quote Originally Posted by wonderfullyrich View Post
    I have to second this experience of PdaNet failing on 2.6.24-23. It works fine on on 2.6.24-22. I've got a Dell Latitude D420 using the same Intel 3945ABG Wireless Adapter. I posted the same script as SnowflakeRV7, which I slightly modified for my Dell hardware.
    I am also having difficulty getting it to work. I am running a dell xps m1530 with a Broadcom BCM4312 on 2.4.24-23.

    Just a FYI, I believe the correct syntax is:
    Code:
    iwconfig whatever mode Ad-Hoc
    At least on my box, the Ad-Hoc is case sensitive. It also seems iwconfig is particularly finicky with my broadcom chipset. It fails if I do not stack all of the iwconfig arguments together, for example this works for me:

    Code:
    iwconfig eth1 essid mynet channel 4 key aaaaaaaaaa mode Ad-Hoc
    But this doesn't:

    Code:
    iwconfig eth1 essid mynet
    iwconfig eth1 channel 4
    iwconfig key aaaaaaaaaa
    iwconfig eth1 mode Ad-Hoc
    Go figure

    PDANet will work perfectly for me if I do not use encryption:

    Code:
    iwconfig eth1 essid mynet enc off mode Ad-Hoc
    However, if I try with encryption, pdanet never sees or responds to my dhcp requests. I know encryption is working, I can statically assign ip addresses to the connection on both sides and ssh back and forth. It just seems pdanet does not like something about wep encryption and dhcp in my case.

    I have contacted pdanet (I registered my copy) and they are of no help whatsoever.

    Has anyone had any luck getting it to work, with encryption?

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •