14.04 - ModemManager configura o modem serial

0

Eu estou trabalhando com o Ubuntu 14.04 LTS, onde eu gostaria de conectar um modem Cinterion através de uma porta serial - ttyS0 neste caso -.

O modem funciona corretamente quando o seguinte comando é emitido:

pppd call OPERATOR

Obtendo alguns rastros em / var / log / syslog semelhantes a estes:

NetworkManager[911]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
NetworkManager[911]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
NetworkManager[911]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...

Depois de seguir este link AskUbuntu eu adicionei uma regra para o udev, para permitir que o ttyS0 seja ativado como um "dispositivo de rede serial":

SUBSYSTEM=="pnp", ACTION=="add", KERNEL=="00:08", ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"

Devido a esses resultados:

# udevadm info /dev/ttyS0
P: /devices/pnp0/00:08/tty/ttyS0
N: ttyS0
E: DEVNAME=/dev/ttyS0
E: DEVPATH=/devices/pnp0/00:08/tty/ttyS0
E: ID_MM_CANDIDATE=1
E: MAJOR=4
E: MINOR=64
E: SUBSYSTEM=tty
E: USEC_INITIALIZED=87154

# udevadm info /sys/devices/pnp0/00\:08
P: /devices/pnp0/00:08
E: DEVPATH=/devices/pnp0/00:08
E: DRIVER=serial
E: ID_MM_PLATFORM_DRIVER_PROBE=1
E: SUBSYSTEM=pnp
E: USEC_INITIALIZED=87046

Além disso, como eu queria testar a saída de depuração do ModemManager, parei o serviço de gerenciamento de rede. Então, na saída eu obtive traços como estes:

    #ModemManager --debug    
    [...]
    ModemManager[3170]: <debug> [1473157920.412477] [mm-device.c:298] mm_device_grab_port(): (/sys/devices/pnp0/00:08) could not get vendor/product ID

    ModemManager[3170]: <debug> [1473157920.412643] [mm-plugin-manager.c:576] build_plugins_list(): (Plugin Manager) [ttyS0] Found '5' plugins to try...

    ModemManager[3170]: <debug> [1473157920.412662] [mm-plugin-manager.c:580] build_plugins_list(): (Plugin Manager) [ttyS0]   Will try with plugin 'Cinterion'

    ModemManager[3170]: <debug> [1473157929.569356] [mm-port-probe-at.c:43] mm_port_probe_response_processor_is_at(): Parsing AT got: 'Serial command timed out'
    ModemManager[3170]: <debug> [1473157929.569369] [mm-port-probe.c:161] mm_port_probe_set_result_at(): (tty/ttyS0) port is not AT-capable

    [...]
    ModemManager[3170]: <debug> [1473157935.569494] [mm-plugin-manager.c:417] plugin_supports_port_ready(): (Plugin Manager) (Generic) [ttyS0] found best plugin for port
    ModemManager[3170]: <debug> [1473157935.569507] [mm-plugin-manager.c:285] port_probe_context_finished(): (Plugin Manager) 'ttyS0' port probe finished, last one in device
    ModemManager[3170]: <debug> [1473157935.569514] [mm-plugin-manager.c:107] find_device_support_context_complete_and_free(): (Plugin Manager) [/sys/devices/pnp0/00:08] device support check finished in '15.157042' seconds
    ModemManager[3170]: <info>  [1473157935.569638] [mm-device.c:486] mm_device_create_modem(): Creating modem with plugin 'Generic' and '1' ports
    ModemManager[3170]: <warn>  [1473157935.569779] [mm-plugin.c:900] mm_plugin_create_modem(): Could not grab port (tty/ttyS0): 'Cannot add port 'tty/ttyS0', unhandled serial type'
    ModemManager[3170]: <debug> [1473157935.569805] [mm-base-modem.c:1556] finalize(): Modem (Generic) '/sys/devices/pnp0/00:08' completely disposed
    ModemManager[3170]: <warn>  [1473157935.569816] [mm-manager.c:145] find_device_support_ready(): Couldn't create modem for device at '/sys/devices/pnp0/00:08': Failed to find primary AT port
    [...]

Então, o processo terminou com um erro e não encontrou um modem em pnp0 / 00: 08.

Quais passos adicionais devem ser feitos?

    
por aloplop85 06.09.2016 / 11:39

1 resposta

1

de acordo com:

ModemManager[3170]: <debug> [1473157929.569356] [mm-port-probe-at.c:43] mm_port_probe_response_processor_is_at(): Parsing AT got: 'Serial command timed out'
ModemManager[3170]: <debug> [1473157929.569369] [mm-port-probe.c:161] mm_port_probe_set_result_at(): (tty/ttyS0) port is not AT-capable

sua conexão serial é executada em um tempo limite.  Verifique quais comandos AT são enviados.

Além disso, os módulos Cinterion geralmente são executados em 115200 baudrate por padrão, enquanto o ModemManager usa 57600 (pelo menos quando eu os usei).

Tente alterar a taxa de transmissão dos módulos para 57600 executando:

AT+IPR=57600

& amp; Reinicie. Se você tiver mais problemas, precisará rastrear sua conexão serial e verificar o que está sendo enviado na interface.

    
por Kevin K. 17.11.2016 / 18:25