GPS error ASUS P535
-
Hi, I have an ASUS P535 and I have a problem with GPS. If I use TomTom Navigator, I don't have any problem, but if I use the gps sample from Microft I have the next problem: - Sample project: Microsoft.WindowsMobile.Sample.Location (ProgramFiles\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\Cs\Gps) - Error: In the function WaitForGpsEvents the code stop indefinitily WaitForMultipleObjects - The Microsoft sample, haven't any problem in HTC P3300 - The code and error: private void WaitForGpsEvents() { lock (this) { bool listening = true; IntPtr handles = Utils.LocalAlloc(12); Marshal.WriteInt32(handles, 0, stopHandle.ToInt32()); Marshal.WriteInt32(handles, 4, deviceStateChangedHandle.ToInt32()); Marshal.WriteInt32(handles, 8, newLocationHandle.ToInt32()); while (listening) { int obj = WaitForMultipleObjects(3, handles, 0, -1); (!!!!!ERROR STOP HERE indefinitely!!!!!!!!!!!!!!!!!!!). if (obj != waitFailed) { switch (obj) ... { case 0: // we've been signalled to stop listening = false; break; case 1: // device state has changed if (deviceStateChanged != null) { deviceStateChanged(this, new DeviceStateChangedEventArgs(GetDeviceState())); } break; case 2: // location has changed if (locationChanged != null) { locationChanged(this, new LocationChangedEventArgs(GetPosition())); } break; } } } // free the memory we allocated for the native handles Utils.LocalFree(handles); // clear our gpsEventThread so that we can recreate this thread again // if the events are hooked up again. gpsEventThread = null; } } Some idea or solution? Thank you
-
Hi, I have an ASUS P535 and I have a problem with GPS. If I use TomTom Navigator, I don't have any problem, but if I use the gps sample from Microft I have the next problem: - Sample project: Microsoft.WindowsMobile.Sample.Location (ProgramFiles\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\Cs\Gps) - Error: In the function WaitForGpsEvents the code stop indefinitily WaitForMultipleObjects - The Microsoft sample, haven't any problem in HTC P3300 - The code and error: private void WaitForGpsEvents() { lock (this) { bool listening = true; IntPtr handles = Utils.LocalAlloc(12); Marshal.WriteInt32(handles, 0, stopHandle.ToInt32()); Marshal.WriteInt32(handles, 4, deviceStateChangedHandle.ToInt32()); Marshal.WriteInt32(handles, 8, newLocationHandle.ToInt32()); while (listening) { int obj = WaitForMultipleObjects(3, handles, 0, -1); (!!!!!ERROR STOP HERE indefinitely!!!!!!!!!!!!!!!!!!!). if (obj != waitFailed) { switch (obj) ... { case 0: // we've been signalled to stop listening = false; break; case 1: // device state has changed if (deviceStateChanged != null) { deviceStateChanged(this, new DeviceStateChangedEventArgs(GetDeviceState())); } break; case 2: // location has changed if (locationChanged != null) { locationChanged(this, new LocationChangedEventArgs(GetPosition())); } break; } } } // free the memory we allocated for the native handles Utils.LocalFree(handles); // clear our gpsEventThread so that we can recreate this thread again // if the events are hooked up again. gpsEventThread = null; } } Some idea or solution? Thank you
Does the Asus provide gps sharing through a virtual port scheme. If so this may be your problem. The workaround would be to implement your own polling and NMEA sentence data parsing routine. I experienced a problem on an HP Travel Companion with the serial port data received events when the virtual port feature was being used. The virtual port feature is intended for sharing of the gps port by multiple applications. When I disabled the feature and accessed the port directly the data received event was fired. If I enabled the feature I had to use a polling routine to get the serial port data. I do not think that this is a bug. I am not sure how I would implement a data received event for multiple listeners when using virtual ports.