I am tring to speak to a modem attached as tty via AT commands. i wrote a tool to issue the commands. The tool works with any modem tty, just the one I need replys the correct number of char but nearly all of them are 0xFF which is obviously not correct.
example OK -> 0xFFFF
Anyone met such behaviour before?
Talking to the tty with Minicom does work for some reason, repsonse is normal. Minicom uses same baud, parity, flowcontrol, no init string.
term.c_cc[VMIN] = 0;
term.c_cc[VTIME] = 5;
term.c_cc[VEOL] = '\r';
term.c_iflag = (term.c_iflag & 0xFFFFF0CD) | 5;
term.c_oflag = term.c_oflag & 0xFFFFFFFE;
term.c_cflag = (term.c_cflag & 0xFFFC6CFF) | 0x3CB00;
term.c_lflag = term.c_lflag & 0xFFFFFA77;
term.c_cflag = (term.c_cflag & ~CSIZE) | CS8;
term.c_cflag &= ~PARENB;
term.c_lflag |= ICANON;
term.c_lflag &= ~ECHO;
tcsetattr(fd, TCSANOW, &term);