ts-7000
[Top] [All Lists]

Re: [ts-7000] Com2 Problem TS-7250

To:
Subject: Re: [ts-7000] Com2 Problem TS-7250
From: Larry <>
Date: Mon, 05 Feb 2007 21:15:16 -0500
Sounds like you have a flow control problem
You're enabling hardware flow control, so the wires must be connected properly
and the GPS must be configured for HW flow control as well.
Check if the 7260 port you're using supports RTS and CTS.

Larry
cspin_2001 wrote:

I am still getting up to speed on the TS-7260. I am trying to read a
GPS data from the serial port. It reads the data from the first
burst coming from the GPS (several messages). I get $GPSRMC and a
few other messages and then it pauses for a while and then just
keeps outputing "buff= ". I would like to read the stream
continuosly. Any idea what is screwed up?

Thanks
Charlie

#include <fcntl.h>
#include <termios.h>
#include <stdio.h>

#define BAUDRATE B9600
#define MODEMDEVICE "/dev/ttyAM1"
#define _POSIX_SOURCE 1 /* POSIX compliant source */

main()
{
int fd;
struct termios oldtio,newtio;
char buf[512];

fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
if (fd <0) {perror(MODEMDEVICE); exit(-1); }
tcgetattr(fd,&oldtio); /* save current serial port settings */
bzero(&newtio, sizeof(newtio)); /* clear struct for new port
settings */
newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
newtio.c_iflag = IGNPAR | ICRNL;
newtio.c_oflag = 0;
newtio.c_lflag = ICANON;
tcflush(fd, TCIFLUSH);
tcsetattr(fd,TCSANOW,&newtio);

while (1)
{
read(fd,buf,512);
printf("buf = %s\n" ,buf);
}

tcsetattr(fd,TCSANOW,&oldtio); // restore the old port settings
}


<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU