07/06/2009, 03:46 PM
|
#1 (permalink) |
|
Member
Join Date: Jul 2009
Posts: 33
Thanks: 0
Thanked 26 Times in 7 Posts
|
hello all,
I'm new here but I love the site. I posted this on the "possible tether work-around" thread but I wanted to make sure everybody got a chance to see it, and that thread is pretty long now. I used to have my 800w hacked for tethering and when I found the options of tethering available to the pre (so far) they just didn't quite cut it. I didn't want to have to ssh to my phone and use a socks proxy or run an app to shut down pmconnectionmanager every time I wanted to connect, so I modified the connectionmanager program to stop change ip_forward to 0. Here are the steps: Prerequisites: rooted pre ssh access (dropbear or openssh) ability to use VI or editor of your choice optional prereq: usbnet setup and dhcp setup 1) ssh to the phone, sudo to root and go to /usr/bin 2) cp PmConnectionManager PmConnectionManager.orig just in case you mess something up 3) stop PmConnectionManager 4) vi PmConnectionManager and do a find for "forward" (with vi you use / then the string you are looking for) 5) the third "forward" you find should say "Disabling IP Forwarding^@0^@^@^@" 6) change the 0 to a 1, save and quit 7) start PmConnectionManager I did this and kept checking my /proc/sys/net/ipv4/ip_forward file and it is now staying at 1. with this and the correct IPtable rules I can just connect my phone via usb or bluetooth and get right on the net without ssh or anything else. I rebooted the phone many times and it has stuck also the iptable rull I'm using looks something like this: iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE I added that iptable rule to my dropbear upstart script so it gets added on startup. If you wanted to make a separate upstart you could, but I was too lazy. I'm using webOS 1.0.4 and it's working great. Let me know if you have any questions. thanks. |
|
|
| Thanked By 12: |
07/06/2009, 04:04 PM
|
#4 (permalink) |
|
Tazmorator
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2005
Location: P|C when the light below is green. Otherwise; I could be just about anywhere.
Posts: 8,295
Thanks: 1,701
Thanked 1,241 Times in 922 Posts
|
Thanks!
and Welcome to PreC
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. Just call me Berd. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
|
|
07/06/2009, 04:05 PM
|
#5 (permalink) |
|
Member
Join Date: May 2009
Posts: 452
Thanks: 27
Thanked 252 Times in 51 Posts
|
Although I'm quite adept at following instructions, programming and *nix are not my bailiwick. So... how do you stop the PmConnectionManager specifically? Conversely, how do you start it again? You mentioned that you can now just connect via Bluetooth- how, exactly? And the last question: How do you add the iptable rule to a dropbear upstart script (and what's an upstart script, anyway)?
|
|
|
07/06/2009, 04:11 PM
|
#6 (permalink) |
|
Member
Join Date: Jul 2009
Posts: 33
Thanks: 0
Thanked 26 Times in 7 Posts
|
starting and stoping is quite easy, you litterally type stop PmConnectionManager and start PmConnectionManager at the command line. As far as adding the ip table rule you edit the file in /etc/event.d/optware-dropbear and you will see a few iptable lines near the end of the file. just add another line with the rule that I posted here. Here is what mine looks like:
pre-start script # Add firewall rule to allow SSH access over WiFi on port 222 # Remove the "-i eth0" on both of the following lines to enable SSH access # over the cellular data network (EVDO, etc). /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT /usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE end script |
|
|
07/06/2009, 04:37 PM
|
#7 (permalink) | |
|
Member
Join Date: May 2009
Posts: 452
Thanks: 27
Thanked 252 Times in 51 Posts
|
Quote:
|
|
|
|
07/06/2009, 05:01 PM
|
#8 (permalink) |
|
Member
Join Date: May 2009
Posts: 452
Thanks: 27
Thanked 252 Times in 51 Posts
|
Update:
This was absurdly simple in execution. After following the instructions and lastly modifying the iptables, I restarted the phone. It came back up, I made sure bluetooth was on, then added a new Bluetooth device on my Mac. The Pre was found, and a new PAN (Personal Area Network) was established. I turned off the WiFi on my laptop, and connected to the PAN (click the Bluetooth icon in your menu bar, then click the Pre). Flawless. I had the Pre connected to my wireless network, so I don't know how quick it'll be using EVDO, (and at the risk of offending some of the more Neanderthal among us) it's so simple a caveman could do it. Thanks again. Update (again): I tried using EvDo. It works, but it's molasses slow. I'm guessing part of this may be because I'm connecting via Bluetooth. How would I connect via USB instead? |
|
|
07/06/2009, 10:05 PM
|
#10 (permalink) |
|
Member
Join Date: Jul 2009
Posts: 19
Thanks: 5
Thanked 1 Time in 1 Post
|
Wow, that was almost too easy! Thanks so much for keeping after it.
I'm posting this from my newly tethered Pre. It's not super speedy, but good enough for the rare cases when I'll actually need it. Rock on! |
|
|
07/06/2009, 10:11 PM
|
#11 (permalink) |
|
Member
Join Date: Jul 2009
Posts: 19
Thanks: 5
Thanked 1 Time in 1 Post
|
Update: while the screen was refreshing I turned on Outlook. The Pre popped up a notice that it wanted to turn on WiFi because there was no network connection available. When I dismissed the notice, everything in Firefox stopped and I had to restart to get going again. So maybe we can only browse, but that's ok. I can still use web based email.
|
|
|
07/06/2009, 10:23 PM
|
#12 (permalink) | |
|
Homebrew Developer
Join Date: Nov 2008
Location: Raleigh, NC
Posts: 187
Thanks: 36
Thanked 29 Times in 16 Posts
|
Quote:
|
|
|
|
07/07/2009, 12:00 AM
|
#15 (permalink) | |
|
Member
Join Date: Jun 2009
Posts: 763
Thanks: 211
Thanked 61 Times in 46 Posts
|
Quote:
"optional prereq: usbnet setup and dhcp setup" But I don't see any of that listed in your instructions, is that not necessary? Thanks, |
|
|
|
07/07/2009, 12:22 AM
|
#16 (permalink) |
|
Member
Join Date: Jul 2009
Posts: 33
Thanks: 0
Thanked 26 Times in 7 Posts
|
I did not list it because you can find it on predev wiki. I should have probably posted a link to it before because it's probably highly desirable with this mod. so here it is.
pre dev wiki: USBnet networking setup make sure and do the optional dhcp setup as well. Let me know if you have any other questions. |
|
|
| Thanked By: |
07/07/2009, 01:53 AM
|
#18 (permalink) |
|
Homebrew Developer
Join Date: Jun 2009
Location: Lexington KY
Posts: 813
Thanks: 66
Thanked 117 Times in 82 Posts
|
Ok, I have DHCP set up on usb0 via predev and I followed your instructions here but something is not right. When i plug the usb up I get a ip address of 192.168.0.12.
My gateway is 192.168.0.202 as is my DNS. I have no connection to the internet. At least not with DNS. I haven't tried a IP but i need DNS of course. Am I missing something? What should the DNS be? Sprints DNS servers? or 192.168.0.12? I doubt it is 192.168.0.202 as that address is not on my usbnet or is it a virtual interface bridge to ppp0? If it is wrong, how do I change it on my pre? Thanks ok i figured out the ip was coming from the pres usb0, but i still have no connection to the internet :/ edit2: nvm sorry must of been the firewall rule after reboot it worked fine getting about 75 KB/s averageedit3: ok, it looks like I can only have one or the other. Whith the modified PmConnectionManager in place. the pre will not operate over its EVDO. It pops up a no network connection dialog. Last edited by fain; 07/07/2009 at 02:50 AM. |
|
|
07/07/2009, 03:01 AM
|
#19 (permalink) |
|
Member
Join Date: Jul 2009
Posts: 33
Thanks: 0
Thanked 26 Times in 7 Posts
|
as I post this message I'm am downloading and watching youtube on my phone. so there might be something wrong with your config. about posting the files I would be more than willing but I dont wanna violate any terms on this forum. PM me and I will help you.
|
|
|
07/07/2009, 07:55 AM
|
#20 (permalink) | |
|
Member
Join Date: Feb 2009
Posts: 335
Thanks: 168
Thanked 55 Times in 26 Posts
|
Quote:
Graet find here though. Seems the easiest of all the tether work arounds. I don't know much about a lot of the programming though so how hard would it be possibly in the future to write a program that essentially automatically goes in and switches that setting? |
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -4. The time now is 02:04 AM.












getting about 75 KB/s average
Linear Mode








