Windows Mobile GPS Application Issue

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.  
 
 
sonu19Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

alexey_gusevCommented:
should not  it be "COM0:" (with the colon at the end) ? What does exception's text say?
0
sonu19Author Commented:
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
mokuleCommented:
Are You sure COM0?
Have never seen it.
Maybe COM1 ?
0
Introducing the "443 Security Simplified" Podcast

This new podcast puts you inside the minds of leading white-hat hackers and security researchers. Hosts Marc Laliberte and Corey Nachreiner turn complex security concepts into easily understood and actionable insights on the latest cyber security headlines and trends.

sonu19Author Commented:
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
mokuleCommented:
best way would be to use Regex I thinkt
using System.Text.RegularExpressions;

0
JimBrandleyCommented:
Do you have any info from the manufacturer on how the data is encoded?

Jim
0
MeffCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Wireless Networking

From novice to tech pro — start learning today.