2

我正在尝试让 USB 调制解调器在我的嵌入式系统上工作,该系统使用来自 Yocto Dunfell 的 Linux 以及 ModemManager 和 NetworkManager。

正如您在下面看到的,我可以连接网络上的调制解调器,但我无法创建连接并调出接口。

以下是不同命令的输出:

root@rpi-cm3:/# mmcli -L
    /org/freedesktop/ModemManager1/Modem/2 [Telit] LE910-EU V2
root@rpi-cm3:/# mmcli -m 2
  --------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/2
           |            device id: d522cda0f436245296a7a9e47c981e9601af3bc7
  --------------------------------
  Hardware |         manufacturer: Telit
           |                model: LE910-EU V2
           |    firmware revision: 20.00.402
           |            supported: gsm-umts, lte
           |              current: gsm-umts, lte
           |         equipment id: 351622072422039
  --------------------------------
  System   |               device: /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5
           |              drivers: cdc_acm, cdc_ncm
           |               plugin: Telit
           |         primary port: ttyACM0
           |                ports: ttyACM1 (unknown), ttyACM3 (at), ttyACM5 (unknown), 
           |                       wwan0 (net), ttyACM0 (at), ttyACM4 (unknown), ttyACM2 (unknown)
  --------------------------------
  Status   |                state: registered
           |          power state: on
           |          access tech: umts
           |       signal quality: 57% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g; preferred: none
           |                       allowed: 3g; preferred: none
           |                       allowed: 2g, 3g; preferred: none
           |                       allowed: 4g; preferred: none
           |                       allowed: 2g, 4g; preferred: none
           |                       allowed: 3g, 4g; preferred: none
           |                       allowed: 2g, 3g, 4g; preferred: none
           |              current: allowed: 2g, 3g, 4g; preferred: none
  --------------------------------
  Bands    |            supported: egsm, dcs, utran-1, utran-8, eutran-1, eutran-3, eutran-7, 
           |                       eutran-8, eutran-20
           |              current: egsm, dcs, utran-1, eutran-1
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 351622072422039
           |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |            dbus path: /org/freedesktop/ModemManager1/SIM/2
  --------------------------------
  Bearer   |            dbus path: /org/freedesktop/ModemManager1/Bearer/1
root@rpi-cm3:/# mmcli -b 1
  ------------------------
  General    |  dbus path: /org/freedesktop/ModemManager1/Bearer/1
             |       type: default
  ------------------------
  Status     |  connected: no
             |  suspended: no
             | ip timeout: 20
  ------------------------
  Properties |        apn: gprs.swisscom.ch
             |    roaming: allowed
root@rpi-cm3:/# nmcli device show
GENERAL.DEVICE:                         wwan0
GENERAL.TYPE:                           wwan
GENERAL.HWADDR:                         00:00:11:12:13:14
GENERAL.MTU:                            1500
GENERAL.STATE:                          20 (unavailable)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --

GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         B8:27:EB:F7:A1:B3
GENERAL.MTU:                            1500
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
WIRED-PROPERTIES.CARRIER:               off
IP4.GATEWAY:                            --
IP6.GATEWAY:                            --

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            --
root@rpi-cm3:/# nmcli c show
NAME   UUID                                  TYPE  DEVICE 
modem  e7482093-2d4c-47fa-b52b-e6e282902453  gsm   --   
root@rpi-cm3:/# nmcli c up modem
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).

我被困在这里,无法找到有关如何创建连接的信息。

奇怪的是我无法将 NetworkManager 配置为自动管理 wwan 接口,我使用以下命令添加强制它:

nmcli dev set wwan0 managed yes

谢谢您的帮助

此致

4

1 回答 1

0

我一直在努力使我的调制解调器工作(我有一个 EM7455B),我终于使它与这些命令一起工作(按此顺序):

解锁sim(假设'mmcli -L'给你'0',在'-m'上使用它)

  • sudo mmcli -m 0 --sim=0 --pin= your_pin_here

这将允许您启用调制解调器:

  • 须藤mmcli -m 0 -e

然后连接:

  • sudo mmcli -m 0 --simple-connect="apn= your_apn_here "

核实

  • 须藤mmcli -b 0
于 2021-07-26T19:14:04.313 回答