I have a FEZ spider (using framework 4.2) and a extender connected on socket 11, on the extender I have connected a GPS module (TX cable to pin 5 and RX cable to pin 4 on the extender). I use the GPS extension code from the codeshare: http://www.tinyclr.com/codeshare/entry/25
My serial connection code is (4800 baud is from the datasheet of the GPS module and works just fine with windows test application):
_port = new SerialPort("COM1", 4800, Parity.None, 8, StopBits.One);
But I do not receive any data from the GPS module and the gpstime stays on the minimum date.
Will not work. That is to convert from serial to usb. Not usb to serial. There is no way that I know of to connect a USB device to a serial port.
You can look at using a USB Host module with the Spider, and plugging in the GPS into that. But I don’t know what driver the GPS uses, and I don’t know if the Spider will be able to talk to the USB device.
Well well well, 3 holes in the ground - i forgot i have the same module, found it and opened it up.
It appears to be an EM406 (see pic below)
Soooo that means the module is TTL and the cable will have an FTDI or similar to do the USB fluff.
So therefore you will be able to hook it up to the Spider by doing a wee bit of a snip and rewire.
I happily use a EM406 on my Cobra (the module on the right) just make sure you use both grounds.
Ok, so it is a serial GPS then, not USB. Quick question. You cut the cable. If you plug just the bit with the usb plug into the PC, do you still hear the “new device connected” sound?
To your problem. Is the module connected to COM1?
You can use this code to get the real serial object, where MySocket is the socket number where you connected your externder module:
Gadgeteer.Interfaces.Serial a= new GT.Interfaces.Serial(Gadgeteer.Socket.GetSocket(MySocket, true, null,"U"),4800, GT.Interfaces.Serial.SerialParity.None, GT.Interfaces.Serial.SerialStopBits.One,8, GT.Interfaces.Serial.HardwareFlowControl.NotRequired,null);
I am using the adafruit GPS mtk339 module on an extender. here is a pic of the setup. TX from the GPS goes to P5 on the Extender and RX on the GPS goes to P4.
i cheated as the adafruit GPS is 9600 and used the Seeed module in the program.gadgeteer designer and connected it to socket 9 on my spider and it works really well.
To make sure i was getting at least some data i just did this