Netduino home hardware projects downloads community

Jump to content

The Netduino forums have been replaced by new forums at This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Yet another supported shield question (GPS)

  • Please log in to reply
22 replies to this topic

#21 nhale


    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 27 May 2012 - 08:49 PM

for me as a programmer a strange problem, but today I tried everything with a 9V block battery and now the LED on the GPS receiver is blinking...even inside - but as soon as I plugin the USB cable or only try it using the USB cable no fix is being found...
If it really expects about 9V I would expects some kind of error and not the invalid NMEA results.



I build the Adafruit Kit with the EM-406A based on this tutorial by Bob Cravens.
Then just ran the code from above (post #5).
But even after walking around about 30 minutes outside with blue sky and no clouds, I still not get a fix.
Does anyone has an idea what the problem could be or how I can debug the possible problem (I'm a programmer not electrician)

Powering on and off the GPS module works fine when switching Pins.GPIO_PIN_D2 from 'false' to 'true' and back. The LED on the GPS receiver gets red(on) or is off(off). I read in other posts, that it will start blinking as soon as it got a fix...but never saw that ;-(

Connection is TX ==> D0; RX ==> D1; PWR ==> D2

As sample output with the program above looks like this.
According to the this reference NMEA sentence info I interpreted my output like this:

  • No fix available ($GPRMC,000117.056,V,...)
  • and no satellites found ($GPGSA,A,1,...)

$PSRFTXT,Version:GSW3.5.0_3.5.00.00-SDK-3EP2.01 *46
$PSRFTXT,WK:   1519*69
$PSRFTXT,POS:  6378137 0 0*2A
$PSRFTXT,CLK:  96250*25
$PSRFTXT,Baud rate: 4800*65





and so on.....

#22 zee


    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 11 March 2013 - 03:04 AM


Here's some very rough test code I put together to make sure we were getting data from the GPS receiver. You might want to put this in an event handler-based class which parsed the data out and raised events whenever a new location was received.

But this will show you your GPS data stream Posted Image I've put a 100ms delay in between each iteration of the loop so that we're not getting and printing one byte of data at a time.

I plugged TX, RX, and PWR into pins D0, D1, and D2. This corresponds to serial port 1 (COM1) and a "powerpin" of D2.

using System;using System.IO.Ports;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;namespace GpsLogger{    public class Program    {        public static void Main()        {            // write your code here            SerialPort serialPort = new SerialPort("COM1", 4800, Parity.None, 8, StopBits.One);            serialPort.Open();            // pin D2 off = gps module turned on            OutputPort powerPin = new OutputPort(Pins.GPIO_PIN_D2, false);            while (true)            {                int bytesToRead = serialPort.BytesToRead;                if (bytesToRead > 0)                {                    // get the waiting data                    byte[] buffer = new byte[bytesToRead];                    serialPort.Read(buffer, 0, buffer.Length);                    // print out our received data                    Debug.Print(new String(System.Text.Encoding.UTF8.GetChars(buffer)));                }                Thread.Sleep(100); // wait a bit so we get a few bytes at a time...            }        }    }}


Hi Chris,


May i know what will be the output like?

There's no error but im just wondering how will the output like?

Sorry for my noob question. Im soooo new to this sensor device.. :)

#23 r1ch4rd


    New Member

  • Members
  • Pip
  • 7 posts
  • LocationIpswich, UK

Posted 05 November 2013 - 07:43 PM

HI Guys,


Has anyone had any luck with Netduino Plus 2, Sparkfun GPS Shield (https://www.sparkfun.../products/10710) & EM-406? 

I am a newbie so its probably something I am (or more likely not) doing.


I tried the sample code:

using System;using System.IO.Ports;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;namespace GpsLogger{public class Program{public static void Main(){// write your code hereSerialPort serialPort = new SerialPort("COM1", 4800, Parity.None, 8, StopBits.One);serialPort.Open();// pin D2 off = gps module turned onOutputPort powerPin = new OutputPort(Pins.GPIO_PIN_D2, false);while (true){int bytesToRead = serialPort.BytesToRead;if (bytesToRead > 0){// get the waiting databyte[] buffer = new byte[bytesToRead];serialPort.Read(buffer, 0, buffer.Length);// print out our received dataDebug.Print(new String(System.Text.Encoding.UTF8.GetChars(buffer)));}Thread.Sleep(100); // wait a bit so we get a few bytes at a time...}}}}

which deploys fine and the led flashes on the GPS module but I don't receive any form of result in the VS output window?

I know its not hardware as a friend tested in on his Arduino and it worked ok.


Any pointers would be very muchly appreciated!

Fantastic forum btw :mellow:


Thanks in advance,


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.