LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1407|回复: 4

联通的cdma无线网卡

[复制链接]
发表于 2007-6-11 17:51:44 | 显示全部楼层 |阅读模式
你好,

我不是中国人所以用互联网研究不容易.
如国这儿不是好的地方问这样的问题, 请告诉我比较好的地方.

我的问题是, 我买了一张联通的cdma无线网sim卡.
我也找到了一张没有问题的usb的cdma的无线网卡.

可是用这张卡试一试上网的时候, 联通的ppp服务器不给我回答.

下边可以看我的情况. 有人有想法吗?

Clayton

-------------------

# /etc/ppp/peers/cdma: start with "pppd call cdma"
-detach
debug
connect "/usr/sbin/chat -v -f /etc/ppp/peers/cdma-chat"
defaultroute
usepeerdns
/dev/ttyUSB0
230400
local
novj
noauth
user card
mru 768
mtu 768
# lock
crtscts

-------

# /etc/ppp/chat-cdma:
ABORT BUSY
ABORT ERROR
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'Invalid Login'
ABORT 'Login incorrect'
'' ATZ
OK ATDT#777
CONNECT ''
TIMEOUT 5
~-- ''

Jun 10 18:08:03 portable pppd[4750]: pppd 2.4.4 started by root, uid 0
Jun 10 18:08:04 portable chat[4751]: abort on (BUSY)
Jun 10 18:08:04 portable chat[4751]: abort on (ERROR)
Jun 10 18:08:04 portable chat[4751]: abort on (NO ANSWER)
Jun 10 18:08:04 portable chat[4751]: abort on (NO CARRIER)
Jun 10 18:08:04 portable chat[4751]: abort on (NO DIALTONE)
Jun 10 18:08:04 portable chat[4751]: abort on (Invalid Login)
Jun 10 18:08:04 portable chat[4751]: abort on (Login incorrect)
Jun 10 18:08:04 portable chat[4751]: send (ATZ^M)
Jun 10 18:08:04 portable chat[4751]: expect (OK)
Jun 10 18:08:04 portable chat[4751]: ATZ^M^M
Jun 10 18:08:04 portable chat[4751]: OK
Jun 10 18:08:04 portable chat[4751]:  -- got it
Jun 10 18:08:04 portable chat[4751]: send (ATDT#777^M)
Jun 10 18:08:04 portable chat[4751]: expect (CONNECT)
Jun 10 18:08:04 portable chat[4751]: ^M
Jun 10 18:08:04 portable chat[4751]: ATDT#777^M^M
Jun 10 18:08:04 portable chat[4751]: CONNECT
Jun 10 18:08:04 portable chat[4751]:  -- got it
Jun 10 18:08:04 portable chat[4751]: send (^M)
Jun 10 18:08:04 portable chat[4751]: timeout set to 5 seconds
Jun 10 18:08:04 portable chat[4751]: expect (~)
Jun 10 18:08:04 portable chat[4751]:  230400^M
Jun 10 18:08:09 portable chat[4751]: alarm
Jun 10 18:08:09 portable chat[4751]: send (^M)
Jun 10 18:08:09 portable chat[4751]: send (^M)
Jun 10 18:08:09 portable pppd[4750]: Serial connection established.
Jun 10 18:08:09 portable pppd[4750]: using channel 6
Jun 10 18:08:09 portable pppd[4750]: Using interface ppp0
Jun 10 18:08:09 portable pppd[4750]: Connect: ppp0 <--> /dev/ttyUSB0
Jun 10 18:08:10 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:13 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:16 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:19 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:22 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:25 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:28 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:31 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:34 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:37 portable pppd[4750]: sent [LCP ConfReq id=0x1 <mru 768> <asyncmap 0x0> <magic 0x9efc9125> <pcomp> <accomp>]
Jun 10 18:08:40 portable pppd[4750]: LCP: timeout sending Config-Requests
Jun 10 18:08:40 portable pppd[4750]: Connection terminated.
Jun 10 18:08:40 portable pppd[4750]: Modem hangup
Jun 10 18:08:40 portable pppd[4750]: Exit.
发表于 2007-6-11 17:56:56 | 显示全部楼层
you can try wvdial.
and put wvdial's log.


  1. Here comes the steps.
  2. 1. First you need let your keneral to support USB.
  3. 2. Reboot your system and you can find your CDMA has been found. Or check it
  4. out with dmsg.
  5. 3. After that, the device should be added. Some use /dev/ttyUSB0, some use
  6. /dev/input/ttyACM0 like mine. You can use cat /dev/input/ttyACM0 to verify it.
  7. 4. Config the wvdial with /etc/wvdial.conf.
  8. ++++++++++++++++++++++++++++
  9. [Modem0]
  10. Modem = /dev/modem
  11. #Baud = 230400
  12. Baud = 115200
  13. SetVolume = 0
  14. Dial Command = ATDT
  15. Init1 = ATZ
  16. FlowControl = Hardware (CRTSCTS)

  17. [Dialer cdma]
  18. Username = CARD
  19. Password = CARD
  20. Phone = #777
  21. Stupid Mode = 1
  22. Inherits = Modem0

  23. ++++++++++++++++++
  24. 5. wvdial cdma . Then the pppd will be run.
  25. 6. After this, you still need to do one more thing. Since the server won't add
  26. the DNS server for you like the WINXX.
  27. In your /etc/resolv.conf, add the following lines.
  28. nameserver 220.192.8.58
  29. nameserver 211.97.168.129
  30. The nameserver you can check it out in your window 2K using CDMA to access
  31. the internet.
  32. ifconfig /all

  33. After that, you can enjoy CDMA1X.
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-11 20:55:07 | 显示全部楼层
Thanks a bunch, Yuri, I will give it a try next time I head to Zhongguancun. Something tells me that "Stupid Mode" is probably what does the trick.

Clayton
回复 支持 反对

使用道具 举报

发表于 2007-6-11 21:01:27 | 显示全部楼层
Post by clayton
Thanks a bunch, Yuri, I will give it a try next time I head to Zhongguancun. Something tells me that "Stupid Mode" is probably what does the trick.

Clayton

Your Chinese is pretty good!
But I haven't use a CDMA card to connect to Internet~
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-19 15:12:57 | 显示全部楼层
Yuri, I finally bought this card:
http://www.chinawiki.info/doku.p ... oadband:linux:c610u

wvdial works amazingly well, considering how much headache I had from kppp and pppd (which I still have not seen working in this context). I pared your wvdial script down to the bear essentials:

/etc/wvidial.conf:
[Dialer cdma]
Modem = /dev/ttyUSB0
Username = CARD
Password = CARD
Phone = #777
Stupid Mode = 1

Note that in fact "Stupid Mode" does not seem to be essential, it just speeds up the process.

I also found that on my Debian testing machine, /etc/resolv.conf gets updated automatically, so there is nothing to do after "wvdial cdma" except start surfing. I think on Debian the resolvconf package takes care of /etc/resolv.conf.

Clayton
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表