Huawey E173

Ethernet card, Wi-Fi, Bluetooth, IrDA, ADSL-модемы, модемы

Модератор: Модераторы разделов

Ответить
IMB
Сообщения: 2561
ОС: Debian

Huawey E173

Сообщение IMB »

Доброго дня!
Есть плата с ARM-процессором на которой надо наладить работу Huawey E173 от Megafon. Используется ядро 2.6.18 и возможности его сменить, на данный момент, нет.
Конфигурация ядра:

Код: Выделить всё

CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_DEBUG=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_SOC=y
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_HDRC_HCD=y
CONFIG_USB_TI_CPPI_DMA=y
CONFIG_USB_MUSB_LOGLEVEL=0
CONFIG_USB_ACM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_OPTION=y



После подсоединения устройства:

Код: Выделить всё

# usb 1-1: USB disconnect, address 3
usb 1-1: new high speed USB device using musb_hdrc and address 4
usb 1-1: Product: HUAWEI Mobile
usb 1-1: Manufacturer: HUAWEI Technology
usb 1-1: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
scsi5 : SCSI emulation for USB Mass Storage devices
  Vendor: HUAWEI    Model: Mass Storage      Rev: 2.31
  Type:   CD-ROM                             ANSI SCSI revision: 02
scsi 4:0:0:0: Attached scsi generic sg0 type 5
  Vendor: HUAWEI    Model: SD Storage        Rev: 2.31
  Type:   Direct-Access                      ANSI SCSI revision: 02
sd 5:0:0:0: Attached scsi removable disk sda
sd 5:0:0:0: Attached scsi generic sg1 type 0

/proc/bus/usb/devices

Код: Выделить всё

........................
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=1446 Rev= 0.00
S:  Manufacturer=HUAWEI Technology
S:  Product=HUAWEI Mobile
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

/etc/usb_modeswitch.conf

Код: Выделить всё

EnableLogging=1
DefaultVendor = 0x12d1
DefaultProduct = 0x1446
MessageEndpoint = 0x01
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
CheckSuccess=5
Interface=0

Запускаю ./usb_modeswitch -c /etc/usb_modeswitch

Код: Выделить всё

usb 1-1: usbfs: process 780 (usb_modeswitch) did not claim interface 0 before use
Note: target parameter missing; usb 1-1: USB disconnect, address 4
success check limited
Looking for default devices ...
 Found devices in default mode, class or configuration (1)
Accessing device 004 on bus 001 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
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 ("usb-storage")
 OK, driver "usb-storage" detached

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

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
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
 Error resetting endpoint: -71
Resetting message endpoint 0x01
 Error resetting endpoint: -19
 Device is gone, skipping any further commands

Checking for mode switch (max. 5 times, once per second) ...
 (For a better success check provide target IDs or class)
 Original device vanished after switching

Mode switch most likely succeeded. Bye.

# usb 1-1: new high speed USB device using musb_hdrc and address 5
usb 1-1: Product: HUAWEI Mobile
usb 1-1: Manufacturer: HUAWEI Technology
usb 1-1: configuration #1 chosen from 1 choice
scsi6 : SCSI emulation for USB Mass Storage devices
scsi7 : SCSI emulation for USB Mass Storage devices
  Vendor: HUAWEI    Model: Mass Storage      Rev: 2.31
  Type:   CD-ROM                             ANSI SCSI revision: 02
scsi 6:0:0:0: Attached scsi generic sg0 type 5
  Vendor: HUAWEI    Model: SD Storage        Rev: 2.31
  Type:   Direct-Access                      ANSI SCSI revision: 02
sd 7:0:0:0: Attached scsi removable disk sda
sd 7:0:0:0: Attached scsi generic sg1 type 0

lsusb

Код: Выделить всё

12d1:140c (bus 1, device 5)
0000:0000 (bus 1, device 1)

/proc/bus/usb/devices

Код: Выделить всё

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=140c Rev= 0.00
S:  Manufacturer=HUAWEI Technology
S:  Product=HUAWEI Mobile
C:* #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

При вызове PPP ошибка Failed to open /dev/ttyUSB0: No such device
Пробовал устройства от ttyUSB0 до ttyUSB7, результат тот же.
Подозреваю, что не хватает некоего модуля ядра, но какого? Подскажите?
Или драйвер USB_ACM не умеет работать с этим устройством, так как в его описании сказано:

Код: Выделить всё

If your modem only reports "Cls=ff(vend.)" in the descriptors in
/proc/bus/usb/devices, then your modem will not work with this driver.

Спасибо.
Спасибо сказали:
IMB
Сообщения: 2561
ОС: Debian

Re: Huawey E173

Сообщение IMB »

Вынес драйвер usb_serial в модуль и после usb_modeswitch загрузил с указанием параметров.
Теперь связь устанавливается через ttyUSB0, в логе следующее:

Код: Выделить всё

ATZ
OK
AT+CGDCONT=1,"IP","internet"
OK
ATD *99#
CONNECTScript /root/test/chat -s -S -V -t 60 -f /etc/ppp/chat/megafon finished (pid 743), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x97ed2aa6>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x10b6dc1> <pcomp> <accomp>]
sent [LCP ConfRej id=0x0 <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x97ed2aa6>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MD5> <magic 0x10b6dc1>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MD5> <magic 0x10b6dc1>]
sent [LCP EchoReq id=0x0 magic=0x97ed2aa6]
rcvd [LCP DiscReq id=0x2 magic=0x10b6dc1]
rcvd [CHAP Challenge id=0x1 <3a99284b62d563563c414eb49e269d7d>, name = "UMTS_CHAP_SRVR"]
sent [CHAP Response id=0x1 <3cc31735d9f719d82883448b2268adfe>, name = "gdata"]
rcvd [LCP EchoRep id=0x0 magic=0x10b6dc1 97 ed 2a a6]
rcvd [CHAP Success id=0x1 ""]
CHAP authentication succeeded
CHAP authentication succeeded
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfNak id=0x2 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfNak id=0x3 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfNak id=0x4 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x5 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]
rcvd [IPCP ConfRej id=0x5 <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x6 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfNak id=0x6 <addr 10.216.160.171> <ms-dns1 10.77.48.19> <ms-dns2 10.77.48.3>]
sent [IPCP ConfReq id=0x7 <addr 10.216.160.171> <ms-dns1 10.77.48.19> <ms-dns2 10.77.48.3>]
rcvd [IPCP ConfAck id=0x7 <addr 10.216.160.171> <ms-dns1 10.77.48.19> <ms-dns2 10.77.48.3>]
Could not determine remote IP address: defaulting to 10.64.64.64
local  IP address 10.216.160.171
remote IP address 10.64.64.64
primary   DNS address 10.77.48.19
secondary DNS address 10.77.48.3
Terminating on signal 2
Connect time 0.2 minutes.
Sent 0 bytes, received 0 bytes.
sent [LCP TermReq id=0x2 "User request"]
rcvd [LCP TermAck id=0x2]
Connection terminated.

Программа была прервана по Ctrl-C, так как создалось впечатление, что программа зависла.
Что ж, теперь буду разбираться с настройками PPPd.
Спасибо сказали:
Ответить