ts-7000
[Top] [All Lists]

[ts-7000] TS-7260 :How to configure ttyTS0 in B19200, 8 bit, no pairty,

To:
Subject: [ts-7000] TS-7260 :How to configure ttyTS0 in B19200, 8 bit, no pairty, 2 stop ?
From: "fabianhiernaux" <>
Date: Wed, 09 Feb 2011 15:32:10 -0000
Hi everybody,

I'd like to configure the ttyTS0 (COM3 on my TS7260) but when I run my soft 
during serial port openning I receved the error :

tsuart:unsupported stop bits, using 1
tsuart:unsupported byte size, using CS8
tsuart:unsupported stop bits, using 1


Sure there is a problem in my config with cflag but where and what?

Could you help me ?


Here under my open serial function :

#define DEVICE "/dev/ttyTS0"

int OpenSerialPort()
{
    int dawf;

      fd = open(DEVICE, O_RDWR | O_NOCTTY | O_NDELAY ); //O_RDWR | O_NOCTTY | 
O_NONBLOCK);


      if (fd < 0)
      {
         perror(DEVICE);
         return -1;
      }



    tcgetattr(fd,&oldtio);

    bzero(&settings, sizeof(settings)); // new tio


   settings.c_line = 0;

   settings.c_lflag &= ~(ISIG|ICANON|ECHO|ECHOE|ECHOK|ECHOKE|ECHOCTL|IEXTEN);

   settings.c_iflag &= ~(INLCR|IGNCR|ICRNL|IUCLC|IXON|IXOFF|IMAXBEL|PARMRK);
   settings.c_iflag |= IGNBRK;
   settings.c_iflag |= IGNPAR;

   settings.c_oflag &= ~(OLCUC|ONLCR|OCRNL|ONLRET|OFILL|OFDEL|OPOST);
   
   settings.c_cflag= B19200 | CLOCAL | CREAD | CSTOPB;


    settings.c_cc[VMIN] = 0;
    settings.c_cc[VTIME] = 0;


    tcflush(fd, TCIFLUSH);
    if ((dawf=tcsetattr(fd,TCSANOW,&settings))<0){
        printf("err new config");
        fflush(stdout);
        return -1;
    }
    disable_binary();

    return fd; 

}



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<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