cfsetispeed broken??

cfsetispeed broken??

Post by Bruce Edg » Thu, 13 May 1999 04:00:00



Couple of questions, btw, this works fine on other unix's

1) Why do cfsetispeed/cfsetospeed not set the appropriate fields in
the termios struct?

2) Why doesn't tcgetattr fill out the baud rate fields?

Thanks, Bruce.

  // These lines do not set Termios_p.c_ispeed/c_ospeed !!!
  cfsetispeed( &Termios_p, B9600 );
  cfsetospeed( &Termios_p, B9600 );

  // These do !!!
  Termios_p.c_ispeed = B9600;
  Termios_p.c_ospeed = B9600;

  if (tcsetattr(fd, TCSAFLUSH, &Termios_p) < 0) {
    return -1;
  }

  /* check to be sure tcsetattr worked -- completely */
  struct termios Tp;
  tcgetattr( fd, &Tp );

        Termios_p.c_i/ospeed elements are not set in Tp ??

  bedge.vcf
< 1K Download
 
 
 

cfsetispeed broken??

Post by Bruce Edg » Thu, 13 May 1999 04:00:00


Never mind, it was ddd displaying incorrect data :-(

-Bruce.


> Couple of questions, btw, this works fine on other unix's

> 1) Why do cfsetispeed/cfsetospeed not set the appropriate fields in
> the termios struct?

> 2) Why doesn't tcgetattr fill out the baud rate fields?

> Thanks, Bruce.

>   // These lines do not set Termios_p.c_ispeed/c_ospeed !!!
>   cfsetispeed( &Termios_p, B9600 );
>   cfsetospeed( &Termios_p, B9600 );

>   // These do !!!
>   Termios_p.c_ispeed = B9600;
>   Termios_p.c_ospeed = B9600;

>   if (tcsetattr(fd, TCSAFLUSH, &Termios_p) < 0) {
>     return -1;
>   }

>   /* check to be sure tcsetattr worked -- completely */
>   struct termios Tp;
>   tcgetattr( fd, &Tp );

>         Termios_p.c_i/ospeed elements are not set in Tp ??

  bedge.vcf
< 1K Download

 
 
 

1. termios.h B14400 cfsetispeed( )

I would like to set the baud rate of a native serial port to 14.4 K from
within a 'C' program using the cfsetispeed( ) subroutine.  I have found that
on AIX 4.3.2 and Redhat Linux 7.1 (i386) a constant 'B14400' is not
available in the 'termios.h' header.  Does this mean that the port can not
be set at 14.4K this way ?

Thanks,
Curt

2. lxrun

3. Make broken, top broken, flock errors, kernel modules broken

4. Unix I/O question.

5. 2.5: ieee1394 still broken, vesafb still broken, ipv6 still broken

6. looking a utility to chdir without typing full path

7. HELP! Linux broke WinNT and fdisk broke Linux!

8. please help a newbie

9. PPPoE and IP MASQ: ftp is great, HTTP is broken, NNTP is broken

10. FYI: [2.5 patch] let broken drivers depend on BROKEN

11. RH6.2: broken Imake?, broken Open Motif?

12. 3c59x broken in (vortex) driver broken in higher 2.0.x?

13. TCB broken on SCO - authck broken too