Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WM5 to WM6 GPSID Problem on HTC P3300

77 views
Skip to first unread message

Mike

unread,
Oct 30, 2007, 7:35:42 PM10/30/07
to
I have been using the Windows mobile 5 GPS Intermediate driver sample kit
for well over a year now successfully.

I recently upgraded my HTC 3300 from Windows mobile 5 to Windows mobile 6.

Now, the sample kit (and my software) will not get any GPS data.

I have even tried the Windows Mobile 6 GPS Intermediate driver sample kit
and that does not work.

TomTom6 still works fine on the Com4 virtual port though.

The line of code in fault is in the gps.cs module is:

int result = GPSGetPosition(gpsHandle, ptr, 10000, 0);

The result is always 87.

Does anyone have any ideas?

Thanks

The full procedure is:

public GpsPosition GetPosition(TimeSpan maxAge)
{
GpsPosition gpsPosition = null;
if (Opened)
{
// allocate the necessary memory on the native side. We have a
class (GpsPosition) that
// has the same memory layout as its native counterpart
IntPtr ptr = Utils.LocalAlloc(Marshal.SizeOf(typeof(GpsPosition)));

// fill in the required fields
gpsPosition = new GpsPosition();
gpsPosition.dwVersion = 1;
gpsPosition.dwSize = Marshal.SizeOf(typeof(GpsPosition));

// Marshal our data to the native pointer we allocated.
Marshal.StructureToPtr(gpsPosition, ptr, false);

// call native method passing in our native buffer
int result = GPSGetPosition(gpsHandle, ptr, 10000, 0);
if (result == 0)
{
// native call succeeded, marshal native data to our managed data
gpsPosition = (GpsPosition)Marshal.PtrToStructure(ptr,
typeof(GpsPosition));

if (maxAge != TimeSpan.Zero)
{
// check to see if the data is recent enough.
if (!gpsPosition.TimeValid || DateTime.Now - maxAge >
gpsPosition.Time)
{
gpsPosition = null;
}
}
}

// free our native memory
Utils.LocalFree(ptr);
}

return gpsPosition;
}


João Paulo Figueira

unread,
Oct 31, 2007, 7:14:48 AM10/31/07
to
I confirm this behavior on the HTC P3300 after having a day-long struggle to
get this beast to work with the GPSID in native code. The GPSReadPosition
always returns 87 (ERROR_INVALID_PARAMETER) no matter what. This device has
an interesting history of having poor GPS support. Earlier this year I found
out that the GPS COM port does not generate COM events, so the WaitCommEvent
function is useless:
http://nativemobile.blogspot.com/2007/01/reading-gps-port-on-htc-p3300.html

There seems to be no way around it: use ReadFile with reasonable timeout
settings...

Regards,
João Paulo Figueira
DAD MVP

"Mike" <mike.sharp_n...@maptex.com> wrote in message
news:13iffug...@corp.supernews.com...

Mike

unread,
Oct 31, 2007, 6:50:21 PM10/31/07
to
Hi João,

Thanks for the reply.

So, it is possibly an issue in the GPSID_HTC.dll (or whatever DLL is being
used on the HTC).

WM5 worked fine. WM6 does not!

Also, I am having issues on other WM6 devices as well, so it is not
restricted to the HTC 3300.

Thanks

Mike

"João Paulo Figueira" <joao.f...@primeworks-mobile.com> wrote in message
news:1A819DDA-C84F-4A2F...@microsoft.com...

João Paulo Figueira

unread,
Nov 2, 2007, 11:38:16 AM11/2/07
to
Hi Mike,

I believe this is an issue with the HTC device or GPSID implementation. My
code ran fine on an Asus P535 both in WM5 and after it was upgraded to WM6.

What other devices are displaying this behavior?

Regards,
João Paulo Figueira
DAD MVP

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13ii1lf...@corp.supernews.com...

John Spaith [MS]

unread,
Nov 2, 2007, 6:40:44 PM11/2/07
to
First my apologies for issues you're hitting and not jumping on this sooner.
We're transitioning GPSID to a new dev, which isn't an excuse for me not
tracking this better (long term a win since the new dev is a lot smarter
than I am :)).

These issues are all news to me. I whipped out a WM6 image and wasn't able
to repro any of this, though that's not so surprising since we wouldn't have
shipped if we thought it was a GPSID bug.

One question for anyone using this is which WM6 build # are you on?
(Settings -> About, baslically whatever comes after "Windows Mobile 6 ---"
line). We made some changes to GPSID for what we call AKU 0.4 and what
would be build #18120. The changes were to make it easier for GPS driver
writers to plug into us & shouldn't have affected app dev experience.

For those seeing the ERROR_INVALID_PARAMETER, could you include a small
(native) sample showing it. Also could you copy/paste to the group the
exact contents of GPS_POSITION structure as the debugger tells them to you?
Thanks

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"João Paulo Figueira" <joao.f...@primeworks-mobile.com> wrote in message

news:ACFD48DF-6C98-407C...@microsoft.com...

Mike

unread,
Nov 3, 2007, 3:41:44 AM11/3/07
to
Hi John,

The following devices exhibit this behaviour:

HTC P3300 {Windows Mobile 6 Professional, CE OS 5.2.1620 (Build
18125.0.4.2) }

Glofish M600 (WM6) {Awaiting exact details on this one}

These appear to be a later build than your 18120. Can you try the same build
as us (18125)?

Due to manufacturers now shipping WM6 instead of WM5, our company is now
finding they can no longer ship software to support WM6 as we have based it
all around GPSID :-(

Any help you can provide would be very much appreciated as our customers are
getting impatient.

I have tried your new GPSID Windows mobile 6 SDK - that exhibits the
behaviour, so you should use that kit for testing.

Interestingly, I have tried a T-Mobile MDA Vario III {Windows mobile 6
professional, CE 5.2.1620 (Build 18125.0.4.2) } with your sample kit, and I
do not get error 87. The sample kit will still not run however, so there is
a slightly different error, but ultimately the same end result (the
GPSPosition returned is invalid).

Thanks

Mike


"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message
news:%233iasFa...@TK2MSFTNGP06.phx.gbl...

Mike

unread,
Nov 4, 2007, 3:23:08 AM11/4/07
to
I am currently trying to get hold of an external GPS device to see if this
is a problem with external, internal or both types of GPS devices.

People are reporting success with other types of devices (on other threads),
but I suspect they are external GPS. If so, that would imply that there
could be an issue with the internal type. If that is the case, is this due
to the "plug in" facility which was recently added?

If this is indeed the case, and the "plug in" is failing over several
manufacturers, then that would imply a general "plug in" failure which would
point to the GPSID release itself.

I will feedback results once I have been able to test the external GPS
device on my two failing devices (which use internal GPS).

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13io9ho...@corp.supernews.com...

Mike

unread,
Nov 4, 2007, 5:04:23 AM11/4/07
to
I have done more tests on this.

On the HTC PC3300, I can set the external device port (com7) and paired an
external GPS up with it.
Even after a reboot, any attempts to use GPSID fired up the internal GPS. It
ignored my settings. GPSID still failing.

On the T-Mobile MDA Vario III, every attempt to set the hardware port
reverted to "none" - the unit seems to be ignoring my settings.

There is something very strange going on inside the GPS tool in WM6........

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13ir0bc...@corp.supernews.com...

Mike

unread,
Nov 6, 2007, 5:16:04 PM11/6/07
to
John,
I posted this on the earlier message - but just in case you are only
monitoring this one:

The GPSID is failing on numerous Wm6 devices - how can we get this
escalated?

Your WM6 C# SDK will not even work "out of the box" on numerous devices.

We are now at the stage where we need to make some major decisions.

Thanks


"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message
news:%233iasFa...@TK2MSFTNGP06.phx.gbl...

<ctacke/>

unread,
Nov 6, 2007, 7:04:33 PM11/6/07
to
I'mcertain that opening an actial support case would count as escalation.
Call in and get an SRX number. It's likely that John would end up as the
engineer you'll work with anyway, btu then it would be an official,
customer-provided support case.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13j1pt6...@corp.supernews.com...

John Spaith [MS]

unread,
Nov 7, 2007, 12:05:26 PM11/7/07
to
I'm working with the new GPSID engineer on this & have marked priority
appropriately.

From a native sample, when you pass in GPS_POSITION could you please let me
know what the exact values you're passing for dwVersion & dwSize are, as
reported from a debugger watch window or via a printf() run at runtime, and
also dwFlags as passed in? Unless somehow the driver is getting yanked from
under you, I don't see how else the ERROR_INVALID_PARAMETER could be getting
indicated. (The driver yank-out is also something we're looking at.)

We'll get to the bottom of this I promise & again apologies for pain it's
causing.

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"Mike" <mike.sharp_n...@maptex.com> wrote in message
news:13j1pt6...@corp.supernews.com...

Mike

unread,
Nov 7, 2007, 12:43:10 PM11/7/07
to
John,

I'm using C#. I don't do native code.

If you can obtain a HTC P3300 or one of the other devices, and run your WM6
SDK GPS sample, you get the same issue.

You can always contact me directly at mikeDOTsharpATmaptexDOTcom

I have fired up tomtom on com4: (virtual port) and that bit works ok, so I'm
all configured up ok. The "WM6 Manage GPS" is ticked - so that is ok.

Its just the GPSAPI.DLL access to the GPSID via C# that's not working.

Thanks

Mike

"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message

news:uAeXlBW...@TK2MSFTNGP05.phx.gbl...

João Paulo Figueira

unread,
Nov 8, 2007, 9:33:31 AM11/8/07
to
Hi John,

If memory serves me well, dwSize is 344 and the dwVersion is 1.

Regards,
João Paulo Figueira
DAD MVP

"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message

news:uAeXlBW...@TK2MSFTNGP05.phx.gbl...

John Spaith [MS]

unread,
Nov 8, 2007, 11:42:13 AM11/8/07
to
As an update, we're following up with João via email to get more information
about his repro, since he is using native.

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13j3u9g...@corp.supernews.com...

John Spaith [MS]

unread,
Nov 8, 2007, 2:01:26 PM11/8/07
to
I've been talking with one of our OEM liason PMs and he's requested more
information about the build you guys are on. Basically he wants
*everything* from the settings->about box, beyond just the build #. You
don't need to copy out all the copyright nonsense since that's not
interesting, but please let us know the version # for everything, including
but not limited to:

radio version
RIL version
available storage (there are 2 flavors of HTC 3300 and the easy way to tell
the difference is amount of RAM)
processor
and all the CE ROM update version stuff


--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message
news:u25rQZiI...@TK2MSFTNGP02.phx.gbl...

Mike

unread,
Nov 8, 2007, 2:27:23 PM11/8/07
to
Hi,

This issue is present on three different hardware manufacturers (HTC3300,
Glofish M600, T-Mobile MDA Vario III)

My HTC Details as requested (the lot!)

CE OS 5.2.1620 (Build 18125.0.4.2)

Processor: OMAP850-201Mhz
Memory: 47.93MB

On a reboot:
IPL 3.13.0001
SPL 3.13.0000
GSM 02.94.90
OS 3.13.0.0

Device information:
ROM Version: 3.13.405.1 WWE
ROM Date: 8/28/07
Radio version: 02.94.90
Protocol version: 4.1.13.44
ExtROM version: 3.13.405.102

CPU Info:
CPU: OMAP850
Speed: 201Mhz
RAM Size: 64MB
Flash Size: 128MB
Data bus: 16 bits
Storage size: 32.45 MB
Display: 240x320
Colours:65535


"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message

news:%23ON7Dnj...@TK2MSFTNGP06.phx.gbl...

Mike

unread,
Nov 12, 2007, 12:24:20 PM11/12/07
to
Any progress on this?

have you replicated the issue?

Thanks

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13j6oot...@corp.supernews.com...

John Spaith [MS]

unread,
Nov 13, 2007, 11:17:51 AM11/13/07
to
We are in the process of getting hardware, which we should have shortly. I
appreciate the time crunch on you, but it will take some time to debug this
unfortunately.

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13jh328...@corp.supernews.com...

Mike

unread,
Nov 16, 2007, 6:36:08 PM11/16/07
to
Hi,

Have you obtained a WM6 device exhibiting this problem and tried to run the
WM6 SDK C# GPS sample on it yet?

Thanks

"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message

news:e8Zo9ChJ...@TK2MSFTNGP04.phx.gbl...

Buddy

unread,
Nov 22, 2007, 12:32:54 PM11/22/07
to
Hello John,

a lot of people would like to hear of some progress, at least some
none-existant. What's your status??

Regards,
Florian

"Mike" <mike.sharp_n...@maptex.com> escribió en el mensaje
news:13jsabd...@corp.supernews.com...

Mike

unread,
Nov 22, 2007, 5:52:23 PM11/22/07
to
Hi,

It takes a few days to obtain a HTC P3300 with WM6 and test the C# SDK on
it.

I have tried around 5 different vendor WM6 devices now and they ALL fail. I
did this by obtaining the necessary hardware myself!

I have even found a problem on the Glofiish devices with the CameraDialog
api, but that is another thread........

Can I echo the request for some real progress please?

The various WM6 release issues with the GPSID is causing us severe issues
with our client base. It seems crazy that we have to contemplate ditching
the GPSID and reverting back to a COM: port handler :-(

Please update the community urgently.

A confirmation of the issues would be a real start ;-)

Thanks

"Buddy" <vo...@nowhere.com> wrote in message
news:udkzq8UL...@TK2MSFTNGP02.phx.gbl...

Mike

unread,
Nov 24, 2007, 5:04:14 PM11/24/07
to
The time frame on sorting this is disheartning.

The GPSID could have been rewritten by now, which is something I myself have
to seriously contemplate.

We went down the GPSID route as we believed the "standard" API approach was
the best route, even with the degrees issue present.

Our client base is getting very annoyed now, with what seems to them to be a
lack of progress on our part.

At the end of the day, I have tried numerous hardware (WM6) with the WM6 SDK
/ GPS Sample, and it doesn't work. That cycle took me a couple of days to
BUY in hardware.

Can we expedite this please?

WM6 GPS functionality is a key part of the O/S and we simply can't get it to
work in C#

We would like to stick with WM6 and GPSID, but our clients might not hang
around.

Please advise urgently :-)


"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message

news:e8Zo9ChJ...@TK2MSFTNGP04.phx.gbl...

<ctacke/>

unread,
Nov 24, 2007, 6:05:45 PM11/24/07
to
If y0u want to expedite it, call Microsoft and open an actual support case.
Turn around time to hear back is 24 hours, and in my experience resolution
is usually under a week (depending on the complexity of the problem).

While I'm sure John would love to fix this issue right now, he's also got
other things to do during his day job. Public forums are *not* part of
Microsoft's official support channel, so any information gathered and posted
here is done on a purely voluntary basis by Microsoft employees. Who
knows - maybe John has been busy with an internal project and hasn'st had
the time to even read this forum since his last post. Getting an actual
support case allocates actual defined resources within Microsoft to work for
a solution.

If the problem turns out to be a Microsoft bug (which is certainly sounds
like in this case) then the support case costs nothing anyway.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13kh7v2...@corp.supernews.com...

Mike

unread,
Nov 25, 2007, 5:16:21 PM11/25/07
to
Hmmm...... the lines seem to be very grey.

I thought, looking at the relevant blog, that this was a semi-supported
forum of sorts, sort of open, so all could see. I guess I misred that one. I
did not realise this was being done in their own personal time.

I'll try the route you suggest and see how I do.

Thanks

"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
news:uw4pS6uL...@TK2MSFTNGP03.phx.gbl...

microteq

unread,
Dec 4, 2007, 2:30:21 AM12/4/07
to
Hi,

I just wanted to mention that we are facing exactly the same problem
on our HTC P3300. For us, too, the situation is critical. Does anyone
know if there is already a solution around?

Thanks.
Daniel.

Mike

unread,
Dec 4, 2007, 2:36:25 AM12/4/07
to
Hi,

Due to the many weeks involved in waiting for a solution (or even
confirmation of the issue), we took the decision to remove all GPSID
functionality from our software.

This is disappointing as we viewed the GPSID API as a good way forward, but
the WM5 release had issues (depending on the vendor implementation) with
angular correction. The WM6 implementation we simply cannot get to work at
all.

We will be sticking to the NMEA stream from the com port from now on as we
cannot afford any issues like this again.

Thanks

Mike

"microteq" <dgeis...@microteq.ch> wrote in message
news:d26a5c22-0ee4-4164...@d61g2000hsa.googlegroups.com...

<ctacke/>

unread,
Dec 4, 2007, 11:39:11 AM12/4/07
to
Not sure how I can be any more clear. How about this:


OPEN A SUPPORT CASE WITH MICROSOFT.

--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com

"microteq" <dgeis...@microteq.ch> wrote in message
news:d26a5c22-0ee4-4164...@d61g2000hsa.googlegroups.com...

John Spaith [MS]

unread,
Dec 5, 2007, 11:11:45 AM12/5/07
to
I apologize for the delay. What happened is that I was on vacation for 3
weeks and there was an emergency that made the incoming GPSID developer
unavailable also. Going through support isn't a bad idea, but I'm also
going to be looking at this now that I'm back.

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
news:eWSh1QpN...@TK2MSFTNGP05.phx.gbl...

Mike

unread,
Dec 6, 2007, 4:54:52 AM12/6/07
to
Hi,

I tried - it took me ages to navigate the site and I gave up in the end,
having never raised a support case before.....

In the end, it didn't take me that long to remove the GPSID functionality
and go straight to the serial port. That would seem to offer the best path
going forward as we use the "standard NMEA"....

Thanks

"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message

news:eWSh1QpN...@TK2MSFTNGP05.phx.gbl...

<ctacke/>

unread,
Dec 6, 2007, 10:13:00 AM12/6/07
to
If you want to go straight to the port, we have some open-source code that
might save you a little time. It already does a fair bit of the connection
and parsing stuff.

http://opennetcf.com/FreeSoftware/OpenNETCFIOSerial/tabid/252/Default.aspx


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com

"Mike" <mike.sharp_n...@maptex.com> wrote in message

news:13lfhnf...@corp.supernews.com...

Mike

unread,
Dec 6, 2007, 11:59:01 AM12/6/07
to
Hi Chris,

I already use your serial port implementation for com port handling :-) It
works very well.

I had to modify it slightly for the HTC P3300 virtual port as it (the P3300)
doesn't seem to fire the right events on its virtual comm port.... but that
is another thread.

We rolled our own NMEA parser and return everything as objects, pretty much
like the GPSID, so the port wasn't as painful as one would expect.

I will monitor this thread though, as I would like to know what was going
wrong.....

Thanks

Mike


"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message

news:euJHCqBO...@TK2MSFTNGP06.phx.gbl...

John Spaith [MS]

unread,
Dec 6, 2007, 4:49:26 PM12/6/07
to
I have posted a summary of what went wrong and a short-term workaround
to this problem at
http://blogs.msdn.com/cenet/archive/2007/12/06/gpsid-problem-workaround-on-recent-wm6-release.aspx.
After my workaround (hack), I was able to get GPS position from an HTC P3300
device & GPSID.

--
John Spaith
Senior Software Design Engineer
Windows CE Networking
Microsoft Corporation

http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2007 Microsoft Corporation. All rights
reserved.

"Mike" <mike.sharp_n...@maptex.com> wrote in message
news:13lgaip...@corp.supernews.com...

microteq

unread,
Dec 7, 2007, 2:59:26 AM12/7/07
to
Hello,

we just have tried the workaround by using the following strategy:

First we try to get the position the 'old way' (WM5 devices).
Then we check for Error 87.
If Error, we set a WM6 flag to true, set the structure size manually
to the new one and try to get the position again.
If success, we continue and will always set the size manually for
future calls...

This just works fine on our HTC P3300.

Many tanks for your workaround, John!!
Daniel.

0 new messages