Active Topics

 


Reply
Thread Tools
Posts: 384 | Thanked: 90 times | Joined on Mar 2008
#1
Hey guys, I'm trying to get a 4800 baud NMEA sentence stream out of a serial port connected to the N810. Thanks to fanoush, connecting a USB to Serial adapter to the N810 was easy. I've been using screen to connect to serial devices via a USB to Serial adapter just fine.

Now I'd like your recomendations on how to push NMEA sentences through the serial port at 4800 baud.


I asked someone who was very knowledgeable on this topic and here is what he had to say:

navicore-gpsd-helper seems to emit NMEA on stdout if you start it on
the command line. But it's proprietary. gpsd emits "raw" NMEA (the same as it reads from /dev/pgps, probably the same as emitted by navicore-gpsd-helper) if you connect to
localhost:gpsd and issue an "r" command. gpsd is open-source. That's probably the best

route; you'd have to open a socket to talk to gpsd, open a TTY via the
USB, and copy sentences across. Or it may be easier to synthesize the
sentences you need from gpsd data; I recall one of my old autopilots
didn't recognize my newer GPS because it needed APA not RLL or whatever.

You also need to power on the GPS chip and keep gpsd running; the
Maemo example I was tinkering with does that.
I'm not sure how to implement this.
Can someone give me <nearly?> exact commands I need to input to achieve this? I know nothing about navicore, gpsd and their inner workings.

Last edited by st5150; 2008-05-26 at 20:05.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#2
When gpsd is up (Not sure the best way to keep it up, other than doing a proper program; I've been using the Location Control Panel applet as a temporary sol'n.), I think gpspipe should do what you want... the man page suggests -s and -r. (gpspipe does the "open a socket to talk to gpsd" bit fine for me; "open a TTY via the USB" is -s, and "copy sentences across" is -r; should work, but I haven't had occasion to try.)

I'm attaching a partial build of gpsd-clients; it includes gpspipe, which I needed for different reasons. Unzip all the files, put them in /usr/bin, and make sure they're executable...

HTH
Attached Files
File Type: zip gpsd-clients.zip (54.9 KB, 652 views)
 

The Following 3 Users Say Thank You to Benson For This Useful Post:
Posts: 384 | Thanked: 90 times | Joined on Mar 2008
#3
Thank you thank you thank you! gpspipe -rs /dev/ttyUSB0 works like a dream!

A ftdi USB to Serial converter I was using seemed to be crashing the N810 after a few minutes of use, but a pl2303 one seems to be stable so far.

I can post an outputting 4800 baud serial GPS NMEA stenences for dummies instruction guide if anyone is interested.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#4
BTW, that gpsd-clients stuff will be coming out in .deb form soon; might wanna wait for that, if you do post a dummies guide.

(I'm currently getting input from more experienced devs; I'll probably package it tomorrow.)

At that time, I'll also drop a version of the python script I linked above that actually works. I find it impressively cool, and hope that others may find it at least amusing, if not useful.
 
Posts: 384 | Thanked: 90 times | Joined on Mar 2008
#5
Sounds good. My ftdi USB to Serial converter choked again, but this time it didn't hang the system. I'll try to do some testing tomorrow with a USB power injector to see if the problem is voltage/hardware related or software related.
 
Posts: 43 | Thanked: 33 times | Joined on Dec 2008
#6
Hey long time the last post was puplished here.
So I thought I'll ask for the "dummies guide" and maybe benson has created his gpsd-clients stuff in .deb form ?
 
Posts: 384 | Thanked: 90 times | Joined on Mar 2008
#7
I'm quite busy these days. I'll write up a more detailed guide later if you'd like. I'm going to assume you're somewhat familiar with linux. Post up a link to the gpsd-clients deb if you find it.


1) Download gpsd-clients.zip , linked above to your NIT. Put gpspipe in /usr/bin/ As root, run chmod 777 /usr/bin/gpspipe

2) Download and extract these USB to serial kernel modules to your NIT: http://www.internettablettalk.com/fo...12&postcount=5 the modules in the next step are contained in this tar.gz

3) I assume you've already connected a USB to serial converter to your NIT using the proper adapters.

Depending on the chipset of your USB to serial adapter, you want to run:

insmod /path/to/mods/drivers/usb/serial/usbserial.ko
insmod /path/to/mods/drivers/usb/serial/pl2303.ko
gpspipe -rs /dev/ttyUSB0

or

insmod /path/to/mods/drivers/usb/serial/usbserial.ko
insmod /path/to/mods/drivers/usb/serial/ftdi_sio.ko
gpspipe -rs /dev/ttyUSB0


I found the pl2303 chipset to be more stable. Post your own findings.

This will give you 4800 baud NMEA sentences output via the serial port connected to your NIT. Now you can connect your N810 to your laptop for navigation via Microsoft Maps and Streets or any other GPS application you'd like.



Since we now have serial port access on the NIT, I found it helpful to use it for console access to various devices. If you don't have screen already, run apt-get install screen Once you have screen installed you can connect to devices via the serial port by running screen /dev/ttyUSB0 -FTCYPKJ5 9600,cs8,-ixon,-ixon,-istrip (change the 9600 to whatever baud rate the device you're talking to requires).

Last edited by st5150; 2009-04-08 at 08:30.
 
Posts: 43 | Thanked: 33 times | Joined on Dec 2008
#8
thanks for your fast answer. It's no problem if you can not answer fast when you are busy ^^
I'm not very familiar with linux except some commandline commands :>

May it be possible to emulate a gps device for ms autoroute 2007 via usb?
I looked on amazon and it says the gps there is connected through a usb-link.
 
Posts: 34 | Thanked: 2 times | Joined on Mar 2009
#9
do you know where is a good place to learn linux? anyone?
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#10
Linux for Dummies pay no attention to the title, it is a very good start on the Linux environment.
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:36.