AGPS Patch Motorola Defy 3.1 & 2.2 | Not officially supported

crypted

Senior Member
Nov 20, 2007
2,493
4,221
0
Miami, FL
derekgordon.com
The gps.conf I was provided is not stock for broadcom devices. If someone could get me that, I'd appreciate it.

EDIT: The CM builds are providing you with Qualcomm gps.conf files. While my patch is superior to that, it won't help with me modifying to utilize Broadcom supplied aGPS data files. I need that gps.conf to get you all a fully optimized gps.conf using my patch and those data provisions.
 
Last edited:

popcorn1122

Senior Member
Nov 21, 2011
569
208
0
Mumbai
As far as I see my stock defy sea15 ... there is no gps.conf file.... instead there is a gpsconfig.xml file

the file contains the following details:

<?xml version="1.0" encoding="utf-8"?>
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="glconfig.xsd" >

<hal
acPortName="/dev/ttyS0"
lBaudRate="115200"
cLogEnabled="false"
acLogDirectory="/data/location/com.broadcom.gps/logs/"
ltoFileName="lto.dat"
acNvStoDir="/data/location/"
acCmdPipeName="/data/location/gpscmd"
bAllowIgnoreOsc="false"
bUseHalLogger="false"
/>

<!-- GPS configuration with standalone 26 MHz TCXO and 1.625 MHZ CNTIN -->
<gll
LogPriMask="LOG_DEBUG"
LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA | LOG_INTEGR | LOG_USR1"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_1_625MHZ_300PPB"
RfType="GL_RF_BARRACUDA_EXT_LNA"
/>

<!-- Periodic Position Fix using default settings -->
<job id="Periodic">
<task>
<req_pos/>
</task>
</job>

</glgps>
 

crypted

Senior Member
Nov 20, 2007
2,493
4,221
0
Miami, FL
derekgordon.com
As far as I see my stock defy sea15 ... there is no gps.conf file.... instead there is a gpsconfig.xml file

the file contains the following details:

<?xml version="1.0" encoding="utf-8"?>
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="glconfig.xsd" >

<hal
acPortName="/dev/ttyS0"
lBaudRate="115200"
cLogEnabled="false"
acLogDirectory="/data/location/com.broadcom.gps/logs/"
ltoFileName="lto.dat"
acNvStoDir="/data/location/"
acCmdPipeName="/data/location/gpscmd"
bAllowIgnoreOsc="false"
bUseHalLogger="false"
/>

<!-- GPS configuration with standalone 26 MHz TCXO and 1.625 MHZ CNTIN -->
<gll
LogPriMask="LOG_DEBUG"
LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA | LOG_INTEGR | LOG_USR1"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_1_625MHZ_300PPB"
RfType="GL_RF_BARRACUDA_EXT_LNA"
/>

<!-- Periodic Position Fix using default settings -->
<job id="Periodic">
<task>
<req_pos/>
</task>
</job>

</glgps>
Do the custom ROMs contain this as well? Like CM7 and whatever else?
 

popcorn1122

Senior Member
Nov 21, 2011
569
208
0
Mumbai
@crypted ... CM7.1.0 have such xml file... infact same...

I have motorola defy green lens and I am on stock rom 2.2.2 SEA 15 (Latest build)
Infact I have not seen any gps.conf file on stock roms of defy...
stock roms checked are nordic,UK blur, SEA15 ... non had gps.conf file. It only has that xml file in /system/etc. Without the gps.conf file the gps locks in 1 minute for the first use. There after its preety fast to detect where I am in 10 meter range...

---------- Post added at 12:53 PM ---------- Previous post was at 12:46 PM ----------

The accuracy of stock rom is upto 1 meter if I have wifi on and GPS On.. and the compass calibrated . this is without the gps.conf file.... the out of box defy state.

---------- Post added at 01:13 PM ---------- Previous post was at 12:53 PM ----------

Now check this :
http://www.broadcom.com/collateral/tb/LTO-TB100-R.pdf

I have checked the stock rom for /data/gps/lto.dat .... but I see no files or folders under /data .... so the lto.dat file is missing? That file basically holds an analog to XTRA data; It doesn't quite help picking up satellites, but it makes locking onto them a hell of a lot faster once they're found.

---------- Post added at 01:23 PM ---------- Previous post was at 01:13 PM ----------

adb shell
cd /data/gps
wget http://gllto.glpals.com/7day/latest/lto.dat
chmod 777 lto.dat

If anyone can give the report by downloading that file manually and checking the gps locktime/accuracy.... it would be great.... also this .dat file would be valid for 7 days.. and I have no clue why it is not downloaded automatically... If anyone knows the details please share...
 

popcorn1122

Senior Member
Nov 21, 2011
569
208
0
Mumbai
found the answer of lto.dat not getting downloaded. The file is actually downloaded... but its stored in 3 different files.

\data\location\ have three file.

gpsdata.nvs , learn_store.bin , location.cfg

These three files are generated by downloading lto.dat from this code of xml:
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="glconfig.xsd" >

The details are stored in gpsdata.nvs , learn_store.bin , location.cfg for around 4 hours max...

What I can conclude is that we do not need any gps.conf file... we just need to be patient with our defy to get those there files via gprs or wifi... Once this is done the GPS will work fine in fixing in around 10 seconds...

---------- Post added at 07:09 PM ---------- Previous post was at 06:27 PM ----------

I have found a file of other mobile manufacturer who uses LTO... any one can use the below file for a better config of GPS for motorola defy? the ttyHS1 is different... some paths are different like /data/location of motorola defy is /data/gps of this other manufacturer...
We can have Repetetive warm starts if GPS receiver starts after it was left off for more that 4 hours. Only we need to edit this file and not gps.conf in case of Broadcom chipsets..

Code:
<xml version="1.0" encoding="utf-8"?>
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >

<hal
acPortName="/dev/ttyHS1"
lBaudRate="115200"
cLogEnabled="false"
acLogDirectory="/data/gps"
ltoFileName="lto.dat"
ctrlPipe="/data/gps/glgpsctrl"
lcsApiSockName="/dev/socket/gps"
gpioNStdbyPath="/sys/class/gpio/gpio203/value"
gpioDelayMs="120"
arp-supl-enable="false"
/>

<!-- GPS configuration with standalone 16.8 MHz TCXO -->
<gll
LogPriMask="LOG_DEBUG"
LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA"
FrqPlan="FRQ_PLAN_26MHZ_2PPM"
RfType="GL_RF_4751_DANUBE"
PeriodicTimeOutSec="30"
/>

<!-- GPS configuration for with 16.8 MHz TCXO
and CNTIN connected to the clock with 100 ppb uncertainty
-->
<!--gll
LogPriMask="LOG_DEBUG"
LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA"
FrqPlan="FRQ_PLAN_16_8MHZ_2PPM_10MHZ_100PPB"
RfType="GL_RF_BARRACUDA_EXT_LNA"
/-->

<!-- GPS configuration for with 16.8 MHz TCXO
and CNTIN connected to the clock with 300 ppb uncertainty
-->
<!--gll
LogPriMask="LOG_DEBUG"
LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA"
FrqPlan="FRQ_PLAN_16_8MHZ_2PPM_10MHZ_300PPB"
RfType="GL_RF_BARRACUDA_EXT_LNA"
/-->

<!-- Periodic Position Fix using default settings -->
<job id="Periodic">
<task>
<req_pos/>
</task>
</job>

<!-- Periodic Position with the ROM almanac ignored for simulator testing -->
<job id="Simulator_Periodic">
<task id="cont" repeat="1">
<startup ignore_rom_alm="true" />
<req_pos validfix="2000" duration_sec="4500"/>
</task>
</job>

<!-- Repetetive cold starts -->
<job id="Cold_Starts">
<task repeat="1000000">
<startup
ignore_osc="false"
ignore_rom_alm="false"
ignore_ram_alm="false"
ignore_pos="true"
ignore_nav="true"
ignore_time="true"
/>
<req_pos validfix="1"/>
</task>
</job>

<!-- Repetetive cold starts with the ROM almanac ignored for simulator testing -->
<job id="Simulator_Cold_Starts">
<task repeat="1000000">
<startup
ignore_osc="false"
ignore_rom_alm="true"
ignore_ram_alm="false"
ignore_pos="true"
ignore_nav="true"
ignore_time="true"
/>
<req_pos validfix="1"/>
</task>
</job>

<!-- Repetetive warm starts
Stored ephemeris data is discarded before the start begins
This simulates GPS receiver start after it was left off for more that 4 hours
-->
<job id="Warm_Starts">
<task repeat="1000000">
<startup ignore_nav="true"/>
<req_pos validfix="1"/>
</task>
</job>

<!-- Repetetive warm starts performed on GPS simulator -->
<job id="Simulator_Warm_Starts">
<task repeat="1000000">
<startup
ignore_rom_alm="true"
ignore_nav="true"
/>
<req_pos validfix="1"/>
</task>
</job>

<!-- Repetetive hot starts -->
<job id="Hot_Starts">
<task repeat="1000000">
<req_pos validfix="1"/>
</task>
</job>

<!-- This job must be performed every time the GPS simulator scenarion is reset -->
<job id="CollectEphemeris">
<task repeat="1">
<startup
ignore_osc="true"
ignore_rom_alm="true"
ignore_ram_alm="true"
ignore_pos="true"
ignore_nav="true"
ignore_time="true"
/>
<req_pos validfix="200"/>
</task>
</job>


<!-- This job performes series of single shot requests using the data stored
in NVRAM to simulate assistance data received from the network
The QoS parameters are set to maxmize the GPS sensitivity
-->
<job id="Assisted_Cold_Starts">
<task repeat="1000000">
<startup
ignore_rom_alm="true"
ignore_ram_alm="true"
/>
<asst>
<!--pos Lat="-30.0" Lon="-50.0" Alt="50" /-->
<pos Lat="33.7691" Lon="-84.4062" Alt="300" />
<!--pos Lat="37.0" Lon="-122.0" Alt="50" /-->
<!--pos Lat="37.26533652" Lon="-121.94128855" Alt="51.4" /-->
</asst>
<req_pos_single acc="50" timeout="30" />
</task>
</job>

<!-- This job performes series of single shot requests using the data stored
in NVRAM to simulate assistance data received from the network
The QoS parameters are set as it woudld be set by Spirent ULTS executing
3GPP TS performance tests.
-->
<job id="3GPP_Assisted_Cold_Starts">
<task repeat="1000000">
<startup
ignore_rom_alm="true"
ignore_ram_alm="true"
/>
<asst>
<!--pos Lat="-30.0" Lon="-50.0" Alt="50" /-->
<pos Lat="33.7691" Lon="-84.4062" Alt="300" />
<!--pos Lat="37.0" Lon="-122.0" Alt="50" /-->
<!--pos Lat="37.26533652" Lon="-121.94128855" Alt="51.4" /-->
</asst>
<req_pos_single acc="25" timeout="20" />
</task>
</job>

<!-- This job starts signle chanel factory test mode
The signal is expected to be in the range from -125 dBm to -145 dBm
with the frequency offset range from -2 ppm to +2 ppm
for this mode to provide reliable results
-->
<job id="Factory_High_SNR">
<task id="test" repeat="1">
<startup
ignore_osc="true"
ignore_rom_alm="true"
ignore_ram_alm="true"
ignore_pos="true"
ignore_nav="true"
ignore_time="true"
/>
<req_ftest
PRN="1"
GL_FACT_TEST_MODE="GL_FACT_TEST_CONT"
GL_FACT_TEST_ITEMS="GL_FACT_TEST_WER"
avg_int_sec="10"
duration_sec="60"
/>
</task>
</job>

<!-- This job is intended to be ran after the Factory_High_SNR job
It uses the TCXO offset stored in NVRAM during the Factory_High_SNR job
-->
<job id="Factory_Low_SNR">
<task id="test" repeat="1">
<startup
ignore_osc="false"
ignore_rom_alm="true"
ignore_ram_alm="true"
ignore_pos="true"
ignore_nav="true"
ignore_time="true"
/>
<req_ftest
PRN="1"
GL_FACT_TEST_MODE="GL_FACT_TEST_CONT"
GL_FACT_TEST_ITEMS="GL_FACT_TEST_WER"
avg_int_sec="10"
duration_sec="200"
/>
</task>
</job>

</glgps>
 

popcorn1122

Senior Member
Nov 21, 2011
569
208
0
Mumbai
The location.cfg is updated with the svstatus.txt. This txt file is taken from the latest glpals.com which shows the last gps fix time. This glpal file is fetched every hour
LAST_SECURE_GPS_TIME = 1010676346 . this 1010676346 is taken from the latest svstatus.txt file of that hour.
http://gllto.glpals.com/2day/latest/svstatus.txt
By default LAST_SECURE_GPS_TIME = 0

Also these two lines are also updated if you are connected to any mobile tower instead of satellites:
IS_VALID_LAST_DRV_TCXO = 1
LAST_DRV_TCXO = (LAST CELL ID you logged)

both values are default set to 0 (ZERO).

learn_store.bin & gpsdata.nvs are also update every 1 hour
 
Last edited:

crypted

Senior Member
Nov 20, 2007
2,493
4,221
0
Miami, FL
derekgordon.com
The location.cfg is updated with the svstatus.txt. This txt file is taken from the latest glpals.com which shows the last gps fix time. This glpal file is fetched every hour
LAST_SECURE_GPS_TIME = 1010676346 . this 1010676346 is taken from the latest svstatus.txt file of that hour.
http://gllto.glpals.com/2day/latest/svstatus.txt
By default LAST_SECURE_GPS_TIME = 0

Also these two lines are also updated if you are connected to any mobile tower instead of satellites:
IS_VALID_LAST_DRV_TCXO = 1
LAST_DRV_TCXO = (LAST CELL ID you logged)

both values are default set to 0 (ZERO).

learn_store.bin & gpsdata.nvs are also update every 1 hour
Allright, so it would seem that having a gps.conf would be irrelevant because your phone doesn't utilize it. The only time it would come into play would be a port using it. That, still, doesn't mean it would help at all.

I would think that some of the gps.conf stuff does help with ported ROM's. It would mean that the xtra.bin would not. Tthe SUPL-driven location could still be useful.
 

loyukfai

Member
Jan 29, 2010
20
4
23
Thanks for the explanation, that's much better.

If anything, the "snake oil" would be the very much proven v3.x while v2.x does not remove any part of the standard Qualcomm or NTP.ORG references. However, this "snake oil" has convinced thousands including a number of ROM developers who readily include v3.x in all of their builds since its release.
Many people also thought clearing battery stats could improve the battery life.

(Ooops, sorry I couldn't post link at the moment, but Dianne's got a rebuttal on Google Plus+ for those who're not sure what I'm talking about.)

You know, many of those would swear that it did help, and maybe Ms. Hackborn was wrong. But I'm in general (very) skeptical about anecdotal experiences reported here, on some of the forums on xda, including Defy, where a lot of 15-year-old babbling and swearing all the time.

(Now, I used a generalization and am not against young people in general, I hope you understand.)

The problem is, there are a lot of variables that affect the test results, and sometimes people's wishful thinking blind them from the reality.

Please understand that I'm not against you and your patch, I would be more than willing to donate if I were a heavy GPS user and if it did really help. I've personally donated to various Android developers voluntarily.

Cheers.

P.S. Perhaps you can list which ROMs do use your patch, BTW.
 

crypted

Senior Member
Nov 20, 2007
2,493
4,221
0
Miami, FL
derekgordon.com
Thanks for the explanation, that's much better.

Many people also thought clearing battery stats could improve the battery life.

(Ooops, sorry I couldn't post link at the moment, but Dianne's got a rebuttal on Google Plus+ for those who're not sure what I'm talking about.)

You know, many of those would swear that it did help, and maybe Ms. Hackborn was wrong. But I'm in general (very) skeptical about anecdotal experiences reported here, on some of the forums on xda, including Defy, where a lot of 15-year-old babbling and swearing all the time.

(Now, I used a generalization and am not against young people in general, I hope you understand.)

The problem is, there are a lot of variables that affect the test results, and sometimes people's wishful thinking blind them from the reality.

Please understand that I'm not against you and your patch, I would be more than willing to donate if I were a heavy GPS user and if it did really help. I've personally donated to various Android developers voluntarily.

Cheers.

P.S. Perhaps you can list which ROMs do use your patch, BTW.
I'm not going to spend the time going through, checking, and re-listing ROM's using this.

Yet, the title here said "Tentative Support" based on results from a handful of users who tried this on their own time. After getting more information from this thread, as it was intended to be used for, I decided to not support it. The title has reflected that for a while now.

Again I challenge you to provide a working solution that is superior than this one for most anyone using Qualcomm chipsets and for a number of people using ROM's ported from Qualcomm-based phones.

It is irrelevant that you would or have donated to any project on XDA or elsewhere. The entire reference to any sort of donation revolves around users who feel that they benefit from using the v3.x trunk versus the v2.x trunk as the 3.x utilizes custom servers. Nothing more, nothing less.

This discussion from you has done nothing to further any development or understanding that many of us seek to ascertain. I'm done with this particular conversation.
 

bobo9900

Senior Member
Dec 27, 2009
86
8
0
I'm not going to spend the time going through, checking, and re-listing ROM's using this.

Yet, the title here said "Tentative Support" based on results from a handful of users who tried this on their own time. After getting more information from this thread, as it was intended to be used for, I decided to not support it. The title has reflected that for a while now.

Again I challenge you to provide a working solution that is superior than this one for most anyone using Qualcomm chipsets and for a number of people using ROM's ported from Qualcomm-based phones.

It is irrelevant that you would or have donated to any project on XDA or elsewhere. The entire reference to any sort of donation revolves around users who feel that they benefit from using the v3.x trunk versus the v2.x trunk as the 3.x utilizes custom servers. Nothing more, nothing less.

This discussion from you has done nothing to further any development or understanding that many of us seek to ascertain. I'm done with this particular conversation.


I won't argue about this tweak if he don't use his custom ntp and xtra server. what he did now is giving placebo affect that his server is best. Default server is very reliable, and I won't count on his server. On the other hand, if his server down, most people using his patch will be troubled. And another thing, he is using v2.x claiming it is still using default server. What will you do if you see Froyo and then there is a Gingerbread claimed to be superior, will you install Froyo instead of Gingerbread. Of course everybody will install v3.x with his server.

Angeldeath setting here http://forum.xda-developers.com/showthread.php?t=953630 is better if you have a qualcomm chip. Even I am rather skeptical about ntp server, in logical, using the server closest to you will give faster response. Just ping a server, a server located in the same country will surely give faster response. This crypted argument stating that his server is the best is unreasonable.

http://forum.xda-developers.com/showpost.php?p=21416086&postcount=38
He wouldn't want to accept others tweak is better than his, just read his statement. Simple argument above will prove Angeldeath setting is superior.

And xtra.bin, he just mirror it from original server, and he claim that he generate it or at least he want to people think so.
"I guess the original didn't fall below our process threshold for the rebuild and kept default build." http://forum.xda-developers.com/showpost.php?p=21384629&postcount=19 What does this mean, too sophiscated words I don't even understand.

There is still a lot of people doesn't know well how GPS works. If I say, try to compare MY tweak with default setting. First, get a GPS lock, see how long it takes. Second, install MY tweak, try to lock again to see how long it takes.
Of course second try will always faster. It is hot/warm start. You don't even need to set anything, and the second lock always faster if you wait no more than a few minutes. Even reboot doesn't clear the warm start.
But people who doesn't know GPS well will think MY patch was so great, return to forum and say MY patch was so great.

Another variable is GPS satellite, weather, and building blocking gps visibilty. Sometime there is just not enough satellite visible in your location. There a about 24 active GPS satellite rotating earth twice a day. Some unlucky guy will try to lock GPS and fail within for some reason, maybe he just try it by the windows, and most satelite is behind the windows. and maybe there is bad weather, and when he try his patch, the sky just so clear, luckily a lot satellite above his position, and he will return to forum say his patch was so great.

Crypted, as I said before, set your setting to default server, and I won't bother you. Keep using your server, what you do is breaking people's GPS.

---------- Post added at 09:44 AM ---------- Previous post was at 09:05 AM ----------

@popcorn,

I have try to learn so much about defy's GPS. I have spent 6 hour everyday for more than a month, trying to solve GPS problem, until I give up and ask in the Defy General forum.

Defy's gps driver binary is identical to milestone 2. Motorola is too lazy to update the driver, its last driver is dated July 2010. I have been downloading almost 20 rom from various device I don't own, trying to take the binary out of it and apply in defy but failed. Another device is cliq 2, but still dated July 2010.
About lto.dat, it is not enabled in driver. Closest possible enabled lto from motorola is XOOM, but it is tegra device, and to use that binary, we might need a custom kernel, that means we need unlocked bootloader.
Atrix2 is lto enabled, but it seems to use completely different binary.
Most samsung device and LG is lto enabled, they both use similar binary, but different from what motorola used.

What you see in gpsdata.nvs is data downloaded using SUPL, not lto.dat. While learnstore.bin is more something needed for wireless location, it create database of your locked gps position and what cell signal you have. Next time when you enable use wireless network, it will identify cellid, and give use approx location from database it created in learnstore.bin.

And defy suffers the same inaccurate position as SGS. SGS suffers bad antenna and bad accuracy. Because so many people complain, samsung updated their driver, and solved or at least minimized the bad accuracy. If I'm not wrong, SGS fixed their problem at near end of 2010, so our driver is still outdated as it is from July 2010.

About lto.dat, maybe motorola pay less for the chip without lto enabled. We now can just wait motorola update their driver, or wait for other OMAP3 device from motorola and take the driver to defy.

About bad accuracy, it seem the problem lies within broadcom. I don't know if the chip is bad, or broadcom makes bad driver implementation in linux. Broadcom uses too much predictive location. You can see when we drive, even when we stop, our gps shows up still moving.
Search youtube for iphone4 umts vs cdma gps, umts version uses BCM4750, same as ours, although not as bad accuracy as ours.
I have even read somewhere that atrix 2 still shows 2 block away from real position. So even in latest device, broadcom still not really fix the problem. My next device will be snapdragon and won't be Omap with broadcom chip until I can be assured everything is solved by broadcom.

I'm no developer. Things I said about might just be wrong. I just share what I learned so far.
 
Last edited by a moderator:
  • Like
Reactions: popcorn1122

crypted

Senior Member
Nov 20, 2007
2,493
4,221
0
Miami, FL
derekgordon.com
While I will not support the Motorola Defy, if anyone would like to test two of my rebuilds I worked on for this device please send me a private message.

I'm done with this. Apparently my experience and knowledge is snake oil and not worth the time of anyone who needs legitimate assistance.

I firmly believe from past experience that with modification, this would help Defy users who use custom ROM's because a number of those ROM bases come from phones with supported chipsets.

I appreciate commentary from my foes; however, this belittling and ignoring the underlying matter to opt-in a witch hunt against me is not worth the time spent trying to assist anyone.

Respectfully, I bow out.
 

NoTyp3

Member
Mar 21, 2010
10
0
0
Tested this on ms2ginger rom and cm7

Device now refused to get GPS lock

Reflashed tested 1.2 world wide
Tested 2.2 and 3

None work on my defy (green lense )

Sent from my MB525 using Tapatalk
 

starbright_

Senior Member
Apr 11, 2010
1,124
183
83
Are you using this patch? The data should be stored by your ROM in cache. The file you download is good for 24 hours. If your phone is in a case, remove it.

What ROM are you using? Did you read the Notes Section at all?
Sorry for long delay of answer. I have been offline for some days.

As described in my post I am using Cyanogenmod 7.1.-11 (stable)
Currently I haven't used your patch. This is not because I want to ignore your research (which is very welcome), but because of the behaviour of my Defy is a bit different from the problems your patch seems to solve. This has been my understanding.

bobo9900 notes has been very interesting:
bobo9900 said:
What you need is a-gps data. For qualcomm, that is xtra.bin. For broadcom, its lto.dat. xtra.bin and lto.dat size approx 40kb and valid for about 3-7days. Our defy is broadcom, it is supposed to use lto.dat, but it seem it didn't enabled in driver. Currently only enabled SUPL. Supl only download 4-8kb (4kb for ephemeris, if you wait long enough, it will download another 4kb for almanac), and valid for about 4 hours.
As this is very much, what I observere. With data downloaded by GPSStatus the fix is very fast - within a few seconds.
In my test is disabled data connection to prevent GPSStatus from reload new AGPS data and start GPSStatus after some time. After 6 hours I can't see any positive effect by the previous loaded data.
Is this a valid test setup?

Question: What is SUPL ? What is waiting long enough?

I asked in other thread about the mechanism of AGPS. The answer was more or less, that downloaded data are directly injected into the GPS chip. So the data are not visible as a file on device. Not sure about this - this is what other people told me.

Most time I use Defy without data connection. GPSStatus often shows a lot of sats, but can't get a fix. BTW: Does someone can explain the different colors of GPS-Altar? I see white, blue, yellow ... I assume this some kind of "progress bar" to achive the final fix.

I need a bit more time to read and understand the full thread. There is a lot of information, that is hard for me to understand.

Anyhow, I want thank all of you quys which try to optimize one of the few handicaps of the Defy. (In fact, beside the locked bootloader this is the only for me).

Other question: I case the patch failed, how can I recover previous status? Complete backup and recover?
 

Sir Flashalot

Senior Member
Feb 5, 2011
541
257
0
Camelot
Most time I use Defy without data connection. GPSStatus often shows a lot of sats, but can't get a fix. BTW: Does someone can explain the different colors of GPS-Altar? I see white, blue, yellow ... I assume this some kind of "progress bar" to achive the final fix.
Grey = no data, Blue = have almanach* data, Yellow = have ephemeris* data, Green = used in fix.

*)The navigation message is made up of three major components. The first part contains the GPS date and time, plus the satellite's status and an indication of its health. The second part contains orbital information called ephemeris data and allows the receiver to calculate the position of the satellite. The third part, called the almanac, contains information and status concerning all the satellites; their locations and PRN numbers. http://en.wikipedia.org/wiki/GPS_signals
 
  • Like
Reactions: starbright_

hailmary

Senior Member
Jan 10, 2009
813
133
0
44
manila
www.facebook.com
OP is correct...i use this & it helped a lot on performance of my defy using google specific:

it got my default google maps & lattitude faster locks on my location & is more accurate...
-my location shows more accurate to 3-6 meters in less than 10sec
-my battery consume now is reduced whenever i open my maps/gps things
-its better than no fix at all.
 

starbright_

Senior Member
Apr 11, 2010
1,124
183
83
I manually copied the 2 files from patches/Google into /etc. Note that there has been no SuplRootCert on Defy to be replaced (CM7.1-11)
I did a reboot and start GPSStatus with WIFI on.
As described in note #6 nothing happend after download of GPS data for around 25s. Then in 5s I get yellow bars and very soon green bars - a fix.
So from my experience, with default gps.conf fix was quicker than the fix here and behaves different. But the more important question is - how long takes a fix in 6-7h, if I disconnect WIFI now.

I am a bit confused about note 2,4,5.
As AGPS is generally working, there seems to be no problem with #2, but how to check #5?

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

After 6-7h of waiting and starting GPSStatus again I get the same result as before the patch: Some 4-6 sats (blue), but not a single yellow one, no fix.
First the stats have been displayed with numbers in the compass, but after a while this numbers disappear. Does it kick out the information if it can't get a fix in a certain period of time?
The number sats droped down to 1-2 later. After some more minutes I reset I the AGPS data. After 10min I still had just 2-3 sats (indoor). Enabled WIFI, GPSstatus load AGPS data and after 11s there was a fix. Few seconds later 8/10 sats (same indoor position)!

My conclusion:
- sensitivity of GPS in Defy is good.
- cold start behaviour is simular to other devices
- works great, if data connection is available for new AGPS data
- AGPS data useless after some (short) time. - help!
Would you confirm this?

BTW: Does one of you knows, where there is located the GPS-antenna?
 
Last edited:

hailmary

Senior Member
Jan 10, 2009
813
133
0
44
manila
www.facebook.com
Can someone explains what this patch actually does and how it's an improvement to 1) stock ROMs and 2) CyanogenMod users?

The original post sounds like snake oil to me.

Thanks in advance.
LOL... who still uses stock ROMs? CyanogenMod users- w/c version? nightly,stable,kang,super kanged? LOL try wearing shades man...
(so u can go out & enjoy the sunshine,w/ the gps on)
 

popcorn1122

Senior Member
Nov 21, 2011
569
208
0
Mumbai
The questions is to automate that downloading of lto.dat from http://gllto.glpals.com/7day/latest/lto.dat
Someone has tried the automation process in below link:
https://github.com/CyanogenMod/android_device_samsung_vibrantmtd/pull/3

Can someone help how to install it? If someone can give step by step installation process ,,, it would highly be appriaciated. :)

Code:
#!/system/xbin/bash

exec &> /dev/null

COUNT=30
while [ -z "getprop net.dns1" -a $COUNT -gt 0 ]; do
sleep 10
let COUNT=$COUNT-1
done

find /data/location -name lto.dat -mtime +5 -exec rm -f {} \;
if [ ! -s /data/location/lto.dat ]; then
wget -O /data/location/lto.dat http://gllto.glpals.com/7day/latest/lto.dat
chmod 664 /data/location/lto.dat
fi
some more source:
https://github.com/CyanogenMod/android_device_samsung_vibrantmtd/blob/gingerbread/init.aries.rc
 
Last edited: