Difference between revisions of "Patch webOS Roam Control"
Hopspitfire (talk | contribs) |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 6: | Line 6: | ||
=== Creating a "Roam Only" mode=== | === Creating a "Roam Only" mode=== | ||
− | + | This will allow users to add "Roam Only" mode to WebOS 1.3.1 Palm Pre. | |
=== Procedure=== | === Procedure=== | ||
Line 24: | Line 24: | ||
</nowiki></pre> | </nowiki></pre> | ||
− | line | + | At line 240 (WebOS 1.3.1), 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 1457-1460 (WebOS 1.3.1) 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> | ||
+ | |||
+ | At lines 1449-1455 (WebOS 1.3.1) find: | ||
+ | <pre><nowiki> | ||
+ | |||
+ | if(this.voiceRoamingChoices.length = 3) { | ||
+ | This.voiceRoamingChoices[1] = { | ||
+ | label: $L("Automatic"), | ||
+ | value: "any" | ||
+ | }; | ||
+ | this.voiceRoamingChoices.pop(); | ||
+ | } | ||
+ | |||
+ | </nowiki></pre> | ||
+ | |||
+ | Add // in front of each line to comment it out. Save the file | ||
Mount the filesystem as r/o, reboot the phone and, from the dialer, go to Preferences and test out your new mode! | Mount the filesystem as r/o, reboot the phone and, from the dialer, go to Preferences and test out your new mode! | ||
Line 59: | Line 72: | ||
=== Credit=== | === Credit=== | ||
− | w5mw | + | <pre><nowiki> |
+ | Original: w5mw | ||
+ | Modified for 1.3.1 | ||
+ | </nowiki></pre> | ||
+ | === 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. | ||
− | = | + | NOTE: This Script is Only Verified to Work with WebOS <= 1.3.5.1 |
− | |||
<pre><nowiki> | <pre><nowiki> | ||
#!/bin/bash | #!/bin/bash | ||
− | ######## roam-at-home ############ | + | ######## roam-at-home v.02 ############ |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | MYSSID="put-your-ssid-here" | ||
+ | MYSSID2="put-another-ssid-here-or-leave-as-is" | ||
+ | MYSSID3="put-another-ssid-here-or-leave-as-is" | ||
+ | MYSSID4="put-another-ssid-here-or-leave-as-is" | ||
− | if [ "$SSID" == "$MYSSID" | + | |
− | then | + | function ROAMONLY { |
− | ROAMONLY | + | luna-send palm://com.palm.telephony/roamModeSet '{"mode" : roamonly }' |
− | else | + | } |
− | ANY | + | function ANY { |
− | fi | + | 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" -o "$SSID" == "$MYSSID2" -o "$SSID" == "$MYSSID3" -o "$SSID" == "$MYSSID4" ]; | ||
+ | then | ||
+ | ROAMONLY | ||
+ | else | ||
+ | ANY | ||
+ | fi | ||
</nowiki> </pre> | </nowiki> </pre> | ||
jjonez | jjonez |
Latest revision as of 18:01, 1 May 2010
Roam Control
Creating a "Roam Only" mode
This will allow users to add "Roam Only" mode to WebOS 1.3.1 Palm Pre.
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 240 (WebOS 1.3.1), find:
{label : $L("Automatic"),value: "any"}
- and replace with:
{label : $L("Automatic"),value: "any"}, {label : $L("Roam Only"),value: "roamonly"}
At lines 1457-1460 (WebOS 1.3.1) 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(); }
At lines 1449-1455 (WebOS 1.3.1) find:
if(this.voiceRoamingChoices.length = 3) { This.voiceRoamingChoices[1] = { label: $L("Automatic"), value: "any" }; this.voiceRoamingChoices.pop(); }
Add // in front of each line to comment it out. Save the file
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
Original: w5mw Modified for 1.3.1
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.
NOTE: This Script is Only Verified to Work with WebOS <= 1.3.5.1
#!/bin/bash ######## roam-at-home v.02 ############ MYSSID="put-your-ssid-here" MYSSID2="put-another-ssid-here-or-leave-as-is" MYSSID3="put-another-ssid-here-or-leave-as-is" MYSSID4="put-another-ssid-here-or-leave-as-is" 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" -o "$SSID" == "$MYSSID2" -o "$SSID" == "$MYSSID3" -o "$SSID" == "$MYSSID4" ]; then ROAMONLY else ANY fi
jjonez