当前位置: 技术问答>linux和unix
华为 3G上网卡 E1750 在DM6446上移植的问题
来源: 互联网 发布时间:2017-01-26
本文导语: root@192.168.1.2:/opt/3g# lsusb Bus 001 Device 002: ID 12d1:1446 Bus 001 Device 001: ID 04d6:0000 Mentor Graphics root@192.168.1.2:/opt/3g# source init.sh root@192.168.1.2:/opt/3g# ./usb_modeswitch Looking for target devices ... No devices in t...
root@192.168.1.2:/opt/3g# lsusb
Bus 001 Device 002: ID 12d1:1446
Bus 001 Device 001: ID 04d6:0000 Mentor Graphics
root@192.168.1.2:/opt/3g# source init.sh
root@192.168.1.2:/opt/3g# ./usb_modeswitch
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 033 on bus 001 ...
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)
-------------------------
Manuusb 1-1: usbfs: process 1168 (usb_modeswitch) did not claim interface 0 before use
facturer: HUAWEIusb 1-1: USB disconnect, address 2
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
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
root@192.168.1.2:/opt/3g# usb 1-1: new high speed USB device using musb_hdrc and address 3
pl2303 1-1:1.0: PL-2303 converter detected
usb 1-1: PL-2303 converter now attached to ttyUSB0
pl2303 1-1:1.1: PL-2303 converter detected
usb 1-1: PL-2303 converter now attached to ttyUSB1
pl2303 1-1:1.2: PL-2303 converter detected
usb 1-1: PL-2303 converter now attached to ttyUSB2
scsi2 : SCSI emulation for USB Mass Storage devices
scsi3 : SCSI emulation for USB Mass Storage devices
Vendor: HUAWEI Model: Mass Storage Rev: 2.31
Type: CD-ROM ANSI SCSI revision: 02
Vendor: HUAWEI Model: SD Storage Rev: 2.31
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi3, channel 0, id 0, lun 0
root@192.168.1.2:/opt/3g# echo ATZ>/dev/ttyUSB0
usb 1-1: bash timed out on ep0out
root@192.168.1.2:/opt/3g# cat /dev/ttyUSB0
usb 1-1: cat timed out on ep0out
OK
root@192.168.1.2:/opt/3g# pppd call wcdma &
[1] 1479
root@192.168.1.2:/opt/3g# usb 1-1: pppd timed out on ep0out
usb 1-1: pppd timed out on ep0out
abort on (NO CARRIER)
abort on (ERROR)
abort on (NO DIALTONE)
abort on (BUSY)
abort on (NO ANSWER)
send (^MAT^M)
expect (OK)
AT^M^M
OK
-- got it
send (^MATZ^M)
expect (OK)
^M
ATZ^M^M
OK
-- got it
send (^MAT+CGDCONT=1,"IP","3gnet",,0,0^M)
expect (OK)
^M
AT+CGDCONT=1,"IP","3gnet",,0,0^M^M
OK
-- got it
send (ATDT*99#^M)
expect (CONNECT)
^M
ATDT*99#^M^M
CONNECT
-- got it
send (d)
Serial connection established.
usb 1-1: pppd timed out on ep0out
Using interface ppp0
Connect: ppp0 /dev/ttyUSB0
PAP authentication succeeded
Could not determine remote IP address: defaulting to 10.64.64.64
not replacing default route to eth0 [192.168.1.3]
Cannot determine ethernet address for proxy ARP
local IP address 172.24.192.54
remote IP address 10.64.64.64
root@192.168.1.2:/opt/3g# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.64.64.64 * 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.3 0.0.0.0 UG 0 0 0 eth0
root@192.168.1.2:/opt/3g# route del -net 192.168.1.0 netmask 255.255.255.0 deth0
root@192.168.1.2:/opt/3g# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.64.64.64 * 255.255.255.255 UH 0 0 0 ppp0
default 192.168.1.3 0.0.0.0 UG 0 0 0 eth0
root@192.168.1.2:/opt/3g# ping 61.4.82.114
PING 61.4.82.114 (61.4.82.114) 56(84) bytes of data.
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
--- 61.4.82.114 ping statistics ---
26 packets transmitted, 0 received, 100% packet loss, time 44203ms
网卡应该是识别了,而且已经拨号成功了,为什么会ping不通呢? 有没有人做过这个,给指点下
|
最近我们的RD也在用华为的3G卡(E180)做LINUX/Android下的开发,不过总是跟ISP的沟通有问题,参见下面的log,猜想可能的原因是1》CHAP-SECRET用的不对,我们用的是bogus;2》PPP opinion。看到你的3G卡接入没有问题,能否帮忙释疑?非常感谢。
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1 12d1 1001
I//system/xbin/plugwatch( 494): /sys/class/tty/ttyUSB*: No such file or directory
I//system/xbin/plugwatch( 494): rmmod: delete_module 'option' failed (errno 2)
I//system/xbin/plugwatch( 494): usbserial specific modprobe for our specific device
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.0 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.0 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.1 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.1 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.2 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.2 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.3 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.3 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.4 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.4 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addtty ttyUSB0 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addtty ttyUSB0 12d1 1001
I//system/xbin/plugwatch( 494): NUM_TTY = 3
I//system/xbin/plugwatch( 494): NEW_TTY = /dev/ttyUSB2
I//system/xbin/plugwatch( 494): TODO!!!! shorten the sleep
I//system/xbin/plugwatch( 494): check if the SIM card is there and ready port /dev/ttyUSB2
I//system/xbin/plugwatch( 494): chat -t 4 -ev ABORT '+CME ERROR:' ABORT '+CPIN: SIM PIN' '' '' '' AT OK AT+CPIN? OK /dev/ttyUSB2
I//system/xbin/plugwatch( 494): ^BOOT:28061036,0,0,0,21
I//system/xbin/plugwatch( 494): ^SRVST:1
I//system/xbin/plugwatch( 494): ^MODE:5,4
I//system/xbin/plugwatch( 494): ^RSSI:17
I//system/xbin/plugwatch( 494): ^SIMST:1
I//system/xbin/plugwatch( 494): ^SRVST:2
I//system/xbin/plugwatch( 494): AT
I//system/xbin/plugwatch( 494): OK
I//system/xbin/plugwatch( 494): AT+CPIN?
I//system/xbin/plugwatch( 494): +CPIN: READY
I//system/xbin/plugwatch( 494): OK
I//system/xbin/plugwatch( 494): SIM PRESENT
I//system/xbin/plugwatch( 494): HOTPLUG addtty ttyUSB1 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addtty ttyUSB1 12d1 1001
I//system/xbin/plugwatch( 494): NUM_TTY = 3
I//system/xbin/plugwatch( 494): NEW_TTY = /dev/ttyUSB2
I//system/xbin/plugwatch( 494): HOTPLUG addtty ttyUSB2 12d1 1001
[ 140.080392] init: untracked pid 1817 exited
[ 140.133651] init: untracked pid 1825 exited
I//system/xbin/plugwatch( 494): --- OPTION addtty ttyUSB2 12d1 1001
D/AndroidRuntime( 1828):
D/AndroidRuntime( 1828): >>>>>>>>>>>>>> AndroidRuntime START
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1 12d1 1001
I//system/xbin/plugwatch( 494): /sys/class/tty/ttyUSB*: No such file or directory
I//system/xbin/plugwatch( 494): rmmod: delete_module 'option' failed (errno 2)
I//system/xbin/plugwatch( 494): usbserial specific modprobe for our specific device
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.0 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.0 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.1 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.1 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.2 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.2 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.3 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.3 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.4 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addusb /devices/platform/dwc_otg.1/usb2/2-1/2-1.1/2-1.1:1.4 12d1 1001
I//system/xbin/plugwatch( 494): HOTPLUG addtty ttyUSB0 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addtty ttyUSB0 12d1 1001
I//system/xbin/plugwatch( 494): NUM_TTY = 3
I//system/xbin/plugwatch( 494): NEW_TTY = /dev/ttyUSB2
I//system/xbin/plugwatch( 494): TODO!!!! shorten the sleep
I//system/xbin/plugwatch( 494): check if the SIM card is there and ready port /dev/ttyUSB2
I//system/xbin/plugwatch( 494): chat -t 4 -ev ABORT '+CME ERROR:' ABORT '+CPIN: SIM PIN' '' '' '' AT OK AT+CPIN? OK /dev/ttyUSB2
I//system/xbin/plugwatch( 494): ^BOOT:28061036,0,0,0,21
I//system/xbin/plugwatch( 494): ^SRVST:1
I//system/xbin/plugwatch( 494): ^MODE:5,4
I//system/xbin/plugwatch( 494): ^RSSI:17
I//system/xbin/plugwatch( 494): ^SIMST:1
I//system/xbin/plugwatch( 494): ^SRVST:2
I//system/xbin/plugwatch( 494): AT
I//system/xbin/plugwatch( 494): OK
I//system/xbin/plugwatch( 494): AT+CPIN?
I//system/xbin/plugwatch( 494): +CPIN: READY
I//system/xbin/plugwatch( 494): OK
I//system/xbin/plugwatch( 494): SIM PRESENT
I//system/xbin/plugwatch( 494): HOTPLUG addtty ttyUSB1 12d1 1001
I//system/xbin/plugwatch( 494): --- OPTION addtty ttyUSB1 12d1 1001
I//system/xbin/plugwatch( 494): NUM_TTY = 3
I//system/xbin/plugwatch( 494): NEW_TTY = /dev/ttyUSB2
I//system/xbin/plugwatch( 494): HOTPLUG addtty ttyUSB2 12d1 1001
[ 140.080392] init: untracked pid 1817 exited
[ 140.133651] init: untracked pid 1825 exited
I//system/xbin/plugwatch( 494): --- OPTION addtty ttyUSB2 12d1 1001
D/AndroidRuntime( 1828):
D/AndroidRuntime( 1828): >>>>>>>>>>>>>> AndroidRuntime START