Old 06/11/2009, 04:11 PM     Thread Author   #1 (permalink)
Member
 
Join Date: Sep 2003
Posts: 418
Likes: 38
Thanks: 18
Thanked 35 Times in 26 Posts

Default Possible tether work-around

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?
jsabo is offline   Reply With Quote
Old 06/11/2009, 04:43 PM   #2 (permalink)
Member
 
ToniCipriani's Avatar
 
Join Date: Apr 2009
Location: Toronto, ON
Posts: 3,595
Likes: 249
Thanks: 175
Thanked 410 Times in 319 Posts

Default

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

I nominate Leo Apotheker to be a Darwin Award laureate.

Need OEM Palm Pre parts? See here
ToniCipriani is offline   Reply With Quote
Old 06/11/2009, 05:11 PM   #3 (permalink)
Member
 
Join Date: Mar 2009
Posts: 452
Likes: 0
Thanks: 10
Thanked 188 Times in 43 Posts

Default

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
haydur is offline   Reply With Quote
Old 06/11/2009, 05:44 PM   #4 (permalink)
Member
 
Join Date: Jun 2009
Posts: 53
Likes: 1
Thanks: 3
Thanked 30 Times in 5 Posts

Default

There's already been work on trying to connect via wifi (ad-hoc would be easier, cutting an entire router out of the picture...)
LarrySteeze is offline   Reply With Quote
Old 06/11/2009, 05:52 PM   #5 (permalink)
Member
 
Join Date: Aug 2007
Location: Denver, CO
Posts: 33
Likes: 0
Thanks: 5
Thanked 20 Times in 5 Posts

Default

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
[/code]

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 06:03 PM. Reason: Comments
fish199902 is offline   Reply With Quote
Old 06/11/2009, 05:55 PM   #6 (permalink)
Member
 
Join Date: Jun 2009
Posts: 355
Likes: 0
Thanks: 6
Thanked 26 Times in 13 Posts

Default

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?...)
ronnienyc is offline   Reply With Quote
Old 06/11/2009, 06:01 PM   #7 (permalink)
Member
 
Join Date: Aug 2007
Location: Denver, CO
Posts: 33
Likes: 0
Thanks: 5
Thanked 20 Times in 5 Posts

Default

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 06:02 PM. Reason: Spelling
fish199902 is offline   Reply With Quote
Old 06/11/2009, 06:06 PM   #8 (permalink)
Member
 
Join Date: Jun 2009
Posts: 355
Likes: 0
Thanks: 6
Thanked 26 Times in 13 Posts

Default

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!
ronnienyc is offline   Reply With Quote
Old 06/11/2009, 06:09 PM   #9 (permalink)
Member
 
Join Date: Jun 2009
Posts: 21
Likes: 0
Thanks: 0
Thanked 2 Times in 2 Posts

Default

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
[/code]

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.
Irix is offline   Reply With Quote
Old 06/11/2009, 06:10 PM   #10 (permalink)
Member
 
Join Date: Jun 2009
Posts: 2
Likes: 0
Thanks: 0
Thanked 0 Times in 0 Posts

Default

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".)
BreadJedi is offline   Reply With Quote
Old 06/11/2009, 11:28 PM   #11 (permalink)
Member
 
Join Date: Sep 2007
Posts: 337
Likes: 0
Thanks: 4
Thanked 53 Times in 31 Posts

Default

Yea its not going to work all the connection is already proxied on sprints end.
atlanta is offline   Reply With Quote
Old 06/11/2009, 11:33 PM   #12 (permalink)
Member
 
Join Date: Sep 2007
Posts: 337
Likes: 0
Thanks: 4
Thanked 53 Times in 31 Posts

Default

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
atlanta is offline   Reply With Quote
Old 06/12/2009, 01:36 AM   #13 (permalink)
Member
 
Join Date: Apr 2009
Location: Illinois
Posts: 248
Likes: 9
Thanks: 96
Thanked 25 Times in 18 Posts

Default

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.
ananimus is offline   Reply With Quote
Old 06/12/2009, 08:38 AM   #14 (permalink)
Member
 
Join Date: Jun 2009
Posts: 131
Likes: 0
Thanks: 40
Thanked 11 Times in 9 Posts

Default

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.
victorkruger is offline   Reply With Quote
Old 06/12/2009, 09:35 AM   #15 (permalink)
Member
 
Join Date: Jun 2009
Posts: 53
Likes: 1
Thanks: 3
Thanked 30 Times in 5 Posts

Default

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.
LarrySteeze is offline   Reply With Quote
Old 06/12/2009, 10:15 AM   #16 (permalink)
Member
 
Join Date: Jun 2009
Posts: 355
Likes: 0
Thanks: 6
Thanked 26 Times in 13 Posts

Default

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...
ronnienyc is offline   Reply With Quote
Old 06/12/2009, 10:15 AM   #17 (permalink)
Member
 
Join Date: Jun 2009
Posts: 13
Likes: 0
Thanks: 4
Thanked 1 Time in 1 Post

Default

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.
grindz145 is offline   Reply With Quote
Old 06/12/2009, 10:38 AM   #18 (permalink)
Member
 
Join Date: Jun 2009
Posts: 355
Likes: 0
Thanks: 6
Thanked 26 Times in 13 Posts

Default

Could a script be made to do everything required to make this work? ;-))
ronnienyc is offline   Reply With Quote
Old 06/12/2009, 10:49 AM   #19 (permalink)
Member
 
Join Date: Jun 2009
Posts: 13
Likes: 0
Thanks: 4
Thanked 1 Time in 1 Post

Default

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.
grindz145 is offline   Reply With Quote
Old 06/13/2009, 09:19 AM   #20 (permalink)
Member
 
Join Date: Jun 2009
Location: Tampa, FL
Posts: 18
Likes: 0
Thanks: 4
Thanked 1 Time in 1 Post

Default

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?
microbolt is offline   Reply With Quote

 

Content Relevant URLs by vBSEO 3.6.0