Difference between revisions of "Patch webOS Roam Control"
Hopspitfire (talk | contribs) |
|||
| Line 24: | Line 24: | ||
</nowiki></pre> | </nowiki></pre> | ||
| − | line | + | At line 233 (WebOS 1.2), find: |
<pre><nowiki> | <pre><nowiki> | ||
{label : $L("Automatic"),value: "any"} | {label : $L("Automatic"),value: "any"} | ||
| Line 34: | Line 34: | ||
</nowiki></pre> | </nowiki></pre> | ||
| − | + | At lines 1264-1267 (WebOS 1.2) find: | |
<pre><nowiki> | <pre><nowiki> | ||
if(payload.extended.mode == 'any') { | if(payload.extended.mode == 'any') { | ||
this.voiceRoamingModel.currentVoiceRoaming = "any"; | this.voiceRoamingModel.currentVoiceRoaming = "any"; | ||
$('dataroamingrow').show(); | $('dataroamingrow').show(); | ||
| − | |||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
| Line 47: | Line 46: | ||
this.voiceRoamingModel.currentVoiceRoaming = "roamonly"; | this.voiceRoamingModel.currentVoiceRoaming = "roamonly"; | ||
$('dataroamingrow').show(); | $('dataroamingrow').show(); | ||
| − | |||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
Revision as of 21:25, 29 September 2009
Roam Control
Creating a "Roam Only" mode
By default, the Pre has no "Roam Only" mode. For fringe Sprint service areas, this can be very annoying, as the phone will tend to prefer a weak Sprint signal versus a strong Verizon/Other CDMA signal. We can enable this mode fairly easily.
Procedure
SSH in to rooted Pre Mount filesystem as r/w, navigate to phoneprefs folder and create a backup of current preflist-assistant.js
mount -o remount,rw / cd /usr/palm/applications/com.palm.app.phoneprefs/app/controllers cp preflist-assistant.js preflist-assistant.js.bak
Edit preflist-assistant.js
vi preflist-assistant.js
At line 233 (WebOS 1.2), find:
{label : $L("Automatic"),value: "any"}
- and replace with:
{label : $L("Automatic"),value: "any"},
{label : $L("Roam Only"),value: "roamonly"}
At lines 1264-1267 (WebOS 1.2) find:
if(payload.extended.mode == 'any') {
this.voiceRoamingModel.currentVoiceRoaming = "any";
$('dataroamingrow').show();
}
- and add below:
else if(payload.extended.mode == 'roamonly') {
this.voiceRoamingModel.currentVoiceRoaming = "roamonly";
$('dataroamingrow').show();
}
Mount the filesystem as r/o, reboot the phone and, from the dialer, go to Preferences and test out your new mode!
mount -o remount,ro / reboot
Credit
w5mw
Scripting possibilities
You can use luna-send to change these settings from the command line. I run this bash (not sh) script from cron to change to roamonly whenever my phone is connected to my access point because my carrier's signal is poor where I live and calls are dropped in automatic mode.
#!/bin/bash
######## roam-at-home ############
MYSSID="put-your-ssid-here"
function ROAMONLY {
luna-send palm://com.palm.telephony/roamModeSet '{"mode" : roamonly }'
}
function ANY {
luna-send palm://com.palm.telephony/roamModeSet '{"mode" : any }'
}
SSID=$( iwconfig eth0 | grep ESSID | awk -F 'ESSID:"' '{print $2}' | awk -F '"' '{print $1}' )
if [ "$SSID" == "$MYSSID" ];
then
ROAMONLY
else
ANY
fi
jjonez
