Modded GPS.conf [need ROOT] - Xiaomi Mi 4C

This is a GPS.conf script inside the CM, after i had problem with GPS, i learn very basic GPS
i mod this script to optimize the locking speed for Device only GPS mode, and optimize AGPS for LTE network,
Please try and report if its work for you
replace the GPS.conf in system/etc/gps.conf with this :
https://www.dropbox.com/s/94gqm8r1n7msrz4/gps.conf?dl=0
or edit the GPS.conf in editor mode and paste this script (dont forget to back up the old file) - save
XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin
#Version check for XTRA
#DISABLE = 0
#AUTO = 1
#XTRA2 = 2
#XTRA3 = 3
XTRA_VERSION_CHECK=0
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
#Test
NTP_SERVER=time.gpsonextra.net
#Global
#NTP_SERVER=pool.ntp.org
#Asia
# NTP_SERVER=asia.pool.ntp.org
# NTP_SERVER=0.asia.pool.ntp.org
# NTP_SERVER=1.asia.pool.ntp.org
# NTP_SERVER=2.asia.pool.ntp.org
#Europe
# NTP_SERVER=europe.pool.ntp.org
# NTP_SERVER=0.europe.pool.ntp.org
# NTP_SERVER=1.europe.pool.ntp.org
# NTP_SERVER=2.europe.pool.ntp.org
#North America
# NTP_SERVER=north-america.pool.ntp.org
# NTP_SERVER=0.north-america.pool.ntp.org
# NTP_SERVER=1.north-america.pool.ntp.org
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
# If DEBUG_LEVEL is commented, Android's logging levels will be used
DEBUG_LEVEL=4
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# Below bit mask configures how GPS functionalities
# should be locked when user turns off GPS on Settings
# Set bit 0x1 if MO GPS functionalities are to be locked
# Set bit 0x2 if NI GPS functionalities are to be locked
# default - non is locked for backward compatibility
#GPS_LOCK = 0x2
# supl version 2.0
SUPL_VER=0x20000
# Emergency SUPL, 1=enable, 0=disable
SUPL_ES=1
#Choose PDN for Emergency SUPL
#1 - Use emergency PDN
#0 - Use regular SUPL PDN for Emergency SUPL
USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
#SUPL_MODE is a bit mask set in config.xml per carrier by default.
#If it is uncommented here, this value will over write the value from
#config.xml.
#MSA=0X2
#MSB=0X1
#SUPL_MODE=0x1
# GPS Capabilities bit mask
# SCHEDULING = 0x01
# MSB = 0x02
# MSA = 0x04
# ON_DEMAND_TIME = 0x10
# GEOFENCE = 0x20
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
CAPABILITIES=0x37
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.host.com or IP
# SUPL_PORT=1234
SUPL_HOST=supl.google.com
SUPL_PORT=7276
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234
# Bitmask of slots that are available
# for write/install to, where 1s indicate writable,
# and the default value is 0 where no slots
# are writable. For example, AGPS_CERT_WRITABLE_MASK
# of b1000001010 makes 3 slots available
# and the remaining 7 slots unwritable.
#AGPS_CERT_WRITABLE_MASK=0
####################################
# LTE Positioning Profile Settings
####################################
# 0: Enable RRLP on LTE(Default)
# 1: Enable LPP_User_Plane on LTE
# 2: Enable LPP_Control_Plane
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
LPP_PROFILE=3
################################
# EXTRA SETTINGS
################################
# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=0
# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
SGLTE_TARGET=1
##################################################
# Select Positioning Protocol on A-GLONASS system
##################################################
# 0x1: RRC CPlane
# 0x2: RRLP UPlane
# 0x4: LLP Uplane
A_GLONASS_POS_PROTOCOL_SELECT=0x4
Click to expand...
Click to collapse
you can also change / add the NTP server based on your region from here http://www.pool.ntp.org/en/
Enjoy

I did also experience some difficulties with the GPS accuracy in the past. I did test all the settings above and they work, but there is no/little deference.
The last stable MIUI 7.5 version 7.5.4.0 does not have problems any more.

It usually takes very long time to lock with that setting, but once u locked, it'll be much faster on next use

Related

Disabling Direct Push on Dolphin 9900 Handset

I have a Dolphin 9900 handset which runs WM 6.1. Each day at 12:00PM and 12:00AM the device turns on automatically. There are no e-mail accounts setup on this device. I have tried to disable Direct Push, assuming that's the reason for its issue, but nothing has worked. I have tried the following:
[HKEY_CURRENT_USER\ControlPanel\Notifications\Remin ders\AutoSnooze]
"AutoSnoozeMins"=dword:0
HKCU\ControlPanel\Notifications\{A877D65A239C-47a7-9304-0D347F580408}
set value "Options" to 20000000 (hexadecimal) or 536870912 (decimal)
And the steps found here:
The Exchange Security Policy (4131) updates the device policy:
HKLM\Security\Policies\00001023: 0 = Enabled; 1 = Disabled
To change the inactivity timer:
HKLM\Comm\Security\Policy\LASSD\AE\{50C13377-C66D-400C-889E-C316FC4AB374}\
AEFrequencyType: 0 = No inactivity time; 1 = Activity time enable
AEFrequencyValue: = number of minutes before timeout
To change the password strength policy:
HKLM\Comm\Security\Policy\LASSD\LAP\lap_pw\
MinimumPasswordLength: minimum number of characters in password (0 defaults to 1)
PasswordComplexity: 0 = Require Alphanumeric; 1 = Require numeric (PIN); 2 = No restriction
And finally to change the Device wipe settings:
HKLM\Comm\Security\Policy\LASSD\
DeviceWipeThreshold: -1 = disabled; (any positive number) = # failed attempts before device memory gets whacked
CodewordFrequency: # of attempts before a codeword is displayed to prevent accidental device wipe.
None of these steps worked as the device still turns on at 12:00 each time. Does anyone have any suggestions?

default wimax ##data# settings

Hopefully these will be useful if someone messed up theirs. Eventually after I update/root I will post any changes.
stock unrooted evo 4g
hardware 0003
baseband = 1.39.00.05.31
software = 1.32.651.6
pri = 1.40_003
prl = 60668
Code:
##data# > wimax settings
standby time (minute) = 10
scan rate (minute) = 30
NAI = [email protected]
username = [email protected]
realm = sprintpcs.com
spi mn-aaa = 4D2
spi mn HA = 4D2
home ip address = 0.0.0.0
second home agent = 68.28.89.76
center frequency = 2647000,2657000,2667000
bandwidth = 10, 10, 10
napdis = 000002
nspdis = 000004
wimax scan attempt timeout(s) = 1
wimax scan retry(s) = 900
wimax idle sleep(s) = 10
wimax entry rx (rssi) (dbm) = -89
wimax entry cinr (db) = 4
wimax entry delay(s) = 600
wimax exit cinr (db) = 2
wimax exit delay(s) = 2
handoff threshold = 0
idle mode timer = 0
tls = enable
ttls = disable
obviously replace the 4g mac and username with your own.
--------------------------------------------
edit: after OTA update, some missing and modified settings
stock unrooted evo 4g
hardware 0003
baseband = 2.05.00.06.10
software = 1.47.651.6
pri = 1.40_003
prl = 60668
Code:
##data# > wimax settings
standby time (minute) = 10
scan rate (minute) = 30
NAI = [email protected]
username = [email protected]
realm = sprintpcs.com
[STRIKE]spi mn-aaa = 4D2
spi mn HA = 4D2
home ip address = 0.0.0.0
second home agent = 68.28.89.76[/STRIKE]
center frequency = 2647000,2657000,2667000
bandwidth = 10, 10, 10
napdis = 000002
nspdis = 000004
wimax scan attempt timeout(s) = 1
[COLOR="SeaGreen"]wimax scan retry(s) = 300[/COLOR]
wimax idle sleep(s) = 10
wimax entry rx (rssi) (dbm) = -89
wimax entry cinr (db) = 4
[COLOR="SeaGreen"]wimax entry delay(s) = 300[/COLOR]
wimax exit cinr (db) = 2
wimax exit delay(s) = 2
handoff threshold = 0
idle mode timer = 0
tls = enable
ttls = disable
edit 2: added additional settings per request
------------------------------------
Code:
data profile
active profile = 1
username = [email protected]
spi mn-ha = 4d2
spi mn-aaa = 4d2
reverse tunnel preferred = enable
home ip address = 0.0.0.0
primary home agent = 255.255.255.255
second home agent = 68.28.89.76
dsa server url = https://dsa.spcsdns.net:443/dsa/
Code:
evdo
ddtm = disable
preferred mode = automatic
Code:
advanced
meid(hex) = your meid
p_rev = IS-2000 (6)
scm = 58
slot mode = enable
slot cycle index = 2
mcc (mobile country code) = 310
mnc (mobile network code) = 00
msid = (not sure if this is private so not posting)
accolc (access overload class) = 2
vocoder = enable
evrc-b = disable
home orig = evrc
roam orig = voice 13k
home sys registration = enable
foreign sid registration = enable
foreign nid registration = enable
mn ha spi set = enable
mn aaa spi set = enable
home side/nid #1 = 4139/65535
mms server url = http://mms.sprintpcs.com
rtsp proxy port = 554
rtsp proxy address = rtsp.vog.sprintpcs.com
http pd proxy port = 8085
http pd proxy address = pd.vog.sprintpcs.com
======================================
after froyo ota update
android version = 2.2
baseband = 2.15.00.07.28
kernel = 2.6.32.15-g746f4f0 [email protected] #58
build = 3.26.651.6 cl218634 release-keys
software = 3.26.651.6
browser = webkit3.1
pri = 1.40_003
prl = 60668
Code:
##data#
standby time (minutes) = 10
scan rate (minutes) = 30
NAI = [email protected]
user name = [email protected]
realm = sprintpcs.com
center frequency = 2647000,2657000,2667000
bandwidth = 10,10,10
napdis = 000002
nspdis = 000004
wimax_scan_attempt_timeout(s) = 1
[COLOR="Lime"]wimax_scan_retrys = 120[/COLOR]
wimax_idle_sleep(s) = 10
wimax_entry_rx(rssi)dbm = -89
wimax_entry_cinr(db) = 4
wimax_entry_delay(s) = 300
wimax_exit_cinr (db) = 2
wimax_exit_delay(s) = 2
handoff threshold = 0
idle mode timer = 0
tls = enable
ttls = disable
Awesome thanks!
Swyped from my EVO via XDA app
When you root your PRI will roll back to 1.34
There is quite a few obvious entries that are missing on a rooted evo with 4g working.
Hmm
Interesting
James
added wimax data settings after applying OTA update
Thanks for this, it was a big help!
I had screwed with some settings and ended up not remembering what they were
Can some post the screen shots/info for the other settings under data plz, looking for default unmodified ones.
I thought these were the default unmodified settings?
~Jasecloud4
jasecloud4 said:
I thought these were the default unmodified settings?
~Jasecloud4
Click to expand...
Click to collapse
they prob are but i need the ones for evdo
stress1ner said:
Can some post the screen shots/info for the other settings under data plz, looking for default unmodified ones.
Click to expand...
Click to collapse
added info to first post
TeknoJnky said:
added info to first post
Click to expand...
Click to collapse
Good move not posting your MSID, it's private
my 4g isnt working after the simple root process. how might i go about figuring out why?
jbcain said:
my 4g isnt working after the simple root process. how might i go about figuring out why?
Click to expand...
Click to collapse
I would recommend flashing whitslacks rooted oem to make sure all the radios and such are up to date.
http://forum.xda-developers.com/showthread.php?t=715915
Once its all working from there, then you can try out other roms if you desire.
TeknoJnky said:
added info to first post
Click to expand...
Click to collapse
good looking out.
TeknoJnky said:
Code:
##data# > wimax settings
standby time (minute) = 10
scan rate (minute) = 30
NAI = [email protected]
username = [email protected]
realm = sprintpcs.com
[STRIKE]spi mn-aaa = 4D2
spi mn HA = 4D2
home ip address = 0.0.0.0
second home agent = 68.28.89.76[/STRIKE]
center frequency = 2647000,2657000,2667000
bandwidth = 10, 10, 10
napdis = 000002
nspdis = 000004
wimax scan attempt timeouts = 1
[COLOR="SeaGreen"]wimax scan retrys = 300[/COLOR]
wimax idle sleeps = 10
wimax entry rx (rssi) (dbm) = -89
wimax entry cinr (db) = 4
[COLOR="SeaGreen"]wimax entry delays = 300[/COLOR]
wimax exit cinr (db) = 2
wimax exist delays = 2
handoff threshold = 0
idle mode timer = 0
tls = enable
ttls = disable
Click to expand...
Click to collapse
Just FYI: If you change the WIMAX_scan_attempt_Timeout - the only valid entries are 5-300, so you won't be able to restore the default value of "1"
updated with froyo OTA defaults
only change noticed was
wimax_scan_retrys = 120 (from 300)
...and the update resets all values that were manually changed.
Question: How would the MN HA SPI Set and MN AAA SPI Set values be changed from Enable (stock) to Disable? I was checking speed downloads tonight on my Evo and my wife's and noticed are settings are different, but I didn't change my values manually something else did... All other settings are consistent.
Both phones are rooted and running MikFroyo 4.5.
I tried to google what those settings are even for, but didn't have much luck. Any help would be appreciated.
Question: What are the MN HA SPI Set and MN AAA SPI Set values for?
I was comparing download speeds on my wife's Evo and mine tonight after the latest PRL update and noticed our settings are different.
Her phone shows both values as Enable and mine show Disable. I have no idea how mine got changed.
I tried to google search but didn't find anything helpful. Any help would be appreciated.
Edit: Both of our phones are rooted and currently running MikFroyo 4.5.
Is there a way to disable 4G? My 4G keeps turning itself on and I *DONT* want it on EVER AGAIN.
SOLVED: Chaged 4G MAC to 00:00:00:00:00:00 and now it doesn't connect and after a few attemps it idles. Still haven't checked how much the battery drains... Another solution is to change the RSA key just 1 character will make it not connect. (both the MAC & RSA keys can be edited in wimax.img)

GPS conf question...

Below is my gps conf file. Is there anything I can do to alleviate the 10 minute lock on?
I live about an hour northwest of Chicago.
NTP_SERVER=time-a.timefreq.bldrdoc.gov
NTP_SERVER=time-b.timefreq.bldrdoc.gov
NTP_SERVER=time-c.timefreq.bldrdoc.gov
NTP_SERVER=utcnist.colorado.edu
NTP_SERVER=utcnist.colorado.edu
NTP_SERVER=time.nist.gov
NTP_SERVER=now.okstate.edu
NTP_SERVER=ntp1.kansas.net
NTP_SERVER=ntp2.kansas.net
NTP_SERVER=ntp1.jtsage.com
NTP_SERVER=ntp.jentfoo.com
NTP_SERVER=ntp2.jtsage.com
NTP_SERVER=ntp.squirrels.us
NTP_SERVER=0.us.pool.ntp.org
NTP_SERVER=1.us.pool.ntp.org
NTP_SERVER=2.us.pool.ntp.org
NTP_SERVER=3.us.pool.ntp.org
NTP_SERVER=north-america.pool.ntp.org
NTP_SERVER=0.north-america.pool.ntp.org
NTP_SERVER=1.north-america.pool.ntp.org
NTP_SERVER=2.north-america.pool.ntp.org
NTP_SERVER=3.north-america.pool.ntp.org
AGPS=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL = 3
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_USER_PLANE=TRUE
REPORT_POSITION_USE_SUPL_REFLOC=1
QOS_ACCURACY=50
QOS_TIME_OUT_STANDALONE=60
QOS_TIME_OUT_agps=89
QosHorizontalThreshold=1000
QosVerticalThreshold=500
AssistMethodType=1
AgpsUse=1
AgpsMtConf=0
AgpsMtResponseType=1
AgpsServerType=1
AgpsServerIp=3232235555
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=1
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000
################################
##### AGPS server settings #####
################################
# FOR C2K PDE SUPPORT, set the following
C2K_HOST=c2k.pde.com
C2K_PORT=1234
# FOR SUPL SUPPORT, set the following
SUPL_HOST=FQDN
SUPL_HOST=lbs.geo.t-mobile.com
SUPL_HOST=supl.google.com
SUPL_PORT=7276
SUPL_SECURE_PORT=7275
SUPL_NO_SECURE_PORT=3425
SUPL_TLS_HOST=FQDN
SUPL_TLS_CERT=/etc/SuplRootCert
SUPL_CERT=/etc/SuplRootCert
################################
# EXTRA SETTINGS
################################
# Wiper (wifi positioning), 1=enable, 0=disable
ENABLE_WIPER=1
CURRENT_CARRIER=common
PHONE_TYPE=UMTS
What ROM are you running? I get 3-6m locks in under a minute on CM 7.2.0 without even touching the gps.conf file.
Sent from my LG-P999 using xda premium
I'm running Tsugi 11-28 roll up.
I added the google supl settings, and it worked like a charm.
I had to change my supl host to supl.google.com After the first lock which took a few minutes, it locks within 5 seconds now as long as I have clear view of the sky.
Here is my gps.conf
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
SUPL_HOST=supl.google.com
SUPL_CERT=/etc/SuplRootCert
SUPL_PORT=7275
PHONE_TYPE=UMTS
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=7275
################################
# EXTRA SETTINGS
################################
# Wiper (wifi positioning), 1=enable, 0=disable
ENABLE_WIPER=1
Sent from my LG-P999 using XDA App
Beekersguy said:
I added the google supl settings, and it worked like a charm.
Click to expand...
Click to collapse
Could you be a little more specific as to exactly which settings you added/changed? I'm a little confused, because in your original post you already had "SUPL_HOST=supl.google.com" in the gps.conf you quoted. Thanks.
More generally, what is the relationship between what is shown in the "GPS Test" system settings you get to from the hidden menu and what's in gps.conf? I changed the system settings via the hidden menu, but /etc/gps.conf is still the original version.
I went into the hidden menu and in SUPL settings, I added the info about google supl servers that is listed in my conf.
Ah, okay; thanks for the clarification.
http://forum.xda-developers.com/showthread.php?t=1222022 Here you go
Beekersguy said:
I went into the hidden menu and in SUPL settings, I added the info about google supl servers that is listed in my conf.
Click to expand...
Click to collapse
A quick followup on this: I had done that numerous times with various supl servers, including Google's, on previous ROMs with little or no effect. I did it again last night and just got a 14-second TTFF this morning! That's the first time that's ever happened (after allowing a suitable delay to let the data expire to ensure that I was not getting a hot fix from the previous fix). The only differences from what I had done before were: 1) used port 7276 instead of 7275; 2) set the SuplCert path; 3) used the Tsugi ROM (previous attempts were with Froyo and Gingerbread stock ROMs).
I'm not sure what, if anything, is significant in those differences or if this speed-up will persist, but I've never gotten a warm fix in less than 60 seconds before, with most taking 2-3 minutes, so I'm cautiously optimistic.
Beekersguy said:
I went into the hidden menu and in SUPL settings, I added the info about google supl servers that is listed in my conf.
Click to expand...
Click to collapse
How do I get to the hidden menu?
Depends on the ROM you are using. You dial 1809#*xxx#, where "xxx" represents the model number of the phone: 999 for stock ROMs, 95 for ROMs based on the leaked 2.3.4 Tracfone ROM like Tsugi. That brings up the "hidden menu," which has a "GPS Test" command. If you wander around in the System Settings, you'll find the places to set the supl server, etc.
If the phone code does not work for you because your on a custom rom that doesn't support phone codes on the dialer do this
Download Anycut from market
Long press home screen Shortcuts -> Any Cut -> Activity -> HiddenMenu
You now have a shortcut to hiddenmenu ^_^
Did you flash the latest baseband and ril?
Sent from my LG-P999 using xda premium

[Q] How to use Tasker to enable WIFI when entering Airplane Mode?

I'm using Tasker to enable Airplane Mode on my OnePlus automatically when I lose cellular signal and recheck for signal again in five minutes time. (this is so that battery isn't constantly drained looking for signal). This is useful at my workplace where I have wifi but no cellular connection. I would like to enter airplane mode but would like to keep Wifi on so that I can still use my internet connection. Can someone please tell me how I can go about turning my wifi on when Airplane mode is activated? Or better yet, not tuning wifi off at all? (note, I'm using SEcure Settings to enable/disable airplane mode as 4.4.4 does not allow it to do that natively in Tasker.)
Thank you!
I just figured it out, but please tell me if you have any thoughts. I used Secure settings to Turn wifi on after Airplane Mode comes on. Tasker native 'wifi on' does not work but using the Secure Settings plugin worked fine) I would still prefer to keep wifi on when Airplane mode is entered so I do not lose wifi connection while the Wifi card is being restarted. Please let me know what you think.
I have been using this tutorial to achieve airplane mode when signal is weak: (taken from http://android.stackexchange.com/qu...-and-how-can-i-keep-it-from-eating-my-battery )
Task "InitVars":
Variable -> Variable Set: %SIGSTATE = 0
Task "SigLow":
Net -> Mobile Data: Off
Variable -> Variable Set: %SIGSTATE = 1
Alert -> Notify Vibrate: Title "IzzySignal"; Text: "Signal Low; Mobile data disabled (Signal: %CELLSIG)"
Task "SigLost":
Variable -> Variable Set: %WLANSTATE = 0
Variable -> Variable Set: %WLANSTATE = 1 IF %Wifi ~ on
Net -> Airplane Mode: On
Net -> Wifi: On IF %WLANSTATE ~ 1
Variable -> Variable Set: %SIGSTATE = 2
Alert -> Notify Vibrate: Title "IzzySignal", Text: "Signal Lost; Entering Airplane Mode"
Task "SigReturn":
Task -> Wait: 5 Minutes
Net -> Airplane Mode: Off
Task -> Wait: 15 Seconds
(give the device some time to find a new signal!)
Net -> Mobile Data: On IF %ROAM ~ Off
(prevent bad surprise when returning from vacation abroad!)
Variable -> Variable Set: %SIGSTATE = 0
Alert -> Notify Vibrate: Title "IzzySignal", Text "Signal On; Airplane Mode disabled (Signal: %CELLSIG)"
Now for the profiles:
Profil SigLowCheck:
State -> Variable -> Variable Value: Name "%SIGSTATE", Op "Math: Less Than", Value "1"
State -> Phone -> Signal Strength: From 0 To 2
State -> Tasker -> Profile Active: "SigLost", [x] Invert
(make sure to avoid a conflict: %SIGSTATE~0 && SignalStrength~1 would match both profiles condition)
Task: SigLow
Profil SigLostCheck:
State -> Variable -> Variable Value: Name "%SIGSTATE", Op "Math: Less Than", Value "2"
State -> Phone -> Signal Strength: From 0 To 1
Task: SigLost
Profile SigReturnCheck:
State -> Variable -> Variable Value: Name "%SIGSTATE", Op "Math: Greater Than", Value "0"
Task: SigReturn
Profile Init:
Event -> Tasker -> Monitor Start
Task: InitVars
neopl666 said:
I'm using Tasker to enable Airplane Mode on my OnePlus automatically when I lose cellular signal and recheck for signal again in five minutes time. (this is so that battery isn't constantly drained looking for signal). This is useful at my workplace where I have wifi but no cellular connection. I would like to enter airplane mode but would like to keep Wifi on so that I can still use my internet connection. Can someone please tell me how I can go about turning my wifi on when Airplane mode is activated? Or better yet, not tuning wifi off at all? (note, I'm using SEcure Settings to enable/disable airplane mode as 4.4.4 does not allow it to do that natively in Tasker.)
Thank you!
I just figured it out, but please tell me if you have any thoughts. I used Secure settings to Turn wifi on after Airplane Mode comes on. Tasker native 'wifi on' does not work but using the Secure Settings plugin worked fine) I would still prefer to keep wifi on when Airplane mode is entered so I do not lose wifi connection while the Wifi card is being restarted. Please let me know what you think.
I have been using this tutorial to achieve airplane mode when signal is weak: (taken from http://android.stackexchange.com/qu...-and-how-can-i-keep-it-from-eating-my-battery )
Task "InitVars":
Variable -> Variable Set: %SIGSTATE = 0
Task "SigLow":
Net -> Mobile Data: Off
Variable -> Variable Set: %SIGSTATE = 1
Alert -> Notify Vibrate: Title "IzzySignal"; Text: "Signal Low; Mobile data disabled (Signal: %CELLSIG)"
Task "SigLost":
Variable -> Variable Set: %WLANSTATE = 0
Variable -> Variable Set: %WLANSTATE = 1 IF %Wifi ~ on
Net -> Airplane Mode: On
Net -> Wifi: On IF %WLANSTATE ~ 1
Variable -> Variable Set: %SIGSTATE = 2
Alert -> Notify Vibrate: Title "IzzySignal", Text: "Signal Lost; Entering Airplane Mode"
Task "SigReturn":
Task -> Wait: 5 Minutes
Net -> Airplane Mode: Off
Task -> Wait: 15 Seconds
(give the device some time to find a new signal!)
Net -> Mobile Data: On IF %ROAM ~ Off
(prevent bad surprise when returning from vacation abroad!)
Variable -> Variable Set: %SIGSTATE = 0
Alert -> Notify Vibrate: Title "IzzySignal", Text "Signal On; Airplane Mode disabled (Signal: %CELLSIG)"
Now for the profiles:
Profil SigLowCheck:
State -> Variable -> Variable Value: Name "%SIGSTATE", Op "Math: Less Than", Value "1"
State -> Phone -> Signal Strength: From 0 To 2
State -> Tasker -> Profile Active: "SigLost", [x] Invert
(make sure to avoid a conflict: %SIGSTATE~0 && SignalStrength~1 would match both profiles condition)
Task: SigLow
Profil SigLostCheck:
State -> Variable -> Variable Value: Name "%SIGSTATE", Op "Math: Less Than", Value "2"
State -> Phone -> Signal Strength: From 0 To 1
Task: SigLost
Profile SigReturnCheck:
State -> Variable -> Variable Value: Name "%SIGSTATE", Op "Math: Greater Than", Value "0"
Task: SigReturn
Profile Init:
Event -> Tasker -> Monitor Start
Task: InitVars
Click to expand...
Click to collapse
So when you enter airplane mode wifi disconnects and re connects again.
Sent from Galaxy Note 3 SM-N9005
thahim said:
So when you enter airplane mode wifi disconnects and re connects again.
Sent from Galaxy Note 3 SM-N9005
Click to expand...
Click to collapse
That's correct.
I am trying to find a way to stop it from disconnecting so that I do not lose my internet connection. I would also like to make it a bit more involved and disconnect Wifi ONLY IF there are no known networks in rage. Any ideas would be much appreciated!

I think my gps.conf file is wrong for my location (EU) but I don't know how to change

So the title says most of it. My gps is only finding GPS satellites, and no galileo or glonass satellites. It was showing them a day or two ago, but since I've been having a lot of GPS issues (no fixes, long fixes etc) I've been trying a lot of stuff and probably somehow broke something (included format, new rom, new firmware). Taking a look through my gps.conf file shows that the ntp servers are maybe not good for my location? (Portugal, Europe)
Can anyone tell me what do I need to replace? Are the NTP_SERVER the only thing that needs a change to
NTP_SERVER = ntp.ist.utl.pt
NTP_SERVER_1 = 0.pt.pool.ntp.org
NTP_SERVER_2 = 1.pt.pool.ntp.org
NTP_SERVER_3 = europe.pool.ntp.org
NTP_SERVER_4 = 0.europe.pool.ntp.org
NTP_SERVER_5 = 1.europe.pool.ntp.org
NTP_SERVER_6 = 2.europe.pool.ntp.org
NTP_SERVER_7 = 3.europe.pool.ntp.org
Or should I change anything else in the file in order to see all the other satelittes?
Thank you
Code:
##################################################
# GPS almanac settings
##################################################
# Whether to use the predefined XTRA servers
# below (XTRA_SERVER_), or to query them from the
# modem.
#
# Values: 0 - use predefined, 1 - query modem
XTRA_SERVER_QUERY = 0
# The predefined XTRA servers to be used if modem
# querying (XTRA_SERVER_QUERY) is off.
#
# Values: URL
XTRA_SERVER_1 = https://xtrapath1.izatcloud.net/xtra3grc.bin
XTRA_SERVER_2 = https://xtrapath2.izatcloud.net/xtra3grc.bin
XTRA_SERVER_3 = https://xtrapath3.izatcloud.net/xtra3grc.bin
XTRA_SERVER_4 = https://ssl.gpsonextra.net/xtra3grc.bin
XTRA_SERVER_5 = https://ssl.izatcloud.net/xtra3grc.bin
# Whether or not to test for XTRA support.
#
# Values: 0 - don't test, 1 - test
XTRA_TEST_ENABLED = 1
# The version of the XTRA data used. XTRA v3
# supports digital signing and is advised.
#
# Values: 0 - disable XTRA, 1 - automatic check,
# 2 - XTRA v2, 3 - XTRA v3
XTRA_VERSION_CHECK = 3
# Path to the CA certificates used to validate
# the XTRA data.
#
# Values: path
XTRA_CA_PATH = /system/etc/security/cacerts
##################################################
# Error estimatation
##################################################
# Whether or not to use error estimation.
#
# Values: 0 - don't use, 1 - use
ERR_ESTIMATE = 0
##################################################
# NTP server
##################################################
# The NTP servers used for time synchronisation.
#
# Values: URL
NTP_SERVER = rhel.pool.ntp.org
NTP_SERVER_1 = 0.rhel.pool.ntp.org
NTP_SERVER_2 = 1.rhel.pool.ntp.org
NTP_SERVER_3 = 2.rhel.pool.ntp.org
NTP_SERVER_4 = 3.rhel.pool.ntp.org
##################################################
# Debugging
##################################################
# The Android logging level of the GPS service. If
# commented out, then Android's default logging
# level will be used.
#
# Values: 0 - none, 1 - error, 2 - warning, 3 - info
# 4 - debug, 5 - verbose
DEBUG_LEVEL = 1
##################################################
# Intermediate position reporting
##################################################
# Whether or not to report intermediate positions.
#
# Values: 0 - don't report, 1 - report
INTERMEDIATE_POS = 1
# Accuracy threshold for intermediate positions.
# Set to 0 to pass all positions.
#
# Values: unknown
ACCURACY_THRES = 1
##################################################
#
##################################################
# Functionalities to switch off when GPS is disabled.
# Default is to lock nothing for backward
# compatibility.
#
# Bitmask: 0x1 - lock MO GPS, 0x2 - lock NI GPS
GPS_LOCK = 0
# Provider for NMEA.
#
# Values: 0 - application, 1 - modem
NMEA_PROVIDER = 1
# Whether the device supports being a SGLTE
# target.
#
# Values: 0 - not supported, 1 - supported
SGLTE_TARGET = 1
##################################################
# GPS supplement settings
##################################################
# The version of SUPL to be used.
#
# Values: bitmask
SUPL_VER = 0x30000
# Whether to report the reference SUPL location as
# the current position.
#
# Values: 0 - don't report, 1 - report
REPORT_POSITION_USE_SUPL_REFLOC = 1
# Whether to use SUPL in an emergency situations
# (eg. calling emergency services).
#
# Values: 0 - disable, 1 - enable
SUPL_ES = 1
# The PDN to ve used for emergency SUPL.
#
# Values: 0 - emergency PDN, 1 - regular SUPL PDN
USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL = 1
# Carrier-set GPS mode for SUPL.
# If commented, will be taken from config.xml.
#
# Bitmask: 0x2 - MSA, 0x2 - MSB
SUPL_MODE = 0x2
# The SUPL server used.
#
# Values: URL, IP
SUPL_HOST = supl.google.com
# The port to connect to the SUPL server.
#
# Values: port
SUPL_PORT = 7275
##################################################
# GPS capabilities
##################################################
# GPS features which are supported.
#
# Bitmask: 0x01 - scheduling, 0x02 - MSB,
# 0x04 - MSA, 0x10 - on-demand time,
# 0x20 - geofencing
CAPABILITIES = 0x37
# Whether to use WiFi positioning.
#
# Values: 0 - disable, 1 - enable
ENABLE_WIPER = 1
##################################################
# C2K server settings
##################################################
# The C2K PDE server used.
#
# Values: URL, IP
C2K_HOST =
# The port to connect to the C2K PDE server.
#
# Values: port
C2K_PORT =
##################################################
# A-GPS settings
##################################################
# Slots writable to install A-GPS infomation to.
#
# Values: bitmask
AGPS_CERT_WRITABLE_MASK = 0
# Whether to use A-GPS configuration injection.
#
# Values: 0 - disable, 1 - enable
AGPS_CONFIG_INJECT = 1
##################################################
# LTE positioning profile
##################################################
# LTE positioning mode.
#
# Values: 0 - RRLP, 1 - LPP_User_Plane,
# 2 - LPP_Control_Plane,
# 3 - LPP_Control_Plane and LPP_User_Plane
LPP_PROFILE = 3
##################################################
# A-GLONASS protocol
##################################################
# The A-GLONASS positioning protocol used.
#
# Bitmask: 0x1 - RRC CPlane, 0x2 - RRLP UPlane,
# 0x4 - LLP Uplane
A_GLONASS_POS_PROTOCOL_SELECT = 0x4
##################################################
# LPPe settings
##################################################
# The LPPe control plane method.
#
# Bitmask: 0x1 - DBH, 0x2 - WLAN AP measurements,
# 0x4 - SRN AP measurement,
# 0x8 - Sensor barometer measurement
LPPE_CP_TECHNOLOGY = 0x10
# The LPPe user plane method.
#
# Bitmask: 0x1 - DBH, 0x2 - WLAN AP measurements,
# 0x4 - SRN AP measurement,
# 0x8 - Sensor barometer measurement
LPPE_UP_TECHNOLOGY = 0x10
##################################################
# AP settings
##################################################
# The AP coarse timestamp uncertainty until the
# GNSS receiver is able to acquire better timing
# information.
#
# Values: unknown
AP_TIMESTAMP_UNCERTAINTY = 10
# The quality of the APPS processor clock. Used to
# calculate AP timestamp uncertainty.
#
# Values: PPM
AP_CLOCK_PPM = 100
##################################################
# QDR engine availability
##################################################
# Whether to use the QDR configuration.
# Recommended for automobile use cases. If used,
# the DR_AP_Service needs to be enabled.
#
# Values: 0 - disable, 1 - enable
EXTERNAL_DR_ENABLED = 0
##################################################
# Pulse settings
##################################################
# Whether to use the Linux PPS driver to make use
# of events generated by DR_SYNC pulse.
#
# Values: 0 - disable, 1 - enable
DR_SYNC_ENABLED = 0
# The path to the Linux PPS device.
#
# Values: path
PPS_DEVICENAME = /dev/pps0
# The path time threshold to validate any missing
# PPS pulses.
#
# Values: ms
MISSING_PULSE_TIME_DELTA = 900
# Whether to use time uncertainty propagation
# logic in the case of missing PPS pulse.
#
# Values: 0 - don't use, 1 - use
PROPAGATION_TIME_UNCERTAINTY = 1

Categories

Resources