C access to GPS ports

I am trying to write a C program to access GPS data and currently it only works intermittently. And won’t work even with minicom once the ports are misconfigured until the module is power down. The failure mode is that the control port (USB2) accepts commands and responds but no output sent to data port (USB1).
The serial ports are set as follows:

// open readonly GPS data return port   
   *fd_data = open(GPSDATA, O_RDONLY | O_NOCTTY );
   if (*fd_data <0) 
      {
      log_error("Open of GPS data failed! RC=%d", *fd_data);
      return -1;
      }
      
   struct termios options_data, options_cntl;
   
   tcgetattr(*fd_data,&options_data);
   
   options_data.c_iflag &= ~(IXON | IXOFF | IXANY | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL);
   options_data.c_iflag |= IGNPAR | ICRNL;
   
   options_data.c_oflag &= (OPOST | ONLCR); 
   
   options_data.c_lflag &= ~(ECHO | ECHOE | ECHONL | ISIG | ICANON);
   
   options_data.c_cflag &= ~(PARENB | CSTOPB | CSIZE);
   options_data.c_cflag |= CS8 | CLOCAL | CREAD | CRTSCTS;
   options_data.c_cc[VEOF]     = 4;     // Ctrl-d  
   options_data.c_cc[VMIN]     = 0; 
   options_data.c_cc[VTIME]    = 5;
   
   cfsetspeed(&options_data, B115200);
    
   tcflush(*fd_data, TCIFLUSH);
   tcsetattr(*fd_data,TCSANOW,&options_data); 
 
// open read/write GPS control port      
/*   *fd_cntl = open(GPSCNTL, O_RDWR | O_NOCTTY ); 
   if (*fd_cntl <0) 
      {
      log_error("Open of GPS control failed! RC=%d", *fd_cntl);
      return -1;
      }
      
   tcgetattr(*fd_data,&options_cntl); 
   options_cntl.c_cflag &= ~(PARENB | CSTOPB | CSIZE );
   options_cntl.c_cflag |= CS8 | CLOCAL | CREAD | CRTSCTS;
   options_cntl.c_iflag &= ~(IXON | IXOFF | IXANY | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL);
   options_cntl.c_iflag |= IGNPAR | ICRNL;
   options_cntl.c_oflag &= (OPOST | ONLCR);  // new
   options_cntl.c_lflag &= ~(ECHO | ECHOE | ECHONL | ISIG | ICANON);
   options_cntl.c_cc[VEOF]     = 4;     // Ctrl-d  
   options_cntl.c_cc[VMIN]     = 0; 
   options_cntl.c_cc[VTIME]    = 10;
   
   cfsetspeed(&options_data, B115200);      

   tcflush(*fd_cntl, TCIFLUSH);
   tcsetattr(*fd_cntl,TCSANOW,&options_cntl); 

full code is at https://github.com/wkeeling63/racecam/blob/main/GPSUtil.c

Let me know if you have any ideas what I have wrong.

Thanks
William