没有华为棒的接口

没有华为棒的接口

在我的 Linux Mint 上使用华为 USB 记忆棒可以工作(开箱即用),但在我的 ubuntu 服务器上它不会创建界面。

lsusb:

Bus 001 Device 016: ID 12d1:14dc Huawei Technologies Co., Ltd. 

/var/log/usb_modeswitch.log(两台机器上的输出相同,除了 1-10)

USB_ModeSwitch log from Sat Aug  1 00:04:23 2020

Use global config file: /etc/usb_modeswitch.conf

Raw args from udev: 1-10:1.0

Bus ID for device not given by udev.
 Trying to determine it from kernel name (1-10:1.0) ...
Use top device dir /sys/bus/usb/devices/1-10

USB dir exists: /sys/bus/usb/devices/1-10

SCSI dir exists: /sys/bus/usb/devices/1-10
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
Use interface /sys/bus/usb/devices/1-10/1-10:1.0
----------------
USB values from sysfs:
  idVendor      12d1
  idProduct     1f01
  manufacturer  HUAWEI
  product       HUAWEI Mobile
  serial        FFFFFFFFFFFFFFFF
  bNumConfigurations    1
  bConfigurationValue   1
  devnum        15
  busnum        1
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
Searching entries named: /usr/share/usb_modeswitch/12d1:1f01*
Searching overriding entries named: /etc/usb_modeswitch.d/12d1:1f01*
SCSI attributes not needed, move on.

Extract config 12d1:1f01 from collection /usr/share/usb_modeswitch/configPack.tar.gz
config: TargetVendor set to 12d1
config: TargetProduct set to 14db,14dc
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
! matched, now switching
Unbinding driver
Command to be run:
/usr/sbin/usb_modeswitch -W -D -s 20 -c /run/usb_modeswitch/current_cfg -u -1 -b 1 -g 15 -v 12d1 -p 1f01 2>&1

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------

Read config file: /run/usb_modeswitch/current_cfg

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.2 (C) Josua Dietze 2017
 * Based on libusb1/libusbx


 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1f01
TargetVendor=   0x12d1
TargetProductList="14db,14dc"
HuaweiNewMode=1
Success check enabled, max. wait time 20 seconds
System integration mode enabled

Use given bus/device number: 001/015 ...
Look for default devices ...
 bus/device number matched
  found USB ID 12d1:1f01
   vendor ID matched
   product ID matched
 Found devices in default mode (1)
Get the current device configuration ...
Use interface number 0
 with class 8
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI Mobile
  Serial No.: FFFFFFFFFFFFFFFF
-------------------------
Using standard Huawei switching message
Looking for active drivers ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 1 (CSW) ...
 Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Check success of mode switch for max. 20 seconds ... Read attributes ...
USB dir exists: /sys/bus/usb/devices/1-10
Warning: USB attribute "serial" not readable.
 All attributes matched
Mode switching was successful, found 12d1:14dc (HUAWEI: HUAWEI Mobile)Now check for bound driver ...
 no driver has bound to interface 0 yet
Device not in "bind_list" yet, bind it now
Module loader is /sbin/modprobe
Module is active already
Try to add ID to driver "option"
 ID added to driver; check for new devices in /dev
 driver binding failed
Check for AVOID_RESET_QUIRK kernel attribute
 AVOID_RESET_QUIRK activated

All done, exit

消息

[ 4004.412215] usb 1-10: new high-speed USB device number 17 using xhci_hcd
[ 4004.561533] usb 1-10: New USB device found, idVendor=12d1, idProduct=1f01
[ 4004.561539] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4004.561542] usb 1-10: Product: HUAWEI Mobile
[ 4004.561545] usb 1-10: Manufacturer: HUAWEI
[ 4004.561548] usb 1-10: SerialNumber: FFFFFFFFFFFFFFFF
[ 4004.614909] usb-storage 1-10:1.0: USB Mass Storage device detected
[ 4004.615233] scsi host6: usb-storage 1-10:1.0
[ 4005.668902] scsi 6:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[ 4005.685276] scsi 6:0:0:1: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[ 4005.701070] sr 6:0:0:0: Power-on or device reset occurred
[ 4005.732978] sr 6:0:0:0: [sr0] scsi-1 drive
[ 4005.733343] sr 6:0:0:0: Attached scsi CD-ROM sr0
[ 4005.733589] sr 6:0:0:0: Attached scsi generic sg2 type 5
[ 4005.734183] sd 6:0:0:1: Attached scsi generic sg3 type 0
[ 4005.764449] sd 6:0:0:1: Power-on or device reset occurred
[ 4005.796221] sd 6:0:0:1: [sdc] Attached SCSI removable disk
[ 4005.959885] usb 1-10: USB disconnect, device number 17
[ 4006.448382] usb 1-10: new high-speed USB device number 18 using xhci_hcd
[ 4006.597604] usb 1-10: New USB device found, idVendor=12d1, idProduct=14dc
[ 4006.597609] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4006.597613] usb 1-10: Product: HUAWEI Mobile
[ 4006.597616] usb 1-10: Manufacturer: HUAWEI
[ 4006.853910] cdc_ether 1-10:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-10, CDC Ethernet Device, 00:1e:10:1f:00:00
[ 4006.854366] usb-storage 1-10:1.2: USB Mass Storage device detected
[ 4006.854751] scsi host6: usb-storage 1-10:1.2
[ 4006.864087] cdc_ether 1-10:1.0 enx001e101f0000: renamed from eth0
[ 4007.887133] scsi 6:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[ 4007.887717] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 4007.888703] sd 6:0:0:0: [sdc] Attached SCSI removable disk

[4006.864087] cdc_ether 1-10:1.0 enx001e101f0000:从 eth0 重命名

enx001e101f0000是我的桌面 Linux Mint 上的接口名称相同,并且可以正常工作,但在我的 ubuntu 服务器上,它在接口列表(ifconfig)中缺失,尽管如您所见,它在 dmesg 中被提及。

我遗漏了什么?我必须自己创建界面吗?

答案1

感谢帮助,我找到了解决方案:

打开界面:

ifconfig enx001e101f0000 up

获取IP:

dhclient enx001e101f0000

测试IP:

curl http://httpbin.org/ip --interface enx001e101f0000

>> {
>>  "origin": ............
>> }

附言:我不确定,但也许摇杆处于错误模式(正如 JohnnyVegas 提到的)。我重新连接了摇杆并获得了有关 GSM 调制解调器的信息,dmesg但这可能是另一个故事。

94780.847155] sd 0:0:0:0: [sda] Attached SCSI removable disk
[94780.864767] usbcore: registered new interface driver option
[94780.864776] usbserial: USB Serial support registered for GSM modem (1-port)

相关内容