yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] AngelDeath:
First sorry I did see that but when I talked to Ali he looked at the logs and then pointed me to that. Not trying to take away anything from your find. Second try reading the chat maybe you'll see that he said it can help the conf file. Third even bother to look at the logs to see that android at boot up READS the conf file? Probably not. Fourth you should re- read my main post I clearly said I am nowhere near as good as the devs and they would know best. Did we get their attention yes will they do anything don't know but maybe they will, maybe Ali confirming what we or sorry YOU posted will give someone incentive, just like cedesmith with clk. Fifth your entitled to your opinion of what works and what doesn't just like everyone else doesn't work fine doesn't work.

Lets all give up and move on. Don't see the reason your flipping out.

Sorry if someone **** in your cheerios today but no need to take it out on me or anyone else.

Have a nice day.
[HD2 Android NAND Development] lukesan:
The whole gps.conf file is useless at this point. I have been doing tests over the last months and always had variable results.

Sometimes lock times are even better without it sometimes which proves it has no use ...... at this point!

There is no use to start yelling or to tell people to stop what they are believing in.

Stopping in believing what you are doing is a halt of technology and personal, and since this is a sharing site, others people development.

Sure you can be sceptical, nothing wrong with that!

I'm mister sceptical himself but if we all stick our heads together and share it will lead to better thoughts and results.

We just can't lead emotions control our thoughts.

So now enjoy this Sunday, and since my HD2 is broken and HTC is failing to pickup my device twice, I think I'll spend it with my family.
[HD2 Android NAND Development] Mafioso:
Guys, I contacted Mach2003, the author of GPSModDriver in WinMO, if he has some clues how quickGPS works:

I further asked him, where does the function in gpsapi.dll write to? Is the true that QuickGPS writes data directly onto the chip and not its not just packedEphemeris.ee which is downloaded in Windows folder because Android lock times were better if we do quickgps download (when using Haret)

So he replied me,

So we finally know now, there is more to QuickGPS then just downloading the data to windows folder...Its does write something to the chipset...if someone has disassembly skills, gpsapi.dll and more importantly GPS_HTC.dll are the file to be looked at..probably it contains the RPC's which we're looking for...since they do most of the work..

Unfortunately, I don't have any coding/debugging skills myself but I hope somebody can make use of this good information given by Mach2003..

He seems like a helpful guy, can be contacted if someone needs more information..
[HD2 Android NAND Development] arne182:
I stated with the Hyperdroid build. The source is freely available but after compiling I see that it only copies Gauner's libgps and doesn't compile it. I need to get the source directly from Gauner. Will see if I can contact him.
[HD2 Android NAND Development] Mafioso:
You're right, but I thought just to post it anyway since gauner1986 mentioned it, some dev may find it useful...just doing my bit :)

Anyway, I found out QuickGPS does help, but still GPS is not as effective in Android as it is in WinMo even after the download...that's why i'm back on NAND after one week of tolerating slow SD builds :D

And yes, there are couple pieces still to be figured out, probably what you guys are doing are right now...

Also I don't care what other people say, but yes, you're gps.conf does help...

There were places earlier when I just couldn't get a lock ever (like the subway train which runs on the ground btw :P)...but after you're modified config files, I'm getting a lock, although slow takes 2-3 mins but still its better than nothing...

Maybe its placebo, co-incidental but its hard to believe all the people are getting the same placebo in you're other Q&A thread...

Keep up the hard work :D
[HD2 Android NAND Development] arne182:
From what I can see there is some mention in the libgps.so that we are using of pdsm_client_xtra_reg when viewing it in notepad. Without the source I can't exactly know what it is doing but it does look like it is doing something with AGPS. Still busy with tests.

Can you check the information that I posted earlier.

Using gpstime from the android market set your android clock to the correct time:

https://market.android.com/details?id=net.sourcewalker.gpstime&feature=search_result

Use Clocksync from the android market and check if the NTP server time is the same as the GPS time.

https://market.android.com/details?id=ru.org.amip.ClockSync&feature=search_result

I get 14s differnce, Which is definitely a problem with the libgps.so

The tests are tough to do because the GPS Chip stores its location data and maybe, just maybe the AGPS data.

From http://irclog.netripper.com/htc-linux/2011/3/22/

18:57	arrrghhh	if you get a lock in winmo before booting android, or use quickgps before booting android, lock times are significantly shorter.

It looks like the GPS unit saves the data on the chip. Can anyone who still uses winmo confirm this.

Will be traveling on the 14th and will use that chance to test the difference between my two phones, one using the AGPS and one without after I have traveled halfway around the world.
[HD2 Android NAND Development] memin1857:
First of all, clocksync app is NOT very accurate. It has accuracy of +/- 1 second. (repetitively update clock and you will see it goes 500-1000 miliseconds back or forth) I tried pool.ntp.org europe.pool.ntp.org asia.pool.ntp.org tr.pool.ntp.org with two phones (one htc one samsung) and atomic clock in the app is not really accurate to miliseconds. My gps time is within 1 second of atomic time in both phones btw. I don't have that 14 second difference (which is probably leap seconds after 1 january 1970 but I don't have it)

Second, I already wrote this in my posts, hd2 GPS TIME is ALWAYS exactly 1 SECOND BEHIND my samsung native android phones' gps time. Accuracy reporting in hd2 is also wrong (it reports more accurate than reality) someone posted earlier that the code just divides some accuracy value by 10 to find reported value. Comparing it to my samsung, hd2 shows about 4 times more accuracy than the other phone. Since we have this code in hand we can change the calculation, we can correct it easily. We can also correct gps time to be 1 second ahead. (It should be a simple mathematical calculation in the code)

BTW gps chips does store information. Even without AGPS it learns the information from the satellites and stores it. AGPS is just a way of downloading prelearned information and storing it directly in gps chip without waiting for learning it from the sats which takes time because baud rate is very low with gps. (It takes 30 seconds to fully download ephemeris data even if you don't miss any frame) There are gps receivers on top of buildings which listen to gps sats all time time and share that info over the internet so user's gps equipment doesn't have to wait and listen for about a minute to learn the same information. Without this assistance, any gps receiver will still learn and store the information by itself. I flashed winmo for testing and yes I still confirm that is the way it is.

I am using typhoon 2.9.1 gingerbread btw. It might be different with froyo stock desire dft rom or another.
[HD2 Android NAND Development] dlsniper:
Hope these links will put a end to the speculations about how GPS works:

- http://www.kowoma.de/en/gps/data_composition.htm

- http://arstechnica.com/gadgets/news/2009/01/assisted-gps.ars/ (I think it's the best link out there that explains how GPS, APGS and so on are supposed to work)

Also from my findings I see that gauner never actually released the sources of the GPS fix, neither Diem. I've pm'ed gauner on IRC and Diem on XDA maybe one of them will reply with the source code.

Hope I'm made administrator of the forums after this post since clearly it's recognition I want, not to open the eyes of those who can't understand how things work.
[HD2 Android NAND Development] noellenchris:
Cotulla is the dev who fixed the gps and I don't think he hosted the source at the time. He did have the file shared on his cotulla/rr server...which I think is dead. He seems to be busy atm though. Markinus is a great dev , I missed him the other day. I don't know if he knows much about gps and agps, but he's pretty much made all the updates for the kernel on the git since last may/june timeframe. So I'm guessing he's got some mad android skills...:P
[HD2 Android NAND Development] AngelDeath:
Based on my chat yesterday with ali, according to him the xtra.bin isnt suppose to be in the data folder, but injected into the gps chip itself If you look at the April 3rd logs. I am going to presume that WinMo did the same thing, not that I investigated it in winmo before.

One of the problems I also believe that makes things a little more difficult is, based on the android port, the files seems to change, take for exmaple dungphp's it has the locapi and locapi_rpc just like the inspire as well as the libgps.so, where as others just have the libgps.so. But in dungphp's rom I dont see a call to the libgps.so file at all, I see the same calls as the inspire.

According to jonpry (Going based on his answer, the almanc takes longer then 30 seconds, because of the low bandwidth, now I dont know if Ali is right, but he thinks that the xtra.bin is the almanac being installed on the chip.

Guess you day wasnt so nice, I guess now they pissed in your cornflakes huh? Please Please Wish a damn mod would see this, cause I am getting very tired of your BS, and I'm holding my tongue, but if a Mod doesnt step in, I'm gonna go off. and thank god your not an administrator of the forums, if you havent watched dictatorship and one-sided BS is on the decline.

What are you bent out of shape because Ali1234 said to listen to memin1857 cause he knows what he talking about, and I thought htcvidi should have recognition too and I didnt add your name to the list? Or are you bent cause I actually had a conversation with the dev's and you got shafted? Which is it? Unlike you I'm not here for recognition, I dont need anyone to bow to me, I'm here to share what I know, or as little as I know as I go along learning, and to help a COMMUNITY, not shoot down everything if its not the same thought process as you, so in the future if you have nothing to add but pot shots, just click back and move on to another thread.
[HD2 Android NAND Development] noellenchris:
Ok, enough of the off topic banter. Stick on topic. If any furthur post's contain bashing, venting etc. I will delete the post for trolling and infract. Grow up and stop acting like kids. Thanks, now let's get back to the topic and fix my AGPS :P
[HD2 Android NAND Development] AngelDeath:
Memin1857,

You attached a libgps.so file if I remember correctly, could you do me a favor please, from that same rom you pulled that from can you zip a few files and attached them here? I am look for:

librpc.so

libutils.so

liblog.so

libcutils.so

libc.so

libstdc++.so

libm.so

If you have all of them great, if not, then the ones you do have. Thanks.
[HD2 Android NAND Development] memin1857:
Normally when a thread had gone this far, test kernels/libs would be flying all over. But I guess agps is more complex than many things.

Let's start small. Let's just just get gps time and accuracy reporting adjusted.

From what I see, hd2 gps time is exactly one second behind of my other native android phones gps time. From what I remember gps time calculation was a simple math calculation like seconds passed since 1 january 1970 or something like that.

357	fix.timestamp = ntohl(data[8]);

358	if (!fix.timestamp) return;

359

360	// convert gps time to epoch time ms

361	fix.timestamp += 315964800; // 1/1/1970 to 1/6/1980

362	fix.timestamp *= 1000;

Whatever value that makes gps time 1 second ahead would be correct I guess. This is leap seconds right? (line 362 multiplies by 1000, I guess its for conversion to miliseconds),

This is the info from: http://www.freelists.org/post/opendtv/The-Challenge,1

"system_time - A 32-bit unsigned integer quantity representing the current system time as the number of GPS seconds since 00:00:00 UTC, January 6th, 1980."

All one has to do in order to determine the value for <system_time> at any given UTC time and date, is to determine how many GPS seconds have elapsed between 6 January 1980 00:00:00 UTC and the current time.

When given the date 3 January 2003 00:03:02 GPS as the "current" time, one has to determine the number of GPS seconds that have elapsed between 6 January 1980 00:00:00 UTC and that date.

This explains the line 361's "// 1/1/1970 to 1/6/1980 "

Also google search for 315964800 reveals many useful info for gps time.

It was written in this thread that fix.accuracy code was in place which just divided the value by 10 to reach final reported value. I believe this was done as a rough fix to make gps work. Maybe dividin by 3 is a better value (when I compare it to other brand phones reported gps accuracy) Also the other phone never reports better accuracy than 4.0 meters.

(This is from post 133 of arne's)

366	if (ntohl(data[75])) {

367	fix.flags |= GPS_LOCATION_HAS_ACCURACY;

368	fix.accuracy = (float)ntohl(data[75]) / 10.0f;

369	}

370

Can we try value 3.0 for this?

Code are from https://gitorious.org/htc-hd2-android-libraries/libgps/blobs/master/leo-gps-rpc.c

I guess we haven't got the source code from gauner or Diem for gingerbread, but we have it for froyo right? We can begin in froyo code, making tests with dft stock desire rom. In the time we can ask gauner and diem for code.
[HD2 Android NAND Development] AngelDeath:
Also, I just noticed this error in the logcat anyone know if such a directory exists:

/dev/onrpc/3000008c:000400002

/dev/onrpc/3000008c:000400000

failed to initialize client (permissions?)!

Any idea on this?
[HD2 Android NAND Development] tytung:
http://comments.gmane.org/gmane.comp.handhelds.android.kernel/2574

The files in /dev/oncrpc/ are used to communicate with the Qualcomm

baseband processor on Qualcomm chipsets. If you are not using a

Qualcomm chipset then none of those files should be there at all. If

you are on a Qualcomm chipset but /dev/oncrpc/3000008c:00010000 is

missing, then your chipset does not support the same version of the

GPS API.
[HD2 Android NAND Development] AngelDeath:
Thanks Tytung being that I know very little in programming, on our HD2's being its a qualcomm processor, and from what I read its a built in gps chip, does this apply to us? Is it of any use to us? Reading the link you provided.

Also, can ANYONE PLEASE look at this logcat I just did, Again I dont know programming, but I "THINK" I may have found our AGPS Interface. I read this over and over again, and thats what it looks like to me, but Someone confirm or deny what I see.
[HD2 Android NAND Development] memin1857:
I tested a Desire HD. It doesn't have the enable AGPS in its location menu but agps works. It has gps.conf with wrong time server but still locks quite fast. It reports proper accuracy (like 48-52meters) next to an hd2 reporting 2 meters!

It has agps_rm file in its system but it wasn't rooted so I couldn't check all the files. It does have around 15 sec difference between gps time and utc time (but my hd2 or samsung doesn't have that difference)

Desire HD also reports sats before lock.

FYI
[HD2 Android NAND Development] AngelDeath:
Yes but the logcat I just posted, I am trying to see if 1) agps interface is being called, and 2) if its a step in the right direction, it doesnt lock on to a sat, but I dont know if it could before I made changes, I have to check that today.
[HD2 Android NAND Development] memin1857:
Here you go. The files are from official froyo desire rom (for the HTC Desire, not HD2) All of your list is available.
[HD2 Android NAND Development] AngelDeath:
Thanks, trying a theory as I look thru the libs.

BTW did you get a chance to look at the last log I posted, trying to see if its in the right direction.
[HD2 Android NAND Development] memin1857:
Because of work I didn't have the chance yet. But I did find a software for the pc called EditPad Lite which opens unix formatted text files properly so at least I can examine it properly now.

Was this log from your Inspire, or HD2?

Note: Even if HD2 uses the same gps chip as other native HTC phones, because of different radio firmware, rpc calls "might" be different. That would be the reason for the need to examine quickgps in winmo. Not sure yet, though.

Can we talk about how on 1 August 2010, gps was made working with hd2 Android? Exactly what was modified in STOCK desire rom?

We can do this by comparing the DFT Stock Desire rom for HD2 and real htc desire rom for htc desire. I will do so.
[HD2 Android NAND Development] AngelDeath:
The log was from my HD2, the inspire log is in the zip a few posts up, I didnt see a need to make another log of something native that works, in the zip it was made just for reference.

But this log was with changing a few things around. Also should be noted this log was done a gingerbread sense rom 2.3.2. Imilka's 0.3 version. froyo is frustrating me big time, so I decided to try another build. One of my theories also is the naming of the files. I think it might play a part in how it looks for things.

Yes and I'm sure the radio has something to do with it possibly. I am going to presume even withut a sim card the radio still would play a part in the gps. Because the Inspire I have has no sim in it.

And I assume when your referring to the August 1 2010 GPS working, you mean at the current state it is now, or are you referring to what we are trying to do now?
[HD2 Android NAND Development] memin1857:
August 1 2010 is the date gps first started working with hd2 android. At that time, roms from nexus one OR htc desire were booted on hd2 and whatever wasn't working were being fixed one by one. GPS started working on that day, because somebody (Cotulla or maybe Dan1j3l) did modify something in those stock roms.

From my initial comparisons with beyondcompare software I see the only change is libgps.so (which is 5 times smaller than the one in official desire rom)

The other so files you asked are the same.

We should compare the sources of libgps.so from official desire rom and desire rom for hd2.

I guess Dan1j3l didn't write our libgps.so from scratch he used most of the code from some other libgps source and modified small parts of it to make it work in hd2. (maybe we can ask him?)

Since we have the source for both files we should do a file compare and see what is different in the matching code. (my guess is our 20Kb libgps.so shares a lot of code with the 100Kb libgps.so of Desire) This is the way to go. Maybe we can add the remaining code in desire libgps.so to ours, and with some small adjustments it may work.

Note: The above info is for froyo because we have the source code for both froyo libgps.so files. Somebody care to do comparison?
[HD2 Android NAND Development] arne182:
15 seconds come from leap seconds, here is a website to check it.

http://www.csgnetwork.com/timegpsdispcalc.html
[HD2 Android NAND Development] memin1857:
I know, my question is why is the leap seconds are calculated differently in Desire HD, your HD2 compared to my HD2 and my samsung. and they still work.
[HD2 Android NAND Development] arne182:
What we need is a third party. I would like someone else other than us. Probably not in the same time zone to check the time synchronization.

Here is the programs and instructions

http://xdaforums.com/showpost.php?p=12622870&postcount=212

The only other explanation is that the GPS position plays a part.
[HD2 Android NAND Development] ratelutz:
i'm in germany and run the test. i startet gps-time and synced my device with the gps-time.

I configured clock-sync with the first ntp server found in my gps.conf file and getting +13,305
[HD2 Android NAND Development] dusty_nz:
Have made all the changes and tested.

First con is slow.

Second is fast.

Wait until the next day and test. Same slow.

No improvement over std.
[HD2 Android NAND Development] clyder:
I checked this while driving to work today and I got +14.267s...
[HD2 Android NAND Development] D4rk50ul:
When comparing phones they are all gsm right? I've noticed cdma devices are much faster. Just something to keep in mind cause a mytouch 4g was on par with my hd2
[HD2 Android NAND Development] memin1857:
We should do this comparison. Anybody? (with time?)
[HD2 Android NAND Development] arne182:
Accuracy should be 10 times more than it is now. Source code for other libgps files don't divide by 10.

Something else that someone should check. Can you keep your GPS on for more than 12 hours without a SOD?
[HD2 Android NAND Development] lolmensch:
i had mine in use for about 14 hours on on an earlier cm7 (typhoon) build. my phone was okay back then (havent had it modified. it was stock)

(forgot to turn off gps status before i went to sleep :D)
[HD2 Android NAND Development] AngelDeath:
I was doing a search based on this error I got during start up of android in the logcat: no agps interface in agps_data_conn_open

Which I assume means the interface we are looking for isnt there and android seems to check this at boot up, well doing a search led me to th script attached, I dont know if this was already brought up in the thread or not, but I thought I would post it in our aid to our goal.

You can open it with wordpad.

Source:http://gitorious.org/rowboat/framew...droid_server_location_GpsLocationProvider.cpp

Hope this isnt a dupe, and let me know if this is or isnt in our current builds/libs/drivers or whatever.

*EDIT* Just noticed htcvidi was looking into the same file, but from a different source, maybe this source says what we need?
[HD2 Android NAND Development] arne182:
Sometime from v2.8 something it stopped working, or rather since we are using the new libgps.so

Can you try doing it again. Maybe leave the Google maps application running while it charges at night. Easiest is having it plugged into a computer to keep from sleaping.
[HD2 Android NAND Development] AngelDeath:
I just did a logcat on the inspire from boot to fully loaded, and I wanted to post it here incase something stands out. For me what stands out is the Inspire has the same startup error that the HD2 had about a dir not found that tytung responded to:

Originally Posted by AngelDeath

Also, I just noticed this error in the logcat anyone know if such a directory exists:

/dev/onrpc/3000008c:000400002

/dev/onrpc/3000008c:000400000

failed to initialize client (permissions?)!

Any idea on this?

http://comments.gmane.org/gmane.comp...id.kernel/2574

The files in /dev/oncrpc/ are used to communicate with the Qualcomm

baseband processor on Qualcomm chipsets. If you are not using a

Qualcomm chipset then none of those files should be there at all. If

you are on a Qualcomm chipset but /dev/oncrpc/3000008c:00010000 is

missing, then your chipset does not support the same version of the

GPS API.

Exact same error, if you look in the log, you'll notice just about every error is ALMOST the same, except near the bottom, on its own it calls a program I guess you can call it called: GPSXtraDownloader, and then the locapi kicks in to inject the data.

The Inspire I have is running 2.2.1. Hope this helps.
[HD2 Android NAND Development] memin1857:
I figured out why hd2 didn't know gps signal was lost when going through tunnels. It is because since the sats are not reported without a lock, when going inside a tunnel, gps lock is lost and sat reporting is stopped. So it thinks it has lock and reports the same frozen signal levels till it times out (or you get out of the tunnel) It would be a good idea to enable sat reporting before lock.