LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2009, 07:11 AM   #1
kennyha85
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
Question C code to read GPS via USB port


Hi gus,
I got a USB-GPS receiver ( Haicom 204E), but I don't have its driver in linux. I wanna to write a C program to read data from this GPS receiver via USB port (dev/ttyUSB0), but I don't know how to do it. I'm newbie in linux
this is some parameters of my GPS receiver:
- output port: USB port
- baud rate: 4800 8N1
- data type: NMEA108
thanks in advance.
 
Old 10-29-2009, 11:15 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,813

Rep: Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229Reputation: 8229
Quote:
Originally Posted by kennyha85 View Post
Hi gus,
I got a USB-GPS receiver ( Haicom 204E), but I don't have its driver in linux. I wanna to write a C program to read data from this GPS receiver via USB port (dev/ttyUSB0), but I don't know how to do it. I'm newbie in linux
this is some parameters of my GPS receiver:
- output port: USB port
- baud rate: 4800 8N1
- data type: NMEA108
thanks in advance.
Don't need a drive for it...it shows up as a serial device, with the communications parameters you noted (4800,8,N,1). It should show up as /dev/ttyUSB0, or the like.

Just write your C program to read serial data from that device.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need software to read Data from HOLUX GM-210 GPS receiver for Ubuntu 8.10 srinivasmiriyalu Linux - Software 7 06-18-2009 08:46 AM
Reading NMEA from GPS and output it in the USB port OlaJi Linux - Hardware 1 05-21-2009 06:56 AM
USB, how to R/W to port, sample C code? bapigoo9 Linux - Newbie 6 11-25-2008 08:01 AM
serial to USB, trying to read from /dev/ttyUSB0 in C code newguy21 Programming 1 09-29-2004 01:11 PM
GPS via serial port MeLassen Linux - Hardware 3 08-19-2004 11:07 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration