yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] asdffdsa11:
great,your way run.thx.

I used 2.60,it seem that this bug was not fixed for some phone.I use HTC HD with energy rom 6.5 23569.

With your way,now i can keep the GUI displaying celltower info.But I want to know,with reading your policy of the program,I think even I select port "MsApi",if no fix,this driver should not provide its data,and should provide celltower data.why don't the policy run?
[Windows Mobile Apps and Games] stathis95194:
Thanks for this great driver. It eliminates lag on iGo. I have a question. I'm a ROM junkie and because of that i have to install the driver all the time. Is there a specific file or registry entry that i can backup so that i don't have to enter the profile data all the time?

Thanks a lot.
[Windows Mobile Apps and Games] Mach2003:
HKLM/Software/Mach2003 and all subs in there.
[Windows Mobile Apps and Games] stathis95194:
Perfect. Thanks a lot
[Windows Mobile Apps and Games] hulkman:
Hi! I am a developer of cachebox and I am trying to use cachebox with gpsmod driver on a HD2 but everytime I start the connection it says it can't start the driver. The problem is when I try to connect using a serial port to the gpsmod driver port... It keeps giving me IOException!

I am using a .NET 3.5 Serial Port Object:

comPort = new SerialPort(portName, baudRate);

comPort.ReadTimeout = 60000;

comPort.Open();

After the Open method, an IOException is fired... If I use the direct Serial Port to the gps, everything is ok!

Any idea why is this happening? I would really like to solve this issue!
[Windows Mobile Apps and Games] Mach2003:
Why would you want a 60 second timeout for reading GPS?

Use mod settings to enable logs, and enhanced. Exit Mod Settings, wait more than 15 seconds and then start your application. Inspect the log file \Mach2003\ModDriver.txt for clues (or send it off to me to look at).
[Windows Mobile Apps and Games] hulkman:
Regarding the 60 seconds timeout... it was just a test... I know it should be fast to connect!

I've made what you told me, and it started to work!!! When I disable the Extended option, it keeps working! When I disable the Log it stops working again!!! A hidden bug maybe?
[Windows Mobile Apps and Games] Homekino:
Hello,

I`m a beginner, I own a HD2 since two weeks.

I want to use gpsmoddriver with cachebox for compass support and static navigation. I`ve tried several versions but only with 1.63 b4 as repported many posts before I can set NMEA Port 3 in Cachebox but with high CPU load, not useable for me.

Is GPSMODdriver used by Cachebox if I set GPS -> Windows in Cachebox and in Gpsmodsetup MSapi Enable and fix Order 1 ?

Can someone please tell me witch version of mod driver works with hd2 and cachebox.

Sorry for my question, I searched for posts about correct settings with Cachebox but don`t find any.
[Windows Mobile Apps and Games] Mach2003:
I can't imagine what enabled logging would do to stop the error you are getting, send me a copy (or post ir here if you don't have GPS fix yet) of the enhanced log file anyway, so I can follow what your app is doing to open and read my port.
[Windows Mobile Apps and Games] Mach2003:
Your sugested settings would just have cachebox and mod driver both reading raw GPS data, cachebox would still see the raw data comming from MsApi. Any app that uses Mod Driver MUST open and read the COM port specifiled on driver installation, and shown on the system tab as Gps Mod Driver Com Port (Default: COM1).
[Windows Mobile Apps and Games] hulkman:
I've uploaded the log file to rapidshare so you can see it!

http://rapidshare.com/files/393940314/ModDriver.txt.html

Hopefully it will provide some information on what's the problem with using your gpsmoddriver! Thanks for your help!
[Windows Mobile Apps and Games] Homekino:
In my case, at the install on the hd2 in all versions is reported by gpsmoddriver that com 3 is the port to set, but in cachebox I can`t set com 3 , -> driver not started is reported by cachebox. Only with GPSModdriver Version1.63 b4 I can set com3 in cachebox, but with highest Cpu-Load, not usable.
[Windows Mobile Apps and Games] hulkman:
try enabling the log in the options... and see if it works that way?
[Windows Mobile Apps and Games] Mach2003:
Can I have a bit more of your code, showing when you read the port?

By the way the read timeout is the amount of time ReadFile will wait for a any data to be present not the amount of time it takes to open the port. Set it to a more reasonable 1200 ms.

There are a number of issues I see, none should have caused an exception.

When WaitCommEvent() is called, driver waits for a flagged comm event to occur and then returns, except when a new SetCommEvent is recieved, then driver aborts the wait (as is documented by MS). You system is calling the SetCommEvent directly after the WaitCommEvent in all cases, quite useless.

Your system is calling ClearCommEvent over and over again. The base use for this call is to obtain the number of characters waiting in the queue to be read. Polling the function several times a millisecond is just a waste of system. Polling once every 50 or so ms should be enough, or better still use SetCommEvent() and then WaitCommEvent() (in that order), and when WaitCommEvent returns data will be ready to read. Use ClearCommError() to find the size to read, and then call ReadFile with that size.
[Windows Mobile Apps and Games] hulkman:
Here is the code that is used to read the gps... It wasn't made by me, but as I am a developer of the application I want to make it better and work with gpsmoddriver!

public override bool Open()
{
if (ConnectionString == null || ConnectionString == "")
throw new Exception("Locator.NmeaLocator.Open: Empty Connection String!");

String[] args = ConnectionString.Split(new char[] { ',' });
String portName = args[0];
int baudRate = int.Parse(args[1]);

shutDown = false;

try
{
comPort = new SerialPort(portName, baudRate);
comPort.ReadTimeout = 60000;
comPort.Open();

if (thread != null)
{
thread.Abort();
thread = null;
}

thread = new Thread(new ThreadStart(threadEntryPoint));
thread.Priority = ThreadPriority.Normal;
thread.Start();

return true;
}
catch (Exception ex)
{
Close();
return false;
}

}

protected void threadEntryPoint()
{
try
{
String buffer = String.Empty;

while (!shutDown && comPort != null && comPort.IsOpen)
{
try
{
buffer += comPort.ReadLine() + "\n";
buffer += comPort.ReadExisting();
}
catch (Exception)
{
// Wenn bluetooth-verbindung abreisst scheitern
// die readline-aufrufe sofort und es wird derbe prozessorzeit
// verbrannt
Thread.Sleep(1000);

// Global.AddLog("Locator.threadEntryPoint: Exception caught: " + exc.ToString());
continue;
}

if (buffer == null)
continue;

int idx = 0;

bool locationUpdated = false;

while ((idx = buffer.IndexOf('\n')) >= 0)
{
String line = buffer.Substring(0, idx);
buffer = buffer.Substring(idx + 1);

// Alles, was kein gültiges NMEA ist, wird ignoriert
if (!IsSentenceValid(line))
continue;

validLineRead = true;

// Checksumme interessiert nach Gültigkeitsprüfung niemanden mehr
line = line.Substring(0, line.IndexOf('*'));

if (line.StartsWith("$GPRMC"))
{
locationUpdated = true;
parseGPRMC(line);
continue;
}

if (line.StartsWith("$GPGGA"))
{
parseGPGGA(line);
continue;
}
}

// OnLocationDataReceived-Listener benachrichtigen
if (locationUpdated)
OnLocationDataReceived();
}
}
catch (ThreadAbortException)
{

}
}
[Windows Mobile Apps and Games] Homekino:
Hello hulkman,

hope you and mach2003 can find the problem, so we can use these two wonderful programs together...

Regards from Germany

Homekino
[Windows Mobile Apps and Games] Mach2003:
Where does the comPort class come from? Do you have a module or library for it?

By the way do you have error reporting turned on in your device?

The only thing I can guess, so far, is that when the comPort.ReadLine and/or the comPort.ReadExisting calls are made there are no system calls in its tight loop (calls to GetCommState at 10 per milli-second). If logging is disabled in ModDriver there are no system calls from Mod Driver either, and windows itself gets deadlocked (no message queue).
[Windows Mobile Apps and Games] hulkman:
The comPort is the instantiated object of the SerialPort class... This class is part of the .NET Compact Framework from Microsoft.

The problem is in the

comPort.Open();

it is throwing an IOException... The reading is never made because it can't open the port.
[Windows Mobile Apps and Games] Mach2003:
What happens if you disable logging, and then run Mod Settings. Leave it running, and then try to start your application.

EDIT: I have downloaded your source from sourceforge. You appear to be opening the port in the (NmesLocator.cs) Scan function (CheckPort), and then re-opening it with Open a very short time later.

From MSDN Here : "The best practice for any application is to wait for some amount of time after calling the Close method before attempting to call the Open method, as the port may not be closed instantly."

I wonder if this is the issue? Is the first open call failing, or the second one? Logging enabled would cause a delay on my end. Add a Sleep function after the Close call to see if it solves the issue.
[Windows Mobile Apps and Games] hotsync100:
suggestion

This application is very usefull.. I think it would be nice if it play a sound or make a vibration when it get the fix ..
[Windows Mobile Apps and Games] Mach2003:
I added MessageBeep() to the first fix, for the next update release.
[Windows Mobile Apps and Games] wil_dee:
mach2003, thanks very much for this great tweak, tomtom gets a fix almost immediately after this has been installed
[Windows Mobile Apps and Games] PaliKu:
More apps with QueStub?

First, thanks for the nice app!

How can i see which port is used by the app if i can't set the port ? (e.g. NaviComputer, Sportypal)

It is possible to use more apps with QueStub ? (how?)

Thanks!
[Windows Mobile Apps and Games] cybero2912:
Hello I have installed version 2.60 on my HTC Touch Pro.

Sometimes GpsMod shows no position (Lat:/Lon: 0.000000) but on the satelites page I see up to 6

when I softreset in most of the cases it is working again
[Windows Mobile Apps and Games] Mach2003:
To use QueStub with other applications, assuming you want more than one application installed on the device and using QueStub.

Find the exe that starts your application, rename it to old.exe. Copy QueStub .exe to teh same folder on your device, rename it to the the old name of your application. Link to the "new" QueStub file (with the old name). (copy a shortcut to it into windows/start menu/programs).

FYI, I am working on a Mod Driver update that will support stubbing in gpsapi.dll and thus supporting all applications that read GPS using the GPSOpenDevice GPSGetPosition and other calls in that api. Hopefully I'll get it done real soon.

But are the bars shown on the sat page (in Mod Settiongs) blue (ish)? Does Mod Settings report No Fix on 0 of 6 sats?

It is not uncommon for sats to be in view, but you still don't have a fix from that bird yet. I don't see how a soft reset could solve this issue though. Are you using Msapi or COM under ports? How often does this happen, and one it gets fixed, does it ever loose that fix? How long have you waited for it to get fix?
[Windows Mobile Apps and Games] hulkman:
Hi there! Thanks for your answer! Unfortunately that was not the problem, as one of the Open was not being called... It's only executed the first time the app starts to check for gps on the different ports...

However, I did some research, and started using a new method instead of the SerialPort class from .NET framework and it seems to be working ok now. I will have to do some more testing and perfomance improvement, but I think this can solve the problem!
[Windows Mobile Apps and Games] PaliKu:
I have try it also before that way as you are writing...

First i setup the path for QuePPC.exe under Garmin registry as it is written on post #1 and then installed the QueStub (Garmin XT is working perfectly)

But now if i copy the QueStub (from /MACH2003 folder) somewhere e.g. NaviComputer folder, rename the original exe to old.exe and so on...than..as soon as i start the renamed QueStub in NaviComputer folder the Garmit XT starts!...am i doing something wrong?
[Windows Mobile Apps and Games] Mach2003:
Sorry I scewed up, QueStub will always start the program in the registry, so always will start Garmin. It will only run one application.
[Windows Mobile Apps and Games] Bright.Light:
This looks very promising! Thanks so far!!:D

It would be nice though when a complete help is provided :P

Just wondering... My device found one satellite and the cell tower service is active.

So, it knows my location (though telling me the location information is weak!)

But when I look at the time the GPS driver returns, it is 2 hours behind :confused:

I would have thought that the time is the active time of the device until a correct time can be read from the satellites. This is not the case.

Also, on the information page it would be nice to see the time from GPS and/or calculated time.
[Windows Mobile Apps and Games] Mach2003:
Gps signal is shown as one fake connected bird, 2D fix, 10.0 dops, when using cell tower location. I thought that it was a good idea since cell tower location is very approximate. Bird 85 if MachCell based, 88 if myLocation based.

All time/dates are stored using UTC. GPS time is also in UTC. GPS time is returned based on the current device clock, and the actual GPS sample's time stamp. Cell tower time (as seen in your GPS application) is the current device time. It should never be two hours old. How are you checking the time? Is your time zone set correctly? Enable logging and inspect the logs for time date entries.

Raw GPS time date is of no real value to a user since it is often a few seconds old by the time you would see it. Some GPS applications set the device clock automatically to GPS time (Garmin for one), but with Mod Driver the time returned is based on the device clock already, and the device clock is already set to match the GPS time when it is found to be out by more than a few seconds. This time trick actually reduces displayed lag (for me anyway) by up to a full second.
[Windows Mobile Apps and Games] dampam:
Hi March2003

The new features/ functions in 310 are just awesome, thank you and please keep up the excellent work.

Is there a way to get Garmin to show 0 Kph instead of 5kph but keeping the map still rotates thing intact ?

Can you explain the cell tower naming system used ?
[Windows Mobile Apps and Games] Mach2003:
Cell tower filenames are MCC (Mobile Country Code).

MOC-LAC-CID (Mobile Operator, Location Area, Cell ID) for the actual cell.

All these values come directly from the RIL on the device. CDMA has different accronyms, but they mean the same thing and are used in the same way.

Note that I have noticed each physical tower has three or more cell's on it (pointing in various directions). And, often, the same tower supports more than one operator. Although the CID's are different for each operator, sight of the tower confirms that there usually are only three cells physicaly on it.

I tried 0, 0.1, 0.9, 1.0, 2.0 and 5.0 for "Compass speed", it took the later one before Garmin would rotate the map with the compass. I found the fake speed real handy in testing to know if I was using compass or saved GPS heading. I plan on adding an item to compass page to allow users to change the value, and zero (use actual speed) will be an option there.

I am not sure I even need the map to rotate with compass, since the compass does not work in the car, and I don't use the map application while walking or caching.
[Windows Mobile Apps and Games] asdffdsa11:
thank you for excellent work.

but I met issue.The cell tower servie don't work on my ppc(HTC HD with energy ROM 23569).It can't resolve cell tower and can't return lat/lng to GPS software(beeline gps).

I found no internet link was actived when I run Mod Driver.It seem that it don't get any data from Google.

Also,when I press button "Export" or "Update",no any response.
[Windows Mobile Apps and Games] nyk2005:
Hi,

Thanks for your great work

After few days when i test 2.6 version and i see that the improvements are impressive, no lag, satellites are fixed in maximum 10 sec, yesterday i upgraded mod driver to 3.10, but, in garmin the signal it's not stable, signal / no signal. in 3.10 version the altitude it's more accurate , it's almost equal with values from google earth. Now i will downgrade to 2.6 version to see if that was the problem, or something else.

I am using HTC diamond with SwiftBL-WWE-Diamond-v7-5-Full-12MbPP.

Can i help you with some logs or in other way?
[Windows Mobile Apps and Games] Mach2003:
Run ModSettings. See what the first line shows, watch this for about 60 seconds.

On the extras page, does it show a check mark beside "Service is Running now"? If not does "Restart" or "Start" button get it going?

If service is running and still no Cell Tower location, enable logging and expanded and then post a copy of device\Mach2003\MachCell.txt and MachCellOld.txt here for me to look into (if they exist, after another 60 seconds).
[Windows Mobile Apps and Games] Mach2003:
What ports are enabled in Mod Settings? Have you changed any of the default values? Make sure msapi is enabled and lower number than COM4, see if that makes the unstable signal go away in Garmin. I have not tried 3.10 on my Diamond yet (others have tried it on HD2 though), but I am doing some other mods today, and will test on Diamond later.

Edit: My Diamond has no erratic signal, but then it also has no working SIM card, so it gets no CELL tower notifications, although it does still load the cell driver. And a short time ago, it did get cell tower notifications, and use internet data to resolve them.
[Windows Mobile Apps and Games] dampam:
Hi March2003

In Driving mode, the speed reading in Garmin XT will take a few seconds after the car has stopped before it reduces to show 0kph and then it will show 5kph (in 310, earlier version 0kph). The map will sometime spin while the speed reduces (car stationary at this stage) and will revert to the correct orientation when it shows 5 kph.

What settings should I change to try to stop the spin ? Possible to reduce the lag in the speed display (reaching 0kph) ?

Wonder if the G sensor can be used to help to achieve a quicker car stop indicator (hence more positive way to stop the map from spinning and display the correct speed quicker while car is stationary). The phone proximity sensor can be used to help to decide if the G sensor reading is to be used i,e G sensor reading probably not useful to indicate stop position if the phone is not in a car holder.

The other observation made is that Garmin XT seems to be showing about 5 m lower altitude than shown in ModDriver (seperation shown in ModDriver 5m). Knowing the altitude of the location, Garmin XT is actually 5m closer to the correct altitude of the location.

IGO 8, however, show the same altitude as modDriver.

Why is XT showing a different altitude from ModDriver ? What is the significance of the Seperation value ?
[Windows Mobile Apps and Games] Mach2003:
menu/{driving}/Zero Speed Time is the setting for how long to hold the speed when you stop (3 seconds by default), this was added because a beta tester had it bounce back and forth from 0 to actual speed when slowing up to a light or walking(HD2).

I have noticed the spin as well, but have not tracked it down exactly yet. It is related to Minimum Speed and speed threshold on the same page, when slowing between minimum speed and speed threshold, the change in position is used for course.

I have not kept detailed sensor logs, but I suspect that slowing to a light will have less effect on the g-sensor than a simple bump in the road (unless you are slowing very quickly)

The proximity sensor on the Samsung Omnia II is only an on/off indicator and shows if an object is within 2 cm of the earpiece (phone to your ear). I don't know if it can detect a car holder 'behind' the earpiece, do you?

The data has two altitude values in it (either msapi or nmea). According to the nmea spec (written my boat people), altitude has to be reported as "Above Sea Level" (ASL). GPS calculations give altitude as "above the WGS84 elipsoid". For most of us, these two numbers are close enough, so we don't care. But to try and get the "correct" value we need to consider that gravity is different depending on exactly where you are on the planet. The difference in gravity changes the level of the sea (by as much as -+ 100 meters). The elipsoid only considers the "oval" shape of the earth, and not the variance due to gravity.

Seperation is the difference between ASL and the ellipsoid.

Mod Driver uses your current GPS position and a subset of the published table to determine the seperation value, or uses the GPS data itself if you wish (Prefer GPS). In random number tests the table was within 2 meters on all populated land surfaces.

So when you say "known altitude" at any given location, then you must be sure if that 'known' is ASL or Elipsoid altitude.

Mod Driver reports both numbers to the application, it is up to that application to display elipsoid altitude or ASL altitude. XT is showing ellipsoid, and IGo is showing ASL. Mod Settings shows ASL and the seperation value itself (as per nmea spec), add them together for ellipsoid (that's what Garmin is doing).

Finnaly GPS altitude, due to the way the it is calculated, is not that accurate anyway. Typically only one bird is used to determine altitude, while up to 12 are used for position. Check your VDOP value multiply by 3 to get approx error in GPS altitude (90% of the time :) ).
[Windows Mobile Apps and Games] asdffdsa11:
The first line is "LastKnown"

I got come contents from MachCell.txt.I had changed my LAC and CID,but it won't effect any thing.

Service always request Operator,but no internet link was actived,no google cell data was got.

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

130610 223807.008

000.000 Comm Init

000.001 Open Existing Key: Software\Mach2003\CellTower: OK

000.002 Read MaxCells: 4 bytes, 500

000.003 Read EnableCells: 4 bytes, 7

000.010 Ril Init OK

000.025 Comm Init End

000.832 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

000.833 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

001.192 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

001.638 Operator: , , 46000,

001.771 Signal: Cur=-59, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

001.867 CellTower: MCC=460, MNC=0, LAC=12345, CID=10000, BSI=0, GCID=0. GBSI=0, Rxl=0

001.868 Request Operator

001.992 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

002.287 Operator: , , 46000,

002.287 CellTower: MCC=460, MNC=0, LAC=12345, CID=10000, BSI=0, GCID=0. GBSI=0, Rxl=0

002.288 Request Operator

.....

217.584 Request Operator

217.595 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

217.614 Operator: 中国移动 Main, , 46000,

217.614 CellTower: MCC=460, MNC=0, LAC=12345, CID=10000, BSI=0, GCID=0. GBSI=0, Rxl=0

217.615 Request Operator

217.627 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

217.645 Operator: 中国移动 Main, , 46000,

................

244.802 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

244.819 Operator: 中国移动 Main, , 46000,

244.819 CellTower: MCC=460, MNC=0, LAC=12345, CID=10000, BSI=0, GCID=0. GBSI=0, Rxl=0

244.820 Request Operator

244.832 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

244.850 Operator: 中国移动 Main, , 46000,

244.850 CellTower: MCC=460, MNC=0, LAC=12345, CID=10000, BSI=0, GCID=0. GBSI=0, Rxl=0

244.851 Request Operator

............

545.131 Notify Signal: Cur=-55, Min=-113, Max=-51, Low=-110, High=-60, BitErrRate=-0.01

545.148 Operator: 中国移动 Main, , 46000,

545.149 CellTower: MCC=460, MNC=0, LAC=12345, CID=10200, BSI=0, GCID=0. GBSI=0, Rxl=0

545.150 Request Operator

545.163 Opened

545.164	IOControl code=1040008 (Stop)

545.183 Close cell data file

545.183 Ril Stop

545.301	IOControl return=1

545.334 Closed