I have a IVI app which controls a serial based instrument. When I RW directly from my COM port, no problem reading the CRLF sequences. However, when I put a Ethernet to serial box in between and confiure MAX to use a TCPIP socket instead of a COM port, all CRLF sequences get tranlated into CR\NULL's.
What this means is that my string functions fail (ie:strstr()), as they only look as far as the 1st NULL. The read itself indicates that the buffer is much larger, and indeed the data is there, just embedded with NULLs.
As a workaround, I replaced every NULL within the buffer[len] - len being returned by the read() - with spaces, and all is well again.
Is there a configuration I should use instead to stop the translation by
sockets?
rjmiller