2007年07月20日 星期五

Sierra Wireless AirCard 555 for Debian Linux

这几天在使用联通的掌中宽CDMA无线上网卡,但是只提供了Windows下面的驱动程序。Linux下面的驱动得自己生成。

网卡型号:Sierra Wireless AirCard 555R

我的系统,Debian Linux testing
Kernel,Linux debian 2.6.21-2-686 SMP

创建并编辑下面两个文件:

创建/etc/pcmcia/aircard555.conf:


debian:/etc/pcmcia# more aircard555.conf
card "Sierra Wireless AirCard 555"
manfid 0x0192, 0xa555
cis "cis/aircard555.dat"
bind "serial_cs"

创建/etc/pcmcia/cis/aircard555.cis

debian:/etc/pcmcia/cis# more aircard555.cis
dev_info
no_info
attr_dev_info
EEPROM 250ns, 512b
manfid 0x013f, 0x0710
funcid serial_port
vers_1 7.0, "Sierra Wireless", "AirCard 555", "A555", "Rev 1"
config base 0x0700 mask 0x0073 last_index 0x03
cftable_entry 0x20 [default]
io 0x03f8-0x03ff [lines=3] [8bit] [range]
irq mask 0x3fbc [level]
cftable_entry 0x21
io 0x02f8-0x02ff [lines=3] [8bit] [range]
cftable_entry 0x22
io 0x03e8-0x03ef [lines=3] [8bit] [range]
cftable_entry 0x23
io 0x02e8-0x02ef [lines=3] [8bit] [range]
cftable_entry 0x24
io 0x0000-0x0007 [lines=3] [8bit]

然后应该生成文件aircard555.dat,命令如下:

debian:/etc/pcmcia/cis# pack_cis -o aircard555.dat aircard555.cis

但是,我的系统里面的pack_cis程序有问题,所以我是直接从网上下载的,你可以直接从这里下载aircard555.dat文件,拷贝到相应目录即可。

debian:/etc/pcmcia/cis# dmesg -c
debian:/etc/pcmcia/cis#

这是插入网卡,听到两声beep,
debian:/etc/pcmcia/cis# dmesg
pccard: PCMCIA card inserted into slot 0
pcmcia: registering new device pcmcia0.0
0.0: ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A

可以看到系统已将网卡关联到/dev/ttyS0,在你的系统上有可能设备有所不同。

然后,可以使用pppconfig配置连接。

pppconfig

Main Menu:
Create Create a connection
Provider Name:
aircard
Configure Nameservers (DNS):
(*) Dynamic Use dynamic DNS
Authentication Method for aircard:
CHAP Crypto Handshake Auth Protocol
User Name:
card
Password:
card
Speed:
115200
Pulse or Tone:
(*) Tone
Phone Number:
#777
Choose Modem Config Method

Manually Select Modem Port
/dev/ttyS0

"Properties of aircard"
Please select the property you wish to modify, select "Cancel" to go back
Number #777 Telephone number
User card ISP user name
Password card ISP password
Speed 115200 Port speed
Com /dev/ttyS0 Modem com port
Method CHAP Authentication method

Advanced Advanced Options

Finished Write files and return to main menu.
Previous Return to previous menu
Quit Exit this utility


连接网络:
使用pon或者poff连接或者断开网络。

debian:/etc/pcmcia/cis# pon aircard
debian:/etc/pcmcia/cis# tail /var/log/messages -n 30
Jul 20 17:01:04 debian kernel: 0.0: ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A
Jul 20 17:11:02 debian pppd[17058]: pppd 2.4.4 started by root, uid 0
Jul 20 17:11:03 debian chat[17062]: abort on (BUSY)
Jul 20 17:11:03 debian chat[17062]: abort on (NO CARRIER)
Jul 20 17:11:03 debian chat[17062]: abort on (VOICE)
Jul 20 17:11:03 debian chat[17062]: abort on (NO DIALTONE)
Jul 20 17:11:03 debian chat[17062]: abort on (NO DIAL TONE)
Jul 20 17:11:03 debian chat[17062]: abort on (NO ANSWER)
Jul 20 17:11:03 debian chat[17062]: abort on (DELAYED)
Jul 20 17:11:03 debian chat[17062]: send (ATZ^M)
Jul 20 17:11:03 debian chat[17062]: expect (OK)
Jul 20 17:11:03 debian chat[17062]: ATZ^M^M
Jul 20 17:11:03 debian chat[17062]: OK
Jul 20 17:11:03 debian chat[17062]: -- got it
Jul 20 17:11:03 debian chat[17062]: send (ATDT#777^M)
Jul 20 17:11:03 debian chat[17062]: expect (CONNECT)
Jul 20 17:11:03 debian chat[17062]: ^M
Jul 20 17:11:03 debian chat[17062]: ATDT#777^M^M
Jul 20 17:11:03 debian chat[17062]: CONNECT
Jul 20 17:11:03 debian chat[17062]: -- got it
Jul 20 17:11:03 debian chat[17062]: send (\d)
Jul 20 17:11:04 debian pppd[17058]: Serial connection established.
Jul 20 17:11:04 debian pppd[17058]: Using interface ppp0
Jul 20 17:11:04 debian pppd[17058]: Connect: ppp0 <--> /dev/ttyS0
Jul 20 17:11:09 debian pppd[17058]: CHAP authentication succeeded:
Jul 20 17:11:09 debian pppd[17058]: CHAP authentication succeeded
Jul 20 17:11:10 debian pppd[17058]: local IP address 211.145.37.188
Jul 20 17:11:10 debian pppd[17058]: remote IP address 220.192.0.22
Jul 20 17:11:10 debian pppd[17058]: primary DNS address 220.192.0.130
Jul 20 17:11:10 debian pppd[17058]: secondary DNS address 220.192.8.58

debian:/etc/pcmcia/cis# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5363 errors:0 dropped:0 overruns:0 frame:0
TX packets:5363 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1122730 (1.0 MiB) TX bytes:1122730 (1.0 MiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:211.145.37.188 P-t-P:220.192.0.22 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:72 (72.0 b) TX bytes:87 (87.0 b)

然后就可以上网啦!


debian:/etc/pcmcia/cis# poff aircard
debian:/etc/pcmcia/cis# tail /var/log/messages
Jul 20 17:11:09 debian pppd[17058]: CHAP authentication succeeded
Jul 20 17:11:10 debian pppd[17058]: local IP address 211.145.37.188
Jul 20 17:11:10 debian pppd[17058]: remote IP address 220.192.0.22
Jul 20 17:11:10 debian pppd[17058]: primary DNS address 220.192.0.130
Jul 20 17:11:10 debian pppd[17058]: secondary DNS address 220.192.8.58
Jul 20 17:14:22 debian pppd[17058]: Terminating on signal 15
Jul 20 17:14:22 debian pppd[17058]: Connect time 3.2 minutes.
Jul 20 17:14:22 debian pppd[17058]: Sent 0 bytes, received 122 bytes.
Jul 20 17:14:22 debian pppd[17058]: Connection terminated.
Jul 20 17:14:22 debian pppd[17058]: Exit.


全部文件下载:aircard555.tgz

参考原地址: http://centerclick.org/aircard555/

如果使用pcmciautils,则直接将文件SW_555_SER.cis放到/lib/firmware/下,插入网卡以后,就会自动关联到设备文件/dev/ttyS0。

由 beat 发表于 2007年07月20日 下午04点49分
回复
发表回复









记住我的信息?