PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2 > Android On TP2 Development

Notices


Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-12-2012, 12:21 PM
detule's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC TP2
Carrier: Sprint
 
Join Date: Dec 2009
Posts: 85
Reputation: 140
detule is keeping up the good workdetule is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
[TESTING] Rhod AGPS (XTRA) support

Update ( 03/08 ) Seems gsm rhod users are using the lib without any problems (per reports on xda) - changing the name and updating this post to reflect this - no longer specializing in CDMA.
************************************************** ************************************************** ***

As the name suggests, this is a thread to test and develop aGPS support for RHOD.


This is a testing thread, so please, only for users that have a working proficiency with adb. Do NOT post in this thread reporting a bug, unless you provide complete GetLogs output capturing the issue. In addition, please provide logcat output of the boot sequence (as this is when xtra_set_data is called by default, and when the data injections happens.) All other posts will be ignored.

Q: What is XTRA?
A: A collection of instructions that allow userland (Android) to communicate with the GPS engine in our devices. In particular, they allow for Android to inject data packets that contain satellite information, which in turn drastically reduces the time to get GPS lock. In short, without it, a GPS lock takes a long, long time from a "cold start". If it's working, with a "cold start" you should be able to get a GPS lock in less than 30 seconds (provided you are outside with clear skies).

If you like to contribute to this thread, please do so only if you are using GBX0B since this is the build that I have and the only one that I can debug.

Installation and download instructions follow.

Please read the entire post carefully.

First thing is first: These libs are stock xdandroid libs with tytung's aGPS patches from Leo ported over. He is to be credited, along with all other xdandroid developers who have put in work in the xdandroid stock libs. If you would like to redistribute or modify this lib, please read the disclaimer in tytung's post. In compliance with his request, the full source code for this lib can be found here.

0. You need a working data (3G) connection (this could possibly work over WiFi, I just haven't had time to check).

1. Download gps.xdandroid.so from the downloads section. This lib needs to go in /system/lib/hw . In gbx0b, this means, either
a) Mount bind the lib in gingerbread.user.conf by adding the command
Code:
mount --bind <path_to_lib_on_sdcard>/gps.xdandroid.so /system/lib/hw/gps.xdandroid.so
or
b) Back up and replace the existing lib in system/lib/hw . Note first, you need to remount /system as rw.

(In either case, verify that you have the correct lib in place (by running md5sum) BEFORE reporting an issue.)

2. Make sure GPS is on in Settings. Turn off the device. Pull the battery and wait at least 10 minutes (to ensure all information is cleared from the gps engine).

3. Boot back in xdandroid - xtra.bin is inserted automatically shortly after bootanimation is over. If you have booted with GPS on and this lib, and you run logcat, you should hopefully see something like this in your logcat:

Code:
02-12 00:23:34.985 D/gps_rpc ( 1312): pdsm_xtra_set_data(0, 1f40, 0, 0x40b2b568, 400, 57, 100, 1)=1
02-12 00:23:34.985 D/gps_msm7k( 1312): gps_xtra_inject_xtra_data: inject part = 58/100, len = 400
4. Test: Either use google maps, or a gps testing app from the market. I like Gps Status.

Additional Information:

Currently, xtra.bin is downloaded every time you reboot into Android provided that GPS was checked as ON when you were booting the device. If you would like to inject it manually, you can use tytung's excellent aGPS Injector App (again, need to make sure GPS is checked ON in Settings when trying to inject xtra.bin manually).

Known issues:

1) I *think* currently accuracy is being computed incorrectly. Need to look into it a bit further, but yeah don't put too much stock in the accuracy information.

Download:
02-12 gps.xdandroid.so

Last edited by detule; 03-08-2012 at 11:23 PM.
This post has been thanked 3 times.
  #2 (permalink)  
Old 02-12-2012, 12:52 PM
arrrghhh's Avatar
Testing Extraordinaire
Offline
Pocket PC: HTC Touch Pro 2 (RHOD400)
Carrier: Sprint
 
Join Date: Mar 2007
Posts: 3,604
Reputation: 7360
arrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the community
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Thanks man, will try this now.

Sweet! This works on OMGB as well. Just be sure to rename gps.rhodium.so to gps.rhodium.bak or whatever, then take gps.xdandroid.so and rename it to gps.rhodium.so. I also chmodded it to 644, to match the other files.

Last edited by arrrghhh; 02-12-2012 at 01:57 PM.
This post has been thanked 2 times.
  #3 (permalink)  
Old 02-12-2012, 12:54 PM
detule's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC TP2
Carrier: Sprint
Threadstarter
 
Join Date: Dec 2009
Posts: 85
Reputation: 140
detule is keeping up the good workdetule is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Reserving in case thread becomes insanely popular.
  #4 (permalink)  
Old 02-12-2012, 04:46 PM
mbellot's Avatar
PPCGeeks Regular
Offline
Pocket PC: TP2
Carrier: Boost
 
Join Date: Jul 2010
Posts: 156
Reputation: 135
mbellot is keeping up the good workmbellot is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Quote:
Originally Posted by detule View Post
3. Boot back in xdandroid - xtra.bin is inserted automatically shortly after bootanimation is over. Ensure you have GPS enabled in Settings->Location. If you have booted with GPS on and this lib, and you run logcat, you should hopefully see something like this in your logcat:

Code:
02-12 00:23:34.985 D/gps_rpc ( 1312): pdsm_xtra_set_data(0, 1f40, 0, 0x40b2b568, 400, 57, 100, 1)=1
02-12 00:23:34.985 D/gps_msm7k( 1312): gps_xtra_inject_xtra_data: inject part = 58/100, len = 400
4. Test: Either use google maps, or a gps testing app from the market. I like Gps Status.

Additional Information:

Currently, xtra.bin is downloaded every time you reboot into Android. If you would like to injetct it manually, you can use tytung's excellent aGPS Injector App.
Two quick questions.

1. Will XTRA data get injected automatically if you boot with GPS off and then turn it on? Your explanation above seems to say "no", but I wanted to be certain.

2. I rebooted with GPS on and the new lib, I am seeing the two lines you posted, but it is followed by what appears to be a failure message.

Code:
02-12 13:11:44.300 D/gps_rpc (  121): pdsm_xtra_set_data(0, 1f40, 0, 0x407d84b0, 400, 94, 100, 1)=1

02-12 13:11:44.300 D/gps_msm7k(  121): gps_xtra_inject_xtra_data: inject part = 95/100, len = 400

02-12 13:11:44.300 D/gps_rpc (  121): xdr_xtra_data_args() is called: 0x407d8640, 400, 95, 100

02-12 13:11:44.300 E/gps_rpc (  121): dispatch_pdsm() received unknown procid: 5

02-12 13:11:44.310 D/gps_rpc (  121): pdsm_xtra_set_data() is called: clnt_stat=0
Is that expected (the unknown procid message), or is it failing on something?

I'm running OMGB on a RHOD400 with Boost service, I'll try getting a position lock next, but wanted to post about the possible log issue.
Attached Files
File Type: zip 02122012_logcat.zip (10.4 KB, 10 views) Click for barcode!

Last edited by mbellot; 02-12-2012 at 04:51 PM. Reason: Fixing up quoted log info
  #5 (permalink)  
Old 02-12-2012, 08:52 PM
detule's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC TP2
Carrier: Sprint
Threadstarter
 
Join Date: Dec 2009
Posts: 85
Reputation: 140
detule is keeping up the good workdetule is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Quote:
Originally Posted by mbellot View Post
Two quick questions.

1. Will XTRA data get injected automatically if you boot with GPS off and then turn it on? Your explanation above seems to say "no", but I wanted to be certain.
Downloading xtra.bin is currently not part of the gps init sequence (which is a mistake), rather, it is controlled as part of a frameworks call that is related to updating the network state. So to answer your question : "it depends" on the build you are using, and how it handles the HAL init/de-init sequence. The good news is, there is infrastructure for the gps library itself to ask Android to initiate download of the xtra binary and to pass it along for an injection. Later down the road we can implement this in the gps init sequence.

Quote:
Originally Posted by mbellot View Post
2. I rebooted with GPS on and the new lib, I am seeing the two lines you posted, but it is followed by what appears to be a failure message.
The short story is, after each rpc call to the gps chip, it comes back to us with a message (dispatch). Currently, we (I) have no idea what it is, and I haven't had time to dump it. I am hoping it's a message saying "a-ok", and the fact that the injection is working on my device supports this conclusion. However, when Mokkun was trying to get this lib going on a gsm device, I saw an un-interrupted stream of these dispatches trailing the final data injection. This is likely an indication of failure, and whoever picks this up on the gsm side will have to dump those messages to figure out what's wrong.

I just took a look at your log and I see the same sequence of trailing dispatches after the injection is over, so I assume the gps lock never worked for you. Could you try manually asking for the injection by using tytung's aGPS Injector?

Last edited by detule; 02-17-2012 at 11:23 AM.
  #6 (permalink)  
Old 02-13-2012, 12:37 AM
mbellot's Avatar
PPCGeeks Regular
Offline
Pocket PC: TP2
Carrier: Boost
 
Join Date: Jul 2010
Posts: 156
Reputation: 135
mbellot is keeping up the good workmbellot is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Quote:
Originally Posted by detule View Post
Downloading xtra.bin is currently not part of the gps init sequence (which is a mistake), rather, it is controlled as part of a frameworks call that is related to updating the network state. So to answer your question : "it depends" on the build you are using, and how it handles the HAL init/de-init sequence. The good news is, there is infrastructure for the gps library itself to ask Android to initiate download of the xtra binary and to pass it along for an injection. Later down the road we can implement this in the gps init sequence.
Fair enough, we are in a testing thread.

Quote:
Originally Posted by detule View Post
I just took a look at your log and I see the same sequence of trailing dispatches after the injection is over, so I assume the gps lock never worked for you. Could you try manually asking for the injection by using tytung's aGPS Injector?
I was actually inside for that whole sequence.

I tried another test this evening (no logs, sorry). Pulled the battery around 4:30pm. Took the phone out with me tonight around 5pm while doing some grilling in the snow, popped the battery in and booted the phone (left GPS on before I did the battery pull). The phone booted, I loaded Maps and had a lock in something like 15-20 seconds. Maps claimed +/- 10 meters accuracy.

If a cold start set of logs while outside would be useful let me know and I'll do it up.

I'm going to beat on it a little tomorrow, using it for navigation to and from work.
  #7 (permalink)  
Old 02-13-2012, 05:46 PM
wizardknight's Avatar
PPCGeeks Regular
Offline
Pocket PC: Touch pro 2
Carrier: sprint
 
Join Date: Aug 2009
Posts: 181
Reputation: 95
wizardknight is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Thank you so much for trying to get this working. It is one of the features I have missed sooooo much.Do you have to use gps.xdandroid.so , or can you just use the manual app Leo AGPS Injector?

Last edited by wizardknight; 02-13-2012 at 06:16 PM.
  #8 (permalink)  
Old 02-13-2012, 06:50 PM
detule's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC TP2
Carrier: Sprint
Threadstarter
 
Join Date: Dec 2009
Posts: 85
Reputation: 140
detule is keeping up the good workdetule is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Quote:
Originally Posted by wizardknight View Post
Do you have to use gps.xdandroid.so , or can you just use the manual app Leo AGPS Injector?
Read the first post carefully. You need gps.xdandroid.so The app is just so you can control when xtra.bin is injected.
  #9 (permalink)  
Old 02-14-2012, 10:42 AM
mbellot's Avatar
PPCGeeks Regular
Offline
Pocket PC: TP2
Carrier: Boost
 
Join Date: Jul 2010
Posts: 156
Reputation: 135
mbellot is keeping up the good workmbellot is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Missed yesterday, but ran navigation this morning and everything was flawless (minus the accuracy issues).

I had booted with GPS off, gave the system about a minute to try and lock with no luck so I rebooted with GPS on. It had lock within 10 seconds of rebooting and getting Maps loaded. I've downloaded the injector app so I don't have to do that any more.

Only problem (possibly unrelated) is shortly after stopping navigation the phone had a full blown SOD. /proc/last_kmsg will be in the OMGB thread since that's my base distro, but I looked and didn't see anything obvious.
  #10 (permalink)  
Old 02-14-2012, 04:57 PM
detule's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC TP2
Carrier: Sprint
Threadstarter
 
Join Date: Dec 2009
Posts: 85
Reputation: 140
detule is keeping up the good workdetule is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] CDMA rhod AGPS (XTRA) support

Quote:
Originally Posted by mbellot View Post
Missed yesterday, but ran navigation this morning and everything was flawless (minus the accuracy issues).
Glad it's working for you. I suspect the SOD has nothing to do with the gps lib - ACL seems to be on top of it.
Closed Thread

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2 > Android On TP2 Development

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 10:34 AM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com