Old 06/14/2009, 11:20 PM   #21 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,161
Thanks: 69
Thanked 167 Times in 120 Posts
Default

fish... what file are you editing up there can you show it to me from usr directory all the way to the file it self
jack87 is offline   Reply With Quote
Old 06/15/2009, 01:12 AM   #22 (permalink)
Member
 
Join Date: Aug 2007
Location: Denver, CO
Posts: 33
Thanks: 5
Thanked 20 Times in 5 Posts
Default

@jack87: I'm not exactly sure what you mean. Once you've rooted, the method I posted above doesn't edit any files. Optionally, you could save the commands to a file and run it as script, in which case, you would place it in /usr/bin/tether.sh (or similar).

grindz145 suggested modifying one of the built in applications to do this, but I haven't tried this yet.


Also, I have been experimenting with different methods of tethering. While the iptables solution above works, it still requires a script to be executed on the device, and conflicts with the Pre's built in WiFi daemon. Another solution: SSH supports running as a SOCKS proxy that can forward any (tcp) network traffic over its connection, this would allow network access (not just HTTP) without installing/running anything else on the Pre, and it works over Bluetooth PAN (despite sprint's 'auth error'). For this all that is necessary is to connect is to:
  1. Connect with bluetooth PAN (ignore the auth error)
  2. On the computer: Run 'ssh -D 8080 -p 222 preuser@10.1.1.10'. Alternatively (e.g. Windows), PuTTY can be configured to do this using dynamic forwarding.
  3. Tell any application to use the SOCKS proxy at localhost:8080 or try this
fish199902 is offline   Reply With Quote
Thanked By 5:
Old 06/15/2009, 08:40 AM   #23 (permalink)
Member
 
Join Date: Jun 2009
Posts: 49
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by fish199902 View Post
  1. Connect with bluetooth PAN (ignore the auth error)
  2. On the computer: Run 'ssh -D 8080 -p 222 preuser@10.1.1.10'. Alternatively (e.g. Windows), PuTTY can be configured to do this using dynamic forwarding.
  3. Tell any application to use the SOCKS proxy at localhost:8080
Dude - you rock! I connected to bluetooth PAN, ignored sharing error, opened putty and set it up using the information I found at www .neophob.com/serendipity/index.php?/archives/48-SSH-tunneling-Part-2,-use-SOCKS-to-be-free....html (sorry, this is my first post, so I can't link)
I setup IE to proxy using SOCKS and bam! I'm tethered!!!

I attached a screenshot of my speedtest.net results showing I was connected through Sprint PCS
Attached Images
File Type: jpg speedtest.jpg (56.9 KB, 160 views) Email Attachment
dsackr is offline   Reply With Quote
Old 06/15/2009, 08:51 AM   #24 (permalink)
Member
 
Join Date: Jun 2009
Posts: 13
Thanks: 4
Thanked 1 Time in 1 Post
Default

@Fish thats a great idea, because you then wouldn't have to modify settings every time. Although, wifi tethering is really convenient.
grindz145 is offline   Reply With Quote
Old 06/15/2009, 09:00 AM   #25 (permalink)
Member
 
Join Date: Jun 2009
Posts: 13
Thanks: 4
Thanked 1 Time in 1 Post
Default

@dsacker nice! rough connection speed though:-D
grindz145 is offline   Reply With Quote
Old 06/15/2009, 10:08 AM   #26 (permalink)
Member
 
Join Date: Jun 2009
Posts: 13
Thanks: 4
Thanked 1 Time in 1 Post
Default

I just noticed that somone has come up with a way to run a shell on the pre through the web browser http ://predev.wikidot.com/shell This makes it easy to run the any config script at all with considerable ease... just saying:-D
grindz145 is offline   Reply With Quote
Old 06/15/2009, 11:27 AM   #27 (permalink)
Member
 
Join Date: Jun 2009
Posts: 90
Thanks: 9
Thanked 10 Times in 2 Posts
Default

Quote:
Originally Posted by fish199902 View Post
@jack87: I'm not exactly sure what you mean. Once you've rooted, the method I posted above doesn't edit any files. Optionally, you could save the commands to a file and run it as script, in which case, you would place it in /usr/bin/tether.sh (or similar).

grindz145 suggested modifying one of the built in applications to do this, but I haven't tried this yet.


Also, I have been experimenting with different methods of tethering. While the iptables solution above works, it still requires a script to be executed on the device, and conflicts with the Pre's built in WiFi daemon. Another solution: SSH supports running as a SOCKS proxy that can forward any (tcp) network traffic over its connection, this would allow network access (not just HTTP) without installing/running anything else on the Pre, and it works over Bluetooth PAN (despite sprint's 'auth error'). For this all that is necessary is to connect is to:
  1. Connect with bluetooth PAN (ignore the auth error)
  2. On the computer: Run 'ssh -D 8080 -p 222 preuser@10.1.1.10'. Alternatively (e.g. Windows), PuTTY can be configured to do this using dynamic forwarding.
  3. Tell any application to use the SOCKS proxy at localhost:8080 or try this
So this is confirmed to work. Can we get an in depth walkthrough on how to set this up?
lcars123 is offline   Reply With Quote
Old 06/15/2009, 12:30 PM   #28 (permalink)
Member
 
Join Date: Oct 2007
Posts: 874
Thanks: 75
Thanked 40 Times in 35 Posts
Default

Quote:
Originally Posted by lcars123 View Post
So this is confirmed to work. Can we get an in depth walkthrough on how to set this up?
please?
ericizzy1 is offline   Reply With Quote
Old 06/15/2009, 12:36 PM   #29 (permalink)
Member
 
Join Date: Aug 2007
Location: Denver, CO
Posts: 33
Thanks: 5
Thanked 20 Times in 5 Posts
Default

Sure, I'll try to be as accurate as I can for windows, however my only windows install is in a virtual machine.

Prerequisites:
  • A rooted Pre, with ssh installed
  • An SSH client for your computer (Linux: ssh, Windows: PuTTY)
  • Linux users only: Root access, the bnep kernel module and the following commands: pand, rfcomm, hciconfig, hcitool, ifconfig

Walk-though:
  1. Open bluetooth preferences on your Pre. Turn on bluetooth and wait until it says your phone is discoverable
  2. On Windows:
    1. Pair with your Pre (right click the bluetooth tray icon and select add device).
    2. Right-clicking the bluetooth tray icon and selecting join a bluetooth PAN will bring up a dialog to join a network.
    3. Select your pre and connect.
    On Linux:
    1. Start bluetooth, run '/etc/init.d/bluetooth restart'
    2. Run 'hciconfig' to get the name of your BT adapter. Its probably called hci0 but if not, replace hci0 with this name from now on.
    3. Run 'hciconfig hci0 up'
    4. Run 'hcitool scan' to look for devices. Select your device and copy the address (something like XX:XX:XX:XX:XX:XX)
    5. This step shouldn't be necessary, but it was for me: Run 'rfcomm connect hci0 XX:XX:XX:XX:XX:XX 1'. If you were successful, there should be a phone icon next to your computer's name on your Pre.
    6. Open another terminal. Run 'pand -n -c XX:XX:XX:XX:XX:XX', there should now be a globe icon on your Pre. It should say something like bnep0 connected, remember this name, use it in place of bnep0 in commands from now on
    7. Run 'ifconfig bnep0 10.1.1.11 up'. Test the connection by running 'ping -c 4 10.1.1.10' If you dont see errors you're connected.
  3. SSH Users: Run 'ssh -D 8080 -p 222 preuser@10.1.1.10', where preuser is your user name on your phone.
    PuTTY Users: Enter 10.1.1.10 in the host name blank, and 222 in port. Go to Connection > SSH > Tunnels, enter 8080 in source port and select 'Dynamic' below. Click add. Click open, and login to your Pre.
  4. Here you have two options to configure network access:
    • Per Application: Configure whatever application you use to use the SOCKS proxy at localhost:8080. For example to configure firefox, go to Options > Advanced > Network > Connection Settings, select Manual proxy, and enter localhost and 8080 in SOCKS Host and Port. Then type in about:config, enter 'dns' in filter and double click network.proxy.socks_remote_dns
    • Generic: Look at tsocks (for linux) and FreeCap (for windows). I haven't used them, but they should allow any application to use the proxy
fish199902 is offline   Reply With Quote
Old 06/15/2009, 12:38 PM   #30 (permalink)
Member
 
Join Date: Jun 2009
Posts: 90
Thanks: 9
Thanked 10 Times in 2 Posts
Default

Quote:
Originally Posted by fish199902 View Post
Sure, I'll try to be as accurate as I can for windows, however my only windows install is in a virtual machine.

Prerequisites:
  • A rooted Pre, with ssh installed
  • An SSH client for your computer (Linux: ssh, Windows: PuTTY)
  • Linux users only: Root access, the bnep kernel module and the following commands: pand, rfcomm, hciconfig, hcitool, ifconfig

Walk-though:
  1. Open bluetooth preferences on your Pre. Turn on bluetooth and wait until it says your phone is discoverable
  2. On Windows:
    1. Pair with your Pre (right click the bluetooth tray icon and select add device).
    2. Right-clicking the bluetooth tray icon and selecting join a bluetooth PAN will bring up a dialog to join a network.
    3. Select your pre and connect.
    On Linux:
    1. Start bluetooth, run '/etc/init.d/bluetooth restart'
    2. Run 'hciconfig' to get the name of your BT adapter. Its probably called hci0 but if not, replace hci0 with this name from now on.
    3. Run 'hciconfig hci0 up'
    4. Run 'hcitool scan' to look for devices. Select your device and copy the address (something like XX:XX:XX:XX:XX:XX)
    5. This step shouldn't be necessary, but it was for me: Run 'rfcomm connect hci0 XX:XX:XX:XX:XX:XX 1'. If you were successful, there should be a phone icon next to your computer's name on your Pre.
    6. Open another terminal. Run 'pand -n -c XX:XX:XX:XX:XX:XX', there should now be a globe icon on your Pre. It should say something like bnep0 connected, remember this name, use it in place of bnep0 in commands from now on
    7. Run 'ifconfig bnep0 10.1.1.11 up'. Test the connection by running 'ping -c 4 10.1.1.10' If you dont see errors you're connected.
  3. SSH Users: Run 'ssh -D 8080 -p 222 preuser@10.1.1.10', where preuser is your user name on your phone.
    PuTTY Users: Enter 10.1.1.10 in the host name blank, and 222 in port. Go to Connection > SSH > Tunnels, enter 8080 in source port and select 'Dynamic' below. Click add. Click open, and login to your Pre.
  4. Here you have two options to configure network access:
    • Per Application: Configure whatever application you use to use the SOCKS proxy at localhost:8080. For example to configure firefox, go to Options > Advanced > Network > Connection Settings, select Manual proxy, and enter localhost and 8080 in SOCKS Host and Port
    • Generic: Look at tsocks (for linux) and FreeCap (for windows). I haven't used them, but they should allow any application to use the proxy
Thanks! Now can we get a second confirmation from someone that this works.
lcars123 is offline   Reply With Quote
Old 06/15/2009, 12:46 PM   #31 (permalink)
Member
 
Join Date: Jun 2009
Location: Louisville, KY
Posts: 174
Thanks: 30
Thanked 14 Times in 8 Posts
Default

HOLY MOTHER OF GOD. It works:



Using the tethered connection to make this post and browse the forums
prochobo is offline   Reply With Quote
Old 06/15/2009, 12:54 PM   #32 (permalink)
Member
 
Join Date: Jun 2009
Posts: 90
Thanks: 9
Thanked 10 Times in 2 Posts
Default

Quote:
Originally Posted by prochobo View Post
HOLY MOTHER OF GOD. It works:



Using the tethered connection to make this post and browse the forums
Nice now I can actually buy the Pre. Have been waiting because I depend on the ability to tether.
lcars123 is offline   Reply With Quote
Old 06/15/2009, 01:05 PM   #33 (permalink)
Member
 
Join Date: Oct 2006
Location: NYC
Posts: 815
Thanks: 486
Thanked 59 Times in 39 Posts
Default

Good work! Now wrap it up in a one click application and sell it for $20!
bryanharig is offline   Reply With Quote
Old 06/15/2009, 01:43 PM   #34 (permalink)
Member
 
Join Date: Jun 2009
Posts: 90
Thanks: 9
Thanked 10 Times in 2 Posts
Default

Quote:
Originally Posted by bryanharig View Post
Good work! Now wrap it up in a one click application and sell it for $20!
Wishful thinking I'm sure but I would definitely be willing to pay 20 bucks for that.
lcars123 is offline   Reply With Quote
Old 06/15/2009, 01:50 PM   #35 (permalink)
Member
 
Join Date: Nov 2004
Posts: 1,213
Thanks: 20
Thanked 40 Times in 24 Posts
Default

^Many non-techie people would. PDANet is more and many use it.
__________________
Sprint Pre, Mugen 2800mah battery
xenophonite is offline   Reply With Quote
Old 06/15/2009, 02:33 PM   #36 (permalink)
Member
 
Join Date: Dec 2007
Posts: 40
Thanks: 3
Thanked 0 Times in 0 Posts
Default

The SSH tunnel is a great idea. I've used SSH tunnels back to my home network over my tethered WinMo phone for a while; just for transport security. This is pretty cool. I'm getting closer and closer to being able to pick up a Pre to replace my Mogul.

Once again, nice work!
whatsit2002 is offline   Reply With Quote
Old 06/15/2009, 02:36 PM   #37 (permalink)
Member
 
Join Date: Jun 2009
Posts: 90
Thanks: 9
Thanked 10 Times in 2 Posts
Default

Quote:
Originally Posted by fish199902 View Post
Sure, I'll try to be as accurate as I can for windows, however my only windows install is in a virtual machine.

Prerequisites:
  • A rooted Pre, with ssh installed
  • An SSH client for your computer (Linux: ssh, Windows: PuTTY)
  • Linux users only: Root access, the bnep kernel module and the following commands: pand, rfcomm, hciconfig, hcitool, ifconfig

Walk-though:
  1. Open bluetooth preferences on your Pre. Turn on bluetooth and wait until it says your phone is discoverable
  2. On Windows:
    1. Pair with your Pre (right click the bluetooth tray icon and select add device).
    2. Right-clicking the bluetooth tray icon and selecting join a bluetooth PAN will bring up a dialog to join a network.
    3. Select your pre and connect.
    On Linux:
    1. Start bluetooth, run '/etc/init.d/bluetooth restart'
    2. Run 'hciconfig' to get the name of your BT adapter. Its probably called hci0 but if not, replace hci0 with this name from now on.
    3. Run 'hciconfig hci0 up'
    4. Run 'hcitool scan' to look for devices. Select your device and copy the address (something like XX:XX:XX:XX:XX:XX)
    5. This step shouldn't be necessary, but it was for me: Run 'rfcomm connect hci0 XX:XX:XX:XX:XX:XX 1'. If you were successful, there should be a phone icon next to your computer's name on your Pre.
    6. Open another terminal. Run 'pand -n -c XX:XX:XX:XX:XX:XX', there should now be a globe icon on your Pre. It should say something like bnep0 connected, remember this name, use it in place of bnep0 in commands from now on
    7. Run 'ifconfig bnep0 10.1.1.11 up'. Test the connection by running 'ping -c 4 10.1.1.10' If you dont see errors you're connected.
  3. SSH Users: Run 'ssh -D 8080 -p 222 preuser@10.1.1.10', where preuser is your user name on your phone.
    PuTTY Users: Enter 10.1.1.10 in the host name blank, and 222 in port. Go to Connection > SSH > Tunnels, enter 8080 in source port and select 'Dynamic' below. Click add. Click open, and login to your Pre.
  4. Here you have two options to configure network access:
    • Per Application: Configure whatever application you use to use the SOCKS proxy at localhost:8080. For example to configure firefox, go to Options > Advanced > Network > Connection Settings, select Manual proxy, and enter localhost and 8080 in SOCKS Host and Port. Then type in about:config, enter 'dns' in filter and double click network.proxy.socks_remote_dns
    • Generic: Look at tsocks (for linux) and FreeCap (for windows). I haven't used them, but they should allow any application to use the proxy
Question. What portion of this am I going to have to do when I want to tether after the first time?
lcars123 is offline   Reply With Quote
Old 06/15/2009, 02:37 PM   #38 (permalink)
Member
 
kmehr's Avatar
 
Join Date: Oct 2007
Posts: 271
Thanks: 133
Thanked 63 Times in 48 Posts
Default

Quote:
Originally Posted by lcars123 View Post
Thanks! Now can we get a second confirmation from someone that this works.
Unfortunately I am running win 7 64-bit and it will not work for me
kmehr is offline   Reply With Quote
Old 06/15/2009, 02:41 PM   #39 (permalink)
Member
 
Join Date: Aug 2007
Location: Denver, CO
Posts: 33
Thanks: 5
Thanked 20 Times in 5 Posts
Default

lcars123: Unfortunately, you'll have to do most on it each time. You only have to root once of coarse, and you might not have to reconfigure your applications each time (depending on the application).

I could write a Linux program to do this automatically, but I think many of the people here are Windows users, and I have no experience with Windows programming, and especially not its bluetooth API.
fish199902 is offline   Reply With Quote
Old 06/15/2009, 02:46 PM   #40 (permalink)
Member
 
Join Date: Jun 2009
Posts: 90
Thanks: 9
Thanked 10 Times in 2 Posts
Default

Quote:
Originally Posted by fish199902 View Post
lcars123: Unfortunately, you'll have to do most on it each time. You only have to root once of coarse, and you might not have to reconfigure your applications each time (depending on the application).

I could write a Linux program to do this automatically, but I think many of the people here are Windows users, and I have no experience with Windows programming, and especially not its bluetooth API.
Yep, I'm using windows. So I'm assuming after the first time. Everytime I want to tether I will connect via bluetooth.

Then:
PuTTY Users: Enter 10.1.1.10 in the host name blank, and 222 in port. Go to Connection > SSH > Tunnels, enter 8080 in source port and select 'Dynamic' below. Click add. Click open, and login to your Pre.

Then configure which application I want to use. Which most of the time it will just be to browse the internet.

Correct???
lcars123 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:01 AM.

Creating smartphone communities
Android Central - Android reviews, news and forums Crackberry - Blackberry news, reviews and community TiPb - iPhone news, accessory reviews & forums
Pre Central - Palm Pre Review, News and Community Treo Central - Treo & Centro News and Forums WMExperts - Windows Mobile Reviews & News

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0