Serial port parameters in linux?

Hello, I’m new to Linux programming and just starting to prog serials on it.

I have a Digi XSTICK usb dongle (zigBee) recognized by Linux Debian as a USB serial.
I can communicate with the dongle under windows, both from X-CTU and my c code. But I still can’t talk to it under linux :frowning:

What parameters are needed for Unix serial config?
I’m using:

c_cflag = B9600 | CRTSCTS | CS8 | CLOCAL | CREAD;
c_iflag = IGNPAR;
c_oflag = 0;
c_lflag = ICANON;

c_cc[VEOF] = 4;
c_cc[VMIN] = 1;
/* any other c_cc zeroed */

(edit) I configured the XStick with X-CTU under win to 9600 - 8N1 - no flowcontrol - AT command mode.

I discovered that is needed the NON-canonical mode. Good.
But all I can get from the XStick is the “OK” response to the +++ string [:(] every other command is not answered to… why???


There are several options that “destroy” the desired line endings: ONLRET, ONLCR and OCRNL.
If the XStick expects a CR or NL as “end of command”, this can cause a problem.

F. Kerkhoff