Flow control settings for RS232 modems

Carlo Lobrano c.lobrano at gmail.com
Mon Mar 27 13:52:22 UTC 2017


Hi Aleksander,

I've got some problems configuring MM for this test. This is the message I
got just after applying the patch:

ModemManager[28005]: <debug> [1490621030.009049] [mm-base-manager.c:263]
device_added(): (tty/ttyS0): adding device at sysfs path:
/sys/devices/pnp0/00:05/tty/ttyS0
ModemManager[28005]: <debug> [1490621030.009100]
[kerneldevice/mm-kernel-device-udev.c:474] kernel_device_is_candidate():
(tty/ttyS0): port's parent platform driver is not whitelisted

I saw the other email about udev rule to whitelist the serial device, but
it seems I could not get it right.

This is the udevadm info about the serial that responds to AT commands

$ udevadm info --attribute-walk /sys/class/tty/ttyS0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pnp0/00:05/tty/ttyS0':
    KERNEL=="ttyS0"
    SUBSYSTEM=="tty"
    DRIVER==""

  looking at parent device '/devices/pnp0/00:05':
    KERNELS=="00:05"
    SUBSYSTEMS=="pnp"
    DRIVERS=="serial"
    ATTRS{id}=="PNP0501"

  looking at parent device '/devices/pnp0':
    KERNELS=="pnp0"
    SUBSYSTEMS==""
    DRIVERS==""

I tried adding the line

    DRIVERS=="serial", ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"

to 77-mm-platform-serial-whitelist.rules and reloading the rules, but it
doesn't seem the correct way to do it.

What am I doing wrong?

On Sat, 25 Mar 2017 at 19:32 Aleksander Morgado <aleksander at aleksander.es>
wrote:

> Hey Dan, Daniele, Carlo & everyone,
>
> This series of patches tries to implement proper flow control settings on
> the serial port, and is based on letting MM detect which are the supported
> modes with AT+IFC=?. This makes it unnecessary to subclass the flow control
> setting in plugins for modems that don't support XON/XOFF (what was being
> used as default), like the Telit plugin.
>
> The new logic will:
>   * Always open the serial ports without any flow control enabled.
>   * Query the modem which flow control methods are supported, with
> AT+IFC=?.
>   * If supported, prefer RTS/CTS over XON/XOFF, and notify the modem via
> AT+IFC=x,x our selection.
>   * When the port gets connected after an ATD call, reconfigure the TTY
> with the flow control attributes corresponding to the method we selected
> via AT+IFC.
>   * pppd may be run without any of the explicit options regarding flow
> control, which means that whatever was configured in the TTY is used.
>   * On port disconnection, we clear the flow control attributes of the TTY
> explicitly, although this is really not totally needed as we fully close
> and re-open the port (and during the re-open the port is opened without
> flow control enabled).
>
> I prepared this logic for the Telit LE866-SV1, although it really is
> generic for every RS232 modem out there.
>
> What do you guys think?
>
> [PATCH 1/8] helpers: new parser for AT+IFC=?
> [PATCH 2/8] broadband-modem: query supported flow control modes
> [PATCH 3/8] wavecom: ignore custom flow control handling
> [PATCH 4/8] telit: ignore custom flow control handling
> [PATCH 5/8] port-serial: new internal method to run tcsetattr()
> [PATCH 6/8] port-serial: new method to explicitly set flow control
> [PATCH 7/8] port-serial: remove all default flow control settings
> [PATCH 8/8] broadband-bearer: once connected, set flow control
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170327/75aefc2f/attachment.html>


More information about the ModemManager-devel mailing list