Page 1 of 20 12345611 ... LastLast
Results 1 to 20 of 388
  1. jsabo's Avatar
    Posts
    427 Posts
    Global Posts
    479 Global Posts
       #1  
    Given that we know how to install new services on the Linux side of the house, can't you set up the Pre as a proxy server for your other devices?

    1- Install proxy software on Pre

    2- Get Pre on EVDO network

    3- Set up WiFi router with no connection to the net

    4- Get Pre and laptop on wifi

    5- Tell proxy to use EVDO IP address for all outgoing connections

    6- Tell laptop to use Pre IP address as proxy server

    Not as convenient as using Bluetooth, but something, right?
  2. #2  
    Why proxy software? IPTables Masquerade? It's in the kernel.
    Palm IIIc -> Sony CLIÉ T650C -> Sony TJ-37 -> Palm TX -> Palm Centro -> Palm Pre Bell -> Palm Pre Plus Bell/Verizon Hybrid -> HP Veer -> HP Pre 3 NA -> BlackBerry Classic -> BlackBerry Priv

    It's a Late Goodbye, such a Late Goodbye.

    Need OEM Palm Pre parts? See here
  3. haydur's Avatar
    Posts
    447 Posts
    Global Posts
    452 Global Posts
    #3  
    I'm working on this too... We need to do something like the following in iptables:

    iptables -t nat -A POSTROUTING -o (evdo interface id) -j MASQUERADE
  4. #4  
    There's already been work on trying to connect via wifi (ad-hoc would be easier, cutting an entire router out of the picture...)
  5. #5  
    I used Ad-Hoc on my pre, and it WORKED!

    Heres what I did to make it work:
    Code:
    # Setting up ad-hoc network
    iwconfig eth0 mode Ad-Hoc
    iwconfig eth0 ap any
    iwconfig eth0 key off
    iwconfig eth0 essid PreNet
    iwconfig eth0 channel 6
    ifconfig eth0 192.168.1.1 up
    
    # Route traffic from wifi to evdo
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    
    # Stop routing through my local gateway, leaving only the Ev-Do route
    route del default gw 192.168.2.1
    
    while true; do
        # This value resets iteself to 0 periodically, anyone know why?
        echo 1 > /proc/sys/net/ipv4/ip_forward
        sleep 10
    done
    
    # There should be code to restore the old network here
    And the settings on the remote computer:
    IP: 192.168.1.5
    Gateway: 192.168.1.1
    DNS: 4.2.2.1

    Update: I can confirm I was going though the sprint network, and not another connection. I checked an ISP lookup website and it said Sprint
    Last edited by fish199902; 06/11/2009 at 05:03 PM. Reason: Comments
  6. #6  
    Er, would you mind putting those instructions in English for us slow people?? :-)))

    (should I be able to copy and past that code into someplace on my Pre?...)
  7. #7  
    Ok sorry, I guess I got a little excited

    The code above should be run on the Pre as root (see pre dev wiki: Enable Root Access) This will create an Ad-Hoc network.

    Then go to another computer and scan for the network named PreNet. Connect to it and set your internet settings on your computer to match those listed for IP, Gateway etc. DNS could be any DNS server but because the network is set up manually, I copied one from my home network.

    You should be able to browse on your computer at this point, although it seems the connection is lost somtimes at random. I'm not an expert at networking, so I dont understand what is causing this loss, and I know the script needs polishing, but its a start
    Last edited by fish199902; 06/11/2009 at 05:02 PM. Reason: Spelling
  8. #8  
    Awesome Fish. You deserve an medal.

    You should share this with the others who are trying to crack this thing so the polishing can commence!
  9. Irix's Avatar
    Posts
    17 Posts
    Global Posts
    23 Global Posts
    #9  
    Quote Originally Posted by fish199902 View Post
    I used Ad-Hoc on my pre, and it WORKED!

    Heres what I did to make it work:
    Code:
    # Setting up ad-hoc network
    iwconfig eth0 mode Ad-Hoc
    iwconfig eth0 ap any
    iwconfig eth0 key off
    iwconfig eth0 essid PreNet
    iwconfig eth0 channel 6
    ifconfig eth0 192.168.1.1 up
    
    # Route traffic from wifi to evdo
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    
    # Stop routing through my local gateway, leaving only the Ev-Do route
    route del default gw 192.168.2.1
    
    while true; do
        # This value resets iteself to 0 periodically, anyone know why?
        echo 1 > /proc/sys/net/ipv4/ip_forward
        sleep 10
    done
    
    # There should be code to restore the old network here
    And the settings on the remote computer:
    IP: 192.168.1.5
    Gateway: 192.168.1.1
    DNS: 4.2.2.1

    Update: I can confirm I was going though the sprint network, and not another connection. I checked an ISP lookup website and it said Sprint
    Cool, I had similar success when I tried it by hand too using CLI.

    The only things I ran into was the Pre would auto reset the Wifi settings with the WiFi daemon occasionally.

    As well, it's not very useful when your on the go to have a permanent AdHoc setup... so I find this solution sorta useless to the masses as I don't think everyone will want their pre's to only connect to one network permanently.

    The "loss" your experiencing is the Wifi Daemon process resetting the connection

    I'm trying to fix the main Wifi app to show AdHoc networks on the scan... so all anyone would need is to configure the Masquerade permanently for ppp0 and connect to the AdHoc network. As well you'd need to manually configure your DNS servers, but that's pretty simple.
  10. #10  
    After rooting the phone as specified by the pre dev wiki, I was able to ssh to it from Windows via Bluetooth (added the device, then activated Bluetooth PAN on it). From there 'wget -q -O - myfavoritewebsite' worked like a dream, aside from one pesky dialog message on the phone when the PAN first connects "Sprint does not allow internet connection sharing". It seems like it would be very straightforward to set up a http proxy from here as a first step towards tethering. (For those interested in repeating this experiment, I sshed to the gateway address listed in my Bluetooth Network Connection under "ipconfig".)
  11. atlanta's Avatar
    Posts
    324 Posts
    Global Posts
    337 Global Posts
    #11  
    Yea its not going to work all the connection is already proxied on sprints end.
  12. atlanta's Avatar
    Posts
    324 Posts
    Global Posts
    337 Global Posts
    #12  
    Quote Originally Posted by jsabo View Post
    Given that we know how to install new services on the Linux side of the house, can't you set up the Pre as a proxy server for your other devices?

    1- Install proxy software on Pre

    2- Get Pre on EVDO network

    3- Set up WiFi router with no connection to the net

    4- Get Pre and laptop on wifi

    5- Tell proxy to use EVDO IP address for all outgoing connections

    6- Tell laptop to use Pre IP address as proxy server

    Not as convenient as using Bluetooth, but something, right?
    Yea i posted it up earlier in the thread it works just not very ideal to carry a router with you everywhere.

    Quote Originally Posted by haydur View Post
    I'm working on this too... We need to do something like the following in iptables:

    iptables -t nat -A POSTROUTING -o (evdo interface id) -j MASQUERADE
    I also posted this earlier in the thread it is

    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
  13. #13  
    Quote Originally Posted by fish199902 View Post
    You should be able to browse on your computer at this point, although it seems the connection is lost somtimes at random. I'm not an expert at networking, so I dont understand what is causing this loss, and I know the script needs polishing, but its a start
    How often is "sometimes?" For what it's worth, the same happens to me using Internet Connection Sharing on my Sprint Mogul (waiting for 2-yr ). Sometimes I can browse for an hour or two, sometimes I'm disconnected after ten minutes. It appears to be coming from Sprint's end.

    Suspecting this I've found a sort of art to maintaining the connection for > hour stretches. Perhaps it's superstition, but two things seem to reduce the breaks:
    1) Not loading multiple links simultaneously while browsing. Perhaps they notice the hightened traffic?
    2) Maintaining a small connection while idling/reading by having an IM client or mail client polling in the background. Maybe they periodically reset if they think it's just the phone?

    My two cents.
  14. #14  
    Quote Originally Posted by atlanta View Post
    Yea its not going to work all the connection is already proxied on sprints end.
    people have already been tethering their phones on sprint's network for some time.

    It's a matter of making the data from tether connection appear to be coming directly from the phone I.E. using webos on your pre to look at a website vs firefox from your laptop.

    the first step is to properly have a tether to a laptop, the adhoc idea is a great start, just need to work on bluetooth and usb tether now.
  15. #15  
    I've still yet to find where the checksum is for tethering.

    When it's found in the code, it should be easy to bypass.
  16. #16  
    So just to be clear, there are no solutions yet where enabling root access, installing Python is not required, correct?
    I am scared to try any of this, I'll brick my phone for sure...
  17. #17  
    In order to execute this on the pre, maybe we can add this script to where one of the less important apps (IE Nascar). I think I could modify the script to toggle the configurationg everytime the app is executed. That way you could have a pseudo tether on tether off button. Very nice work! Linux core FTW.
  18. #18  
    Could a script be made to do everything required to make this work? ;-))
  19. #19  
    Quote Originally Posted by ronnienyc View Post
    Could a script be made to do everything required to make this work? ;-))
    At this point you would still need to root your pre. Otherwise it is completely possible.
  20. #20  
    Quote Originally Posted by ananimus View Post
    How often is "sometimes?" For what it's worth, the same happens to me using Internet Connection Sharing on my Sprint Mogul (waiting for 2-yr ). Sometimes I can browse for an hour or two, sometimes I'm disconnected after ten minutes. It appears to be coming from Sprint's end.

    Suspecting this I've found a sort of art to maintaining the connection for > hour stretches. Perhaps it's superstition, but two things seem to reduce the breaks:
    1) Not loading multiple links simultaneously while browsing. Perhaps they notice the hightened traffic?
    2) Maintaining a small connection while idling/reading by having an IM client or mail client polling in the background. Maybe they periodically reset if they think it's just the phone?

    My two cents.
    For me it resets to 0 every 1 to 5 seconds I have been able to get it to work but have to constantly set ip_forward to 1. I wonder if we could just kill the WiFi deamon (if that is whats reseting ip_forward to 0) and relaunch it after we are done tethering. It just scans for available networks correct?
Page 1 of 20 12345611 ... LastLast

Posting Permissions