ts-7000
[Top] [All Lists]

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

To:
Subject: [ts-7000] Re: TS-7260 :How to configure ttyTS0 in B19200, 8 bit, no pairty, 2 stop ?
From: "fabianhiernaux" <>
Date: Thu, 10 Feb 2011 09:27:47 -0000
In fact it seems taht the ttyTS0 (COM3) don't support the 2 stop bit 
configuration.

in the tsuart0.c source 
(http://oz.embeddedarm.com/~michael/support/files/tsuart0.c)I can see :

   if (cflag&  CSTOPB) {
     printk("tsuart:unsupported stop bits, using 1\n");
   }


so this config will never work with this port...  :-(


This port is not connected to the cirrus processor but made by TS (into the 
xylinks?)


I'll use the ttyAM1 in place... but I'm not really happy...


--- In  Jim Jackson <> wrote:
>
> 
> 
> 
> On Wed, 9 Feb 2011, fabianhiernaux wrote:
> 
> > 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
> > 
> 
> You may want to simplify things by using the
> 
>  cfmakeraw, cfsetispeed  and cfsetospeed
> 
> macros, instead of trying to get all the individual bits right.
> There are man pages for them.
> 
> I cannot see you setting CS8 for 8 data bits, and check the manual page for 
> tcsetattr, you are SETTING 2 stop bits by ORing in CSTOPB - you need to 
> clear it. 
> 
> > 
> > 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