UART RTS/CTS control problem

I have got UART on IoT card. Data transmission (Rx/Tx) works perfectly. However I have got problem with controlling RTS/CTS lines.

MangOH green:
Line RTS looks fine. When I change RTS on MangOH, CTS changes on connected device. BUT.
When I change RTS on connected device, CTS on MangOH does not react (It is always set).
Unable to control RTS/CTS.

Why FX30 and MangOH behave differently? Why CTS flag is always set?

Serial Port Setup:
//if ((FD = open(“/dev/ttyHS0”, O_RDWR)) == -1) return 0; //MangOH green
if ((FD = open(“/dev/ttyHSL1”, O_RDWR)) == -1) return 0; //FX30
struct termios attr;
//tcgetattr(FD, &oldterminfo)
memset(&attr,0, sizeof(attr));
attr.c_cflag &= ~PARENB;
attr.c_cflag |= CLOCAL;
attr.c_cflag |= CREAD;
attr.c_cflag &= ~CSTOPB;
attr.c_cflag &= ~CSIZE;
attr.c_cflag |= CS8;
attr.c_cflag &= ~CRTSCTS;
attr.c_iflag &= ~(IXON | IXOFF | IXANY);
attr.c_iflag &= ~(ICANON | ECHO | ECHOE | ISIG);
attr.c_cc[VMIN] = 0;
attr.c_cc[VTIME] = 0;
if (tcsetattr(FD, TCSANOW, &attr) == -1)
return 0;


int status;

if (ioctl(FD, TIOCMGET, &status) == -1)
	LE_DEBUG("ERROR: %s", strerror(errno));

if(status & TIOCM_CTS)

if (level)
    status |= TIOCM_RTS;
	status &= ~TIOCM_RTS;
if (ioctl(FD, TIOCMSET, &status) == -1) 
	LE_DEBUG("ERROR: %s", strerror(errno));
    return 0;


Can you please explain how do you do to change RTS/CTS ? are you sure that RTS/CTS is activated ( stty –F /dev/ttyHS0 –a ) ?

You can activate hardware flow control by AT commands “AT&K3” and save it by “AT&W” OR “Stty –F /dev/ttyHS0 crtscts” .


I have disabled CRTSCTS intentionally (please look at my code attr.c_cflag &= ~CRTSCTS;). I don’t want hardware control, I want software control. FX30 and mangOH green are unable to read CTS status. I can set up RTS line on mangOH green but I cannot do it on FX30. Please look at source code in my post.

My post

I use WP8548 on mangOH green. Legato 16.10.3.wp85-wp75-native-x86_64-201705311410

Legato on FX30S - 16.10.1.fx30_wp85-pdk-x86_64-201706301655

FX30S has got:





Where can I find documentation for these?

Is it possible, I cannot control RTS/CTS on FX30S because of wrong rs_mode setting?

(mangOH green does not have /sys/devices/platform/msm_serial_hs.0/rs_mode )

It is continued on mangOH forum

I close this topic as it is handled on Mangoh forum,
best regards,

instead of closng this topic, put it into solved for legato forum