?
Solved

Windows Mobile GPS Application Issue

Posted on 2008-02-08
7
Medium Priority
?
815 Views
Last Modified: 2013-12-09
Hey Guys,

I am developing a simple windows mobile gps app. I have a MC35 device which has a build in GPS on port COM0.
I am having trouble accessing that port to get the GPS data.

My code looks like this
SerialPort port = new SerialPort("COM0", 9600, Parity.None, 8, StopBits.One);
port.Open();

I get an IO Exception at the port.Open();

No other application is using this port.
When I go into Google Map GPS works fine.  
 
 
0
Comment
Question by:sonu19
7 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 20855044
should not  it be "COM0:" (with the colon at the end) ? What does exception's text say?
0
 

Author Comment

by:sonu19
ID: 20855710
I tried that same problem here is the error

   at System.IO.Ports.SerialStream.WinIOError(Int32 errorCode, String str)
   at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
   at System.IO.Ports.SerialPort.Open()
   at SmartDeviceProject2.Form1.SendSampleData()
   at SmartDeviceProject2.Form1..ctor()
   at SmartDeviceProject2.Program.Main()
0
 
LVL 17

Expert Comment

by:mokule
ID: 20855952
Are You sure COM0?
Have never seen it.
Maybe COM1 ?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:sonu19
ID: 20856200
I got the port to work
The hardware is on port 8 and I used port 8 and it worked fine
I get this from the GPS data

$GPGGA,040144.21,,,,,00,02,5.0,,M,-0.582109,M,0.00701,*4B??$GPRMC,040144.21,V,,,,,,,090208,,*1A??$GPGSA,A,1,30,31,,,,,,,,,,,05,05,05*1A??$GPGGA,040145.14,,,,,00,03,5.0,,M,-0.582100,M,0.00701,*44??$GPRMC,040145.14,V,,,,,,,090208,,*1D??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040146.23,,,,,00,03,5.0,,M,-0.582100,M,0.00701,*43??$GPRMC,040146.23,V,,,,,,,090208,,*1A??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040147.18,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*4B??$GPRMC,040147.18,V,,,,,,,090208,,*13??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040148.20,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*4F??$GPRMC,040148.20,V,,,,,,,090208,,*17??$GPGSV,3,1,12,31,75,336,29,01,75,058,26,14,48,104,,30,35,050,25*74??$GPGSV,3,2,12,20,25,310,,16,22,013,,05,18,044,,29,16,013,*7B??$GPGSV,3,3,12,06,15,118,,22,13,166,,12,06,038,,23,04,303,*78??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040149.21,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*4F??$GPRMC,040149.21,V,,,,,,,090208,,*17??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040150.22,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*44??$GPRMC,040150.22,V,,,,,,,090208,,*1C??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040151.22,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*45??$GPRMC,040151.22,V,,,,,,,090208,,*1D??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040152.21,,,,,00,00,5.0,,M,-0.509010,M,0.00701,*44??$GPRMC,040152.21,V,,,,,,,090208,,*1D??$GPGSA,A,1,,,,,,,,,,,,,05,05,05*1B??$GPGGA,040153.15,,,,,00,01,5.0,,M,-0.509010,M,0.00701,*43??$GPRMC,040153.15,V,,,,,,,090208,,*1B??$GPGSV,3,1,12,31,75,336,27,01,75,058,,14,48,104,,30,35,050,*79??$GPGSV,3,2,12,20,25,310,,16,22,042,,05,18,044,,29,16,042,*7B??$GPGSV,3,3,12,06,15,118,,22,13,166,,12,06,038,,23,04,303,*78??$GPGSA,A,1,31,,,,,,,,,,,,05,05,05*19??$GPGGA,040154.21,,,,,00,01,5.0,,M,-0.509010,M,0.00701,*43??$GPRMC,040154.21,V,,,,,,,090208,,*1B??$GPGSA,A,1,31,,,,,,,,,,,,05,05,05*19??$GPGGA,040155.18,,,,,00,01,5.0,,M,-0.509010,M,0.00701,*48??$GPRMC,040155.18,V,,,,,,,090208,,*10??$GPGSA,A,1,31,,,,,,,,,,,,05,05,05*19??$GPGGA,040156.14,,,,,00,02,5.0,,M,-0.509010,M,0.00701,*44??$GPRMC,040156.14,V,,,,,,,090208,,*1F??$GPGSA,A,1,06,31,,,,,,,,,,,05,05,05*1F??$GPGGA,040157.16,,,,,00,03,5.0,,M,-0.509014,M,0.00701,*42??$GPRMC,040157.16,V,,,,,,,090208,,*1C??$GPGSA,A,1,06,30,31,,,,,,,,,,05,05,05*1C??$GPGGA,040158.19,,,,,00,03,5.0,,M,-0.509014,M,0.00701,*42??$GPRMC,040158.19,V,,,,,,,090208,,*1C??$GPGSV,3,1,12,31,75,336,27,01,75,058,,14,48,104,,30,35,050,18*70??$GPGSV,3,2,12,20,25,310,,16,22,073,,05,18,044,,29,16,073,*7B??$GPGSV,3,3,12,06,15,118,22,22,13,166,,12,06,038,,23,04,303,*78??$GPGSA,A,1,06,30,31,,,,,,,,,,05,05,05*1C??$GPGGA,040159.21,,,,,00,03,5.0,,M,-0.509014,M,0.00701,*48??$GPRMC,040159.21,V,,,,,,,090208,,*16??$GPGSA,A,1,06,30,31,,,,,,,,,,05,05,05*1C


How do I go about splitting it!
0
 
LVL 17

Expert Comment

by:mokule
ID: 20857016
best way would be to use Regex I thinkt
using System.Text.RegularExpressions;

0
 
LVL 22

Expert Comment

by:JimBrandley
ID: 20858978
Do you have any info from the manufacturer on how the data is encoded?

Jim
0
 
LVL 8

Accepted Solution

by:
Meff earned 1500 total points
ID: 20860673
The output is a NEMEA string. It is explained here.
http://aprs.gids.nl/nmea/
BTW if you use an AarLogic C05/3 with it Python interpreter, then you can same the Windows part. You wil get GPRS + GPS + Coding engine in one piece of hardware.
http://www.roundsolutions.com/aarlogic/index.htm
Last not least a binary file that supports www.track4free.com you will find here:
http://www.roundsolutions.com/techdocs/
Track4free is a free of charge test server and supports Google Maps.
Regards
Meff
www.gsm-modem.de
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
MS Outlook undoubtedly is the most widely used email client.Its user-friendliness, cost effectiveness, and availability with Microsoft Office Suite make it the most popular email application.  Its compatibility with Microsoft applications like Exch…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question