yashsingh1/xdaforums huggingface dataset:
[G Tablet General] Vlad_z:
Regular GPS receivers can provide compass heading information only when in motion.

So, basically GPS receiver is calculated heading direction using two consecutive readings. It does not need 2 antennas for that. Unless those antennas are quite a distance apart, so they would give slightly different readings from which GPS could derive a direction.

To get direction from stand still position one would need special chip - magnetic sensor.
[G Tablet General] fosser2:
do you know if the z-tab has this mag-compass sensor?
[G Tablet General] rajeevvp:
Yeah, the regular GPSes need to be moving to provide a compass heading, but, I was talking about one of these:

http://www.youtube.com/watch?v=fjC6EIjYcko

These units use 2 antennas to give you heading information even when stationary using only the GPS positioning info. They're much more accurate than a magnetometer and also, I suspect, much more expensive.
[G Tablet General] fosser2:
If we could find a location on board for the magetometer I would attempt and put one in :p. Kinda need another project right? haha that is until android 2.3 or 3.0 is stable enough to run gps. Then I'm back to working on getting GPS to run on those ROMS :D
[G Tablet General] rajeevvp:
Load CM-7.0.3 on your gTab and then we can see if the GPS works on Android 2.3--and if it does not, what we can do to fix it. After that we can wrestle with the bees for the HoneyComb.

EDIT: I had no idea what Engadget was when news of that was posted. Apparently it is a big deal? Belated congratulations on headlining at Engadget.com.
[G Tablet General] fosser2:
Haha thanks for the congrats. I will load up CM 7.0.3 here in a bit. I didn't want to because I just finally got my brilliant corners install finalized and I hate restoring apps :p But what the heck, I'll do it for all of the curious people out there.

EDIT: Ok I got this ROM loaded and can confirm that GPS does not work in maps. Actually the chip doesn't even initiate. My LED light does not even turn meaning the GPS chip is not being properly communicated with .... yet. I will be replacing a few files for the next bit to see if we can get this solved.

EDIT: wow the file structure of CM 7.0.3 is extremely different. It looks like the gps is controlled from /sys/devices/platform/gps_control. In this folder there are driver files and an enable file. The enable file simply states a 1. In the driver file, there is nothing...this is bad for us. There are a few other files in here. The main thing that I recognize is that this file structure is very similar to how honeycomb was set up when I browsed through that. If we get this working, honeycomb is most likely possible also. rajeevvp I'm gonna need your help on this one again.

-Onto the gps control: in the terminal editor, when command " # echo 1 > /sys/devices/platform/gps_control/enable " is run, gps does enable (physically) I watched the LED light I have in my tablet for this. I did also get a satellite lock but software side it was not detected at all. In google maps it just says to check settings to make sure gps is properly enabled (although it is). Thats all I have to report for now. But heck, I'll do everything I can to get this to work.
[G Tablet General] rajeevvp:
This is what I was worried about. We lucked out with the Froyo-based ROMs.

Lemme look at this for a bit. I've got a test setup with a fake GPS device almost ready. In the meantime, let's examine things step by step.

1. Is data appearing at /dev/ttyHS3? Check using hexdump. Enable the GPS manually using echo if you have to.

2. Is data appearing with both the default libgps.so and NI Adam's libgps.so?

Everything in /sys/ and /proc/ are generated by the kernel, on demand, so the files should be the same because the gps control device driver is the same. CM-7.0.3 uses pershoot's kernel and that has the exact same gps control device driver code as VS's TapNTap kernel patch. Anyway, we only care about the enable file. The other files in there are standard Linux device-driver cruft.

This is what I've figured out so far:

1. User starts Maps (or Navigation, or a similar program).

2. Maps calls the Android Java GPS APIs to enable the device.

3. Java API calls the start function in libgps.so.

4. libgps.so writes a 1 into /sys/devices/platform/gps_control/enable to activate the GPS.

5. Kernel device driver reads the 1 from /sys/devices/platform/gps_control/enable and activates the GPS GPIO pins.

6. GPS module is enabled and it starts sending data on the serial port.

7. libgps.so reads the NMEA data from /dev/ttyHS3 (parses it on Froyo? / does not parse on Gingerbread?) and sends it up to the Java API via a callback function (or via RPC?).

8. Java API reads the NMEA data and supplies location info. to Maps. (I can't find the code which parses this NMEA data on GB.)

9. When user backgrounds or stops Maps, the program tells the Java API to shut down the GPS data flow.

10. Java API calls the stop function in libgps.so.

11. libgps.so writes a 0 into /sys/devices/platform/gps_control/enable.

12. Kernel device driver read the 0 and disables the GPS GPIO pins.

13. GPS module is disabled.

I think I've figured out how a libgps.so should be written, but, the problem is that all the info. I have been able to locate for this is for Froyo. I don't know if Gingerbread uses the same APIs and conventions. I haven't been able to locate any definite information for GB.

I'll also write a control program which acts like the Java API (on Froyo, at least) and call the functions in both the standard libgps.so and NI's libgps.so to see if their interface to the Java API is ok. We'll go forward from there.
[G Tablet General] fosser2:
Let me know again what the proper command for hexdump is. I suck at this software stuff. As soon as you post that I'll give you the output. Thanks.
[G Tablet General] rajeevvp:
$ su
# hexdump -C /dev/ttyHS3 | tee /mnt/sdcard/hexdump.txt

fosser2, you had the same GPS not enabling problem with one of your original ROMs, right? Did that get fixed with the NI-libgps.so hack?
[G Tablet General] fosser2:
No actually it did enable fine. the only thing that it did was reverse the coordinates. Thats where the libgps.so hack came in handy. The reason that I had an enable problem earlier was because I actually had it wired wrong...I will post the hexdump in just a min.

EDIT: give me 5 min :p I just bricked the tablet. Gotta re-nvflash.
[G Tablet General] rajeevvp:
Ah! I see.

Take your time with the hexdump. It's actually more for you than it is for me. I just want to verify that the data's still coming through on /dev/ttyHS3 under Gingerbread.

Will check this thread in the morning.
[G Tablet General] fosser2:
Here is the content of the hexdump. See attachment.
[G Tablet General] theroblog.com:
Minor suggestion: Those tiny pads you have jumped can probably be bridged with just a bent needle tip touching both, and just feed the solder into the middle of the tip. It will build up a little bubbly/bump and bridge both. I've done it in lieu of those 0 ohm SMT resistors.

Can't tell from the pic but it'll probably work.

Neater and easier than wire jumpers. If you're jumping pads, and not something diagonal.

For that I'd use 30 gauge Kapton wire.
[G Tablet General] jmdearras:
Gala GPS offline GPS app free on Amazon App store today! :D
[G Tablet General] fosser2:
guessin from the reviews it is not as good as co-pilot, but thanks for the heads up. Always gotta love free stuff!
[G Tablet General] ThatGeekGuy:
The general description of the app seems to indicate it is more oriented towards off-road, d/l'ed it for later. Could make a good geocaching app maybe.
[G Tablet General] harleythatcher:
Got my parts but have a ?

I now have all the parts on hand from the tutorial list. My ? is has the validity of the above part been decided on? Do I put this part in or go with the jumper? Has anyone had good results using this particular item?

Terry in sunny FLorida
[G Tablet General] fosser2:
Nobody else that I know of has tried it yet. If I was you I would try to put the chip in and see if it works. Multiple people said it should work. Again, when I put mine in, my tablet would no longer turn on until I took it back out. But it didn't seem to wreck anything.
[G Tablet General] harleythatcher:
Tks for the reply f2. I think the plan will be to put it in. I will certainly let you folks know how it goes. I want to thank you and the hand full of people that have devoted a lot of time and effort (not to mention grey matter) to this project. I think with GPS my Gtab will rank right up there with the big boys at half the price. So my hat is off to you. Not many people would have the balls to hard mod a $300.00 toy. I am a retired Navy electronic type so the soldering won't be an issue. I will keep all posted on my progress once I get off my butt and actually start.

Terry in Sunny Florida
[G Tablet General] gierso:
Hi again fosser2 other device to be added is the vibrate function ;) i would help but im still raising some gutsto open my new tablet ( and probably wont till gps mod stuff arrives)

Is it easy to open :) or it is glued like ipods and need some prying (besides the fourscrews) ???
[G Tablet General] fosser2:
It is easy to open once you know how. Theres 4 screws then 3 clips per side. Use a credit card to pop the clips. Read the tutorial, I have it written way better in there. As for vibrate, I would have no idea where to hook the "vibrators" up to the board. I'm not even sure that any other tablets have a vibrate function. If you find out where let me know, cus what the heck, I'd attempt that mod. Would be wayy easier than a gps :p
[G Tablet General] fosser2:
haha just wait till you install the antenna. That part puts soldering to shame if you are going to follow the antenna part of the tutorial :p
[G Tablet General] fosser2:
rajeevvp,

Did you experiment with your setup lately? I haven't had a lot of time to mess around with my tablet, but I was just wondering if you found anything else out about Gps on android 2.3
[G Tablet General] rajeevvp:
Same thing here--hopefully will have time this weekend.
[G Tablet General] mike_ekim:
Here's a link for a USB-capable compass, I bet it's expensive (order now and recieve $25 off!) and without drivers it's worthless but it's one possibility. "The compass offers an easy to use ASCII interface..." If it could work at all, maybe it could be added inside the case and hardwired to USB.

http://www.globalspec.com/FeaturedP...SB_or_Serial_Low_Cost_Digital_Compass/38594/0

Here's a 2 year old link where someone was trying to get a development android phone working with a USB compass. The thread was closed because it was a duplicate, and there is a link to the new thread but I can't access it from work.

http://www.mail-archive.com/android-framework@googlegroups.com/msg03514.html
[G Tablet General] fosser2:
The gps can get get the direction if it is moving. Compass applications do not work.

Since I could not get a total breakdown of the z-tab to figure out what kind of magnometer it had in it, I decided to look into the moto xoom. The Xoom uses the following chip from this company. http://www.asahi-kasei.co.jp/akm/en/product/ak8975b/ak8975b.html Since viewsonic "claims" that it does have one built in I was looking through the system board pictures to see if I could find a chip similar to this one. Since I was only using pictures some chip names are blurred out and I could not make them out. I would suggest someone else cracking the tablet open and taking a look for this chip or similar. Just a guess, I am thinking that there are not very many different variations of this chip on the market so if we can find a chip that is similar on board we could have a hit. My guess is the same as rajeevvp's being that viewsonic did have this chip taken out. I think a bit of looking around could find a spot where this chip could reside. I will help on this one, but won't be able to do as much of the legwork.

Here is code for this chip, although I'm not completely certain it is what we need: http://us.generation-nt.com/answer/...k8975-magnetometer-sensor-help-200171411.html

One more line showing android initiate this chip:

I/AKMD2 ( 2260): AK8975/B for Android v 2.0.0.---- (Library: v1.2.0.1217) started.

Finally one more huge post about it http://nv-tegra.nvidia.com/gitweb/?...ff;h=f7a60fe5866e7e55bab5ebd7f46b9651da65e946

I'm not sure what this chip is onboard of the G-Tablet but I think it looks promising.

Uploaded with ImageShack.us​

-This stuff is way over my head. rajeevvp said that in the viewsonic kernals there were no calls for this device at all. If someone put it in, to get it working software side they would a lot of experience in coding I feel.

-This device is also used in the Samsung Galaxy S2 i9100, Xperia Play, and the iPhone 4

-Looks like it costs about $0.70 so you gotta be a big spender to buy it ;)

-I am having trouble finding a distributor to buy from...

-Attached is the official datasheet
[G Tablet General] fosser2:
@rajeevvp

Just thought you should know, I have a development board now for the GPS chip that we could use to get Android 2.3.3 working. Let me know if you need me to do anything.
[G Tablet General] mike_ekim:
Understood, and I appreciate what you guys are doing 100%. Some apps can take advantage of a compass when the tablet is not moving, i.e star map, and that capability would be nice to have but I'm not savvy enough to do more than post a couple of links and hope someone else will put the pieces together.
[G Tablet General] Vlad_z:
Strange... looks like there are no lock in that file.

PS: I saw NMEA parser in Java class in Android 2.1 but later on in 2.2 this parser was moved into native code. I cannot find source code for that libgps.so to confirm.
[G Tablet General] fosser2:
I was not locked when I did the hexdump...dang thats probs the problem... Should I make a new one?

EDIT: here is a new hexdump. I was locked the entire time I ran it.
[G Tablet General] jmdearras:
300 ohm ferrite bead

I asked on Linx's FB page:

Jim De Arras Could you recommend a part# for the 300 ohm ferrite bead that powers an active antenna?

Linx Technologies Querying my engineers...

Jim De Arras Thanks.

Linx Technologies Per my engineer, Jim just needs a 300Ω at 100MHz ferrite bead.

So the originally spec'ed one fits the bill!

Jim
[G Tablet General] TheTruth:
i replaced the keyboard sounds with a 20 to 40Hz waveform... it vibrates the tablet - has been great hapatic feedback for me (the tablet puts out some bass)
[G Tablet General] usofrob:
That's a very clever idea. I may have to try that. :) Thanks. Maybe mix in a higher frequency to have vibrate and sound.
[G Tablet General] fosser2:
rajeevvp,

any luck this weekend on this portion of the project? I feel like this is a more critical project with Android 2.3 released and Android 3.0 being released by the 27th on the Adam Ink. Since the two tablets are close to the same, as soon as the Ink gets updated so will the g-tab. We gotta get this working! ;)
[G Tablet General] rajeevvp:
Couldn't work on it much this weekend--loaded down with other deliverables. I'll have some free time middle of this week. I should be able to send you some GB test programs then.
[G Tablet General] fosser2:
I did just have a thought. Supposedly the Adam Ink is supposed to be getting honeycomb the 27th of June. Since that tablet has gps I would think it is supported. So we wait until then then cop the necessary files to get GPS running on honeycomb and we're good to go :D
[G Tablet General] rajeevvp:
Have a look at this very interesting thread that I just came across.

This is exactly what I (and herbert1) was thinking we'd have to do for our GPS problem. It might not be the official Android way of doing things, but, it'll work.
[G Tablet General] fosser2:
Dang...not gonna lie, I'm pretty sure thats over my head. I'll read it through a few times to see what I can get out of it. Good find though, I'm hoping something can come from it!
[G Tablet General] psychomaniac189:
yeah, so i can't solder. Anybody that knows how to do this want to do it to my gtablet? Ill buy the stuff for ya to do this.
[G Tablet General] fosser2:
rajeevvp,

I have been seeing a lot of the file gps.goldfish.so. Is this file necessary in running the gps on 2.3+ or is it only necessary during an emulated android session on a computer?

EDIT: I am also wondering if anything came from that development system that you had setup.
[G Tablet General] rajeevvp:
The latter, I think. But, that, as it turns out, still proves useful:

I've been using the Gingerbread GPS module interface spec in gps.h, along with some legacy (Android 1.x) GPS code and legacy GPS-under-emulator code that I found online somewhere, to write a new libgps.so which I hope will work on GB.

Now, if only I could find free time to finish and test it...
[G Tablet General] fosser2:
WOW, it sounds like you're up to your head in work. Well I hope you can find some spare time to finish that up. Keep me updated for sure. Right now I've been experimenting with the NI 2.3 update and throwing files at CM 7.0.3 and hoping they take. If I have any luck I will for sure post back here.

EDIT: I had one other question. Before you gave me a program "unyaffs.exe" that was able to extract the contents of "system.img" is there a similar program that you can give me that can extract "boot.img" thanks. (other then perl scripts)

EDIT2: I installed linux using vmware and was able to extract the boot.img file. I found a possible change to enable the gps. I will report back after I figure out how to recompile boot.img. I have never used linux before today so bear with me :p

EDIT3: Ok rajeevvp, I think I've reached the max point of my knowledge. I was able to extract the NI boot.img and pull the init.rc file from it. After looking through it I found the part for GPS:

#for gps
on boot
chmod 0777 /dev/ttyHS3
#################################################
#	#
#	mmc3140 electric compass	#
#	#
#################################################

# change ecompass device permission
chmod 666 /dev/mmc31xx
chmod 666 /dev/ecompass_ctrl

mkdir /data/misc/sensors 0777 system system

# start memsicd service
service memsicd /system/bin/memsicd
user root
oneshot

When I extracted the boot.img from CM 7.0.3 there was no section for the GPS. This is why, when we are running CM 7.0.3 that the GPS is not enabling. I copied the NI section of the code into the CM 7.0.3 and recompiled the boot.img. After re-signing the update and flashing it seems to not be working. My tablet turns on and stays at the viewsonic birds screen. If you could just compile the boot.img file for CM 7.0.3 for me I will sign the update and flash my tablet. I really feel like I'm onto something with this one. :p Let me know what you think.

-Andrew

ps: here are the 2 links I used to get to where I am...

http://android.modaco.com/content/t...l-r1-bootbuilder-for-pulsemini-alpha-release/

http://xdaforums.com/showthread.php?t=909490

-I am using the tool from the xda link and am using the commands from the first link. I hope this makes sense.
[G Tablet General] rajeevvp:
Alright, that seems simple enough--we can do a quick check. There're only 2 things we need as per that init.rc file.

1. You can change the permissions for the device really any time after boot, but, the will not be permanent. Run,

$ su
# chmod 666 /dev/ttyHS3

first thing after boot and before you load Maps.

2. This part is permanent--you just have to do this once. Run,

$ su
# mkdir /data/misc/sensors
# chmod 777 /data/misc/sensors
# chown 1000.1000 /data/misc/sensors

also before loading Maps.

Gotta go--I'll check this thread in the evening.
[G Tablet General] fosser2:
I ran these two commands and they didn't enable the GPS. Dang. I'm sure that those commands have to be ran or integrated into the boot.img but I'm guessing that some other files have to be changed also... My guess is the libgps.so file. The new version of NI 2.3.4 does not have the "libgps.so" file. Instead I found a file called "libadam_gps.so" I'm guessing that this is the "libgps.so" file for the NI. I have uploaded the file for you to take a look at. I think with a bit more messing around we will get the GPS running.
[G Tablet General] rajeevvp:
First things first:

There is an easier way to run Linux than running VMware. Go to http://knopper.net/knoppix, then download and burn either the Live CD or Live DVD iso images. Even the Live CD version (KNOPPIX_V6.4.4CD-2011-01-30-EN.iso) has a C compiler and most other development programs already installed.

Next, are you sure that GPS works on NI Adam 2.3.4?

Last, give me the link to the NI Adam 2.3.4 firmware update file, so I can look inside.

OK, Things to try if GPS really does work on NI Adam 2.3.4:

1. Rename libadam_gps.so to libgps.so on CM-7.0.3 and see if GPS works. The chmod 666 /dev/ttyHS3 should not be needed as system_server (the process that reads from /dev/ttyHS3) already runs as root, but, it doesn't hurt to run that command (once after every boot) while we test things.

2. If the above step doesn't work, rename libgps.so back to libadam_gps.so, and replace CM's /system/framework/com.android.location.provider.jar and /system/framework/framework.jar with NI Adam's version of those files. Test Maps again after a reboot.

Warning: the framework.jar is a critical system file and I don't know what replacing it will do to your tablet--esp. since CM-7.0.3 is based on 2.3.3. It might go into boot loops.

3. As a last resort, if nothing else works, upgrade CM-7.0.3 to the latest nightly which is based on 2.3.4, I believe, and try steps 1 and 2 again.
[G Tablet General] fosser2:
Here is the link to the build I have been using.

http://developers.notionink.com/testimage23/2.3prealpha/nvflash.zip

Alright, so far I have renamed libadam_gps.so to libgps.so and moved that over. That did not do anything. Next I have copied over the 2 framework files. My tablet froze before the cyanogenMod screen comes up. I am flashing to the latest nightly build at the moment (cm_harmony_full-86.zip) I will let you know back.

EDIT: Same results on "cm_harmony_full-86.zip"...guess we hit another wall. I'll keep messing around with it. In maps it just says "Please enable a My Location source in system settings." This makes me wonder if the kernel code is properly written. (Adam Kernel https://github.com/notionink) Would the guys at CM have taken out the gps portion?

EDIT2: To answer your first question ̶I̶'̶m̶ ̶n̶o̶t̶ ̶c̶o̶m̶p̶l̶e̶t̶e̶l̶y̶ ̶s̶u̶r̶e̶ ̶i̶f̶ ̶t̶h̶e̶ ̶g̶p̶s̶ ̶i̶s̶ ̶w̶o̶r̶k̶i̶n̶g̶ ̶o̶n̶ ̶N̶I̶ ̶2̶.̶3̶.̶4̶ ̶ From the wordpress page, a user did say that GPS did function well on NI 2.3.4. I guess that is good news. "- GPS works great for me. It quickly connected and it has been working nicely" Another user: "Gps is working better . Gps test app shows that i get a fix and lock. Yet to test navigation."

EDIT3: In the location /sys/devices/platform/gps_control/enable I changed the 0 that was in that file to a 1. As soon as that was done, power is supplied to the gps chip. Google maps still says "please enable a my location source in system settings." In the settings, location and security, "Use GPS satellites" does not toggle the 0 or the 1 in the enable file. I didn't put 2 and 2 together for this one. The command "echo 1 > /sys/devices/platform/gps_control/enable" does the exact same thing. Dang, I had my hopes up for a second.

EDIT4: I will be using the nighty build "cm_harmony_full-86.zip" for the rest of my 2.3.4 testing. It appears to be stable enough to run, and running the latest and greatest in android is probably for the best.