3G 连接与 ModemManager 和 Netplan 立即连接和断开

3G 连接与 ModemManager 和 Netplan 立即连接和断开

我的旧 3G 调制解调器 (Telit HE910) 有问题,连接是通过 Netplan 和 ModemManager 建立的。 Ubuntu 启动时可以正确识别调制解调器,并且也可以毫无问题地识别 SIM 卡。奇怪的是,似乎连接已建立,但调制解调器立即断开连接。我尝试在调试模式下启动 ModemManager,但我对调制解调器不太熟悉,无法了解问题的实际位置。

网络计划配置:

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp3:                 # eth0 - Maintenance
      dhcp4: false
      optional: true
      addresses:
      - 172.0.0.10/24
      routes:
      - to: default
        via: 172.0.0.1
      nameservers:
        addresses:
        - 8.8.8.8
        - 8.8.4.4
      dhcp4-overrides:
        route-metric: 1
      match:
        name: enp3*
      set-name: enp3
    enp4:                 # eth1 - External modem
      dhcp4: true
      dhcp6: false
      optional: true
      match:
        name: enp4*
      set-name: enp4
  modems:
    telit:                # Internal modem
      dhcp4: true
      optional: true
      apn: iliad
      auto-config: true
      dhcp4-overrides:
        route-metric: 900
      match:
        name: ttyACM*
      set-name: mobile
  wifis:
    wlp1s0:
      dhcp4: false
      dhcp6: false
      optional: true
      access-points:      # Required for wifis
        "empty":
          password: ""

调制解调器管理器日志:

ModemManager[1696]: <debug> [1662750117.761616] [modem0/bearer0] connection through a plain serial AT port: ttyACM0
ModemManager[1696]: <debug> [1662750117.761825] [modem0/ttyACM0/at] device open count is 5 (open)
ModemManager[1696]: <debug> [1662750117.762137] [modem0/ttyACM0/at] device open count is 4 (close)
ModemManager[1696]: <debug> [1662750117.762428] [modem0/ttyACM0/at] --> 'ATD*99***3#<CR>'
ModemManager[1696]: <debug> [1662750117.796882] [modem0/ttyACM0/at] <-- '<CR><LF>CONNECT<CR><LF>'
ModemManager[1696]: <debug> [1662750117.797202] [modem0/bearer0] setting flow control in ttyACM0: rts-cts
ModemManager[1696]: <debug> [1662750117.797369] [modem0/ttyACM0/at] enabling RTS/CTS flow control
ModemManager[1696]: <debug> [1662750117.797575] [modem0/ttyACM0/at] flow control settings updated to rts-cts
ModemManager[1696]: <debug> [1662750117.797780] [modem0/ttyACM0/at] port now connected
ModemManager[1696]: <debug> [1662750117.798010] [modem0/bearer0] connected
ModemManager[1696]: <debug> [1662750117.798634] [modem0/bearer0] PPP is required for connection, will ignore disconnection reports
ModemManager[1696]: <info>  [1662750117.798836] [modem0] state changed (registered -> connected)
ModemManager[1696]: <info>  [1662750117.800684] [modem0] simple connect state (8/8): all done
ModemManager[1696]: <debug> [1662750117.801266] [modem0/ttyACM0/at] device open count is 3 (close)
ModemManager[1696]: <debug> [1662750117.836536] [modem0] user request to disconnect modem (all bearers)
ModemManager[1696]: <debug> [1662750117.839942] [modem0] user request to disconnect modem (all bearers)
ModemManager[1696]: <debug> [1662750117.850015] [modem0] user request to connect modem
ModemManager[1696]: <debug> [1662750117.859771] [modem0/bearer0] disconnecting...
ModemManager[1696]: <info>  [1662750117.860051] [modem0] state changed (connected -> disconnecting)
ModemManager[1696]: <debug> [1662750117.861365] [modem0/bearer0] sending PDP context deactivation in secondary port...
ModemManager[1696]: <debug> [1662750117.861621] [modem0/ttyACM3/at] device open count is 2 (open)
ModemManager[1696]: <debug> [1662750117.862099] [modem0/ttyACM3/at] --> 'AT+CGACT=0,3<CR>'
ModemManager[1696]: <debug> [1662750117.888064] [modem0/ttyACM3/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[1696]: <debug> [1662750117.888482] [modem0/bearer0] reopening data port ttyACM0...
ModemManager[1696]: <debug> [1662750117.888661] [modem0/ttyACM0/at] reopening port (3)
ModemManager[1696]: <debug> [1662750117.888796] [modem0/ttyACM0/at] device open count is 2 (close)
ModemManager[1696]: <debug> [1662750117.888921] [modem0/ttyACM0/at] device open count is 1 (close)
ModemManager[1696]: <debug> [1662750117.889047] [modem0/ttyACM0/at] device open count is 0 (close)
ModemManager[1696]: <debug> [1662750117.889250] [modem0/ttyACM0/at] closing serial port...
ModemManager[1696]: <debug> [1662750117.889431] [modem0/ttyACM0/at] port now disconnected
ModemManager[1696]: <debug> [1662750117.892280] [modem0/ttyACM0/at] serial port closed
ModemManager[1696]: <debug> [1662750117.892472] [modem0/ttyACM3/at] device open count is 1 (close)
ModemManager[1696]: <info>  [1662750117.892880] [modem0] simple connect started...
ModemManager[1696]: <debug> [1662750117.893018] [modem0]    profile ID: unspecified
ModemManager[1696]: <debug> [1662750117.893149] [modem0]    PIN: unspecified
ModemManager[1696]: <debug> [1662750117.893266] [modem0]    operator ID: unspecified
ModemManager[1696]: <debug> [1662750117.893376] [modem0]    allowed roaming: yes
ModemManager[1696]: <debug> [1662750117.893487] [modem0]    APN: iliad
ModemManager[1696]: <debug> [1662750117.893596] [modem0]    APN type: unspecified
ModemManager[1696]: <debug> [1662750117.893707] [modem0]    IP family: ipv4v6
ModemManager[1696]: <debug> [1662750117.893828] [modem0]    allowed authentication: unspecified
ModemManager[1696]: <debug> [1662750117.893948] [modem0]    user: unspecified
ModemManager[1696]: <debug> [1662750117.894068] [modem0]    password: unspecified
ModemManager[1696]: <debug> [1662750117.894184] [modem0]    multiplex: unspecified
ModemManager[1696]: <info>  [1662750117.894341] [modem0] simple connect state (4/8): wait to get fully enabled
ModemManager[1696]: <debug> [1662750118.893991] [modem0/ttyACM0/at] opening serial port...
ModemManager[1696]: <debug> [1662750118.896308] [modem0/ttyACM0/at] setting up baudrate: 57600
ModemManager[1696]: <debug> [1662750118.896488] [modem0/ttyACM0/at] no flow control explicitly requested for device
ModemManager[1696]: <debug> [1662750118.896831] [modem0/ttyACM0/at] device open count is 1 (open)
ModemManager[1696]: <debug> [1662750118.896970] [modem0/ttyACM0/at] device open count is 2 (open)
ModemManager[1696]: <debug> [1662750118.897117] [modem0/ttyACM0/at] device open count is 3 (open)
ModemManager[1696]: <debug> [1662750118.897306] [modem0/bearer0] flashing data port ttyACM0...
ModemManager[1696]: <debug> [1662750118.897691] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750118.898171] [modem0/ttyACM0/at] device open count is 2 (close)
ModemManager[1696]: <debug> [1662750118.898562] [modem0/ttyACM0/at] running init sequence...
ModemManager[1696]: <debug> [1662750118.899053] [modem0/bearer0] PDP disconnection already sent
ModemManager[1696]: <debug> [1662750118.899235] [modem0/bearer0] disconnected
ModemManager[1696]: <info>  [1662750118.899435] [modem0] state changed (disconnecting -> registered)
ModemManager[1696]: <info>  [1662750118.899820] [modem0] simple connect state (5/8): register
ModemManager[1696]: <debug> [1662750118.900457] [modem0] already registered automatically in network '22250', automatic registration not launched...
ModemManager[1696]: <info>  [1662750118.902789] [modem0/bearer0] connection #1 finished: duration 1s, tx: 0 bytes, rx: 0 bytes
ModemManager[1696]: <info>  [1662750118.903778] [modem0] simple connect state (6/8): bearer
ModemManager[1696]: <debug> [1662750118.905370] [modem0] creating new bearer...
ModemManager[1696]: <debug> [1662750118.905609] [modem0] creating broadband bearer in broadband modem...
ModemManager[1696]: <debug> [1662750118.906852] [modem0/ttyACM0/at] device open count is 3 (open)
ModemManager[1696]: <info>  [1662750118.910141] [modem0] simple connect state (7/8): connect
ModemManager[1696]: <debug> [1662750118.910928] [modem0/bearer1] connecting...
ModemManager[1696]: <info>  [1662750118.911186] [modem0] state changed (registered -> connecting)
ModemManager[1696]: <debug> [1662750118.913608] [modem0/bearer1] launching 3GPP connection attempt
ModemManager[1696]: <debug> [1662750118.913857] [modem0] set profile state (1/8): check format
ModemManager[1696]: <debug> [1662750118.914074] [modem0/ttyACM0/at] device open count is 4 (open)
ModemManager[1696]: <debug> [1662750118.914341] [modem0/ttyACM0/at] device open count is 3 (close)
ModemManager[1696]: <debug> [1662750118.915863] [modem0/ttyACM0/at] --> 'ATE0<CR>'
ModemManager[1696]: <debug> [1662750119.795226] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750120.795152] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750121.180951] [modem0/ttyACM3/at] <-- '<CR><LF>+CIEV: signal,2<CR><LF>'
ModemManager[1696]: <debug> [1662750121.181451] [modem0] signal quality updated (28)
ModemManager[1696]: <debug> [1662750121.795367] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750122.510824] [modem0/ttyACM0/at] device open count is 4 (open)
ModemManager[1696]: <debug> [1662750122.511330] [modem0/ttyACM0/at] --> 'ATV1<CR>'
ModemManager[1696]: <debug> [1662750122.795777] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750123.795760] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750124.796161] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <warn>  [1662750125.510748] [modem0] port ttyACM0 timed out 2 consecutive times
ModemManager[1696]: <debug> [1662750125.511081] [modem0/ttyACM0/at] --> 'AT+CMEE=1<CR>'
ModemManager[1696]: <debug> [1662750125.796557] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750126.797186] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <debug> [1662750127.797395] [modem0/ttyACM0/at] <-- '~\255}#\192!}!}!} }8}"}&} } } } }#}$\192#}%}&,\2070d}'}"}(}"\214\165~'
ModemManager[1696]: <warn>  [1662750128.511090] [modem0] port ttyACM0 timed out 3 consecutive times
ModemManager[1696]: <debug> [1662750128.511364] [modem0/ttyACM0/at] --> 'ATX4<CR>'
ModemManager[1696]: <debug> [1662750128.931528] [modem0/ttyACM0/at] <-- '<CR><LF>NO CARRIER<CR><LF>'
ModemManager[1696]: <debug> [1662750128.931900] [modem0/ttyACM0/at] operation failure: 1 (No carrier)
ModemManager[1696]: <debug> [1662750128.932274] [modem0/ttyACM0/at] --> 'AT&C1<CR>'
ModemManager[1696]: <debug> [1662750128.938206] [modem0/ttyACM0/at] <-- '<CR><LF>+CIEV: signal,2<CR><LF>'
ModemManager[1696]: <debug> [1662750128.938646] [modem0] signal quality updated (28)
ModemManager[1696]: <debug> [1662750128.948414] [modem0/ttyACM0/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[1696]: <debug> [1662750128.949130] [modem0] +CGDCONT format details for PDP type 'ipv4v6': minimum 1, maximum 5
ModemManager[1696]: <debug> [1662750128.949320] [modem0] context definition format: minimum 1, maximum 5
ModemManager[1696]: <debug> [1662750128.949464] [modem0] set profile state (2/8): list before
ModemManager[1696]: <debug> [1662750128.949675] [modem0/ttyACM0/at] device open count is 5 (open)
ModemManager[1696]: <debug> [1662750128.949897] [modem0/ttyACM0/at] device open count is 4 (close)
ModemManager[1696]: <debug> [1662750128.950154] [modem0/ttyACM0/at] --> 'AT+CCLK?<CR>'
ModemManager[1696]: <debug> [1662750128.975347] [modem0/ttyACM0/at] <-- '<CR><LF>'
ModemManager[1696]: <debug> [1662750128.975784] [modem0/ttyACM0/at] <-- '+CCLK: "00/01/01,00:32:47+08"<CR><LF><CR><LF>OK<CR><LF>'
ModemManager[1696]: <debug> [1662750128.976535] [modem0/ttyACM0/at] device open count is 3 (close)
ModemManager[1696]: <debug> [1662750128.977418] [modem0/ttyACM0/at] --> 'AT+CGDCONT?<CR>'
ModemManager[1696]: <debug> [1662750129.003874] [modem0/ttyACM0/at] <-- '<CR><LF>+CGDCONT: 1,"IP","web.omnitel.it","",0,0<CR><LF>+CGDCONT: 2,"IP","iliad","",0,0<CR><LF>+CGDCONT: 3,"IPV4V6","iliad","",0,0<CR><LF><CR><LF>OK<CR><LF>'
ModemManager[1696]: <debug> [1662750129.004954] [modem0] set profile state (3/8): select profile (best)
ModemManager[1696]: <debug> [1662750129.005130] [modem0] found exact context at profile 3
ModemManager[1696]: <debug> [1662750129.005258] [modem0] reusing profile '3'
ModemManager[1696]: <debug> [1662750129.005408] [modem0] set profile state (4/8): check activated profile
ModemManager[1696]: <debug> [1662750129.005614] [modem0] checking if profile with id '3' is already activated...=
ModemManager[1696]: <debug> [1662750129.005813] [modem0/ttyACM0/at] device open count is 4 (open)
ModemManager[1696]: <debug> [1662750129.006106] [modem0/ttyACM0/at] device open count is 3 (close)
ModemManager[1696]: <debug> [1662750129.006645] [modem0/ttyACM0/at] --> 'AT+CGACT?<CR>'
ModemManager[1696]: <debug> [1662750129.032246] [modem0/ttyACM0/at] <-- '<CR><LF>'
ModemManager[1696]: <debug> [1662750129.032967] [modem0/ttyACM0/at] <-- '+CGACT: 1,0<CR><LF>+CGACT: 2,0<CR><LF>+CGACT: 3,0<CR><LF><CR><LF>OK<CR><LF>'
ModemManager[1696]: <debug> [1662750129.034446] [modem0] profile '3' is not activated
ModemManager[1696]: <debug> [1662750129.034826] [modem0] set profile state (6/8): profile already stored
ModemManager[1696]: <debug> [1662750129.035450] [modem0] set profile state (8/8): all done
ModemManager[1696]: <debug> [1662750129.036522] [modem0/ttyACM0/at] device open count is 4 (open)

答案1

这并不奇怪!

Vodafone Italia Omnitel,似乎是您的移动网络运营商(即使您的 APN 似乎受 iliad 控制,这是某种漫游协议吗?),在 2021 年关闭了 3G 网络。因此,无法与其建立连接。

因此,除非您想继续使用调制解调器提供 2G(或者更确切地说,2.5 至 2.75 G,即 GPRS 或 EDGE)服务,并指示您的系统接受该服务,并且还拥有允许这样做的订阅,否则这就是电子浪费。

答案2

解决了

几天后我终于找到了解决方案。 Ubuntu 服务器 22.04 LTS 不包含Telit HE910 所需的ppp和软件包。pppoe我通过删除所有 Netplan 配置并仅使用 NetworkManager 得到了这个解决方案。尝试手动连接nmcli c up mycon显示了一个相当普遍的错误,但这与 ppp 包有关。

安装软件包后,我还能够毫无问题地重新激活 Netplan 配置。

相关内容