liarlen 发表于 2010-5-23 21:34

今天db120刷openwrt挂3g网卡wifi上网成功!!!

移动的td网络实在是不敢恭维,家里靠窗户边能收到信号,隔一堵墙就收不到了。
一直在找便宜的3g路由器,最好带wifi的,这样可以把路由器放到窗边,连接好后就可以wifi上网了。在51nb找到这篇帖子:目前已知最便宜的3G路由器方案
经过几天淘宝搜索,发现db120最便宜,花69到家搞了个。根据51nb的一篇文章,非常好,我参照其中一部分,实现了dualwan 这篇文章一步一步搞来,终于搞定3g网卡做wan,共享上网。
其实那些教程都见得很清楚了,菜鸟我在这里只提几个菜鸟容易出问题的地方。希望对大家有帮助。。

1.default vendor和 defaultproduct如何得到?
用USBVIEW这个软件。
我的3g网卡是星网锐捷td2000的,usb-modeswitch.conf文件如下:
DefaultVendor= 0x04cc
DefaultProduct= 0x226e
# choose one of these:
DetachStorageOnly=1
HuaweiMode=1
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
2.安装软件包的时候为啥不成功?
安装软件包的教程在这里   openwrt安装软件包图文教程
重要的一点:先让路由器本身能上网!!我家没有宽带,只好用3g上网卡上网,共享给本本的网卡,网卡连db120的wan口。。你自己可以看自己的情况搞。
这个很重要,这个原理好像是windows中的软件的自动更新一样,必须pc能上网,才能更新。我开始一直以为要下载回来安装的。。后来才知道opkg是直接从网络上下载自动安装的。
3.最好不要开upnp,最好不要关qos,反正我做着两个操作之后,3g网络老是断开重连。这个不能考证是不是普遍问题、、
4.openwrt编辑文件最好学学vi如何编辑文件。反正我这个菜鸟开始连这个都不会的。
vi 有两种模式, vi usb_modeswitch.conf 之后进入的是命令模式,按i键进入编辑模式才能编辑文件内容,编辑完毕按esc会回到命令模式,打:wq是保存退出。这几点应该够用了。。

这些都是我自己按网上搜到的教程搞的时候遇到的菜鸟问题,希望对大家有用。。

[ Edited byliarlen on 2010-5-23 21:37 ]

seaxp 发表于 2010-5-23 21:38

:D 参观一下~~~~~

liarlen 发表于 2010-5-23 21:40

楼上全是神卡。。

hh968 发表于 2010-5-23 21:40

非常具体和实用,虽然用不上,还是表示支持。

seaxp 发表于 2010-5-23 21:43

Posted by liarlen on 2010-5-23 21:40 http://www.ibmnb.com/images/common/back.gif
楼上全是神卡。。
曾经是发烧友啊,现在解毒了。

liarlen 发表于 2010-5-23 21:47

现在卡价比房价长得还厉害,搞不起。。:D

上一张网络接口的图。。

[ Edited byliarlen on 2010-5-23 21:50 ]

roybin 发表于 2010-5-23 22:13

拨号设备那填的什么?

就是那个usbacy啊什么的东东?

l另外,能否把教程再列一边?

roybin 发表于 2010-5-23 22:24

后面的
MessageContent="5553424312345678000000000000061b000000020000000000000000000000
如何知道?

liarlen 发表于 2010-5-24 17:59

回复 #7 roybin 的帖子

我这个拨号设备那个添/dev/ttyACM0
MessageContent="5553424312345678000000000000061b000000020000000000000000000000
还像是固定的。。。不用改

badpenguin 发表于 2010-5-24 18:22

恭喜……

roybin 发表于 2010-5-24 18:40

谢了,我试验下
顺便问下,速度如何?

USB接在1还是2上?

[ Edited byroybin on 2010-5-24 18:42 ]

roybin 发表于 2010-5-24 20:57

还有,请问你用的是什么版本的openwrt?

能否把你配置的network上传下,谢谢:)

roybin 发表于 2010-5-24 21:41

还有,请问你用的是什么版本的openwrt? 在哪里下载:)

zmd99 发表于 2010-5-25 00:49

又一个成功了。。。。。。。

liarlen 发表于 2010-5-30 23:59

Posted by roybin on 2010-5-24 18:40 http://www.ibmnb.com/images/common/back.gif
谢了,我试验下
顺便问下,速度如何?

USB接在1还是2上?

[ Edited byroybin on 2010-5-24 18:42 ]
速度个人感觉跟插在本子上没区别。。。
插usb2 , usb1 插上 不能用,至今不知道如何搞。。

liarlen 发表于 2010-5-31 00:03

Posted by roybin on 2010-5-24 20:57 http://www.ibmnb.com/images/common/back.gif
还有,请问你用的是什么版本的openwrt?

能否把你配置的network上传下,谢谢:)

在这里下最新版本现在是 0528版了,我也刷一下。。
http://www.openwrt.org.cn/bbs/index.php
我不知道配置的network在哪里。。。给个路径 我发个。。

klxn2008 发表于 2010-6-1 22:26

Posted by liarlen on 2010-5-23 21:34 http://www.ibmnb.com/images/common/back.gif
移动的td网络实在是不敢恭维,家里靠窗户边能收到信号,隔一堵墙就收不到了。
一直在找便宜的3g路由器,最好带wifi的,这样可以把路由器放到窗边,连接好后就可以wifi上网了。在51nb找到这篇帖子:目前已知最 ...


请问你在那个商家买的 我也想买 加我个qq841212667给我网址好么 谢谢

roybin 发表于 2010-6-6 08:57

谢谢 liarlen

现在搞定

双TD DB120合并中。。。


唯一没搞定的就是要手动
usb_modeswitch -W
ifup td01
这两个命令

没搞明白如何自动执行这两个命令

roybin 发表于 2010-6-6 12:18

不会配置脚本啊,直接代码贡献下吧
呵呵

klxn2008 发表于 2010-6-6 22:41

Posted by roybin on 2010-6-6 08:57 http://www.ibmnb.com/images/common/back.gif
谢谢 liarlen

现在搞定

双TD DB120合并中。。。


唯一没搞定的就是要手动
usb_modeswitch -W
ifup td01
这两个命令

没搞明白如何自动执行这两个命令
   


能不能出一个教程 真的 我是小白 能不能帮帮忙 无限感激 能不能加我qq 841212667教一下我

roybin 发表于 2010-6-6 23:07

你出什么问题啦,我回复你就是了

现在在研究iphone,没时间写教程啊。。。

wenlh 发表于 2010-6-6 23:45

我901+db120拨不上号
/etc/gcom$ dmesg | grep usb
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
usb usb1: configuration #1 chosen from 1 choice
usb usb2: configuration #1 chosen from 1 choice
usbcore: registered new interface driver cdc_acm
usbcore: registered new interface driver usblp
usb 2-1: new full speed USB device using bcm63xx_ohci and address 2
usbcore: registered new interface driver usbserial
usb 2-1: configuration #1 chosen from 1 choice
usbserial_generic 2-1:1.0: generic converter detected
usb 2-1: generic converter now attached to ttyUSB0
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
usbcore: registered new interface driver usb-storage
usb 2-1: USB disconnect, address 2
usbserial_generic 2-1:1.0: device disconnected
usb 2-1: new full speed USB device using bcm63xx_ohci and address 3
usb 2-1: device descriptor read/64, error -62
usb 2-1: configuration #1 chosen from 1 choice
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
usb 2-1: reset full speed USB device using bcm63xx_ohci and address 3
usb 2-1: USB disconnect, address 3
usb 2-1: new full speed USB device using bcm63xx_ohci and address 4
usb 2-1: device descriptor read/64, error -62
usb 2-1: configuration #1 chosen from 1 choice
usbserial_generic 2-1:1.0: generic converter detected
usb 2-1: generic converter now attached to ttyUSB0
usb 2-1: USB disconnect, address 4
usbserial_generic 2-1:1.0: device disconnected
usb 2-1: new full speed USB device using bcm63xx_ohci and address 5
usb 2-1: device descriptor read/64, error -62
usb 2-1: configuration #1 chosen from 1 choice
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
usb 2-1: reset full speed USB device using bcm63xx_ohci and address 5
usb 2-1: USB disconnect, address 5
usb 2-1: new full speed USB device using bcm63xx_ohci and address 6
usb 2-1: device descriptor read/64, error -62
usb 2-1: configuration #1 chosen from 1 choice
usbserial_generic 2-1:1.0: generic converter detected
usb 2-1: generic converter now attached to ttyUSB0
usb 2-1: USB disconnect, address 6
usbserial_generic 2-1:1.0: device disconnected
usb 2-1: new full speed USB device using bcm63xx_ohci and address 7
usb 2-1: device descriptor read/64, error -62
usb 2-1: configuration #1 chosen from 1 choice
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
usb 2-1: reset full speed USB device using bcm63xx_ohci and address 7
usb 2-1: USB disconnect, address 7
usb 2-1: new full speed USB device using bcm63xx_ohci and address 8
usb 2-1: device descriptor read/64, error -62
usb 2-1: configuration #1 chosen from 1 choice
usbserial_generic 2-1:1.0: generic converter detected
usb 2-1: generic converter now attached to ttyUSB0
usb 2-1: USB disconnect, address 8
usbserial_generic 2-1:1.0: device disconnected
usb 2-1: new full speed USB device using bcm63xx_ohci and address 9
usb 2-1: device descriptor read/64, error -62
usb 2-1: configuration #1 chosen from 1 choice
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
/etc/gcom$ cat /proc/bus/usb/devices

T:Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=1 Spd=12MxCh= 1
B:Alloc=0/900 us ( 0%), #Int=0, #Iso=0
D:Ver= 1.10 Cls=09(hub) Sub=00 Prot=00 MxPS=64 #Cfgs=1
P:Vendor=1d6b ProdID=0001 Rev= 2.06
S:Manufacturer=Linux 2.6.32.10 ohci_hcd
S:Product=BCM63XX integrated OHCI controller
S:SerialNumber=bcm63xx
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub) Sub=00 Prot=00 Driver=hub
E:Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=9 Spd=12MxCh= 0
D:Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=1
P:Vendor=1ab7 ProdID=5700 Rev= 1.00
S:Manufacturer=USB 1.1 Storage Device
S:Product=00000000000123456789
S:SerialNumber=00000000000123456789
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:Ad=04(O) Atr=02(Bulk) MxPS=64 Ivl=0ms
E:Ad=85(I) Atr=02(Bulk) MxPS=64 Ivl=0ms

T:Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=1 Spd=480 MxCh= 2
B:Alloc=0/800 us ( 0%), #Int=0, #Iso=0
D:Ver= 2.00 Cls=09(hub) Sub=00 Prot=00 MxPS=64 #Cfgs=1
P:Vendor=1d6b ProdID=0002 Rev= 2.06
S:Manufacturer=Linux 2.6.32.10 ehci_hcd
S:Product=BCM63XX integrated EHCI controller
S:SerialNumber=bcm63xx
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub) Sub=00 Prot=00 Driver=hub
E:Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
/etc/gcom$usb_modeswitch -W -I -R -c /etc/a.conf
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 009 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
Reading config file: /etc/a.conf

* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.0 (C) Josua Dietze 2010
* Based on libusb 0.1.12

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=0x1ab7
DefaultProduct= 0x5700
TargetVendor=   not set
TargetProduct=not set
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent= not set
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice disabled
Success check disabled
System integration mode disabled


Looking for default devices ...
searching devices, found USB ID 1ab7:5700
   found matching vendor ID
   found matching product ID
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Found default devices (1)
Accessing device 009 on bus 002 ...

USB description data (for identification)
-------------------------
Manufacturer: USB 1.1 Storage Device
   Product: 00000000000123456789
Serial No.: 00000000000123456789
-------------------------
Warning: no switching method given.
Resetting usb device .
OK, device was reset
-> Run lsusb to note any changes. Bye.

/etc/gcom$ usb_modeswitch -W -I-c /etc/b.conf
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 009 on 002
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
Reading config file: /etc/b.conf

* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.0 (C) Josua Dietze 2010
* Based on libusb 0.1.12

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=0x1ab7
DefaultProduct= 0x5700
TargetVendor=   not set
TargetProduct=not set
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061b000000030000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice disabled
Success check disabled
System integration mode disabled


Looking for default devices ...
searching devices, found USB ID 1ab7:5700
   found matching vendor ID
   found matching product ID
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Found default devices (1)
Accessing device 009 on bus 002 ...

USB description data (for identification)
-------------------------
Manufacturer: USB 1.1 Storage Device
   Product: 00000000000123456789
Serial No.: 00000000000123456789
-------------------------
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x04 ...
OK, message successfully sent
-> Run lsusb to note any changes. Bye.

/etc/gcom$ echo "AT^INDLED" > /dev/ttyUSB0
/etc/gcom$ echo "AT^INDLED" > /dev/ttyUSB0
/etc/gcom$ ifup td01
Error setting PIN, check card manually
td01(3g): Failed to set the PIN code.
/etc/gcom$ insmod usbserial vendor=0x1ab7 product=0x2000
insmod: can't insert 'usbserial': File exists
/etc/gcom$ rmmod usbserial
/etc/gcom$ insmod usbserial vendor=0x1ab7 product=0x2000
/etc/gcom$ echo "AT^INDLED" > /dev/ttyUSB0
/etc/gcom$ ifup td01
Error setting PIN, check card manually
td01(3g): Failed to set the PIN code.:'(
页: [1]
查看完整版本: 今天db120刷openwrt挂3g网卡wifi上网成功!!!