ts-7000
[Top] [All Lists]

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

To:
Subject: Re: [ts-7000] Com2 Problem TS-7250
From: Craig and Janet Gates <>
Date: Mon, 05 Feb 2007 18:26:13 -0800
did you disable getty on the port?

check /etc/inittab.


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
}


__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<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