Further info below
-thanks
Brent
“David Gibbs” <dagibbs@qnx.com> wrote in message
news:d8n39b$152$1@inn.qnx.com…
The two most likely candidates:
- does one path leave the GPS on the other end in a bad state?
Part of the initialization is to reset the GPS which should work no matter
what state it is in.
This works on a windows sample program. As mentioned below I have hooked it
up
to another machine and the qnx box won’t transmit the correct signal. When
its working
it transmits 11 bytes starting with 0x01, as the init command, and I see
that on another terminal. If I then get it into
a “broken” mode and hook it up to another machine and run the program that
tries to send
the initialization command, and it only sends 1 byte 0x11 (there is no
relevance that I can see to the byte 0x11),
and of course gets stuck waiting for a response to the initialization
command.
- does one path leaving terminal/port settings wrong, that don’t
get properly reset/cleared/established again?
Here is roughly my serial port opening sequence (minus error checking):
//open serial port
sd = open(serPort,O_RDWR/| O_NOCTTY/);
//get serial port attributes
returnValue = tcgetattr(sd, &serial_param);
//change the output speed of the serial port
returnValue = cfsetospeed(&serial_param, BAUD_RATE);
//set the input speed of the serial port
returnValue = cfsetispeed(&serial_param, BAUD_RATE);
//set flags
serial_param.c_cflag |= CS8; //8 bits
serial_param.c_cflag &= ~CSTOPB; //1 stop bit (not 2)
serial_param.c_cflag &= ~PARENB; //no parity checking
//set the newly changed speeds of the serial port
returnValue = tcsetattr(sd,TCSANOW,&serial_param);
returnValue = tcflush(sd,TCIOFLUSH);
return 0;
Is there anything else I can reset on the serial port. In all cases, I call
close(sd)
before I exit, unless of course I send a SIGKILL, but that never seems to
cause problems.