---
  int modem_ctl_mask = TIOCM_DTR;
  int modem_ctl_state = 0;
  /* Open */
  serialPort_fd = open( "/dev/tty00", O_RDWR | O_SYNC, 0666 );
  if ( serialPort_fd == -1  )
     exit( -1 );
  /* Init (set DTR high) */
  if ( ioctl( serialPort_fd, TIOCMSET, &modem_ctl_mask) == -1 )
  {
     perror( "ioctl" );
     exit( -1 );
  }
  /* Read */
  while ( ioctl(serialPort_fd, TIOCMGET, &modem_ctl_state) != -1 )
  {
    printf("data terminal ready %d\n", (modem_ctl_state & TIOCM_DTR) ? 1 : 0);
    printf("carrier detect      %d\n", (modem_ctl_state & TIOCM_CD) ? 1 : 0);
    printf("data set ready      %d\n", (modem_ctl_state & TIOCM_DSR) ? 1 : 0);
    printf("clear to send       %d\n", (modem_ctl_state & TIOCM_CTS) ? 1 : 0);
    printf("ring                %d\n", (modem_ctl_state & TIOCM_RI) ? 1 : 0);
  }
---
Response from DEC tech support has been painfully slow (over a week and
counting).  Any ideas how I can detect when ring indicator is high?  (This
is definitely not a hardware problem.)  Any tips would be appreciated...
TIA
Vardhan
Received on Fri Feb 09 1996 - 01:11:04 NZDT
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT