Related
Just wondering if anyone has discovered how to speed up the GPS lock time.
I am running shubCRAFT CM6RC2/Froyo/Themed V1.1 and while the GPS works the lock time is upto a few minutes.
In windows I will raise an eyebrow after 10 seconds.
I have seen the posts regarding both the latest libgps.so and updating the GPS file but not sure if thats the issue.
Is the GPS using GPSa?
From what I understand the QuickGPS is a map of satellite locations. The idea is once a single satellite is located then the GPS knows what other ones are in the area instead of blindly looking for all of them its just looks for a few. Still slow to find the first satellite.
GPS-a uses a local cell site to tell the GPS where it is. It can then use the QuickGPS to discover what satellites should be overhead and only looks for those. Nice quick lock times.
Are we using GPS-a?
The fix is not to update your gps.conf file and to use local NTP server settings. Whilst it is ideal to use local time servers this does not impact your phones retrieval of the GPS-A data. The time retrieved from the states is exactly the same as Australia.
UPDATE : The Fix
It looks like there maybe an issues with the way Android on HD2 downloads the GPS-A Data. If you download a Tool from the market place called GPS Status. You can use it to download the GPS-A data manually. BAMM. Fresh GPS locks in 3 seconds versus minutes before hand.
Not sure if this process logs any messages and assume it is a cron job but ideally needs some investigation.
Thanks
this has been covered already
Miyagi said:
Install "File Manager" and "Text Edit" (both are free from the market), then open "File Manager", go to "My Phone", (press Ok on warning), the go to /system, /etc and touch on "gps.conf", Open as, Text, and select "Text Edit".
Edit and use your country direction (pool.ntp.org), save and thats all.
Click to expand...
Click to collapse
songokussm said:
i did not for for me at first. you need to use one of the following servers.
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
Click to expand...
Click to collapse
I tried this yesterday and it works great. Change your NTP server to one of the following, if not in the US, look up your country.
Have questions.
Why is changing the time server improve the GPS lock speed. Both the existing server and the new server will provide the same results. Only difference is the reponse time in milliseconds?
Also can edit the file however cannot save it. File is read only.
Can you confirm the Text edit and File manager. There are mulitples in the market. Who are the authors?
Hmm. Readonly file system is going to cause an issue. Back to question 1
What rom are you using? I'm running mattc leo 1.4
File Manager by Adao Team
Text Edit by Paul Mach
I didn't have a problem saving, others reported issues. Try a different text editor.
As far as lock times, before I couldn't get any lock at all. After applying the update I walked outside, instant lock, tried inside, 3-4 second lock.
Thats the difference. I do get a lock but its slow.
I have just queried the north-america.pool.ntp.org server and compared the output to the query from 1.au.pool.ntp.org.
The results are the same. Changing the ntp server won't make a difference.
Now checking if there is some sort of other issue. Noticing dns does not work at console.
dusty_nz said:
Thats the difference. I do get a lock but its slow.
I have just queried the north-america.pool.ntp.org server and compared the output to the query from 1.au.pool.ntp.org.
The results are the same. Changing the ntp server won't make a difference.
Now checking if there is some sort of other issue. Noticing dns does not work at console.
Click to expand...
Click to collapse
did you fill in 1 of the 4 below?:
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
You just choose one, for example: "0.us.pool.ntp.org"
Not "north-america.pool.ntp.org"
I had the exact same problem with super slow GPS lock, but i changed the ntp server to point to Canada (since i live in Canada) and my GPS lock was seconds.
I personally think it made a huge difference
**edit
Oh, and i used "Text Edit" and "Linda Manager" to do the changes.
I got the same error saying it was read-only, but it still saved the changes. You need to reboot into Android after you make the changes. After you reboot, just go back in with the File Manager and check if your changes are still there (they should be, even though you get the read-only error)
Then try your GPS lock again.
I use Google maps with Google Navigator and it locked in about 5 seconds.
You can also check your in Android "Settings" - "Location and Secrutiy" to have both "Use Wireless Networks" and "Use GPS Satellites" checked off
Gone further.
Installed a ntp client on the phone and tested both north-america.pool.ntp.org and 1.au.pool.ntp.org and both work and give the same response.
I am in australia so the au one is the pick. Using the shubCRAFT rom and the whole file system is readonly.
Need a windows tool to edit the img files. Any recommendations?
Still confused why the au one os better than the north american one. Both work. They are just time servers.
for some reason my gps.conf is blank. Can someone please post their content of this file for me? (Northeastern US region)
Many thanks
norman505 said:
for some reason my gps.conf is blank. Can someone please post their content of this file for me? (Northeastern US region)
Many thanks
Click to expand...
Click to collapse
Check/Read this thread: http://ip208-100-42-21.static.xda-developers.com/showthread.php?p=7410015
Update. See first post.
If GPS Status actually works to get AGPS going then that's great news. Having more accurate times by using local NTP servers does help lock times slightly, but real, working AGPS is the answer we want, and despite the SIPL setting in gps.conf, it doesn't look like it's working by default on the HD2.
EDIT: It looks like GPS Status grabs the AGPS data on launch for me, so all you need to do is setup Tasker to launch GPS Status whenever GPS is turned on and you should have instant lock. I'll test it out tomorrow when I get outside.
dusty_nz said:
Just wondering if anyone has discovered how to speed up the GPS lock time.
I am running shubCRAFT CM6RC2/Froyo/Themed V1.1 and while the GPS works the lock time is upto a few minutes.
In windows I will raise an eyebrow after 10 seconds.
I have seen the posts regarding both the latest libgps.so and updating the GPS file but not sure if thats the issue.
Is the GPS using GPSa?
From what I understand the QuickGPS is a map of satellite locations. The idea is once a single satellite is located then the GPS knows what other ones are in the area instead of blindly looking for all of them its just looks for a few. Still slow to find the first satellite.
GPS-a uses a local cell site to tell the GPS where it is. It can then use the QuickGPS to discover what satellites should be overhead and only looks for those. Nice quick lock times.
Are we using GPS-a?
The fix is not to update your gps.conf file and to use local NTP server settings. Whilst it is ideal to use local time servers this does not impact your phones retrieval of the GPS-A data. The time retrieved from the states is exactly the same as Australia.
UPDATE : The Fix
It looks like there maybe an issues with the way Android on HD2 downloads the GPS-A Data. If you download a Tool from the market place called GPS Status. You can use it to download the GPS-A data manually. BAMM. Fresh GPS locks in 3 seconds versus minutes before hand.
Not sure if this process logs any messages and assume it is a cron job but ideally needs some investigation.
Thanks
Click to expand...
Click to collapse
It does help in my case, always under 30 seconds lock using MotoNav.
In my experience, if you succesfully lock ones without GPS Status, you should lock on the your GPS quickly again as long as you don't restart your phone. M2C's
Gps status works. Fix is very fast. It even works indoors if you are near the window and there is no big building in front of you.
I wrote about this some time ago.
http://forum.xda-developers.com/showthread.php?p=8366121&highlight=gps+status#post8366121
and
http://forum.xda-developers.com/showthread.php?p=8366105&highlight=gps+status#post8366105
(I provided the links so you can check other posts in two similar threads)
new version of gps status downloads sat data directly on app startup. Or you can use quickgps in winmo and download the data and then android will also fix faster. Both software downoload gps sat data valid for 7 days. I think the downloaded data is also input to the gps chip. (not only just downloaded to internal memory/sd card)
I live in Turkey and ntp servers doesn't matter for me. Even us or north-america works fine. apgs data is needed for fast fix. Some people have empty gps.conf file. gpsonxtra lines are needed for downloading sat data.
This is my gps.conf file: (in /system/etc)
NTP_SERVER=europe.pool.ntp.org
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
SUPL_HOST=supl.google.com
SUPL_PORT=7276
You can change your ntp server to us.pool.ntp.org or north-america.pool.ntp.org or yourcountrycode.pool.ntp.org
I went through the entire process.
Changed the NTP server to a local server. Tested the settings using the NTP client. Checked the download link worked. Data seemed valid.
Still would take over 1-3 minutes to get a lock. A second lock within 1/2 hour was quicker but after a few hours it was slow again.
Using GPS status. Sitting in my car. Powered on the phone. Fireed up Google and bank. 2-3 seconds it had my location.
Really happy.
Lock inside 10 sec, downloading agps data with Gps Status. Thx man!
Sent from my HTC HD2 using XDA App
dusty_nz said:
Just wondering if anyone has discovered how to speed up the GPS lock time.
I am running shubCRAFT CM6RC2/Froyo/Themed V1.1 and while the GPS works the lock time is upto a few minutes.
In windows I will raise an eyebrow after 10 seconds.
I have seen the posts regarding both the latest libgps.so and updating the GPS file but not sure if thats the issue.
Is the GPS using GPSa?
From what I understand the QuickGPS is a map of satellite locations. The idea is once a single satellite is located then the GPS knows what other ones are in the area instead of blindly looking for all of them its just looks for a few. Still slow to find the first satellite.
GPS-a uses a local cell site to tell the GPS where it is. It can then use the QuickGPS to discover what satellites should be overhead and only looks for those. Nice quick lock times.
Are we using GPS-a?
The fix is not to update your gps.conf file and to use local NTP server settings. Whilst it is ideal to use local time servers this does not impact your phones retrieval of the GPS-A data. The time retrieved from the states is exactly the same as Australia.
UPDATE : The Fix
It looks like there maybe an issues with the way Android on HD2 downloads the GPS-A Data. If you download a Tool from the market place called GPS Status. You can use it to download the GPS-A data manually. BAMM. Fresh GPS locks in 3 seconds versus minutes before hand.
Not sure if this process logs any messages and assume it is a cron job but ideally needs some investigation.
Thanks
Click to expand...
Click to collapse
Purely outstanding! What a day! It appears there is a fix for the data connection issue and now this fix!
i am trying to make tasker run gps status and update agps data when the phone turns on and boots into android. ideally i'd like this operation to happen in the background and silently.... what are the steps to program tasker to operate in this way? i've never used tasker before.
is downloading the agps data on android boot really worth it, or should i just continue running gps status before i use navigation?
Sadly, I have never gotten compass or quick GPS lock working. I have tried these things as well (changing NTP server, installing GPS Status), several times, on several builds, on 3 different HD2's. Never worked.
On one HD2 I would get a GPS lock after 2-5min. On the other I could not get a lock at all.
Maybe someone in the US can post the contents of their gps.conf?
Tapping "reset" first in gps status app's manage agps settings then tapping download seems to work much better.
Sent from my HTC HD2 using XDA App
Tried. Failed.
Edited the text, now it's blank and I can't re-edit it or copy over my back-up.
EDIT: Let gps lock on. The file is now back to normal, but I can't edit it.
OK. Here we go for a long post, this is the work that came from disassembling glgps daemon and spending quite a few hours/nights driving around to test things. I also drew on my knowledge of GPS systems and used my Bluetooth GPS as a comparison.
The glgps daemon is responsible for communication between the GPS chipset in the SGS and the android userspace. It pulls settings both from NVRAM and some files in /data/gps and /etc. It uses this information to initalize the GPS system at startup and hold it ready to service location requests. This is where all the tweaking that will make a difference regarding GPS output should take place. (If we can get into NVRAM there's more stuff there too.)
I've attached to this post an update.zip with the latest build of the glgps daemon (/vendor/bin/gpsd from nexus s), relocated to /system/bin/gpsd/glgps_samsungJupiter where it sits on the SGS ROMs. I've also included secgps.conf and jupiter.xml, which i've commented with all possible values I could find disassembling it, and the various effects I observed testing them. I also outfitted the jupiter.xml with the most optimal settings I ran into.
A simple breakdown of what I did was to turn off smoothing and interpolation, by using pedestrian mode and a few new variables available in the nexus s daemon. This yields an output as close to what the GPS chip is seeing as possible. It doesn't necessarily mean that it will be more accurate to reality, only that the firmware and daemon won't filter out results that it thinks don't match what it should see. This behavior is more desireable for me than the GPS chip trying to guess, I can be aware of the variations by looking at the accuracy indicator.
[size=+2]How to get logging out of the glgps daemon so you can observe the effects of tweaks, environmental effects, etc. (A.K.A. lets not stab at the dark!)[/size]
1. Root your device
2. adb shell
3. $ su
#
4. cd /system/bin/gpsd
5. mv glgps_samsungJupiter glgps
6. reboot
Now the glgps daemon won't load at startup. After your device reboots, repeat steps 2-4. Then:
7. cp /system/etc/jupiter.xml /sdcard/
8. adb pull /sdcard/jupiter.xml .
9. edit jupiter.xml on your pc as desired.
10. adb push jupiter.xml /sdcard/
11. adb shell
12. su
13. cd /system/bin/gpsd/
14. ./glgps -c /sdcard/jupiter.xml
alternate command line for activating a "job" in glgps:
11. ./glgps -c /sdcard/jupiter.xml jobname <---------- jobname can be anything defined in your jupiter.xml as a job. Examples from mine: normal cold-single-supl freq-aid-test sim-cold-auto. Some jobs will exit immediately after you stop attempting a fix.
Now the glgps will be loaded, and if bPrintToConsole="true" cLogEnabled="true" are both set, you will start seeing debug output in the console. It will indicate the file it is saving log data to, all initialization information, and display info throughout the time you are connected with adb.
To revert glgps back so that it starts again at bootup as normal, rename glgps back to it's original name. It will then continue to load /system/etc/jupiter.xml on the next reboot as normal. (replace this file with your edited one if you want to continue using the settings)
NOTE: Occaisionally i've had the logging verbosity so high that the GPS cannot get a lock at all. To a certain extent you can work around this by adjusting the "niceness" of the process using the program "renice" (which makes it "meaner" giving it a higher priority over other processes (thus more CPU power to work with) - "renice -20 -p $(pidof glgps)" to make it highest priority.
[size=+2]How do I change what goes in the log file (verbosity)?[/size]
<gll LogPriMask="LOG_FLAG | LOG_FLAG2" LogFacMask="LOG_FLAG | LOG_FLAG2" > control this. Possible LOG_FLAGs are as follows, seperated by a | (pipe)
LOG_EMERG | LOG_ALERT | LOG_CRIT | LOG_ERR | LOG_WARNING | LOG_NOTICE | LOG_INFO | LOG_DEBUG | LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA | LOG_ASIC_IO | LOG_RF_DEBUG | LOG_BBTEST | LOG_DEVCV | LOG_DEVET | LOG_DEVJG | LOG_DEVIA | LOG_DEVKF | LOG_DEVMR | LOG_DEVMS | LOG_DEVSP | LOG_DEVDH | LOG_DEVRA | LOG_DEVRS | LOG_DEVVG | LOG_USR1 | LOG_USR2 | LOG_USR3 | LOG_USR4 | LOG_USR5 | LOG_USR6 | LOG_UNITTEST | LOG_DEFAULT
I've documented some of the logging switches in the jupiter.xml comments. Some of these generate HUGE logs. (large enough to use so much I/O and CPU that glgps can't determine your location at all) - be aware that using full verbosity will also probably result in never getting a fix
LOG_DEVVG output: GetSigMeasForClockModel:: SvId 23 Snr 0.000000 mode 1 accepted!
LOG_DEVRA output: GlMeasEng::EnableLowPowerExt(F) GlMechanMgr::UpdateTo12Chan() - Update to 12 full channels AcqMgr::LogAgc() vga_ctrl=0x18 agc=9
LOG_DEVDH output: Raw calculation data (large log)
LOG_DEVMS output: Raw calculation data (large log)
LOG_DEVMR output: #240355D BlndMgr TerminateSearches(2) #240366D BlndMgr(otLstOfSvIdScanNonTrk:686): #240366D BlndMgr(otLstOfSvIdDrillNonTrk:687): #240367D BlndMgr(otSvIdKillLst:691):
LOG_DEVKF output: Fix Data (Lat, Long, Alt, Estimated Accuracy
LOG_DEVIA output: SNR, Latency, Vector, Measurement (large log)
LOG_DEVJG output: Per channel SNR, Latency, Vector, Measurement (large log)
LOG_DEVET output: TCXO calibration data, Doppler calculations (large log)
LOG_DEVCV output: SATAID data, Oscillator data
LOG_DEFAULT output: All on! Realllllllllllllllllly Big!
NOTE: For NMEA output, set LOG_NMEA and also set "GPS Logging" to ON in lbstestmode app. This will generate /sdcard/gps/tracking/NMEA-<DATESTAMP>-<TIMESTAMP>.txt files for each track (from the time you are using the gps til the time you release it) - These .txt files follow the NMEA standard and you can use them to generate tracklogs or do other nifty GPS related things (check out the PC program gpsbabel, for example)
NOTE2: If you want to restart the glgps daemon on the fly, to load new jupiter.xml settings for testing, open a concurrent adb shell connection in root, and type: "kill $(pidof glgps)" this will kill the glgps daemon in the other shell window and you can restart it with a new jupiter.xml
[size=+2]Sample output from logging:[/size]
Code:
H187754I OpenFifo: Opened "/data/gps/glgpsctrl"
H187765I Certificate Path : /system/bin/gpsd/
H187765I TLS enable = 1
H187768I Certificate Path : /system/bin/gpsd/
H187768I TLS enable = 1
H187768I LBS_A: starting event handler
H187768I LBS_I: ASN1 manager: 1237d4, 2044 bytes
H187768I LBS_I: Encode/decode buffer: 123fd4, 6120 bytes
H187768I LBS_I: Dynamic memory buffer: 1257bc, 24480 bytes
H187769I LBS_I: @(#)Broadcom LBS ver. 2.1.0.0 86303, 2010/Nov/07, 13:12:55
H187769I LBS_I: API: gllbs_init(32768)
H187769I LBS_I: CB: nv_open
H187769I LBS_I: CB: nv_read
H187769I LBS_I: CB: nv_close
H187769I LBS_I: 3 cells loaded
Take a look at my provided jupiter.xml for more info on the possible parameters. I've documented it as I went along with comments. I'll update the 2nd post here with more info soon.
[size=+3]Attached file[/size]: CWM update.zip with new glgps daemon from nexus s, jupiter.xml with pedestrian mode settings
NOTE: CWM update.zips will not work in eclair, you must change the following:
Code:
gpioNStdbyPath="/sys/class/sec/gps/GPS_PWR_EN/value"
gpioNResetPath="/sys/class/sec/gps/GPS_nRST/value"
to:
Code:
gpioNStdbyPath="/sys/class/gpio/gpio121/value"
gpioNResetPath="/sys/class/gpio/gpio120/value"
[size=+2]Notable Settings[/size]:
<hal acEEDir="/data/gps/" acEEFileName="xtra.bin" /> : Defines an Extended Ephemeris file for the glgps daemon to load for AGPS data. The drivers normally do not appear to download this file successfully and the daemon says it is corrupt.
<hal bPrintToConsole="true" cLogEnabled="false acLogDirectory="/sdcard/gps/log"" /> : Determines of the logging output should be printed to console and/or to a text file. The text file will be placed in the directory provided and named gl-<TIMESTAMP>.txt. Inside will be the logging output at the verbosity you defined using LOG_FLAGs in <gll LogPriMask="LOG_FLAG | LOG_FLAG2" LogFacMask="LOG_FLAG | LOG_FLAG2" >
<hal arp-supl-enable="true" arp-supl-cap-msb="true" arp-supl-cap-msa="false" arp-supl-cap-ecid="true" arp-supl-reaiding-time-sec = "600" /> : These settings tell the glgps daemon what the SUPL AGPS server provided next is capable of. MS-B means Mobile Station Based, MS-A is Mobile Station Assisted, ECID is unknown. Reaiding time defines the minimum amount of time before attempting to re-inject AGPS data to keep the fix tight in seconds.
<hal acSuplServer="h-slp.mnc410.mcc310.pub.3gppnetwork.org" SuplPort="7275" tlsCertPath="/system/bin/gpsd/" /> : This defines the AGPS server to use for SUPL data (only used if enhanced-assisted="true") - if cp-enhanced-assisted="true" is set, will use the providers control plane rather than normal packet data to access SUPL server. Note that the provided SUPL server is AT&T's SUPL server, which is only accessible within their network. Use google's if you are not on AT&T's network. tlsCertPath defines the location in the filesystem to search for SSL certificates used when connecting to the AGPS server. Most ROMs come with AT&T's, if yours doesn't have it, you'll need to add it for the connection to work.
<hal LbsEnable="true" LbsLocal="true" LbsServer="bcmls2.glpals.com" LbsPort="7275" LbsSyncTimeSec = "60" LbsSyncLto="true" LbsSyncCells="true" /> : These settings tell the glgps daemon to use this server for LBS aiding (Location Based Services.) When LbsLocal is true, the glgps daemon will record all cell sites it sees and your reported GPS location at the time. Any future fix attempt will use these coordinates to seed your fix if the current cell tower you are on matches one the glgps daemon has seen before. This data is stored by default in /data/gps/, so note that it will get erased if you clear the /data partition. It might be useful for frequent flashers to modify the jupiter.xml to store data in /sdard/gps/ or some other less volatile location instead, so the local cell db gets a chance to populate.
<gll CNoSmoothEnable="true" > : This disables some of the glgps daemon's internal smoothing algorithms, makes the GPS a little more accurate to its readings. POSSIBLE VALUES: true false
<gll DynMode="DYN_PEDESTRIAN" > : Defaults to automatic mode which makes the glgps daemon determine on the fly if you are on foot or in a vehicle. This affects the interpolation algorithms used (In GPS land, pedestrian mode means the GPS will report each fix it gets, usually 1 per second.) Vehicle mode will not report movement under a certain amount (usually 3-5 meters) in order to keep the indicator more "stable" POSSIBLE VALUES: DYN_AUTOMATIC DYN_PEDESTRIAN DYN_VEHICLE
<gll RfAtt="GL_RF_ATT_DISABLED" > : I haven't tested this enough to be sure if the chip actually has a built in attenuator you can adjust with this parameter, but if so, it goes all the way up to 18dB. The function of an attenuator is to lower the overall incoming signal in order to better compensate for enviornmental noise. Cordless phones, WiFi, Microwaves, and any number of devices work on frequencies close enough to GPS to cause interference. Assuming there is an attenuation circuit present and it's controllable via this parameter, it will yield better performance for various people in various situations. Requires testing
<gll RfType="GL_RF_4751_DANUBE" > : GL_RF_4751_BLUEFIN GL_RF_4751_DANUBE GL_RF_4751_DANUBE_EXT_LNA are values that I have tested working with our GPS. _EXT_LNA comes default on Nexus S, DANUBE default on ours. BLUEFIN I haven't seen set anywhere, but does work. Danube and Bluefin are likely different revisions of the 4751 chipset.
[size=+2]Other settings not found in jupiter.xml[/size]
glgps also seems to heed what the user has set in Settings -> Location and Security, for "Use wireless networks" and "Use sensor aiding". Wireless networks causes nearby WiFi access point info to be used for a faster first fix, and Use sensor aiding attempts to save power by putting the GPS in low power mode when it sees you moving in a straight line, and shutting off entirely when the accelerometer detects that the phone is stationary. This can cause issues when the compass or accelerometer are providing false values (due to interference, mismatched kernel, etc.)
Also, glgps reads settings from NVRAM that are set by the lbstestmode app. These settings are also stored in secgps.conf, but the settings in NVRAM do NOT necessarily match up. Make sure you set your lbstestmode to "standalone" operation so that Android relies on the glgps daemon for AGPS support. My settings are:
Code:
Session Type: Tracking
Test Mode: S/W
Operation Mode: Standalone
Start Mode: Hot Start
GPS Plus: ON
Dynamic Accuracy: ON
Accuracy: 80
GPS Logging: OFF (use ON and LOG_NMEA to get NMEA logs)
Server FQDN Type: Custom Config
Server: h-slp.mnc410.mcc310.pub.3gppnetwork.org <MATCH THIS WITH YOUR JUPITER.XML>
Server Port: 7275 <MATCH THIS WITH YOUR JUPITER.XML>
SUPL Secure Socket: ON <VARIES WITH SERVER, GOOGLE IS OFF>
AGPS Mode: SUPL <OR CONTROL PLANE, MATCH WITH JUPITER.XML>
[SIZE=+3]To summarize the problem i've identified with our GPS so far:[/SIZE]
AGPS was not properly deployed at the factory, or in any of the updates pushed to the Captivate. Only Control Plane AGPS mode is properly configured, but not active by default. As a result, out of the box, the phone is essentially always in standalone mode regardless of settings (without a modified jupiter.xml)
The GPS chip appears to be receiving some kind of interference from other component(s) on the mainboard. This appears to only manifest itself when the handset is under a heavy usage pattern (such as G Maps/G My Tracks plotting your position, scrolling the map, using cell data, reading gps). This interference is causing the GPS chip to have a major drop in performance. I suspect the phones that don't experience this have an exceptional unit that can perform regardless of this interference (I suspect if they tested with raw signal strength showing, the drop would show)
The glgps daemon attempts to do post processing on the data received in the stream from the GPS chip. Because the data received is generally already incorrect, this further compounds the issue. My jupiter.xml already has these post processing algorithms disabled.
That drop in GPS signal due to interference is the kicker. I haven't yet narrowed down the exact cause of the interference, but suspects are:
1.) Cellular Radio - if this is the case, testing with wifi on and the cell radio off should yield a more desireable result (although hard to test while moving in that situation without another device to tether to for mobile data)
2.) CPU Usage on Host CPU - I don't think this is the case. The only CPU intensive thing that runs on the Host CPU is the glgps daemon, and if this were the case, "renice -20 -p $(pidof glgps_samsungJupiter)" would fix the problem. It does not.
3.) GPU usage - This is a possibility.
4.) CPU usage on baseband CPU - There are also some GPS functions handled in the baseband. I doubt this is the cause but possible.
5.) EM leakage from other system components - I'm leaning towards this right now. I'll have to open up the captivate and throw an EM shield over the GPS chip and see what the results are.
reserved for more two
Sweet! Trying this out now. Will post results. Thanks Da_g
Been watching the progress on this lately and have to say big props on all the research. Will try it out and see how it goes
Sent from my SAMSUNG-SGH-I897 using XDA App
I'll try it and see how well it does when I get home from work..
Mac
So just install it through CWM?
Yes, the attached zip is a CWM zip. Note that these settings are only what I found optimum, and as this is the development forum, I encourage you to tinker with the possible values (commented inside the jupiter.xml) to figure out what works best for you
Just walked from inside heavy building to outside...after 10 Seconds I had a full lock while walking showing 5m distance...holy [email protected]$#& s&$#$ that is already amazing. I'll use it driving home after work....mad props
Sent from my SAMSUNG-SGH-I897 using XDA App
Da_G said:
<hal acSuplServer="h-slp.mnc410.mcc310.pub.3gppnetwork.org" SuplPort="7275" tlsCertPath="/system/bin/gpsd/" /> : This defines the AGPS server to use for SUPL data (only used if enhanced-assisted="true") - if cp-enhanced-assisted="true" is set, will use the providers control plane rather than normal packet data to access SUPL server. Note that the provided SUPL server is AT&T's SUPL server, which is only accessible within their network. Use google's if you are not on AT&T's network. tlsCertPath defines the location in the filesystem to search for SSL certificates used when connecting to the AGPS server. Most ROMs come with AT&T's, if yours doesn't have it, you'll need to add it for the connection to work.
Click to expand...
Click to collapse
So can I change this before flashing the rom? if so, how? is it possible you can push a "AT&T" version and a "Google" version?
Sure, you can edit the file /system/etc/jupiter.xml in the zip before flashing it to the device. I'll make one with settings for google and control plane and post them in a sec.
Da_G said:
Sure, you can edit the file /system/etc/jupiter.xml in the zip before flashing it to the device. I'll make one with settings for google and control plane and post them in a sec.
Click to expand...
Click to collapse
given i'm in Australia, is there any value at all to changing my ntp servers to local ones (0.au.pool.ntp.org) as opposed to US ones?
Edit I'm posting to slow lol
Sent from my SAMSUNG-SGH-I897 using XDA App
I would soooo try this out right now if I was not overseas atm. It'll be 3 weeks before I can try this out but to Da_G thank you for doing something that Samsung should be working on the most!
Ok, updated first post with AT&T, Google, and Control Plane versions. Control Plane should work on any cellular provider (if they have implemented it, which all should have)
Regarding changing the NTP server that can't hurt, but should only affect the TTFF (Time To First Fix) as it should sync up to the GPS satellites after that.
Da_G said:
Ok, updated first post with AT&T, Google, and Control Plane versions. Control Plane should work on any cellular provider (if they have implemented it, which all should have)
Click to expand...
Click to collapse
Is there any value of Control Plane vs Google SUPL? should one be "better" than the other?
Da_G said:
Regarding changing the NTP server that can't hurt, but should only affect the TTFF (Time To First Fix) as it should sync up to the GPS satellites after that.
Click to expand...
Click to collapse
Cool. Didn't quite understand how it was used in relation to GPS.
Is there a rough laymans terms of why having WIFI on (and connected to an AP) leads to far more accurate results faster, when its a new AP that i've not connected to before? I was thinking it might have something to do with Time Servers and Latency (as latency to an NTP would be *dramatically* lower over Wifi VS any form of cellular comms) - given your explanation re NTP, I don't think thats the case now.
It certainly can't be "google knows where the AP's are", given that I work in IT Services and create/delete/move AP's all the time.
In the case of AGPS, your current CellID, along with MNC and MCC are sent to the database (your cell providers control plane server, google, or any other SUPL server provided in jupiter.xml) in order to obtain approximate Latitude/Longitude for an initial fix. (due to the nature of GPS, having an initial "guess" as to your current location helps to seed a faster initial fix, which is the main function of AGPS) The reason your Cellular Provider's database could be better is that it is more likely to be up to date than googles. But of course this varies! Some providers don't even maintain a CP server for AGPS.
The reason WiFi helps the time to first fix is similar. Google actually does have your phone report its visible APs (by MAC address) and current best-guess location to its servers. Everyone else's does this too (assuming they have the wireless tick box on) - This allows them to build a large database with which to seed AGPS from. You may have noticed the first time you turn on "Use wireless networks" in Settings - Location and Security, you get a boilerplate disclaimer about allowing google to collect anonymous connection data. That's what this is for
Adding some info to the first post about "Use sensor aiding" and "Use wireless networks" now.
Da_G said:
In the case of AGPS, your current CellID, along with MNC and MCC are sent to the database (your cell providers control plane server, google, or any other SUPL server provided in jupiter.xml) in order to obtain approximate Latitude/Longitude for an initial fix. (due to the nature of GPS, having an initial "guess" as to your current location helps to seed a faster initial fix, which is the main function of AGPS) The reason your Cellular Provider's database could be better is that it is more likely to be up to date than googles. But of course this varies! Some providers don't even maintain a CP server for AGPS.
The reason WiFi helps the time to first fix is similar. Google actually does have your phone report its visible APs (by MAC address) and current best-guess location to its servers. Everyone else's does this too (assuming they have the wireless tick box on) - This allows them to build a large database with which to seed AGPS from. You may have noticed the first time you turn on "Use wireless networks" in Settings - Location and Security, you get a boilerplate disclaimer about allowing google to collect anonymous connection data. That's what this is for
Adding some info to the first post about "Use sensor aiding" and "Use wireless networks" now.
Click to expand...
Click to collapse
Pardon my ignorance...but does this mean after the initial boot with google it is no longer needed to have wi-fi on to get good locks ?
Mac
With stock settings (JF6/JH7), all the aiding data was not saved, but with the proper settings in jupiter.xml, aiding data should be saved into /data/gps and NVRAM so that the GPS chip can use it on the next fixes. This data is only good for a short period of time (hours to days) so unless you are using the GPS that frequently, WiFi on is still beneficial. You only need to have it on at the time you get the first fix, after that you can shut it off.
Da_G said:
With stock settings (JF6/JH7), all the aiding data was not saved, but with the proper settings in jupiter.xml, aiding data should be saved into /data/gps and NVRAM so that the GPS chip can use it on the next fixes. This data is only good for a short period of time (hours to days) so unless you are using the GPS that frequently, WiFi on is still beneficial. You only need to have it on at the time you get the first fix, after that you can shut it off.
Click to expand...
Click to collapse
Cool...thanks for that detailed explaination
Mac
INTRODUCTION
As we all know, we have two applications to have less problems with our GPS on Android builds.
- FasterFix - the app improves the gps ntp time settings in your gps.conf file and add's a gps suppliant host. <c> the_double
- GPS Status - it downloads A-GPS data from the internet every time you launch it, which helps the process of obtaining a gps lock. <c> suppliesidejesus
Some people responds that it works, but for some it does not helps, like for me.
Well, probably there is a solution.
We already know, that we have file named gps.conf in system/etc. It can be edited with e.g. ASTRO Explorer (via Market) or FasterFix software. The problem is, that we did it wrong, FasterFix software did it wrong.
Click to expand...
Click to collapse
STORY LINE
Here is an example of common gps.conf file:
ntp_server=north-america.pool.ntp.org
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
supl_host=supl.google.com
supl_port=7276
Click to expand...
Click to collapse
And let's say we live in UK (Europe)
When we are editing the file, we edit only the first row: ntp_server=. The same does FasterFix software.
We want a UK, so we edited:
ntp_server=uk.pool.ntp.org
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
supl_host=supl.google.com
supl_port=7276
Click to expand...
Click to collapse
I beleve that for some of you this can be enough, GPS working great. But not for me. For me and a lot of other people it does not help.
Click to expand...
Click to collapse
THE SOLUTION
Let's use http://www.pool.ntp.org/zone/uk to check our NTP adresses in UK.
We got this from the site above:
uk.pool.ntp.org
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org
Click to expand...
Click to collapse
So the solution. Download ASTRO Explorer (via Market). Go with ASTRO to system/etc and find gps.conf. Open it in a text editor. And if you live in UK, edit it this way: (changes are bolded)
ntp_server=uk.pool.ntp.org
xtra_server_1=http://0.uk.pool.ntp.org
xtra_server_2=http://1.uk.pool.ntp.org
xtra_server_3=http://2.uk.pool.ntp.org
xtra_server_4=http://3.uk.pool.ntp.org
supl_host=supl.google.com
supl_port=7276
Click to expand...
Click to collapse
As you can see, i've added one extra xtra_server_4. Why? Because we have 4 servers in uk, why not to use them all?
Save! Reboot! Chech! Leave the feedback!
Click to expand...
Click to collapse
MY STORYLINE
I live in Latvia, but this is Europe. I did the same, but for Europe
NTP link for Europe: http://www.pool.ntp.org/zone/europe
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=0.europe.pool.ntp.org
XTRA_SERVER_2=1.europe.pool.ntp.org
XTRA_SERVER_3=2.europe.pool.ntp.org
XTRA_SERVER_4=3.europe.pool.ntp.org
SUPL_HOST=supl.google.com
SUPL_PORT=7276
Click to expand...
Click to collapse
I don't use http:// in XTRA_SERVERS line. It works without them. Before I could get GPS signal only on WM6.5, but never on Android. Now i got GPS lock in 5-10 seconds with an 2m accuracy error from my home.
Click to expand...
Click to collapse
CREDITS
Great thank's to crunchie-uk for his amazing help and tips.
Click to expand...
Click to collapse
Hope you find that usefull.
Thanks again to crunchie-uk for the code.
Here is a GPS conf that should enable assisted gps and might be worth trying? <crunchie-uk>
Click to expand...
Click to collapse
Code:
NTP_SERVER=xtra1.gpsonextra.net
XTRA_SERVER_1=hxxp://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=hxxp://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=hxxp://xtra3.gpsonextra.net/xtra.bin
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL = 5
# 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=2500
################################
##### 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
################################
# EXTRA SETTINGS
################################
# Wiper (wifi positioning), 1=enable, 0=disable
ENABLE_WIPER=1
#################################
##### AGPS Carrier settings #####
#################################
CURRENT_CARRIER=common
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
# TRUE for "User Plane", FALSE for "Control Plane"
DEFAULT_USER_PLANE=TRUE
Tried some combinations with above settings.
The best i got was a 1 minute fix but followed by longer one, usually it takes 2-3 minutes to get a lock if phone is put in a flat position and left there.
For me that's not usable, i was used to take the phone from my pocket, setting a destination, putting it in the cradle and just drive with navigator... now if i'm already moving with car it takes around 5/10 minutes to get a lock. Often i reach the destination before it locks...
A stange behaviour: i can get these times only with SD roms. Any NAND i tried took more or didn't work completely.
I hope developers could fix this once for all.
Last thing:
AGPS is not supported at the moment, i remember a note from gauner1986 reporting it during GB libs development. Should not being supporte in froyo as well (simply, there is no code for AGPS inside libgps.so).
Cheers.
ntp_server=de.pool.ntp.org
xtra_server_1=http://0.uk.pool.ntp.org
xtra_server_2=http://1.uk.pool.ntp.org
xtra_server_3=http://2.uk.pool.ntp.org
xtra_server_4=http://3.uk.pool.ntp.org
xtra_server_5=http://0.europe.pool.ntp.org
xtra_server_6=http://1.europe.pool.ntp.org
xtra_server_7=http://2.europe.pool.ntp.org
xtra_server_8=http://3.europe.pool.ntp.org
xtra_server_9=http://xtra1.gpsonextra.net/xtra.bin
xtra_server_10=http://xtra2.gpsonextra.net/xtra.bin
xtra_server_11=http://xtra3.gpsonextra.net/xtra.bin
supl_host=supl.google.com
supl_port=7276
Click to expand...
Click to collapse
How many xtra servers can I add? My example is a bit overdone, but in gereral is it possible to combine some servers? Or is this not recommended?
cabalist, Some tips for you:
1. If you are using GPS Status, kill that app b4 launching navigator, or it may interferate with a navigator.
2. Try giving your gps.conf a line: INTERMEDIATE_POS=0 It can help
j4n87, I think there is no a strict limit to that. Try to put in your first line:
ntp_server=0.de.pool.ntp.org
Just copied/pasted your quotes.
Forgot to rename it to de.
My gps was working, I only don't get fast fixes all the time, so I wanted to know, if I can speed them up, by adding more servers e.g. my de and additionally the european and gpsonextra servers.
Synoptex said:
cabalist, Some tips for you:
1. If you are using GPS Status, kill that app b4 launching navigator, or it may interferate with a navigator.
2. Try giving your gps.conf a line: INTERMEDIATE_POS=0 It can help
j4n87, I think there is no a strict limit to that. Try to put in your first line:
ntp_server=0.de.pool.ntp.org
Click to expand...
Click to collapse
Ciao Synoptex,
1) Already uninstalled it;
2) i've already tried but i didn't notice any improvment. altough i have to do more intensive tests, hopefully this weekend. Should also find the time to search for some explanation about these parameters, i would like to understand what is their function into this;
I'm in US and tried this ntp_server trick. It did not work even after 2 reboots. Still like 2-3 minutes fix time.
Then I installed GPS Status and did "A-GPS Reset" and "A-GPS Download". Rebooted. Now my fix is 10-15 sec.
I DID try GPS Status BEFORE I tried gps.conf trick - did not help.
if u need legit directions and a fast lock....use BING! its just as fast at locking gps like wp7, while Bing gets the location right, google is still changing location and getting it wrong. (for me) even tho its not fancy turn by turn, it gets the job done.
oh yeah, also follow the instructions in op, worked to increase lock time, in google maps and bing.
I'm just curious at how changing the Network Time Protocol Server makes it work better? Is there some relationship between them and GPS satellites? I don't have an inkling of how they work, so thought I'd ask.
My GPS is somewhat erratic, but that could well be due to buildings etc in my area.
Hi Guys, small improvements here.
Today i saw my first 7 seconds hot lock! And with the same config i've been able to navigate with maps.
However it's still in some way buggy:
cold start with gps status: around 4/5 minutes.
closed and launched it again - 7 sec
closed and launched again - 10 sec
closed and launched again - >5 minutes.....?
closed and launched again - >3 minutes.... wth???
Unfortunately log does not help so i have to solve it by tests.
If i'll be able to let it work in a regular way i'll post the config.
Cheers.
I'm no GPS expert, but this is what I understand:
NTP: Network Time Protocol - used by your device to sync its time (link: http://www.ntp.org/). NTP_SERVER needs to point to one of these servers (eg: europe.pool.ntp.org)
XTRA: Qualcomm's gpsOneXTRA Assistance technology used for speeding up GPS fixes (link: http://www.gsmarena.com/glossary.php3?term=gpsonextra). XTRA_SERVER_x needs to point to a xtra.bin file located on one of the XTRA servers (eg: xtra1.gpsonextra.net/xtra.bin)
Synoptex's solution seems to confuse one for the other, and as far as I know, NTP and XTRA are not interchangeable.
Try this ..
NTP_SERVER=north-america.pool.ntp.org
XTRA_SERVER_1=0.north-america.pool.ntp.org
XTRA_SERVER_2=1.north-america.pool.ntp.org
XTRA_SERVER_3=2.north-america.pool.ntp.org
XTRA_SERVER_3=3.north-america.pool.ntp.org
SUPL_HOST=lbs.geo.t-mobile.com
SUPL_PORT=7275
Just got a lock in less then 30 secs - Cold Boot ( After Reboot of Phone )
Useing these settings .. best I have ever got
Root
I have GPS status and and so far have never (since installing android) obtained a GPS fix.
I downloaded faster fix but when I run it, it says: error, have root?
ive tried several times just setting it on the dash while driving around, never picks up even 1 sat.
EDIT
my gps.conf looks like this
NTP_SERVER=north-america.pool.ntp.org
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
SUPL_HOST=supl.google.com
SUPL_PORT=7276
gps status won't download fix from wifi here
I agree with chong81, xtra are to download small bin files containing satellite extimate position.
NTP is just a time server.
The only way your proposal works better than before is that xtra.bin files you downloaded were totally wrong, so not using them you've a better behaviour.
Hi,
A lot of people here have a very long GPS fix.
I propose you to post here your android nand or SD version, rom radio, average, max, min fix time and gps.conf file content.
To have pertinent results, I propose you the following procedure :
- Disable 3G and Wifi
- Make a cold restart
- Use gpsfix from Android Labs available in the market.
- make the test during one week each morning and afternoon at the same place (if possible)
I don't know if my thread will have success but i try.
I start
Android : NAND - prj Clean Desire v0.3.2 [Kernel: prj v0.4]
http://forum.xda-developers.com/showthread.php?t=897191
Radio : 2.15.50.14
Fix : Average 2mn30sec, Max : 7min, min 1min.
gps.conf content :
I've tested a lot of configuration so there are a lot of lines commented and uncommented
NTP_SERVER=fr.pool.ntp.org
NTP_SERVER=europe.pool.ntp.org
#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
#XTRA_SERVER_1=0.europe.pool.ntp.org
#XTRA_SERVER_2=1.europe.pool.ntp.org
#XTRA_SERVER_3=2.europe.pool.ntp.org
#XTRA_SERVER_4=3.europe.pool.ntp.org
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL = 3
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
ACCURACY_THRES=5000
# Report supl ref location as position, 1=enable, 0=disable
REPORT_POSITION_USE_SUPL_REFLOC=0
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
#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
################################
# EXTRA SETTINGS
################################
#CURRENT_CARRIER=common
#DEFAULT_AGPS_ENABLE=TRUE
#DEFAULT_SSL_ENABLE=FALSE
# Wiper (wifi positioning), 1=enable, 0=disable
ENABLE_WIPER=0
very nice idea, i'll post my results later today hopefully.
I would suggest to also add the approx age of your phone (recent, old etc...) and, very important, a lo.
you can save logs using alogcat (search for it in android market).
Here is what works best for me ..
Here is what works best for me ..
NTP_SERVER=north-america.pool.ntp.org
XTRA_SERVER_1=0.north-america.pool.ntp.org
XTRA_SERVER_2=1.north-america.pool.ntp.org
XTRA_SERVER_3=2.north-america.pool.ntp.org
XTRA_SERVER_3=3.north-america.pool.ntp.org
SUPL_HOST=lbs.geo.t-mobile.com
SUPL_PORT=7275
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
ENABLE_WIPER=0
Get A Lock Very Quick ..
Cold Start:15-45 Secs
After:5-15
Give it a try.
WarlockW said:
Here is what works best for me ..
NTP_SERVER=north-america.pool.ntp.org
XTRA_SERVER_1=0.north-america.pool.ntp.org
XTRA_SERVER_2=1.north-america.pool.ntp.org
XTRA_SERVER_3=2.north-america.pool.ntp.org
XTRA_SERVER_3=3.north-america.pool.ntp.org
SUPL_HOST=lbs.geo.t-mobile.com
SUPL_PORT=7275
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
ENABLE_WIPER=0
Get A Lock Very Quick ..
Cold Start:15-45 Secs
After:5-15
Give it a try.
Click to expand...
Click to collapse
It works !!! (i have the same response time as yours and i detect 10 satelites instead of 6/7 before) but i can't understand why.
1 - I'm in france and your file uses a ntp server in america.
2 - Xtra server must point to a file and you use an url to another ntp server
3 - my 3g and wifi are disabled so i can't contact neither the ntp server, neither xtra server, neither the supl host
Why does it work ?
I want to say you a big thanks but you will have to wait until tomorrow evening after another day test
What file are you guys editing to "change" the settings?
htc-hd2 said:
What file are you guys editing to "change" the settings?
Click to expand...
Click to collapse
gps.conf in system/etc
To modify it you have to use a soft like 'root explorer' on android or adb or 'DroidExplorer' on PC.
http://forum.xda-developers.com/showthread.php?t=939385
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=0.europe.pool.ntp.org
XTRA_SERVER_2=1.europe.pool.ntp.org
XTRA_SERVER_3=2.europe.pool.ntp.org
XTRA_SERVER_4=3.europe.pool.ntp.org
SUPL_HOST=supl.google.com
SUPL_PORT=7276
Click to expand...
Click to collapse
RADIO: 2.15.50.14
ROM: MDJ's CyanogenMod 7 v. 2.6
Fix: 5 - 10 min. Sometimes 5-10 seconds, sometimes - never.
htcvidi, better for you to minimize the gps.conf file. You can remove all lines starting with: #
When the row starts with #, that means that this exact row is ignored.
So your gps.conf will look like:
NTP_SERVER=fr.pool.ntp.org
NTP_SERVER=europe.pool.ntp.org
DEBUG_LEVEL = 3
INTERMEDIATE_POS=0
ACCURACY_THRES=5000
REPORT_POSITION_USE_SUPL_REFLOC=0
ENABLE_WIPER=0
Click to expand...
Click to collapse
...sorry, just in case.
WarlockW said:
Here is what works best for me ..
NTP_SERVER=north-america.pool.ntp.org
XTRA_SERVER_1=0.north-america.pool.ntp.org
XTRA_SERVER_2=1.north-america.pool.ntp.org
XTRA_SERVER_3=2.north-america.pool.ntp.org
XTRA_SERVER_3=3.north-america.pool.ntp.org
SUPL_HOST=lbs.geo.t-mobile.com
SUPL_PORT=7275
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
ENABLE_WIPER=0
Get A Lock Very Quick ..
Cold Start:15-45 Secs
After:5-15
Give it a try.
Click to expand...
Click to collapse
The GPS fix was very quick yesterday with your config but, unfortunately, today i have the same trouble : GPS fix time is random.
However, i remarked that when the fix is long (2 minutes or more) if i switch on/off 3g or plane mode, i have very often a fix after few secondes.
I had been having lots of problems with GPS but now after installing the latest Hyperdroid NAND rom (3.0), all seems to be well!
Getting a fix at around 10 seconds now which seems normal.
I have a feeling that the gps in the HD2 is not very sensitive, or somehow the android builds do not have the sensitivity set right?
I think this purely because it seems ok in wide open area, but even in the top room of my house where it is fine in Windows mobile, it is either slow or fails to lock on android.
htcvidi said:
gps.conf in system/etc
To modify it you have to use a soft like 'root explorer' on android or adb or 'DroidExplorer' on PC.
Click to expand...
Click to collapse
i cannot move, delete, or edit the file. ive tried various file explorers such as astro etc etc.
Ive tried searching but All i find is the same question being asked, but no real answer.
I assume I need root access, but considering this is a rom, wouldn't I already have root?
If not, what do I need, and need to do?
Wingnutt said:
i cannot move, delete, or edit the file. ive tried various file explorers such as astro etc etc.
Ive tried searching but All i find is the same question being asked, but no real answer.
I assume I need root access, but considering this is a rom, wouldn't I already have root?
If not, what do I need, and need to do?
Click to expand...
Click to collapse
You need to mount your system as read/write. By default its on read/only. R/W lets you make changes to the files and be able to save them after the changes.
mattfmartin said:
You need to mount your system as read/write. By default its on read/only. R/W lets you make changes to the files and be able to save them after the changes.
Click to expand...
Click to collapse
Can you tell me how it's done?
I'm having this same issue as many other people here. I'm unable to edit the GPS.conf file whatever I do. I've tried Astro, ES File Explorer, Super Manager, Android Mate, etc. Every single program has the same issue. They are unable to edit the GPS.conf file. I've read dozens of topics about this, but nobody has written any clear instructions.
My phone is HD2 with "Stock" NAND Android 2.3. And what I've read, it's already rooted, but I still don't have the right permissions.
Some people say, I should use Root Explorer, but is there any free solutions to this problem? All I want, is to edit the GPS.conf file in order to get the GPS working.
If you want a free solution and have a PC, try DroidExplorer.
It looks like a file explorer but for your android.
With it , you will be able to copy to your pc the gps.conf file, and 'push' it again to android.
htcvidi said:
If you want a free solution and have a PC, try DroidExplorer.
It looks like a file explorer but for your android.
With it , you will be able to copy to your pc the gps.conf file, and 'push' it again to android.
Click to expand...
Click to collapse
Tried it, didn't work. I was able to edit the file, but when I copied the new file back, it seemed to work, but when I opened the file, it still contained the old info. I tried to copy the file many times and even rebooted the device, but no success. So the issue still remains. It seems that the problem is not with the editing software, I just don't have the right permissions to edit, delete, or replace the file.
Esaj2 said:
Can you tell me how it's done?
I'm having this same issue as many other people here. I'm unable to edit the GPS.conf file whatever I do. I've tried Astro, ES File Explorer, Super Manager, Android Mate, etc. Every single program has the same issue. They are unable to edit the GPS.conf file. I've read dozens of topics about this, but nobody has written any clear instructions.
My phone is HD2 with "Stock" NAND Android 2.3. And what I've read, it's already rooted, but I still don't have the right permissions.
Some people say, I should use Root Explorer, but is there any free solutions to this problem? All I want, is to edit the GPS.conf file in order to get the GPS working.
Click to expand...
Click to collapse
If you have ES File Explorer, open the app go to Settings by pressing the middle button and you will see a Root and Mount option, click both. Then you will be able to edit the gps.conf file like I do.
htcvidi said:
Hi,
A lot of people here have a very long GPS fix.
I propose you to post here your android nand or SD version, rom radio, average, max, min fix time and gps.conf file content.
To have pertinent results, I propose you the following procedure :
- Disable 3G and Wifi
- Make a cold restart
- Use gpsfix from Android Labs available in the market.
- make the test during one week each morning and afternoon at the same place (if possible)
I don't know if my thread will have success but i try.
I start
Android : NAND - prj Clean Desire v0.3.2 [Kernel: prj v0.4]
http://forum.xda-developers.com/showthread.php?t=897191
Radio : 2.15.50.14
Fix : Average 2mn30sec, Max : 7min, min 1min.
gps.conf content :
I've tested a lot of configuration so there are a lot of lines commented and uncommented
NTP_SERVER=fr.pool.ntp.org
NTP_SERVER=europe.pool.ntp.org
#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
#XTRA_SERVER_1=0.europe.pool.ntp.org
#XTRA_SERVER_2=1.europe.pool.ntp.org
#XTRA_SERVER_3=2.europe.pool.ntp.org
#XTRA_SERVER_4=3.europe.pool.ntp.org
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL = 3
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
ACCURACY_THRES=5000
# Report supl ref location as position, 1=enable, 0=disable
REPORT_POSITION_USE_SUPL_REFLOC=0
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
#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
################################
# EXTRA SETTINGS
################################
#CURRENT_CARRIER=common
#DEFAULT_AGPS_ENABLE=TRUE
#DEFAULT_SSL_ENABLE=FALSE
# Wiper (wifi positioning), 1=enable, 0=disable
ENABLE_WIPER=0
Click to expand...
Click to collapse
Though I am in the US, I am working with AngelDeath, another user on XDA, on creating a very fast GPS solution for the Cmylxgo Stock Desire HD(2) build we are on. I would change your NTP_SERVER command line and add all the servers available for you in France. So instead of you having the "generic" fr.pool.ntp.org line. Go with NTP_SERVER=0.fr.pool.ntp.org, and do it again for servers 1-3. That way you will be accessing all the servers. I would also enable your INTERMEDIATE_POS command line and use the =1 and not =0. Seems to reduce the lock time for me. Do the same for the REPORT_POSITION_USE command line. Also add below the SUPL_PORT=7276 command line SUPL_SECURE_PORT=7275. This helps non-TMOUS carrier users to lock faster as well. I have quite a few changes to the gps.conf file and get cold starts under 25 seconds with relocks in 4-7 seconds. Using nav apps such as Car Home, I am able to get locks within three GPS pulses after first fix. But of course, the command lines I am using are now very specific to my region of the US.
slbenz said:
Though I am in the US, I am working with AngelDeath, another user on XDA, on creating a very fast GPS solution for the Cmylxgo Stock Desire HD(2) build we are on. I would change your NTP_SERVER command line and add all the servers available for you in France. So instead of you having the "generic" fr.pool.ntp.org line. Go with NTP_SERVER=0.fr.pool.ntp.org, and do it again for servers 1-3. That way you will be accessing all the servers. I would also enable your INTERMEDIATE_POS command line and use the =1 and not =0. Seems to reduce the lock time for me. Do the same for the REPORT_POSITION_USE command line. Also add below the SUPL_PORT=7276 command line SUPL_SECURE_PORT=7275. This helps non-TMOUS carrier users to lock faster as well. I have quite a few changes to the gps.conf file and get cold starts under 25 seconds with relocks in 4-7 seconds. Using nav apps such as Car Home, I am able to get locks within three GPS pulses after first fix. But of course, the command lines I am using are now very specific to my region of the US.
Click to expand...
Click to collapse
I'm still confused with all different settings. I'm on tmous, what settings do you recommend for tmous users? I tried to replace gps.conf from Cmylxgo over my ROM but problem still exist.
Okay, if everyone would just give me few days, I am going to open a thread about this and explain what I have learned about the GPS, I know alot of people are having trouble, or even some better people then me have come up with solutions, but it seems that something was over looked when it came to GPS, in the last 3 days I have figured out how all this plays together, and part of me doesnt understand why delevopers (Not talking about rom dev or cookers) did this, its seems at least for the last 3 years we have been going about this all the wrong way.
If everyone would just give me till the end of the week, I will open a thread and explain all this in length, but I also have promised Cmylxgo that if his upcoming rom isnt going to be too far long, then I would hold off until after his release, but I hope to find that out very soon.
Just as a teaser, In the USA region I have now accomplished for the east coast first locks in under 20s and all reboots and reloads to a majority of 3s relocks. At this point I consider this instantaneous and cannot get any faster locks. I also plan to make 6 region files:
USA
Europe
UK
Asia
Oceania
South America
Africa
All the ones for all other countries will not have as extensive commands as the US, for 2 reasons: 1) I dont live in those locations, and two, the servers are not as vast, but I am quite sure it will be better then what anyone has currently running.
slbenz said:
If you have ES File Explorer, open the app go to Settings by pressing the middle button and you will see a Root and Mount option, click both. Then you will be able to edit the gps.conf file like I do.
Click to expand...
Click to collapse
Tried that, but I had problems. When I go to settings and try to activate the Root option, it tells me that this is an experimental feature and when I click "YES", It gives me two choices: Select ROM: 1. Cyanogen Mod / 2. HiAPK. No matter which I choose, it says to me "Sorry test failed, this feature cannot run on your phone". So is there any alternative way of fixing this or any other program, which I could use? Or is there any way to get the gps.conf file writeable?
Could this problem being caused by the custom NAND ROM? I have THIS ROM.
ES file explorer wont work ,says its incompatible with my phone, regardless of which mod (neither of which I have) I select. No surprise.
trying to use droid explorer, but it keeps timing out when saying "downloading tools" and force closing..
Typical, you have a problem, find out what (may) be the solution.. try to get that app/program to fix your original problem, only to fin out the program needed to fix your problem is broke, so now you have to skew off in an entire different direction to try and fix the problem with the program you need to fix your problem.
I love this ****.
Hello all, I've been searching the forums for a similar thread but didn't find anything, so I'm going ahead and posting my advice, hope it can be useful to HD2 fellow owners. I came into possession of an euro HD2 one month ago (my mom didn't use it, it's practically new, lucky me), installed straight away an Android ROM, Tytung's "NexusHD2-JellyBean-4.1.2-CM10 V1.3a" (at http://forum.xda-developers.com/showthread.php?t=1930240).
Cool stuff, I was only pretty disappointed with the GPS fix times.
Then I learned about the gps.conf file, went on to open it, and was very surprised to find out that in this ROM it is very basic and short. I don't know about the situation with other ROMs and other Android versions, but the problem could possibly concern many HD2 users.
So I went for a search on XDA and on the general internet, got educated a bit on the matter, then I started experimenting and finally put together a file that's working very well for me - I'm getting cold fixes in under a minute, and warm fixes in seconds flat (all of this indoors, standing by a window). It was a long trial-and error work.
Hint: gps.conf is to be found in /system/etc directory. You'll need a rooted device to access it, and possibly to change permissions to the file to be able to modify it, I don't even remember if I did the latter :laugh:
Here's my take on the code:
#NTP_SERVER=ru.pool.ntp.org
NTP_SERVER=0.ru.pool.ntp.org
NTP_SERVER=1.ru.pool.ntp.org
NTP_SERVER=2.ru.pool.ntp.org
#NTP_SERVER=3.ru.pool.ntp.org
#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
#NTP_SERVER=3.europe.pool.ntp.org
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
DEFAULT_USER_PLANE=TRUE
DISABLE_AGPS_WHEN_ROAMING=true
REPORT_POSITION_USE_SUPL_REFLOC=1
AssistMethodType=1
AgpsUse=1
AgpsMtConf=0
AgpsMtResponseType=1
AgpsServerType=1
AgpsServerIp=3232235555
DEFAULT_SSL_ENABLE=FALSE
INTERMEDIATE_POS=1
QOS_ACCURACY=60
QOS_TIME_OUT_AGPS=120
QOS_TIME_OUT_STANDALONE=180
SUPL_HOST=supl.google.com
SUPL_PORT=7276
SUPL_SECURE_PORT=7275
SUPL_NO_SECURE_PORT=3425
CURRENT_CARRIER=common
ENABLE_WIPER=1
I'll explain a little: NTP URLs are for getting the precise time from a special server, this is necessary for the A-GPS because location is tracked by estimating the time to reception of the satellite's signal (I'm no expert but I shouldn't be much off the mark). So you want to download the time with the shortest network ping (delay) or it will not be accurate, and in order to do this you need to choose a NTP server as close to you as possible. In fact, of all the code I posted, the only part you should personalize to your needs is the lines regarding the NTP servers. I live in Russia, so I have the letters "ru" in the domains. To find the active servers closest to you, go to:
http://www.pool.ntp.org/en/
Also, I added the European servers as a backup (because they are not too far away from Russia), as some people suggest, and I verified that in some cases they get used by my device, possibly because of an excessive delay in receiving an answer from the earlier-listed addresses.
So why did I comment out some of the servers in the code? Well, looks like a failure in receiving an answer from a server can lead to a waste of time because of longish timeouts. In any case, I found out that by using only three servers from my area (and a couple from Europe, not more) I'm getting better fix times. So I left out the others but did not erase them for good, in order to stress the fact that I found a difference from those who suggest to add some eight NTP addresses or more.
So to recap, say you're from Japan, you could use:
NTP_SERVER=0.jp.pool.ntp.org
NTP_SERVER=1.jp.pool.ntp.org
NTP_SERVER=2.jp.pool.ntp.org
and immediately below (optional):
NTP_SERVER=0.asia.pool.ntp.org
NTP_SERVER=1.asia.pool.ntp.org
Then there's the Xtra servers needed to get the satellites' updated position in a format recognized by our Qualcomm chip. One size fits for all, no need to change anything here. The Agps engine relies on them, or in case of necessity falls back on the SUPL hosts (in this case, google.com).
I found out that the SUPL TLS hosts are useless for me, so I erased the following lines, that some people included and some others say are malformed:
SUPL_TLS_HOST=FQDN
SUPL_TLS_CERT=/etc/SuplRootCert
Also, the much advertised C2K host, and the following lines of code, did not work for me:
C2K_HOST=c2k.pde.com
C2K_PORT=1234
The last line,
ENABLE_WIPER=1
determines the persistence of the (AGPS?) position established by WIFI. It is not clear to me,though, if this is related to the AGPS data unloaded by WIFI, or the geographic position extrapolated by Google from a WIFI networks database (the fix you get when your WIFI is on even without GPS of AGPS). Anyway, 0 stands for inactive, as expected, and 1 for active. I believe modifying this line should not have any negative influence, make your tests.
I recommend you to:
1 - verify that you successfully saved the modified gps.conf file.
2 - reboot the phone (some say one should even turn it off, remove the battery and leave it off for minutes, in order to clean the cache) then use the app "GPS Status" to flush the Agps data and reload said data (and of course wait 1-2 min. the first time). Only then will the effects be visibile.
3 - needless to say, check that your data connection is active.
Also I recommend you not to use programs, like FasterGPS, that work by overwriting the contents of the gps.conf file, or you will have to start anew.
That's it. Please let me know how is your mileage, thanks for your attention.
March 5 edit:
The edited file described above works well until the ephemerides expire (after 2-3 hours from a cold fix). After that, fix times tend to rise, until the 6th hour from the last AGPS data download, at which point (at least on my phone) fresh data get downloaded as per GPS Status app settings (under "download GPS data at start"). My feeling is, since the script does not provide for a routine for assessing data age, and this JB ROM does not include a gpsconfig.xml file, this routine must be missing for good - so the phone tries a warm GPS start using data that are not valid anymore, thence the longer fix times (I may be totally wrong in my diagnosis, so commentaries from more tecnically savvy users are very welcome). I'm going to try and use chunks of a gpsconfig.xml from some other ROM, and see if the newly included gpsconfig.xml file gets recognized at all, to try and include a routine for discerning old from fresh data. Going to update this post further in case of progress.
March 7 note: this problem may be overcome by modifying the already mentioned option "download GPS data at start" choosing the suboption "download if data are older than one hour" under settings in the "GPS Status" app.
This solution is not very elegant from a developing standpoint, plus it involves using the network (and to have it available) more often than the normal ephemerides' expiry term, plus it forces you to use an external app, so I'm looking for a better solution anyway.
March 7 edit: slight modifications to the code. Also, erased the sentence "Important: if you use the app "GPS Status", remember to choose "weak" or "no filter" under "Sensors filter" in the settings" (as this seems to exert little influence with the use of QoS in the code).
Great info
Thanks a bunch, Luther. This helped for me as well. need to see if my cold fix times increase as you mention at the end. Good luck with the xml file development. Hope it works.
gprash said:
Thanks a bunch, Luther. This helped for me as well. need to see if my cold fix times increase as you mention at the end. Good luck with the xml file development. Hope it works.
Click to expand...
Click to collapse
You're welcome, Sir. Please check out the latest amendment to the code.