在 arm9 嵌入式板上配置华为 e303e 加密狗

在 arm9 嵌入式板上配置华为 e303e 加密狗

我一直在尝试在 arm9 主板上连接 3g 调制解调器。bot 调制解调器未被检测到。这是我的 lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 12d1:14fe Huawei Technologies Co., Ltd.

我的 dmesg 给出了类似的信息:

scsi 5:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
sr0: scsi-1 drive
scsi 6:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
sr 5:0:0:0: Attached scsi CD-ROM sr0
sr 5:0:0:0: Attached scsi generic sg0 type 5
sd 6:0:0:0: Attached scsi generic sg1 type 0
sd 6:0:0:0: [sda] Attached SCSI removable disk
scsi 5:0:0:0: rejecting I/O to dead device

我已经为 arm 安装了 usb_modeswitch。当我运行 usb modeswitch 命令时:usb_modeswitch -c /etc/usb_modeswitch.conf -v 0x12d1 -p 0x14fe -W

Warning: TargetProductList overrides TargetProduct!
 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.1.4 (C) Josua Dietze 2010
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x14fe
TargetVendor=   0x12d1
TargetProduct=  not set
TargetClass=    not set
TargetProductList="14fe,1506"

DetachStorageOnly=0
HuaweiMode=1
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint=  not set
MessageContent=""
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check disabled
System integration mode disabled


Looking for target devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 12d1:14fe
     found matching vendor ID
  found matching product ID from list
 Found devices in target mode or class (1)
Looking for default devices ...
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 12d1:14fe
found matching vendor ID
found matching product ID
 adding device
Found devices in default mode or class (1)
Accessing device 004 on bus 002 ...
 Using endpoints 0x01 (out) and 0x81 (in)
 Using endpoints 0x01 (out) and 0x81 (in)
 Inquiring device details; driver will be detached ...
 Looking for active driver ...
 OK, driver found ("dummy")
 OK, driver "dummy" detached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: HUAWEI  
    Model String: Mass Storage    
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
  Product: HUAWEI Mobile
    Serial No.: not provided
-------------------------
Sending Huawei control message ...
 OK, Huawei control message sent
-> Run lsusb to note any changes. Bye.

root@arago:/etc/udev/rules.d# scsi 5:0:0:0: rejecting I/O to dead device

因此当我再次运行 lsusb 命令时:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 12d1:14fe Huawei Technologies Co., Ltd. 

usb 被检测为大容量存储器,但并未被检测为调制解调器。

usb_模式切换器

DisableSwitching=0                                                           
# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>"                                    

EnableLogging=1                                                        
DefaultVendor = 0x12d1             
DefaultProduct = 0x1506
MessageEndPoint = "0x01"
iMessageContent = "55534243000000000000000000000011060000000000000000 0000000000
TargetVendor = 0x12d1                                                           
TargetProductList="14fe,1506"                                                   
HuaweiMode = 1 

我需要为 usb_modeswitch 编写任何规则吗?我的 /lib/udev 中没有规则文件,但 /etc/udev/rules.d 中有一些文件。

为什么我的 3g 加密狗被检测为大容量存储而不是调制解调器?我还需要做什么?请尽快帮助我。

答案1

首先插入 usb_wan.ko、option.ko、async.ko。在 /lib/udev/rules.d 中写入 40-usb_modeswitch.rules,然后运行 ​​modeswitch。对于 wvdial 配置,这个网站对我有帮助 http://www.sisalik.ee/janek/wp/arhiiv/223

相关内容