webOS Nation Forums >  webOS apps and software >  webOS development > Possible tether work-around
Possible tether work-around

  Reply
 
LinkBack Thread Tools Display Modes
Old 06/24/2009, 04:23 AM   #121 (permalink)
Member
 
Join Date: Jun 2009
Posts: 49
Likes Received: 0
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by jack87 View Post
you have to do the steps listed above while being logged in via ssh

but before your run then tether.sh file type 'stop PmConnectionManager' then when you are done tethering in the putty screen hit Ctrl+C then type 'start PmConnectionManager'
Great find! Now we can clean up the code of tether.sh a bit to automatically stop the PmConnectionManager service and restart it when we are done - and we can completely remove the while loop:

Quote:
#---------------- begin code --------------------------

stop PmConnectionManager

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

read -p "Press any key to stop tether"

start PmConnectionManager

#---------------- end code --------------------------
Now there is no need for ctrl+c or additional commands... just connect over the putty or ssh session with ssh tunneling and run tether.sh!

BTW - I was running pandora the entire time I had tether.sh running with this new code and never dropped a packet...
dsackr is offline   Reply With Quote
Old 06/24/2009, 04:55 AM   #122 (permalink)
Member

 
Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
Default

Quote:
Originally Posted by dsackr View Post
Great find! Now we can clean up the code of tether.sh a bit to automatically stop the PmConnectionManager service and restart it when we are done - and we can completely remove the while loop:



Now there is no need for ctrl+c or additional commands... just connect over the putty or ssh session with ssh tunneling and run tether.sh!

BTW - I was running pandora the entire time I had tether.sh running with this new code and never dropped a packet...
Have you tested only with Pandora running in the background though, or without anything else running on the Pre as well?

The reason I ask is because it died after 30 seconds for me (though it might've been that it lost the Bluetooth connection because Putty became unresponsive as well) so I was wondering if you need a constant data stream on the Pre to keep it active.
jhoff80 is offline   Reply With Quote
Old 06/24/2009, 08:30 AM   #123 (permalink)
Member
 
Join Date: May 2009
Posts: 8
Likes Received: 0
Thanks: 1
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by dsackr View Post
#---------------- begin code --------------------------

stop PmConnectionManager

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

read -p "Press any key to stop tether"

start PmConnectionManager

#---------------- end code --------------------------
Actually you still need to turn on ip_forward after turning off PmConnectionManager:

Quote:
#---------------- begin code --------------------------

stop PmConnectionManager

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

read -p "Press any key to stop tether"

start PmConnectionManager

#---------------- end code --------------------------
muchtall is offline   Reply With Quote
Old 06/24/2009, 09:51 AM   #124 (permalink)
Member
 
Join Date: Jun 2009
Posts: 90
Likes Received: 0
Thanks: 9
Thanked 11 Times in 2 Posts
Default

Quote:
Originally Posted by jack87 View Post
you have to do the steps listed above while being logged in via ssh

but before your run then tether.sh file type 'stop PmConnectionManager' then when you are done tethering in the putty screen hit Ctrl+C then type 'start PmConnectionManager'
Yep, this was it. It's working great now. Thanks, much faster than bluetooth and no dropping the connection.
lcars123 is offline   Reply With Quote
Old 06/24/2009, 10:24 AM   #125 (permalink)
Member
 
Join Date: Jun 2009
Location: Columbus, Ohio
Posts: 46
Likes Received: 0
Thanks: 8
Thanked 2 Times in 1 Post
Default

What are the chances of placing this code into an IPK so we can install it as an email link application? I am really wanting the tethering but cant Root my device for lack of knowledge.
Grubish is offline   Reply With Quote
Old 06/24/2009, 10:44 AM   #126 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

Sweet! I am glad we got this going. Very nice. Now I'm no expert at writing code but I have this crazy idea of making a switch on the pre to turn that script on and off. Is there anyone that can take a look at the 'my flashlight' thread and check put pregame's flash light code and make an app like that for this code?... After that's done and released mayve work on turning it to an ipk for all to enjoy..


I would go forth on doing this except I do not even know where to start.
jack87 is offline   Reply With Quote
Old 06/24/2009, 11:13 AM   #127 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

Quote:
Originally Posted by emkman View Post
Sorry I took so long.
pre dev wiki: USBnet networking setup
Still don't have OS X 10.5 working yet, or DNS resolution on windows. But SSH works fine. I assume OpenBGP's suggestion works fine as well. Jack87, if you can let me know if the the usb0 interface shows up in 10.4, that would be great. Thanks guys.
where did you disappear to.. did you get my reply about mac osx 10.4? have you been fallowing what ive been doing on this thread? any ideas with the info to make something awesome?
jack87 is offline   Reply With Quote
Old 06/24/2009, 11:32 AM   #128 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

Quote:
Originally Posted by muchtall View Post
Actually you still need to turn on ip_forward after turning off PmConnectionManager:
My speed from home changed my tether.sh file to muchtall code although i changed any key to enter since any key didnt work good job dsacker and muchtall




Last edited by jack87; 06/24/2009 at 12:17 PM.
jack87 is offline   Reply With Quote
Old 06/24/2009, 01:27 PM   #129 (permalink)
Member
 
Join Date: Jun 2009
Posts: 13
Likes Received: 0
Thanks: 3
Thanked 1 Time in 1 Post
Default

That was nice, after USB Tethering the speeds have drastically increased, thanks again. Just wish BT tethering would stick, i loose bluetooth connection periodically...

I'm getting 1.18 mb/s down and .20 mb/s up.
mykael is offline   Reply With Quote
Old 06/24/2009, 01:51 PM   #130 (permalink)
Member
 
Join Date: Jun 2009
Location: Utah
Posts: 70
Likes Received: 0
Thanks: 17
Thanked 2 Times in 2 Posts
Default Utah!

Orem, Utah is good to see. I live there so its good to speeds like that.
-I'm working on the bluetooth problem (the bluetooth loses connection periodically)
ms2474 is offline   Reply With Quote
Old 06/24/2009, 01:57 PM   #131 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

Quote:
Originally Posted by ms2474 View Post
Orem, Utah is good to see. I live there so its good to speeds like that.
-I'm working on the bluetooth problem (the bluetooth loses connection periodically)
I live in salt lake but when you do the speed test i,m not actually checking from salt lake to orem the internet connection could be coming from anywhere in the US i believe its more from the east cost so it will actually react faster to servers based out of the east coast.
jack87 is offline   Reply With Quote
Old 06/24/2009, 02:33 PM   #132 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

has anyone tried using google maps after applying this mod? mine doesnt seem to want to load right now and i dont know if its because of something from this mod or not.

Update:
I reset my pre and it started working now..
jack87 is offline   Reply With Quote
Old 06/24/2009, 02:46 PM   #133 (permalink)
Member
 
Join Date: Jun 2009
Posts: 308
Likes Received: 0
Thanks: 18
Thanked 657 Times in 59 Posts
Default

Quote:
Originally Posted by jack87 View Post
Sweet! I am glad we got this going. Very nice. Now I'm no expert at writing code but I have this crazy idea of making a switch on the pre to turn that script on and off. Is there anyone that can take a look at the 'my flashlight' thread and check put pregame's flash light code and make an app like that for this code?... After that's done and released mayve work on turning it to an ipk for all to enjoy..


I would go forth on doing this except I do not even know where to start.
I can do this, except I havent really been following this thread or the methods in this thread too closely. Do you want to work with me on this?

My AIM is in my profile.

Last edited by aonic; 06/24/2009 at 03:02 PM.
aonic is offline   Reply With Quote
Old 06/24/2009, 02:54 PM   #134 (permalink)
Member
 
Join Date: Jun 2009
Posts: 10
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

k, so I'm new to this whole pre thing, just rooted and modded pretty much everything in the wiki, had some troubles, figured everything out and have a pretty good understanding of the file system now... The last thing I need is tethering, I was on the Sero plan before tethering, now I'm paying double and would like to have tethering, problem is I'm on OS X 10.5, for some reason the BT connection won't work, passkey from mac never pops up on pre, pre and mac see each other, just do not connect. Vista connects fine to my pre... What about USB? that would be fine with me, I always found I get faster speeds tethering with other phones with USB vs BT. What exactly are the steps to making this work, I've read all seven pages, and I see whats going on, but I really don't want to be inputting code unless its exactly what I need. I get confused with the discussion going back and forth between USB and BT. Basically what do I need to do to make a USB tether work, starting from scratch (after rooting of course)
peazley is offline   Reply With Quote
Old 06/24/2009, 02:54 PM   #135 (permalink)
Member
 
Join Date: Jun 2009
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default WiFi Tethering

So, I have a complete WiFi tether working --- it involves setting up Ad-Hoc mode, and then running the IPTables thing.

Is there a way to turn on the DHCP server for the WiFi Ad-Hoc like we can do for the USB Networking?
Wonder420 is offline   Reply With Quote
Old 06/24/2009, 03:04 PM   #136 (permalink)
Member
 
mu7efcer's Avatar
 
Join Date: Mar 2008
Posts: 921
Likes Received: 7
Thanks: 169
Thanked 229 Times in 141 Posts
Default

Quote:
Originally Posted by mu7efcer View Post
Thanks for this. But just FYI, this does not appear to work in Vista x32. Vista won't install the driver.
Ok. After some experimentation, I was able to get usbnet working on 32bit Vista Home Premium. I followed the instructions here:

predev.wikidot.com/usbnet-setup

But I couldn't install the usbnet driver provided on that page. But I was able to find a driver builtin to Vista that appears to work. Here's what I did:
  1. On Pre: usbnet enable
  2. Reboot Pre
  3. Plug in Pre to USB on Vista
  4. In wizard that comes up asking for driver software, I chose ignore.
  5. Then I went into the device manager, by right clicking on "My Computer" and selecting "Manage", then clicking on "Device Manager"
  6. There was a device called "USB Ethernet Gadget". I right clicked on it and selected "Update Driver Software..."
  7. In the wizard that came up, I clicked "Brows my computer for driver software"
  8. In the next page, I clicked "Let me pick from a list of deice drivers on my computer"
  9. It asked me to pick a type of hardware. I chose "Network Adapter"
  10. Under "Manufacturer", I chose "Microsoft Corporation". (Note: this is not the same as "Microsoft")
  11. In "Network Adapter", I chose "Remote NDIS based Internet Sharing Device.
  12. Then I clicked Next.

Once that finished, I had to manually enable and configure the RNDIS adapter that showed up on the device. I haven't got it working with dnsmasq yet. But I'm able to ssh into my pre over usb. A significant step up from doing it over Bluetooth.
mu7efcer is offline   Reply With Quote
Thanked By: LocoTreoGurl
Old 06/24/2009, 03:18 PM   #137 (permalink)
Member
 
mu7efcer's Avatar
 
Join Date: Mar 2008
Posts: 921
Likes Received: 7
Thanks: 169
Thanked 229 Times in 141 Posts
Default

And holy mackeral! USB is a metric ton faster than bluetooth.

Speedtest just showed 2.09Mb/s download and 0.28Mb/s upload.

Under bluetooth this was more like 0.48Mb/s down & 0.28Mb/s up.
mu7efcer is offline   Reply With Quote
Old 06/24/2009, 03:46 PM   #138 (permalink)
Member
 
Join Date: Jun 2009
Location: Southern Cali
Posts: 90
Likes Received: 0
Thanks: 19
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by mu7efcer View Post
Ok. After some experimentation, I was able to get usbnet working on 32bit Vista Home Premium. I followed the instructions here:

predev.wikidot.com/usbnet-setup

But I couldn't install the usbnet driver provided on that page. But I was able to find a driver builtin to Vista that appears to work. Here's what I did:
  1. On Pre: usbnet enable
  2. Reboot Pre
  3. Plug in Pre to USB on Vista
  4. In wizard that comes up asking for driver software, I chose ignore.
  5. Then I went into the device manager, by right clicking on "My Computer" and selecting "Manage", then clicking on "Device Manager"
  6. There was a device called "USB Ethernet Gadget". I right clicked on it and selected "Update Driver Software..."
  7. In the wizard that came up, I clicked "Brows my computer for driver software"
  8. In the next page, I clicked "Let me pick from a list of deice drivers on my computer"
  9. It asked me to pick a type of hardware. I chose "Network Adapter"
  10. Under "Manufacturer", I chose "Microsoft Corporation". (Note: this is not the same as "Microsoft")
  11. In "Network Adapter", I chose "Remote NDIS based Internet Sharing Device.
  12. Then I clicked Next.

Once that finished, I had to manually enable and configure the RNDIS adapter that showed up on the device. I haven't got it working with dnsmasq yet. But I'm able to ssh into my pre over usb. A significant step up from doing it over Bluetooth.
Dont see any USB Ethernet Gadget, it installed a palm pre, what you think?

Last edited by compnetbobby; 06/24/2009 at 05:28 PM.
compnetbobby is offline   Reply With Quote
Old 06/24/2009, 06:03 PM   #139 (permalink)
Member
 
Join Date: Jun 2009
Posts: 13
Likes Received: 0
Thanks: 2
Thanked 1 Time in 1 Post
Default

Installed SP3 and usbnet works now.
Narfler is offline   Reply With Quote
Old 06/24/2009, 07:11 PM   #140 (permalink)
Member
 
Join Date: Jun 2009
Posts: 58
Likes Received: 0
Thanks: 2
Thanked 20 Times in 9 Posts
Default

Quote:
Originally Posted by jack87 View Post
where did you disappear to.. did you get my reply about mac osx 10.4? have you been fallowing what ive been doing on this thread? any ideas with the info to make something awesome?
Sorry, I am very busy outside of my Pre world between work and friends. You have done a great job investigating and developing the solution. Thanks to everyone for the updated script as well! The only thing I was gonna ask about OS X 10.4 is for you to run 'ifconfig' from the terminal and see if the interface shows up there. Honestly, I am not suprised if it it doesn't work, because the Pre uses a custom 'g_composite' module, as opposed to the vanilla 'g_ether' one. The source code for the BUG Mac usbnet driver is available on their site, but I doubt I can figure out the modifications needed. Anyone ever write mac drivers?
emkman is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0