Bug 100394 - RS232: implement flow control settings
Summary: RS232: implement flow control settings
Status: RESOLVED FIXED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: general (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-25 18:01 UTC by Aleksander Morgado
Modified: 2017-05-17 09:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Aleksander Morgado 2017-03-25 18:01:22 UTC
We were by default requesting XON/XOFF flow control as soon as the serial port was being opened, and then setting AT+IFC=1,1 (XON/XOFF) during modem initialization.

But, XON/XOFF isn't supported by all devices, especially since it isn't the best flow control method out there (using out-of-band signaling like with RTS/CTS would be much better).

Also, these flow control settings only apply really during the data connection, they don't have any sense for the TTY in control mode (i.e. when doing AT commands).

A suggestion would be to:
 * Open the serial port without any flow control enabled.
 * Query the device which are the supported flow control settings and use the best one from them: RTS/CTS, otherwise XON/XOFF, otherwise none.
 * When the port is connected, apply the same flow control settings in the TTY via tcsetattr().
 * When the port is disconnected and again in command mode, reset flow control settings back to none (although this step isn't totally required, as the TTY is completely closed and reopened, and during reopen we would start fresh without flow control settings).
Comment 1 Aleksander Morgado 2017-03-25 18:36:45 UTC
Discussed here: https://lists.freedesktop.org/archives/modemmanager-devel/2017-March/004283.html
Comment 2 Aleksander Morgado 2017-05-17 09:14:14 UTC
This was merged to git master some weeks ago.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.