ネットワーク管理者の代わりにモデム管理者を使用してインターネットにアクセスする方法

ネットワーク管理者の代わりにモデム管理者を使用してインターネットにアクセスする方法

最近タタドコモドングルを購入しました。

挿入後、次のような詳細が得られました。

Aug 05 17:30:46 think-debian kernel: usb 1-2: new high-speed USB device number 5 using xhci_hcd
Aug 05 17:30:46 think-debian kernel: usb 1-2: New USB device found, idVendor=12d1, idProduct=1f01
Aug 05 17:30:46 think-debian kernel: usb 1-2: New USB device strings: Mfr=3, Product=2, SerialN
Aug 05 17:30:46 think-debian kernel: usb 1-2: Product: HUAWEI Mobile
Aug 05 17:30:46 think-debian kernel: usb 1-2: Manufacturer: Huawei Technologies
Aug 05 17:30:47 think-debian mtp-probe[2824]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2"
Aug 05 17:30:47 think-debian mtp-probe[2824]: bus: 1, device: 5 was not an MTP device
Aug 05 17:30:47 think-debian systemd[1]: Created slice system-usb_modeswitch.slice.
Aug 05 17:30:47 think-debian systemd[1]: Starting USB_ModeSwitch__1-2:1.0...
Aug 05 17:30:47 think-debian laptop-mode[2880]: Laptop mode
Aug 05 17:30:47 think-debian laptop-mode[2881]: enabled, active
Aug 05 17:30:48 think-debian kernel: usb-storage 1-2:1.0: USB Mass Storage device detected
Aug 05 17:30:48 think-debian kernel: scsi host3: usb-storage 1-2:1.0
Aug 05 17:30:48 think-debian kernel: usbcore: registered new interface driver usb-storage
Aug 05 17:30:48 think-debian kernel: usbcore: registered new interface driver uas
Aug 05 17:30:48 think-debian usb_modeswitch[2910]: switch device 12d1:1f01 on 001/005
Aug 05 17:30:49 think-debian kernel: usb 1-2: USB disconnect, device number 5
Aug 05 17:30:58 think-debian kernel: usb 1-2: new high-speed USB device number 6 using xhci_hcd
Aug 05 17:30:58 think-debian kernel: usb 1-2: New USB device found, idVendor=12d1, idProduct=14db
Aug 05 17:30:58 think-debian kernel: usb 1-2: New USB device strings: Mfr=4, Product=3, SerialNumber=0
Aug 05 17:30:58 think-debian kernel: usb 1-2: Product: HUAWEI Mobile
Aug 05 17:30:58 think-debian kernel: usb 1-2: Manufacturer: Huawei Technologies
Aug 05 17:30:58 think-debian mtp-probe[2921]: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2"
Aug 05 17:30:58 think-debian mtp-probe[2921]: bus: 1, device: 6 was not an MTP device
Aug 05 17:30:58 think-debian laptop-mode[2997]: Laptop mode
Aug 05 17:30:58 think-debian laptop-mode[2998]: enabled, active
Aug 05 17:30:58 think-debian laptop-mode[3036]: Laptop mode
Aug 05 17:30:58 think-debian laptop-mode[3037]: enabled, active
Aug 05 17:30:58 think-debian kernel: cdc_ether 1-2:1.0 eth1: register 'cdc_ether' at usb-0000:00:14.0-2, CDC Ethernet Device, 00:a0:c6:09:5c:40
Aug 05 17:30:58 think-debian kernel: usbcore: registered new interface driver cdc_ether
Aug 05 17:30:58 think-debian kernel: cdc_ether 1-2:1.0 enx00a0c6095c40: renamed from eth1
Aug 05 17:30:58 think-debian root[3105]: usb_modeswitch: switched to 12d1:14db on 001/006
Aug 05 17:30:58 think-debian systemd[1]: Started USB_ModeSwitch__1-2:1.0.
Aug 05 17:31:01 think-debian ModemManager[1276]: <info>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2': not supported by any plugin
Aug 05 17:32:24 think-debian kernel: usb 1-1: new low-speed USB device number 7 using xhci_hcd
Aug 05 17:32:24 think-debian kernel: usb 1-1: New USB device found, idVendor=192f, idProduct=0916
Aug 05 17:32:24 think-debian kernel: usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Aug 05 17:32:24 think-debian kernel: usb 1-1: Product: USB Optical Mouse
Aug 05 17:32:24 think-debian kernel: usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
Aug 05 17:32:24 think-debian mtp-probe[3112]: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Aug 05 17:32:24 think-debian mtp-probe[3112]: bus: 1, device: 7 was not an MTP device
Aug 05 17:32:24 think-debian laptop-mode[3162]: Laptop mode
Aug 05 17:32:24 think-debian laptop-mode[3163]: enabled, active

同じ状況lsusbも確認された。:-

Bus 003 Device 002: ID 8087:8000 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 04f2:b39a Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 8087:07dc Intel Corp.
Bus 001 Device 002: ID 138a:0017 Validity Sensors, Inc.
Bus 001 Device 006: ID 12d1:1f01 Huawei Technologies Co., Ltd.
Bus 001 Device 005: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

その後、これら2つのコマンドを試しました。https://askubuntu.com/questions/78164/configuring-tata-photon-usb-modem-huawei-ec156基本的に。私はDebianを使用しています。

sudo modprobe usbserial vendor=0x12d1 product=0x14db
sudo usb_modeswitch -v 0x12d1 -p 0x14db -H -W

以下は出力です:-

 Take all parameters from the command line
 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.2.5 (C) Josua Dietze 2015
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x14db
HuaweiMode=1
NeedResponse=0

ifconfig -a提供:-

xxxxxxxxxx Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:e0600000-e0620000

eth0:avahi Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx
          inet addr:169.254.7.244  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          Interrupt:20 Memory:e0600000-e0620000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:468 errors:0 dropped:0 overruns:0 frame:0
          TX packets:468 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:44602 (43.5 KiB)  TX bytes:44602 (43.5 KiB)

wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

最初はifconfig -a私が共有したUSBドングルです。xxxxxx

私が得ることができる最新の情報は次のとおりです。sudo journalctl -f

Aug 07 12:17:06 think-debian kernel: usb 1-1: new high-speed USB device number 11 using xhci_hcd
Aug 07 12:17:06 think-debian kernel: usb 1-1: New USB device found, idVendor=12d1, idProduct=1f01
Aug 07 12:17:06 think-debian kernel: usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0
Aug 07 12:17:06 think-debian kernel: usb 1-1: Product: HUAWEI Mobile
Aug 07 12:17:06 think-debian kernel: usb 1-1: Manufacturer: Huawei Technologies
Aug 07 12:17:06 think-debian kernel: usb-storage 1-1:1.0: USB Mass Storage device detected
Aug 07 12:17:06 think-debian kernel: scsi host6: usb-storage 1-1:1.0
Aug 07 12:17:06 think-debian mtp-probe[3600]: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Aug 07 12:17:06 think-debian mtp-probe[3600]: bus: 1, device: 11 was not an MTP device
Aug 07 12:17:06 think-debian systemd[1]: Starting USB_ModeSwitch__1-1:1.0...
Aug 07 12:17:07 think-debian usb_modeswitch[3656]: switch device 12d1:1f01 on 001/011
Aug 07 12:17:08 think-debian kernel: usb 1-1: USB disconnect, device number 11
Aug 07 12:17:16 think-debian kernel: usb 1-1: new high-speed USB device number 12 using xhci_hcd
Aug 07 12:17:16 think-debian kernel: usb 1-1: New USB device found, idVendor=12d1, idProduct=14db
Aug 07 12:17:16 think-debian kernel: usb 1-1: New USB device strings: Mfr=4, Product=3, SerialNumber=0
Aug 07 12:17:16 think-debian kernel: usb 1-1: Product: HUAWEI Mobile
Aug 07 12:17:16 think-debian kernel: usb 1-1: Manufacturer: Huawei Technologies
Aug 07 12:17:16 think-debian kernel: cdc_ether 1-1:1.0 eth1: register 'cdc_ether' at usb-0000:00:14.0-1, CDC Ethernet Device, xx:xx:xx:xx:xx
Aug 07 12:17:16 think-debian mtp-probe[3684]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1"
Aug 07 12:17:16 think-debian mtp-probe[3684]: bus: 1, device: 12 was not an MTP device
Aug 07 12:17:16 think-debian kernel: cdc_ether 1-1:1.0 xxxxxxxxx: renamed from eth1
Aug 07 12:17:17 think-debian root[3788]: usb_modeswitch: switched to 12d1:14db on 001/012
Aug 07 12:17:17 think-debian systemd[1]: Started USB_ModeSwitch__1-1:1.0.
Aug 07 12:17:19 think-debian ModemManager[1372]: <info>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1': not supported by any plugin

モデムマネージャが必要なようです。助けが必要ですか?

これは私の/etc/network/interfaces結果です: -

$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

したがって、eth0はすでに有線インターフェイスに割り当て/占有されています。

routeこれを考えると: -

$ sudo route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         *               0.0.0.0         U     1002   0        0 eth0
link-local      *               255.255.0.0     U     0      0        0 eth0

更新 - usbidsを更新しましたが、リストは以前よりはるかに良くなりました。

$ lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 04f2:b39a Chicony Electronics Co., Ltd 
Bus 002 Device 003: ID 8087:07dc Intel Corp. 
Bus 002 Device 002: ID 138a:0017 Validity Sensors, Inc. Fingerprint Reader
Bus 002 Device 009: ID 192f:0916 Avago Technologies, Pte. 
Bus 002 Device 007: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

今はネットワーク管理者を使用していますが、モデム管理者に必要な変更を加えたいと思います。

ベストアンサー1

ModemManager(現在)は、少なくとも公開されたモデムデバイスでのみ機能します。制御ポート1個。あなたのHuaweiデバイスはHiLinkベースのデバイスであるように見え、以下を介してのみEthernetネットワークインターフェイスを公開しますcdc_ether。このモードでデバイスに接続する唯一の方法は、デバイス上でDHCPクライアントを実行することです(たとえば、NetworkManagerを動的IPアドレス指定として設定するには、次のようなものがあります)。インターフェイスで試行されました)。完了すると、そのネットワークインターフェイスに設定されているIPアドレスとデフォルトパス192.168.8.2(モデムの仮想ゲートウェイ)を取得できます。192.168.8.1

先に「現在」と言ったのは、HiLinkデバイスに制御インタフェースがあるからです。ネットワークインターフェイスに接続すると、192.168.8.1モデム自体が信号品質などを監視できるWebサービスAPIを含むWebサイトを表示します。この管理をサポートするために、ModemManagerでいくつかのタスクが進行中ですが、まだ準備されていません。

おすすめ記事