webOS Nation Forums >  webOS apps and software >  webOS development > Tethered Pre without any apps, SSH, or scripts
Tethered Pre without any apps, SSH, or scripts

  Reply
 
LinkBack Thread Tools Display Modes
Old 01/06/2010, 04:40 PM   #141 (permalink)
Member
 
Join Date: Aug 2009
Posts: 13
Likes Received: 0
Thanks: 3
Thanked 1 Time in 1 Post
Default Change the Default IP of Bluetooth?

I've noticed with 1.3.5 a new network device (Bridge0) has popped up when I tether via bluetooth with the method in this thread.

My question is, has anyone successfully changed the default IP Addy (10.1.1.11) of this stupid thing when it first connects? I tried to force it by adding an entry for it in /etc/network/interfaces (and restarting), and initially it starts out with forced IP, then reverts back to 10.1.1.11.

I need to use an alternate Private network since I'm trying to VPN over the tether.
Ripley is offline   Reply With Quote
Old 01/06/2010, 06:03 PM   #142 (permalink)
Member
 
Join Date: Apr 2008
Posts: 467
Likes Received: 2
Thanks: 14
Thanked 64 Times in 48 Posts
Default

it just occurred to me that was the reason my ssh via bluetooth was broken...after the os update. It was consistently 10.1.1.10 before the OS update and now it 10.1.1.11...Stupid me for not noticing that.
navinag is offline   Reply With Quote
Old 01/08/2010, 02:24 PM   #143 (permalink)
Member
 
Join Date: Jun 2009
Posts: 1,041
Likes Received: 9
Thanks: 26
Thanked 100 Times in 67 Posts
Default

Quote:
Originally Posted by zeropoint46 View Post
hello all,

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

Is this confirmed to work with no issues in 1.3.5.1?
6tr6tr is offline   Reply With Quote
Old 01/08/2010, 02:36 PM   #144 (permalink)
Member
 
Join Date: Aug 2009
Posts: 14
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, works great in 1.3.5.1 here.
alkos333 is offline   Reply With Quote
Old 01/08/2010, 03:12 PM   #145 (permalink)
Member
 
Join Date: Jan 2009
Posts: 48
Likes Received: 0
Thanks: 3
Thanked 5 Times in 3 Posts
Default

Can this be made into a patch on preware?
dangerusty is offline   Reply With Quote
Old 01/08/2010, 03:20 PM   #146 (permalink)
Member
 
Join Date: Sep 2009
Posts: 289
Likes Received: 0
Thanks: 44
Thanked 14 Times in 13 Posts
Default

+1
Flush2810 is offline   Reply With Quote
Old 01/08/2010, 11:46 PM   #147 (permalink)
Member
 
Join Date: Nov 2009
Posts: 26
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

ok here may be a stupid/brilliant idea....besides the bluetooth one...good one there
ANYwayz for those of us that usb-pre it. what would happen if we were to "find" the script that runs the prompt for "usb drive, just charge" pop up that come on and add it to that......just a thought to our problem that would most likely work but i have yet to start looking thought of the idea and maybe someone knows where it is already.....i will post if i find it. -T
tjburgess is offline   Reply With Quote
Old 02/28/2010, 12:17 AM   #148 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

Where does this stand as of WebOS 1.4?

Does it still work?

I know I am able to use 'echo 1 > /proc/sys/net/ipv4/ip_forward' and tether, but I cannot search for and find the third 'forward' and change the subsequent 0 ---> 1.

EDIT:
1.) I copied PmNetConfigManager —> PmNetConfigManager.140
2.) Copied PmNetConfigManager.orig —> PmNetConfigManager
3.) Made the edits on PmNetConfigManager per the original instructions.

Tethering now to post this edit.

Last edited by DrewPre; 02/28/2010 at 01:28 AM.
DrewPre is offline   Reply With Quote
Old 02/28/2010, 07:02 PM   #149 (permalink)
Member
 
Join Date: Nov 2009
Posts: 26
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

w8 does that mean that u got it working? ...... well then if so what is this patch/update supposed to do.

--side note is there some way to change the tone for a txt msg? i havn't tried but the single beep just isn't cutting it
tjburgess is offline   Reply With Quote
Old 02/28/2010, 07:11 PM   #150 (permalink)
Member
 
Join Date: Aug 2009
Posts: 14
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sweet, good to know this remained functional . Thanks for the update!
alkos333 is offline   Reply With Quote
Old 03/06/2010, 01:43 AM   #151 (permalink)
Member
 
Join Date: Sep 2009
Posts: 268
Likes Received: 0
Thanks: 2
Thanked 15 Times in 13 Posts
Default

So much for using this in 1.4... That's one reason to go back down.
Forever92 is offline   Reply With Quote
Old 03/06/2010, 04:07 AM   #152 (permalink)
Member
 
Join Date: Mar 2010
Posts: 6
Likes Received: 0
Thanks: 1
Thanked 2 Times in 1 Post
Default Got it to work in 1.4 w/o downgrading PmNetConfigManager

With a slight adjustment to the original instructions, tethering does work in 1.4. I've only tested it briefly, but I do know that /proc/sys/net/ipv4/ip_forward has stayed at 1 for at least an hour. Before the hack, it would get reset to 0 every time I accessed the data network on the phone.

Here's how I adjusted the 1.4 PmNetConfigManager. Unfortunately there was some weird interaction between PuTTY and vi so I downloaded a copy over scp. Then I used cygwin's vi to edit. Linux or Mac would work just as well.
When opening you'll see a message about "incomplete last line". This will be important later.

In the file, search for "ip_forward" (no quotes); there should only be one occurrence - it will be your old friend /proc/sys/net/ipv4/ip_forward . Replace that path with /tmp/_sys_net_ipv4_ip_forward . Basically this replaces the old path with a shallow one, without changing the size of the original executable. Now save and quit.

When I checked the size of the file, it was 1 byte larger than before, because vi appended a linebreak. I then used this ruby command to remove it (you should substitute your edited filename):

ruby -e 'open(ARGV[0], "r+"){|fh| sz=fh.stat.size; fh.truncate(sz-1) }' PmNetConfigManager_1.4.0_edit

If you don't have ruby installed locally, you can install it on WebOS by running "ipkg-opt install ruby". Then send your locally edited file back to your phone and run the ruby command there.

Stop the PmNetConfigManager, and create the "decoy":
echo 1 > /tmp/_sys_net_ipv4_ip_forward
Optional: also put a 1 into /proc/sys/net/ipv4/ip_forward so you can see immediately if the decoy works.

After this, you can proceed with the instructions as before.

I found that my "/" filesystem was mounted readonly, so I had to remount it before I could replace the file:
mount -o rw,remount /

When you start PmNetConfigManager, you should see that the decoy file was overwritten with a 0, but the real ip_forward stays at 1. Yeah!

EDIT:
After some experimentation, I realized that /tmp is not a good place for the decoy file, since files are purged from there if they aren't modified for a while. When the file was purged, the modded PmNetConfigManager went back to overwriting the real ip_forward location (must be getting the path from somewhere else). I'm going to try using /var/home/root/decoy/ip_frwrd as the decoy.

Remember to make the file executable by running "chmod 755" on it.

Last edited by KelvinPre; 03/06/2010 at 03:21 PM.
KelvinPre is offline   Reply With Quote
Old 03/06/2010, 04:26 AM   #153 (permalink)
Member
 
Join Date: Mar 2010
Posts: 6
Likes Received: 0
Thanks: 1
Thanked 2 Times in 1 Post
Default

Actually you can avoid the vi madness by just running this ruby command on the phone itself, and skipping the other ruby command in my previous post, since no newline is added.

ruby -e 'print ARGF.read.sub(%r[/proc/sys/net/ipv4/ip_forward], "/tmp/_sys_net_ipv4_ip_forward")' /usr/bin/PmNetConfigManager > PmNetConfigManager_1.4.0_edit

Choose whichever way you prefer. But make perfectly sure that the edited filesize matches the original.

EDIT:
If you're unfortunate enough to be stuck with the native-Windows ruby, the above command will seriously mangle the data. This should work on any system:
ruby -e "$stdout.binmode; print open(ARGV[0], 'rb'){|fh| fh.read.sub(%r[/proc/sys/net/ipv4/ip_forward], '/tmp/_sys_net_ipv4_ip_forward')}" PmNetConfigManager_1.4.0_orig > PmNetConfigManager_1.4.0_edit

EDIT 2:
Grr. I realized that ruby 1.9 (which ipkg-opt installs), refuses to do text substitutions on binary data by default. So here's the revised way to run it on the phone, or on your local Unix shell, whether ruby 1.8 or 1.9 (if you're on Windows, just replace single-quote with double-quote and vice versa):
ruby -e '$stdout.binmode.print ARGF.binmode.read.sub(%r[/proc/sys/net/ipv4/ip_forward], %q[/var/home/root/decoy/ip_frwrd])' PmNetConfigManager_1.4.0_orig > PmNetConfigManager_1.4.0_edit

Note that you must run it on the *original* file, not a previously modded one.
Also note that I changed the decoy path according to the edit on my previous post. (For reference, running md5sum on the new file prints "b0fbc6b39fe82353670ea557bd0ae7ea").

Last edited by KelvinPre; 03/06/2010 at 03:02 PM.
KelvinPre is offline   Reply With Quote
Old 03/06/2010, 04:34 PM   #154 (permalink)
Member
 
Join Date: Mar 2010
Posts: 6
Likes Received: 0
Thanks: 1
Thanked 2 Times in 1 Post
Default

Looks like someone at webos-internals already put up a more comprehensive solution for locking in ip_forward at 1:

www .webos-internals.org/wiki/Ip_forward
(sorry for breaking up the URL - I don't have 10 posts yet)
KelvinPre is offline   Reply With Quote
Old 03/15/2010, 10:39 PM   #155 (permalink)
Member
 
Join Date: Sep 2009
Posts: 268
Likes Received: 0
Thanks: 2
Thanked 15 Times in 13 Posts
Default

If only... if only... I knew *** do with that stuff... Oh well...
Forever92 is offline   Reply With Quote
Old 03/25/2010, 12:41 AM   #156 (permalink)
Member
 
Join Date: Nov 2009
Posts: 26
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

ok so yeah....did that.......is there a setting that i need to change to get an ip handed out to the machine.....totally drawing a blank.....did all web-os crap just need to somehow get it working lol.....ahh 911 911 help me plz
tjburgess is offline   Reply With Quote
Old 03/25/2010, 02:39 AM   #157 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

you could assign an ip manually....or.....

edit your /etc/dnsmasq.palm.conf file

look for a line that says interface=

it will have an interface already there...copy that line and make a new interface for USB0 or Eth1 or both [1 for each]

then if you scroll down and look for the line that reads...

dhcp-host=

and copy this line and put the MAC address of your Host PC NIC card then you're PC will get the same ip address automatically every time.

It's pretty self-explanatory once you're in that file tho.
__________________

Palm Pre Backup Utility...done!
Locate Pre....done!
DrewPre is offline   Reply With Quote
Old 03/25/2010, 02:50 AM   #158 (permalink)
Member
 
Join Date: Nov 2009
Posts: 26
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

thats right sweet dude....yeah i knew that i was forgetting some step....but the PmNetConfig not having the option to set it to 1 was throwing me off we shall see if i get an ip and can hit the net....*crossXfingers*
and as far as setting the forward to 1 it should be fine to put it in the start code like b4 right...i didn't look even to see if that code got reset.....sooo many things to change. I HATE 1.4

**Edit after doin work.....yeah gotta reset the dnsmasq file stop/start and do the web os thing and it is kickin *** again! THanks for your guys help here lol

Last edited by tjburgess; 03/25/2010 at 03:09 AM.
tjburgess is offline   Reply With Quote
Old 03/25/2010, 03:35 AM   #159 (permalink)
Member
 
Join Date: Nov 2009
Posts: 26
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

ok sos soS SoS SOS SOs....help.....my phone is stuck in a loop and wont stop....dunno what i did wrong though :/ *crying........lol warranty?!
It shows the palm symbol and then it goes to the restart spin circle and repeats....endlessly....enless i pull battery >:|
tjburgess is offline   Reply With Quote
Old 03/25/2010, 05:01 AM   #160 (permalink)
Member
 
Join Date: Nov 2009
Posts: 26
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Well i still need help to get my phone set up
***but for those that are still looking to do this i wrote up the basics in the setup***
Bear with it, it is long and hopefully helpful for any still confused....basically combined all of the sites and what not into 1 piece of info and better written i think.
If any ?'s u can ask most all that have done it should be able to help out if they can decrypt my tut?! :P

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
:Official start Tut Updated 3/25/05 1.4.x By: tjburgess Info From: Predev and others/experiments :
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Prerequisites: (all initial set-ups should be at the bottom of tut)
rooted pre
ssh access (dropbear or openssh) & optware install OR the novapoxy.py and putty combo
ability to use VI (just use vi less problems)
--vi quick notes -
shift zz = Save and quit
crtl z = quit w/o save
i = insert text (or actually edit file)
/ = search function
ESC = quit insert,search, etc...

optional prereq:
usbnet setup and dhcp setup

-----IF not already put phone into developer mode-----
Developer Mode Active ! ----Type in the Konami code (upupdowndownleftrightleftrightbastart) to access the Developer Mode application. (you will type this into the search bar -just start typeing it-

1) ssh to the phone, sudo to root (Or use the Python:Novaproxy.py and Putty to it)

2) -- We will need to change 3 settings here --

1) GO to /etc/network/ , vi options
a) Change ipforward=no into ip_forward=yes

2) Go to /etc/pmnetconfig/ , vi if-down (gonna comment lines out with a # symbol)
a) ${LOG} "${ECHO} 0 >/proc/sys/net/ipv4/ip_forward"
b) ${ECHO} 0 >/proc/sys/net/ipv4/ip_forward

3) GO to /usr/bin/PmNetConfigManager (Making a fake file to write to keep ipforward settings)
a) You will start by doing there command lines
mount -o remount,rw /
mkdir-p /media/cryptofs/fake/sys/net/ipv4
ln -s /media/cryptofs/fake /fake
echo 0 >/fake/sys/net/ipv4/ip_forward

--------------make a back-up of your PmNetConfigManager b4 next part--------------
--------------cp PmNetConfigManager PmNetConfigManager.orig just in case you mess something up--------------

4) Now we will edit PmNetConfigManager to write chages to fake file
a) vi PmNetConfigManager
b) do a search for proc/sys/net/ipv4/ip_forward , (dont need the full path. There should be only 1 line with "proc/sys")
c) now change "proc" to "fake"

3) stop PmNetConfigManager

4) start PmConnectionManager
--------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------
: USB SETUP
--------------------------------------------
/etc/# stop dnsmasq
vi dnsmasq.palm.conf
add interface=usb0
add dhcp-range=192.168.0.11,192.168.0.12,12hr

start dnsmasq
--------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------
: enable ip forwarding start-up script
--------------------------------------------

echo 1 > /proc/sys/net/ipv4/ip_forward --Take this line and put below
added this echo statement to /etc/event.d/ipforward below the iptables rule
# 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
-------------PUT LINE HERE
end script

--------------------------------------------

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PRE - Forget me nots on new treak/hacks!!!!!!!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

** seems that the optware package is not working to download for installation so we shall go with NovaProxy.py and putty combo for now.

Putty Settings....(With novaproxy.py)
Host Name: 192.168.0.202 <--Pre Internal IP
Port: 222
Connection Type: SSH
-----------------------------
Putty Settings....(After Dropbear & Optwareinstall)
Host Name: localhost
Port: 8023
Connection Type: Raw

^^--should be the only putty addresses you will need--

++++++++++++++++++++++++++++++++++++++++++++
Pre Rec requirements
++++++++++++++++++++++++++++++++++++++++++++

--------------------------------------------
NovaProxy.py and putty install
(to access pre for first time)
--------------------------------------------
Preparation
* Download the webOS image.(http://palm.cdnetworks.net/staging/r...0ewwsprint.jar)
* Change the file extension from .jar to .zip and then extract the archive.
* Run the driver installer from the extracted file by browsing to the folder webosdoctorp100ewwsprint/resources/ and running NovacomInstaller_x86.msi (for 32-bit Windows) or NovacomInstaller_x64.msi (for 64-bit Windows).
* Download Putty.exe from PuTTY Download Page. Note that there is no installation, you're simply downloading an exe you will run. Note where you downloaded it.
* Download and install Python 2.6 from Download Python. Make sure it's not a more recent or an older version - it must be 2.6.x!
o Install using all the default choices.
* Get a copy of the novaproxy.py script from http://github.com/asedeno/novaproxy/...r/novaproxy.py (Right click and Save the file where you are going to remember you put it).

--------------------------------------------

-----IF not already put phone into developer mode-----
Developer Mode Active ! ----Type in the Konami code (upupdowndownleftrightleftrightbastart) to access the Developer Mode application. (you will type this into the search bar -just start typeing it-


++++++++++++++++++++++++++++++++++++++++++++
PRE WARE INStALL
++++++++++++++++++++++++++++++++++++++++++++

http://www.webos-internals.org/wiki/...alling_Preware
-Follow the instructions

Last edited by tjburgess; 03/25/2010 at 09:14 AM.
tjburgess is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0