micro2440使用3G上网卡实现拨号上网(上)

这几天应实验室要求,搞一个3G拨号,下面是鄙人在此过程中的一些记录:

开发板:友善之臂micro2440

3G上网工具:华为EC189

上网卡:天翼云卡

内核版本:

[root@FriendlyARM /]# uname -a
Linux FriendlyARM 2.6.32.2 #3 Mon Oct 29 06:04:30 PDT 2012 armv4tl unknown

1、插入上网工具,内核打印:

[root@FriendlyARM /]# usb 1-1.2: new full speed USB device using s3c2410-ohci and address 5
usb 1-1.2: New USB device found, idVendor=12d1, idProduct=1446
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=4
usb 1-1.2: Product: HUAWEI Mobile
usb 1-1.2: Manufacturer: HUAÿWEI TECHNOLOGIES
usb 1-1.2: SerialNumber: ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
usb 1-1.2: configuration #1 chosen from 1 choice

2、查看一下设备:

[root@FriendlyARM /usb]# ls /dev/ttyUSB*
ls: /dev/ttyUSB*: No such file or directory

3、转换USB模式

[root@FriendlyARM /usb]# ls
cdma2000                   pppdump
chat-cdma2000-connect      pppstats
chat-cdma2000-disconnect   resolv.conf
libz.so.1                  usb_modeswitch
libz.so.1.2.3              usb_modeswitch.conf
pppd                       usb_modeswitch.modeswitch
[root@FriendlyARM /usb]# /usb/usb_modeswitch -c /usb/usb_modeswitch.conf 


Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found devices 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 endpoints 0x08 (out) and 0x87 (in)
Inquiring device details; driverusb 1-1.4: usbfs: process 881 (usb_modeswitch) did not claim interface 0 before use
 will be detached ...
Looking for active driver ...
 No driver found. Either detached before or never attached


SCSI inquiry data (for identification)
-------------------------
  Vendor usb 1-1.4: USB disconnect, address 3
String: HUAWEI  
   Model String: Mass Storage    
Revision String: 2.31
-------------------------


USB description data (for identification)
-------------------------
Manufacturer: HUA TECHNOLOGIES
     Product: HUAWEI Mobile
  Serial No.: 
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x08 for message sending ...
Trying to send message 1 to endpoint 0x08 ...
 OK, message successfully sent
Resetting response endpoint 0x87
 Could not reset endpoint (probably harmless): -62
Resetting message endpoint 0x08
 Could not reset endpoint (probably harmless): -62
 Device is gone, skipping any further commands


Checking for mode switch (max. 20 times, once per second) ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
usb 1-1.4: new full speed USB device using s3c2410-ohci and address 4
usb 1-1.4: New USB device found, idVendor=12d1, idProduct=1001
usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=4
usb 1-1.4: Product: HUAWEI Mobile
usb 1-1.4: Manufacturer: HUAÿWEI TECHNOLOGIES
usb 1-1.4: SerialNumber: ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
usb 1-1.4: configuration #1 chosen from 1 choice
option 1-1.4:1.0: GSM modem (1-port) converter detected
usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.4:1.1: GSM modem (1-port) converter detected
usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.4:1.2: GSM modem (1-port) converter detected
usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2
 Searching for target devices ...
 Searching for target devices ...


Found target device, now opening
 Found correct target device

Mode switch succeeded. Bye.

4、查看USB设备:

[root@FriendlyARM /usb]# ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2

ok,现在有了哦,呵呵,好高兴!!!!

5、拨号

pppd file cdma2000

这里我遇到了如下问题:

[root@FriendlyARM peers]# pppd file cdma2000 
abort on (NO CARRIER)
abort on (ERROR)
abort on (NO DIALTONE)
abort on (BUSY)
abort on (NO ANSWER)
send (AT^M)
expect (OK)
alarm
Failed
Connect script failed

是因为我在配置cdma2000:

nodetach                                                                       
lock                                                                           
/dev/ttyUSB1                                                                   
921600                                                                         
user "photo number"                                                             
password "passwd"                                                              
crtscts                                                                        
hide-password                                                                  
usepeerdns                                                                     
noauth                                                                         
noipdefault                                                                    
novj                                                                           
novjccomp                                                                      
noccp                                                                          
defaultroute                                                                   
ipcp-accept-local                                                              
ipcp-accept-remote                                                             
connect '/usr/sbin/chat -s -v -f /etc/ppp/peers/chat-cdma2000-connect'         
disconnect '/usr/sbin/chat -s -v -f /etc/ppp/peers/chat-cdma2000-disconnect'


接micro2440使用3G上网卡实现拨号上网(下)


你可能感兴趣的:(micro2440使用3G上网卡实现拨号上网(上))