我有一个 Quectel EG25-G 设置,但每当我连接时(重新启动后),它都会连接 20 秒,然后断开连接。它发生在
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5047] device (ttyUSB2): state change: activated -> failed (reason 'modem-no-carrier', sys-iface-state: 'managed')
Jun 24 06:01:44 localhost.localdomain ModemManager[4884]: <info> Simple connect state (4/8): Wait to get fully enabled
Jun 24 06:01:44 linux NetworkManager[5070]: <warn> [1656050504.5146] device (ttyUSB2): Activation: failed for connection 'telstra'
但我不明白为什么会发生这种情况。
有人能给我指明正确的方向吗?
配置:
nvidia@localhost:~$ sudo cat /etc/NetworkManager/system-connections/telstra
[sudo] password for nvidia:
[connection]
id=telstra
uuid=9ae31580-093b-45ec-8b8c-3c22e7eca76f
type=gsm
permissions=
[gsm]
apn=telstra.internet
number=*99#
password-flags=1
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=auto
NetworkManager 、 ModemMandger 和 ping google.com 的输出:
nvidia@linux:~$ sudo journalctl -u NetworkManager -f &
[1] 8261
nvidia@linux:~$ sudo journalctl -u ModemManager -f &
[2] 8262
nvidia@linux:~$ ping google.com &-- Logs begin at Fri 2022-06-24 06:00:46 UTC. --
Jun 24 06:01:14 localhost.localdomain NetworkManager[5070]: <info> [1656050474.8770] manager: NetworkManager state is now CONNECTED_LOCAL
Jun 24 06:01:14 localhost.localdomain NetworkManager[5070]: <info> [1656050474.8807] manager: NetworkManager state is now CONNECTED_SITE
Jun 24 06:01:14 localhost.localdomain NetworkManager[5070]: <info> [1656050474.8810] policy: set 'telstra' (ppp0) as default for IPv4 routing and DNS
Jun 24 06:01:14 localhost.localdomain NetworkManager[5070]: <info> [1656050474.8864] device (ttyUSB2): Activation: successful, device activated.
Jun 24 06:01:15 localhost.localdomain NetworkManager[5070]: <info> [1656050475.6853] policy: set-hostname: set hostname to 'linux' (from address lookup)
Jun 24 06:01:17 linux pppd[7785]: sif6addr: ioctl(SIOCSIFADDR): Permission denied (line 2613)
Jun 24 06:01:17 linux NetworkManager[5070]: sif6addr: ioctl(SIOCSIFADDR): Permission denied (line 2613)
Jun 24 06:01:17 linux NetworkManager[5070]: cif6addr: ioctl(SIOCDIFADDR): No such address
-- Logs begin at Fri 2022-06-24 06:00:46 UTC. --
Jun 24 06:01:17 linux pppd[7785]: cif6addr: ioctl(SIOCDIFADDR): No such address
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> enabled)
Jun 24 06:01:19 linux NetworkManager[5070]: <info> [1656050479.0411] manager: NetworkManager state is now CONNECTED_GLOBAL
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Simple connect state (5/8): Register
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> registering)
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> home)
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabled -> registered)
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Simple connect state (6/8): Bearer
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Simple connect state (7/8): Connect
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
Jun 24 06:01:14 localhost.localdomain ModemManager[4884]: <info> Simple connect state (8/8): All done
[3] 8269
nvidia@linux:~$ PING google.com (172.217.24.46) 56(84) bytes of data.
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=1 ttl=114 time=34.5 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=2 ttl=114 time=350 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=3 ttl=114 time=37.8 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=4 ttl=114 time=518 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=5 ttl=114 time=55.6 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=6 ttl=114 time=74.5 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=7 ttl=114 time=52.9 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=8 ttl=114 time=131 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=9 ttl=114 time=49.7 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=10 ttl=114 time=568 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=11 ttl=114 time=57.0 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=12 ttl=114 time=75.8 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=13 ttl=114 time=80.8 ms
64 bytes from hkg07s23-in-f14.1e100.net (172.217.24.46): icmp_seq=14 ttl=114 time=63.7 ms
Jun 24 06:01:44 linux ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> registered)
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5044] modem["ttyUSB2"]: modem state changed, 'connected' --> 'registered' (reason: user-requested)
Jun 24 06:01:44 localhost.localdomain ModemManager[4884]: <info> Simple connect started...
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5047] device (ttyUSB2): state change: activated -> failed (reason 'modem-no-carrier', sys-iface-state: 'managed')
Jun 24 06:01:44 localhost.localdomain ModemManager[4884]: <info> Simple connect state (4/8): Wait to get fully enabled
Jun 24 06:01:44 linux NetworkManager[5070]: <warn> [1656050504.5146] device (ttyUSB2): Activation: failed for connection 'telstra'
Jun 24 06:01:44 localhost.localdomain ModemManager[4884]: <info> Simple connect state (5/8): Register
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5159] manager: NetworkManager state is now CONNECTED_LOCAL
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5179] device (ttyUSB2): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 24 06:01:44 localhost.localdomain ModemManager[4884]: <info> Simple connect state (6/8): Bearer
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5483] policy: set-hostname: set hostname to 'localhost.localdomain' (no default device)
Jun 24 06:01:44 localhost.localdomain ModemManager[4884]: <info> Simple connect state (7/8): Connect
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5494] device (ppp0): state change: disconnected -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
Jun 24 06:01:44 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5502] policy: auto-activating connection 'telstra'
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5543] device (ttyUSB2): Activation: starting connection 'telstra' (9ae31580-093b-45ec-8b8c-3c22e7eca76f)
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5548] device (ttyUSB2): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 24 06:01:44 linux NetworkManager[5070]: <info> [1656050504.5552] manager: NetworkManager state is now CONNECTING
Jun 24 06:01:44 localhost.localdomain NetworkManager[5070]: <info> [1656050504.5957] modem["ttyUSB2"]: modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Jun 24 06:01:51 localhost.localdomain NetworkManager[5070]: <info> [1656050511.6961] modem["ttyUSB2"]: modem state changed, 'connecting' --> 'registered' (reason: user-requested)
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <warn> (tty/ttyUSB2) at port timed out 2 consecutive times
Jun 24 06:01:51 localhost.localdomain NetworkManager[5070]: <info> [1656050511.7152] modem["ttyUSB2"]: modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <warn> Couldn't initialize PDP context with our APN: 'Sending command failed: 'Resource temporarily unavailable''
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> registered)
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <info> Simple connect started...
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <info> Simple connect state (4/8): Wait to get fully enabled
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <info> Simple connect state (5/8): Register
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <info> Simple connect state (6/8): Bearer
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <info> Simple connect state (7/8): Connect
Jun 24 06:01:51 localhost.localdomain ModemManager[4884]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
答案1
这里有人建议更新到最新的 ModemManager,例如:
sudo apt-get install software-properties-common # contains add-apt-repository
sudo add-apt-repository ppa:aleksander-m/modemmanager-bionic
sudo apt-get update
sudo apt-get install modemmanager libqmi-utils libmbim-utils policykit-1
sudo reboot
一切开始正常工作。这肯定是 NVidia 基础映像附带的旧版 ModemManager 中的一个 ModemHandler 错误。