yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] Mach2003:
Jumping Position

I have logs here from Barty22 while he tested the compass for you all.

The original position data from the HD2, was way more erratic (jumpy) than I ever saw on my Diamond. Of course a million factors could be involved in these short tests, including the compass routines themselves. ModDriver could amplify jumpy original readings depending on your settings.

If you get 'jumpy' position readings:

- Disable Smooth

- Change Lag Advance to 0

- Disable Speed

- Disable Course

See if position is no longer erratic.

Test with enable only one of the above.

Report here your results.
[Windows Mobile Apps and Games] Nazar78:
Ouh thanks for the advise about the buffers.

I think this Qualcomm gpsOne has the ability to lower the poll rates than 1000ms. Need your expertize to confirm. Sorry I'm in an enclosed building, so I only took about 10secs of reading w/o fix. In the log:

100ms.*.txt: ModDriver sleepttime/pollrate=100ms, samsung subkey default SleepOnNoData=100ms.

For above log, I see consistent 5x sleep 200ms while the buffer returns 0 and sleep 200ms.

1000ms.*.txt: ModDriver sleepttime/pollrate=100ms, samsung subkey default SleepOnNoData=1000ms.

For above log, I see no Buffer Return: 0 and sleep 200ms because I force the samsung default SleepOnNoData value to 1000ms while using ModDriver's 100ms poll rate.
[Windows Mobile Apps and Games] Nazar78:
Hi Mach2003,

This is GpsModDriver sleeptime/pollrate=100ms and samsung subkey default SleepOnNoData=1000ms and just got a quick sat fix.

Thank you...
[Windows Mobile Apps and Games] Mach2003:
I have inspected your logs, and NO you do not get data faster than 1 second, in fact when you set Sleep time to 100, you sometimes miss every other reading, causing a 2 second jump in your position.

The 200 millisecond "Sleep" is Sleep Time + 100, in order to not miss slightly late returns, and is not actually a Sleep but a timeout waiting for data (ie. Up to 200 ms).

Look for these lines where the Return is non zero.

005.175 Buffer Return: 215

Compare the times (005.175 seconds App Run Time) between consecutive readings. If you are getting better rates, then you would have these every 100 milliseconds, but you are not in either log set.

Set both back to 1000, and email or post another log set. I'd like to see if the reported "jumpiness" is shown.
[Windows Mobile Apps and Games] Mach2003:
I guess we were both posting at the same time...

I looked at these logs now as well.

154.804 Read Buffer
154.907 Buffer Return: 400
154.907 $GPGGA,070358.0

154.919 Read Buffer
155.919 Buffer Return: 0
155.919 Sleep For: 0

155.922 Read Buffer
156.923 Buffer Return: 398
156.923 $GPGGA,070359.0

156.933 Read Buffer
157.035 Buffer Return: 400
157.035 $GPGGA,070400.0

157.055 Read Buffer
158.055 Buffer Return: 398

Look at the GPS time stamp on the GPGGA messages, and compare them to the log time stamp. You see that missing the string at 155.9 makes the string at 156.9 (07:03:59.0) an extra second late. Also look and see that in no logs do you get a string other than on the even second (GPS Time).
[Windows Mobile Apps and Games] Mach2003:
Selective Multi Open Ports

I have a working test program that allows you to select the port(s) to READ raw data from. I also included the ability to use the MS GPS API call instead of a COM port. You will be able to order the ports, something like this..

This would eliminate the need to set (or create) the GPSID reg if you have a com port GPS, and allow you to use more than one GPS without additional configuration.

Any Comments?
[Windows Mobile Apps and Games] Nazar78:
Hi Mach2003,

Noted, thanks for the confirmation and explaination. I was excited seein non empty buffer but fail to understand it's content haha. Will do this later: Set both back to 1000, and email or post another log set. I'd like to see if the reported "jumpiness" is shown.

Thank you...
[Windows Mobile Apps and Games] saintman2:
hi,

is it possible to use g-sensor on devices without digital compass (like HTC Diamond) to filter GPS signal?
[Windows Mobile Apps and Games] barty22:
You mean like when in a tunnel, going left and right should trigger the g-sensor and give gpsmoddriver a clue where it currently is?

I think this effect will be minimal and therefore not possible. Perhaps when the g-sensor would be attached to certain technical parts down in the car it could help a little bit. But definitely not when the phone is on your dashboard... I mean the phone barely moves even though you are going left or right.
[Windows Mobile Apps and Games] saintman2:
Yes I'm talking about tunnels as well.

But I believe gsensor is rather sensitive for tracking X(right/left) and Y(accel/braking) acceleration. In addition we know speed before gps signal is lost. The main (and imho HUGE) problem is to convert X,Y acceleration to GPS coordinates...
[Windows Mobile Apps and Games] privategun69:
Hello For Mach2003

Hello,

for you Selective Multi Open Ports its good point !!!

Thanks if you want a beta tester for this and for compass on omnia i8000 im here.

Best regards.

@+++
[Windows Mobile Apps and Games] Junoman:
Hi Mach2003,

Thanks for your reply and for your further assistance. I am so sorry for the little delay of reply as I made a factory reset few days ago. I just pm you my log file as requested.

I confirm that I have installed the latest version of the GPS Mod Driver (1.51) on my Omnia i900 with 6.1 official rom from Samsung.

Cheers,

J.
[Windows Mobile Apps and Games] Nazar78:
Hi Mach2003,

Here's the requested logs both running at 1000ms. As you noted before, I ran gps app and ModSetup in bg.

Thank you...
[Windows Mobile Apps and Games] Mach2003:
The biggest difference between the Samsung and the HTC GPS driver is the way they handle the return from read port when there is no data available yet.

HTC, does not return untill a full GPS string is available (or 1 second timeout).

Samsung Returns 0 bytes without delay.

My code allows for an early return, and does a manual sleep to make up the 1 second less the time already used since the last string was read (your logs show ~897 ms).

I did notice that under these circumstances, and two applications reading Mod Driver at the same time, sometimes one of the applications gets no data, followed by slightly late data. I have a plan to correct this issue and perhaps it will make the erratic position problem go away on the Samsung.
[Windows Mobile Apps and Games] ascot17:
Omnia i900

TomTom 7.910

WM 6.5.3 Custom ROM Build 23519

Mach 2003,

This is by far the best fix for TomTom I have seen! I struggled for a month to get TomTom working on my Omnia - this did the trick in about 5 mins. Many thanks for your work!

I too have had some issues with position jumping & eratic flow. It is much better with the 151 version than the 138 version however.

I still have an issue with the time jumping if I try to use the TomTom 'Arrival Time' in the status bar display. If I am driving at a steady speed all is well and the program runs smoothly. At low speeds it becomes very eratic.

If I am stuck in traffic for 5 mins, my older version of TomTom (v6 on an XDA IIi) would just add 5 mins to the arrival time. My current version with GPSModDriver seems to calculate a new average speed. While stationary, my arrival time gets MUCH further away, accompanied by occasional position jumping.

I have read through a LOT of the posts on this thread. There are suggestions that changing some of the default values in the GPSModDriver settings can help, however I cannot work out what I should be changing.

Any help would be much appreciated!
[Windows Mobile Apps and Games] Mach2003:
Try increasing Delta Distance, it is in meters times 10, so 50 is 5.0 meters. Increase by 10 (1 meter) until the speed remains zero and heading freezes while stopped.

That being said, there still seems to be a problem with Samsung devices and ModDriver, I am working on it!
[Windows Mobile Apps and Games] Mach2003:
New Beta

1.52 Beta build attached here, use at your own risk, but it works on my Diamond.

I changed the system such that delays are removed from the GPS data streem, especially when more that one application is reading the GPS. I also repared the sending of pre-fix data so that it is time stamped better, and returns data sooner.

Hopefully this will reduce or eliminate the "erratic" position 'bugs', and also the funny times reported.

I have not yet added the "multi GPS" port controls, and although we have a Samsung compass version well on the way, it is also not yet included here.
[Windows Mobile Apps and Games] dingolino:
"multi GPS" port controls

Does this mean that I can have multiple GPS sources hooked to the device?

Bluetooth GPS receivers for example?

Best regards,

dingolino
[Windows Mobile Apps and Games] Mach2003:
Not yet, but, yes real soon.

See this post:

The pending mod should also allow freeing up of the extra serial ports some of you have to use,
[Windows Mobile Apps and Games] dingolino:
>Not yet,

This was clear - I just wanted to get the clearnes about the future functionality.

!!! This would be realy a great feature !!!

Please remember I was asking in the past allready the possibility to select the source for the GPS signal. If you use the phone as a GPS in a car this would be quite usefull to place a bluetooth receiver in a good receiving position and have the phone in a position where it is placed safely and good for viewing.

It would be even more great if there could be placed some "logic" behind such as:

if bluetooth gps receiver xyz is available use it and do not switch on internal gps

or would you handle this by arranging the receivers by prioritory? (1st, 2nd, ...)

Another feature would be great if this could be happen "on the fly" so I start gps on internal gps (walking to the car using the gps) but than I am switching on the bluetooth device and GPS Mod Driver is handling over the gps signal from one source to the other and is switching off the internal gps for battery saving.

Maybe this in combination with a profile switching (from "walking" to "driving")

Sorry - you gave the small finger and I am taking the entire hand (or even more) ... :D

Best regards,

dingolino
[Windows Mobile Apps and Games] Mach2003:
In my test application, the priority determins the port that will be opened.

Example:

MsApi 2 (GetGpsPosition API)
Com2 1 (Bluetooth)
Com4 3 (Internal GPS)

The driver would scan first COM2, then the MSApi, and finally COM4. The first port that has GPS data gets used.

I don't have any code to switch ports yet, but I thought I would rescan ports every so often (30 seconds or so). As it is now, you would have to close your all your GPS applications to switch ports.
[Windows Mobile Apps and Games] dingolino:
>I don't have any code to switch ports yet, but I thought I would rescan >ports every so often (30 seconds or so). As it is now, you would have to >close your all your GPS applications to switch ports.

Why do you think this is neccessary?

I thought GPS Mod Driver is "sitting in between", like a "man in the middle attack".

So the application does not see anything from a new source if GPS Mod Driver would decide to use the data from another source if that source is becoming avaiable and has the higher priority.

The only question is whether GPS Mod Driver has the ability to switch off the internal gps receiver (or does this happen automaticly?).

But anyway the features your are decribing would be great as they are at the moment!

Best regards,

dingolino
[Windows Mobile Apps and Games] Mach2003:
As long as the current device (internal GPS) has data comming through, Mod Driver would have to proform a new port scan in order to detect that another port (Bluetooth) has data. There might be a system message to tell Mod Driver that a new port has come online (I have not looked into this yet), but barring that, every once in a while Mod Driver will have to look and see if the new device is online in order to switch sources to a higher ordered device.

If the current source goes offline, switching to a lower priority device would be easy.

On the first test driver I issue, closing the GPS application, closes the source port in Mod Driver, so that the next re-open would re-do the port scan, and find the higher priority device.
[Windows Mobile Apps and Games] ascot17:
Have downloaded the 1.52 version and will test it out later in the week. Am currently working away from home without my car. Will let you know how I get on.

Many thanks!
[Windows Mobile Apps and Games] Hardwired:
Have a minor issue that I need a hand with.

I can't get this mod uninstalled. I have tried softreset and staring over my omnia completely. But when I go to install it still tells me that it's not completely uninstalled.
[Windows Mobile Apps and Games] Nazar78:
install the demo version of sktools, then use it to uninstall...
[Windows Mobile Apps and Games] ephestione:
demo sktools only shows first 6 entries of "installed programs", if gpsmoddriver doesn't happen to be among those 6, like in my case, it's a no go.

Any other suggestions to uninstall this?
[Windows Mobile Apps and Games] Nazar78:
check if the sktools demo has the remove bad uninstall function and/or moddriver in the 6 list.

if not you can easily perform a manual removal. juz seach for moddriver and remove everything you can find. juz that some keys can't be removed due to winmo's security reason but u can delete the entire content ie. hklm\drivers\builtin\moddriver or the older driver version hklm\drivers\builtin\serial5.

after that reboot, and you can now see if it's still there and delete the 3 files, in the start menu shortcut, gpsmodsetup.exe and gpsmoddriver.dll* in \windows...
[Windows Mobile Apps and Games] col135:
Does this driver solve the static navigation issue?

I downloaded and tried your V1.51 driver. It worked fine but did nothing to solve the static navigation filtering that seems to be built into the drivers of these HTC devices (HD2 in my case). I tried several settings and configurations of the walking profile but it persists. From a stable stationary position you still need to move aprox. 20-30M from that position before any update of the LAT-LON occurs rendering the device pretty useless for Geocaching (it's intended purpose).

Looks like I will have to continue using my external Bluetooth GPS and carry an extra device with me. This seems to be one of the most common threads on devices using Qualcomm GPS chip sets. Not sure why the manufactures don't realise this an allow a registry setting or alternative driver to disable it when required.

Any comments on other things I can try or is it just impossible to disable it?
[Windows Mobile Apps and Games] orbit71:
Hi Mach2003

Great tool the GPSModeDriver. Unfortunately I have small bad issue with the driver on a Omnia i900 WM 6.5 or WM6.1 doesn't matter.

If I am standing still, in the most cases it works perfectly and I get the fix really fast. As soon as I am moving (example by car) the 3DFIX as well the Lat/Lon remain, but the speed switches from 0 to the correct value and after some seconds back to zero, then back to the correct value. This forces some Navigation SW like TomTom to be interrupted. It seems like an internal issue of an drop out in GPSModeDriver. If I am using Google Maps, directly connected to GPS – no problem, the same with some GPS Proxy.

Any idea of the issue with GPSModeDriver

Thanks for your Help.
[Windows Mobile Apps and Games] ascot17:
Registry Hack for Omnia i900 / TomTom 7.91x

This registry hack was posted on a german site and translated on Modaco

It works........!!!!!!!!!!!!!

After changing the registry settings and using 'Other NMEA GPS' on Com 3 (instead of GPDModDriver), I was able to get a quick fix on multiple satellites.

Change these settings in the registry:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers\Samsung GPS Hardware\InputBufferSize: set from 4096 to 512

HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers\Samsung GPS Hardware\OutputBufferSize: set from 4096 to 512

HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers\Samsung GPS Hardware\SleepOnNoData: set from 100 to 0

HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Multiplexer\MaxBufferSize: set from 16384 to 1024
[Windows Mobile Apps and Games] Nazar78:
SleepOnNoData: set from 100 to 0

Isn't by setting to 0, the GPS hardware will be always active even there's no GPS applications requesting for data?
[Windows Mobile Apps and Games] orbit71:
Thanks ascot17.

It works also for me too – thanks – I always has used this configuration in combination with GPSModeDriver. But I am still wondering why it was not working in combination with GPSModeDriver – Mach2003 do you have any idea?

In addition I am interested to understand the mention registry entries we have chanced and the related consequences as Nazar78 has mention.

Any idea.
[Windows Mobile Apps and Games] Nazar78:
sorry corrections, when set to 0, gps hardware would not be active when gps apps end.

this value sleep value is actually the duration in ms to wait when there's no gps data received inbetween each polling. default pollrate is 1000ms. when u set the sleep to 0ms, it will continue polling even there's no data which could be a waste of cpu time n mayb power resource.

anyone pls correct me if otherwise...
[Windows Mobile Apps and Games] ChefChaudart:
( hello, I´m happy that Mach2003 is back on business, I´m really looking forward to get this driver working on my HD2. As I was unable to uninstall it last time, I will wait for others HD2 users experience ;).Thanks for your work)
[Windows Mobile Apps and Games] Mach2003:
Use ModSettings (menu, select profile, Walking, Save, Save) to select the Walking Profile. Make sure ALL the values are at the 'factory' default. For me this works great for caching.

Setting the poll rate to anything less than Sleep Time in ModDriver will waste CPU doing absolutly nothing. Setting poll rate or Sleep time to less than 1000, with the internal GPS in all GpsOne devices is a waste of CPU and battery. Enable extended log files, and then look at the ModDriver logs. The GPGGA starts with the sat time (HHMMSS.m/s, UTC). Do you get a sat time difference between two readings sooner than 1 second apart?

Right, an dthe time you are talking about, is the time the MS GPSID waits to read the Samsung driver, and the time the Samsung driver waits to read the actual hardware.

I have a major update in selected beta test right now, stay tuned!

TO UNINSTALL: to be sure, soft reset just before you attempt uninstall. Once you FAIL to uninstall, SKTools is the only option I know of. Although re-installing a new (or the same) version on top of a failed un-install works most of the time. To disable a failed un-install, mearly rename the GpsModDriver.dll in the windows folder and soft reset. Once reset the dll can then be deleted along with the other files, and even the values in the registry.

By the way, I think I have said this so many times before, I install a new cab, 10-30 times a day these days. I never have to un-install. I just install the new cab over the existing one.

To use the SKTools demo version, you could remove some other applications that are easy to re-install, until ModDriver shows up in the first 6 list.
[Windows Mobile Apps and Games] orbit71:
Hi Mach2003

1) As I understood, I have reversed the SleepOnNoData to 100 with the concequences, that TomTom no longer received satellite data ... so I have to set SleepOnNoData back to 0.

2) Are there any explenations of the values InputBufferSize, OutputBufferSize, SleepOnNoData, MaxBufferSize and why they have to be set to the mention values to run on Samsung Omnia with TomTom?

3) Any Idea, why GPSModeDriver does not run in that constellations – standing still, works mostly perfect, as soon as I start to move Fix and speed where periodically lost with GPSModeDriver but works with the direct port (COM3 or COM4) mention before.
[Windows Mobile Apps and Games] privategun69:
For MACH2003 Need Docs methods.

Hello,

Hi March2003, I have been trying GPS Mod Driver and I have just one question:

Could you please point me to some docs (or better SDK methods/tutorial) detailling the process of writing an application as a service like yours (meaning it is awaken only when other application is requiring it)

thanks in advance,

cheers
[Windows Mobile Apps and Games] Mach2003:
With the newest (yet to be published) driver Omina has no problem reading GPS with sleep set to 1000, and no longer has the eratic speed readings. It also reads the Samsung hardware compass. Soon you will see it here, just a few more bugs to work out.

Setting the buffer sizes too large just wastes memory. A full GPS message runs around 420 bytes. In rare cases one message is missed, so the buffers need room for two messages. The way 32 bit windows (probably) works, memory is allocated on page size of 1k, thus buffer size of 1024 is recomended. Keep in mind that there are many layers to the GPS system on ALL these devices, and there are input and output buffers in every layer. I don't have a clue what gets buffered from Hardware to The OEM driver, but from that point on...

Hardware->OEM Driver->MSGPSID->COMPort->ModDriver->Application.
[Windows Mobile Apps and Games] barty22:
Mach2003, is there anything you could do to perhaps improve the GPS position on the HD2? Perhaps some time based 3d position averaging (only below delta speed?), or driver hacking, I really don't know...

I know you are already aware of the problem, but here are some more threads about it:

GPS going crazy (proven with plot screenshots)

Weird GPS problem. Moving even while my car is motionless.

Just to be clear to everyone, this is not because of bugs in GPSModDriver, but because of crappy GPS hardware in the HD2 or some crappy GPS software/driver implementation by HTC.
[Windows Mobile Apps and Games] Mach2003:
Drivers and Services are different, I have a driver (Device.exe), not a service (Service.exe).

From the second post here, follow the link to the Diamond thread, there you can see the link to the place I got the template from.

You can start here for devices.

Or here for services

Because I use a device, the code sits idle unless an application opens it's assigned COM port, and then does something with that port. The OS forwards those requests to my driver DLL, and I can react to those requests (Init, DeInit, open, close, read, write, IOCTL, seek, Power Up, and Power down). Use a WaitForSingleObject or WaitForMultipleObjects call to sleep if there is nothing to do, or else the 'kernal' thread will dead-lock the whole phone.
[Windows Mobile Apps and Games] Mach2003:
Hello there Barty22!

Yes I am aware of the erratic position reported by the HD2 gps system. In the newest driver, you can choose the MSAPI 'port' to read the gps, maybe that will help. Other than that, setting speed and heading averaging on should help. I could offer even more averaging, but without an HD2 to test on, it would be painfull (as you KNOW) to test with log files, but I am game to try it, once the current set of mods are up here and 'bug' free.
[Windows Mobile Apps and Games] Nazar78:
Hi Albert,

Since now 1000ms has no issue, think you need to review your driver on how it would react on the SleepOnNoData set by default in some rom/device, in my case, 100ms in Omnia II (mayb other keys like Input/OutputBufferSize in and outside subkey). Maybe to delete these default keys if exists and set to your driver's value instead.

I had been doin all the recent testing w/o the default 100ms SleepOnNoData in the subkey "Samsung GPS Hardware". I deleted this key because it took priority over your driver's 1000ms SleepOnNoData value. eg. if I change the default value to 2000ms, the GPGGA readings will be skipping 2,4,6,8,10s despite ModSetup having 1000ms "Sleep Time" in the system setup page.

I'm refering to this key:

ModDriver: Drivers\SleepOnNoData=1000

Samsung: Drivers\Samsung GPS Hardware\SleepOnNoData=100

Thank you...