06/11/2009, 04:11 PM
|
|
|
Member
![]() Join Date: Sep 2003
Posts: 418
Likes: 38
Thanks: 18
Thanked 35 Times in 26 Posts
|
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? |
|
|
06/11/2009, 04:43 PM
|
#2 (permalink) |
|
Member
![]() Join Date: Apr 2009
Location: Toronto, ON
Posts: 3,595
Likes: 249
Thanks: 175
Thanked 410 Times in 319 Posts
|
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 |
|
|
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
|
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 |
|
|
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
|
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 |
|
|
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
|
Quote:
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. |
|
|
|
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
|
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".)
|
|
|
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
|
Quote:
Quote:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE |
||
|
|
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
|
Quote:
). 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. |
|
|
|
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
|
Quote:
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. |
|
|
|
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
|
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... |
|
|
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
|
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.
|
|
|
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
|
Quote:
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?
|
|
|
|
![]() |
| webOS Nation Forums Possible tether work-around |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|

















). 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.
Linear Mode









