2

openwrt 環境で qemu 内でドングル 3G を使用しようとしています。ドングル参照: HUAWEi - K4605。

まず、option.c にパッチ カーネル ソースがあります。

--- option.c    2010-12-09 22:29:45.000000000 +0100
+++ option.c    2012-11-12 17:39:17.000000000 +0100
@@ -165,6 +165,7 @@
 #define HUAWEI_PRODUCT_E143D           0x143D
 #define HUAWEI_PRODUCT_E143E           0x143E
 #define HUAWEI_PRODUCT_E143F           0x143F
+#define HUAWEI_PRODUCT_E14C6           0x14C6
 #define HUAWEI_PRODUCT_K4505           0x1464
 #define HUAWEI_PRODUCT_K3765           0x1465
 #define HUAWEI_PRODUCT_E14AC           0x14AC
@@ -477,6 +478,7 @@
    { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) },
    { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) },
    { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff) },
+   { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14C6, 0xff, 0xff, 0xff) },
    { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) },
    { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
    { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) },

また、kmod-usb-serial-option または kmod-usb-uhci としてカーネル モジュールをインストールしました。次に、/etc/usb_modeswitch.conf でホスト マシンの自動 usb_modeswitch を無効にしました。

私のドングルには、ストレージ mod で使用している場合は 12d1:14c1、ドングル 3G mod では 12d1:14c6 の 2 つの製品/ベンダー ID があります。USBオプションでqemuを実行します:

-usb -usbdevice host:12d1:14c6 -usbdevice host:12d1:14c1 

ストレージ mod に lsusb を使用して、qemu マシンでデバイスを検出します。今、私はそれを切り替える必要があります:/usr/bin/usb_modeswitch -v 12d1 -p 14c1 -W -M "55534243123456780000000000000011062000000100000000000000000000"

このステップは機能していません。usb_modeswitch.c にデバッグ コードを追加すると、usb_bulk_write は機能しているのに、usb_bulk_read が応答しないことがわかります。usb_modeswitch のソースを変更して、usb_bulk_read の無制限の待機を削除しました。この変更のおかげで、lsusb を使用して、ドングルの切り替えに成功したが、dev エントリ ttyUSB0 が /dev に作成されていないことを確認できます...

usb_modeswitch のトレースは次のとおりです。

root@OpenWrt:~# /usr/bin/usb_modeswitch -v 12d1 -p 14c1 -W -M "55534243123456780000000000000011062000000100000000000000000000"
scsi 2:0:0:0: CD-ROM            Vodafone CD ROM (Huawei)  2.31 PQ: 0 ANSI: 2
scsi 3:0:0:0: Direct-Access     Vodafone Storage (Huawei)      PQ: 0 ANSI: 2
sd 3:0:0:0: [sdb] Attached SCSI removable disk

Taking all parameters from the command line


 usb_modeswitch: handle USB devices with multiple modes
 Version 1.2.3 (C) Josua Dietze 2012
 Based on libusb0 (0.1.12 and above)

 PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x14c1
TargetVendor=   not set
TargetProduct=  not set
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

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


Looking for default devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 0409:55aa
  searching devices, found USB ID 12d1:14c1
   found matching vendor ID
   found matching product ID
   adding device
 Found device in default mode, class or configuration (1)
Accessing device 003 on bus 001 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found; name unknown, limitation of libusb1
 OK, driver "unkown" detached
 Could not get INQUIRY response (error -110)

USB description data (for identification)
-------------------------
Manufacturer: Vodafone Group (Huawei) 
     Product: Vodafone Mobile Broadband (Huawei) 
  Serial No.: not provided
-------------------------
Looking for active driver ...
 No driver found. Either detached before or never attached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
libusb:error [op_clear_halt] clear_halt failed error -1 errno 32
 Could not reset endpoint (probably harmless): -34
Resetting message endpoint 0x01
libusb:error [op_clear_halt] clear_halt failed error -1 errno 32
 Could not reset endpoint (probably harmless): -34
usb 1-2.1: USB disconnect, address 3
 Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.

誰かが解決策を持っていますか? 一括エンドポイントを介してドングルにメッセージを送信するには、特定の方法で qemu を構成する必要がありますか?

ありがとう、

4

0 に答える 0