LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: niugs

攻克Speedtouch USB ADSL Modem 1.0(中国电信PPPOE拨号的用户必看)

[复制链接]
 楼主| 发表于 2003-9-22 00:05:03 | 显示全部楼层

天邑-110 (tianyi-110)的usb adsl 在redhat9.0中安装(globespan芯片)

十分感激oklqh,为了清楚,我记下了全部安装过程,我想这对象我这样的新人有用的,也请大侠指点迷津!
[root@localhost adsl]# ./configure  //这是驱动目录下,cvs版的
warning: you're running this script as root
root is only required to make install and make cfg

settings:
runtime prefix path = /usr/local (default)
system conf files prefix path = / (default)
driver conf files prefix path = / (default)
driver doc files prefix path = /usr/local (default)
binaries directory = /bin (default)
system conf files directory = /etc (default)
driver conf files directory = /etc/eciadsl (default)
driver doc files directory = /doc/eciadsl (default)
kernel sources path = /usr/src/linux (default)

starting configuration for ECIADSL-0.8 in /root/adsl..

checking make location... /usr/bin/make
checking make version... 3.79.1
checking gcc location... /usr/bin/gcc
checking gcc version... 3.2.2
checking pppd location... /usr/sbin/pppd
checking pppd version... 2.4.1
checking wish location... not found          //不懂,但是没影响安装
checking platform/OS type ... GNU/Linux (little endian), c:1 si:2 i:4

li:4

entering ./
generating Makefile.config... OK
generating config.h... OK
leaving ./

configure script has completed successfully


[root@localhost adsl]# make
cc -ansi -pedantic -Wall -W -c -o eci-load1.o eci-load1.c
cc -ansi -pedantic -Wall -W -c -o pusb.o pusb.c
cc -ansi -pedantic -Wall -W -c -o util.o util.c
cc -lpthread eci-load1.o pusb.o util.o -o eci-load1
cc -ansi -pedantic -Wall -W -c -o eci-load2.o eci-load2.c
cc -ansi -pedantic -Wall -W -c -o semaphore.o semaphore.c
In file included from semaphore.c:12:
/usr/include/sys/ipc.h:25:3: warning: #warning "Files using this header

must be
compiled with _SVID_SOURCE or _XOPEN_SOURCE"
cc -lpthread eci-load2.o pusb.o util.o semaphore.o -o eci-load2
cc -ansi -pedantic -Wall -W -c -o pppoeci.o pppoeci.c
cc -ansi -pedantic -Wall -W -c -o gs7070.o gs7070.c
cc -lpthread pppoeci.o pusb.o gs7070.o util.o -o pppoeci
cc -ansi -pedantic -Wall -W -c -o check-hdlc.o check-hdlc.c
cc -lpthread check-hdlc.o -o check-hdlc
cc -ansi -pedantic -Wall -W -c -o check-hdlc-bug.o check-hdlc-bug.c
cc -lpthread check-hdlc-bug.o -o check-hdlc-bug


[root@localhost adsl]# make install
if [ -n "//usr/local/" -a "//usr/local/" != "/" ]; then install -c -p

-d -m 755
//usr/local/; fi
if [ -n "//" -a "//" != "/" ]; then install -c -p -d -m 755 //; fi
if [ -n "//" -a "//" != "/" ]; then install -c -p -d -m 755 //; fi
if [ -n "//usr/local/" -a "//usr/local/" != "/" ]; then install -c -p

-d -m 755
//usr/local/; fi
install -c -p -d -m 755 //usr/local/bin
install -c -p -d -m 755 //etc/eciadsl
install -c -p -d -m 755 //usr/local/doc/eciadsl
install -c -p -d -m 755 //etc/ppp
install -c -p -d -m 755 //etc/ppp/peers
install -c -p -d -m 755 //tmp/inst
make externdistclean
make[1]: Entering directory `/root/adsl'
rm -f //tmp/inst/*.sed
rm -f -r //tmp/inst
make[1]: Leaving directory `/root/adsl'
rm -f //etc/eciadsl/firmware.bin
rm -f //etc/eciadsl/synch.bin
rm -f //etc/eciadsl/firmware00.bin
rm -f //etc/eciadsl/synch01.bin
rm -f //etc/eciadsl/eci_firm_kit_wanadoo.bin
rm -f //etc/eciadsl/eci_wan.bin
rm -f //etc/eciadsl/eci_wan3.bin
rm -f //etc/eciadsl/eci_wan3.dmt.bin
rm -f //etc/eciadsl/vidpid
rm -f //etc/eciadsl/adsl-skel
install -c -p -m 644 firmware00.bin synch01.bin modemeci.gif

providers.db modems
.db //etc/eciadsl
install -c -p -m 755 eci-load1 eci-load2 pppoeci check-hdlc check-hdlc

-bug //usr
/local/bin
adding ppp_generic alias..
adding ppp_synctty alias..
adding n_hdlc alias..


[root@localhost root]# startmodem

setting up USB support (1/5)..

loading TAP/TUN support
tun loaded successfully

loading firmware (2/5)..

firmware seems to be already loaded

setting up modem (3/5)..

ECI load 2: success
synchronization successful

connecting modem (4/5)..

connection successful

setting up route table (5/5)..

waiting for tap0..
[root@localhost root]# adsl-setup

Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...






LOGIN NAME



Enter your Login Name (default root): ngs6822@e        //这儿应是??



INTERFACE



Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0): tap0             //这儿没错吧?



Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no): no



DNS



Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS

addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here: server

PASSWORD

Please enter your Password:
Please re-enter your Password:

USERCTRL

Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes):

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are

responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing

workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2): 0

Start this connection at boot time

Do you want to start this connection at boot time?
Please enter no or yes (default no):no

** Summary of what you entered **

Ethernet Interface: tap0
User name: ngs6822@e
Activate-on-demand: No
DNS addresses: Supplied by ISP's server
Firewalling: NONE
User Control: yes
Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/ppp/chap-secrets and /etc/ppp/pap-secrets
(But first backing it up to /etc/ppp/chap-secrets.bak)
(But first backing it up to /etc/ppp/pap-secrets.bak)



Congratulations, it should be all set up!

Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown

ppp0'
to bring it down.
Type '/sbin/adsl-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.

[root@localhost root]# adsl-start

[root@localhost root]# adsl-status
Note: You have enabled demand-connection; adsl-status may be

inaccurate.
adsl-status: Link is up and running on interface ppp0
ppp0 Link encapoint-to-Point Protocol
inet addr:218.57.32.185 P-t-P:10.250.1.205

Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:54 (54.0 b) TX bytes:54 (54.0 b)

[root@localhost root]# ifconfig
lo Link encapocal Loopback
   inet addr:127.0.0.1 Mask:255.0.0.0
   UP LOOPBACK RUNNING MTU:16436 Metric:1
   RX packets:9991 errors:0 dropped:0 overruns:0 frame:0
   TX packets:9991 errors:0 dropped:0 overruns:0 carrier:0
   collisions:0 txqueuelen:0
   RX bytes:682593 (666.5 Kb) TX bytes:682593 (666.5 Kb)

ppp0 Link encapoint-to-Point Protocol
     inet addr:218.57.32.185 P-t-P:10.250.1.205 Mask:255.255.255.255
     UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
     RX packets:3 errors:0 dropped:0 overruns:0 frame:0
     TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:3
     RX bytes:54 (54.0 b) TX bytes:54 (54.0 b)

tap0 Link encap:Ethernet HWaddr 00:FF:72:2F:9E:81
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:10 errors:0 dropped:0 overruns:0 frame:0
    TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:560 (560.0 b) TX bytes:364 (364.0 b)

[root@localhost root]# route -n
Kernel IP routing table
Destination      Gateway   Genmask      Flags Metric Ref Use Iface
10.250.1.205     0.0.0.0   255.255.255.255 UH    0    0  0     ppp0
169.254.0.0      0.0.0.0   255.255.0.0      U    0    0  0     lo
127.0.0.0        0.0.0.0   255.0.0.0        U    0    0  0     lo
0.0.0.0       10.250.1.205 0.0.0.0          UG   0    0  0    ppp0


[root@localhost root]# ftp 10.141.3.141 (这是朋友的内网ip)
Connected to 10.141.3.141 (10.141.3.141).
220 Serv-U FTP Server v4.0 for WinSock ready...
Name (10.141.3.141:root): aa
331 User name okay, need password.
Password:
530 Not logged in.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> q
?Ambiguous command
ftp> quit
221 Goodbye!

一会儿就断线了!!!
[root@localhost root]# ping www.sohu.com
ping: unknown host www.sohu.com
[root@localhost root]# route //断线了
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 * 255.255.0.0 U 0 0 0 lo
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
[root@localhost root]# route -n //断线了
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 lo
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
[root@localhost root]# ifconfig //断线了
lo Link encapocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:11397 errors:0 dropped:0 overruns:0 frame:0
TX packets:11397 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:778756 (760.5 Kb) TX bytes:778756 (760.5 Kb)


[root@localhost root]# startmodem

setting up USB support (1/5)..

loading TAP/TUN support
tun loaded successfully

loading firmware (2/5)..

firmware seems to be already loaded

setting up modem (3/5)..

can't set configuration 1
ECI load 2: failed
failed to get synchronization
[root@localhost root]#

in /var/log/messages:

Sep 21 21:20:54 localhost kernel: PPP generic driver version 2.4.2
Sep 21 21:20:54 localhost pppd[4231]: pppd 2.4.1 started by root, uid 0
Sep 21 21:20:54 localhost pppd[4231]: Using interface ppp0
Sep 21 21:20:54 localhost pppd[4231]: Connect: ppp0 <--> /dev/pts/2
Sep 21 21:20:54 localhost /etc/hotplug/net.agent: assuming ppp0 is

already up
Sep 21 21:20:54 localhost pppoe[4232]: PPP session is 2140
Sep 21 21:20:55 localhost pppd[4231]: local IP address 218.57.32.185
Sep 21 21:20:55 localhost pppd[4231]: remote IP address 10.250.1.205
Sep 21 21:20:55 localhost pppd[4231]: primary DNS address

202.102.128.68
Sep 21 21:20:55 localhost pppd[4231]: secondary DNS address

202.102.152.3
Sep 21 21:21:29 localhost kernel: usb-uhci.c: interrupt, status 2,

frame# 1337
Sep 21 21:21:34 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:34 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2

ep 0x2 len 192 ret -110
Sep 21 21:21:39 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:39 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2

ep 0x2 len 192 ret -110
Sep 21 21:21:44 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:44 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2

ep 0x2 len 192 ret -110
Sep 21 21:21:49 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:49 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2

ep 0x2 len 192 ret -110
Sep 21 21:21:50 localhost pppoe[4232]: recv (receivePacket): Network is

down
Sep 21 21:21:50 localhost pppoe[4232]: recv (receivePacket): Network is

down
Sep 21 21:21:50 localhost /etc/hotplug/net.agent: NET unregister event

not supported
Sep 21 21:21:54 localhost pppoe[4232]: send (sendPacket): No such

device or address
Sep 21 21:21:54 localhost pppd[4231]: Modem hangup
Sep 21 21:21:54 localhost pppd[4231]: Connection terminated.
Sep 21 21:21:54 localhost pppd[4231]: Connect time 1.0 minutes.
Sep 21 21:21:54 localhost pppd[4231]: Sent 426 bytes, received 54

bytes.
Sep 21 21:21:54 localhost /etc/hotplug/net.agent: NET unregister event  ///////重点指出,这是什么意思啊?不懂啊

not supported
Sep 21 21:21:54 localhost pppd[4231]: Exit.
Sep 21 21:21:54 localhost adsl-connect: ADSL connection lost;

attempting re-connection.
Sep 21 21:21:59 localhost pppd[4346]: pppd 2.4.1 started by root, uid 0
Sep 21 21:21:59 localhost pppd[4346]: Using interface ppp0
Sep 21 21:21:59 localhost /etc/hotplug/net.agent: assuming ppp0 is

already up
Sep 21 21:21:59 localhost pppd[4346]: Connect: ppp0 <--> /dev/pts/2
Sep 21 21:21:59 localhost modprobe: modprobe: Can't locate module tap0
Sep 21 21:21:59 localhost pppoe[4347]: ioctl(SIOCGIFHWADDR): Session 0:

No such device
Sep 21 21:21:59 localhost pppd[4346]: Modem hangup
Sep 21 21:21:59 localhost pppd[4346]: Connection terminated.
Sep 21 21:21:59 localhost pppd[4346]: Exit.

在断线以后再连就显示如下:
[root@localhost root]# adsl-start
/sbin/adsl-start: line 215: 4251 Terminated $CONNECT "$@"

>/dev/null 2>&1    //我晕了,象终结者三一样,i am terminated!什么含义啊??请大侠指点啦!!
发表于 2003-9-23 01:29:52 | 显示全部楼层
usb adsl modem真折腾人。

用户名就是和你在windows下拨号所用的是一样的,接口写tap0也是对的,不知道会不会是cvs的代码不稳定,造成容易断线,请把刚断线后的/var/log/messages tail一下后帖上来,让大家看看,反正这论坛上已经有人成功拨上了,应该可以帮你解决,或者你可以尝试一下pppd(using pppoe plugin),暂且不用adsl-setup,具体怎么配置可以看看顶楼文章,都是usb modem,有2都是pppoe,应该差不多。
#-----start /etc/ppp/options----
lock
defaultroute
noipdefault
noauth
passive
asyncmap 0
name user@adsl
user user@adsl
lcp-echo-interval 2
lcp-echo-failure 7
plugin /usr/lib/pppd/plugins/pppoe.so
nas0
#usepeerdns
#----end /etc/ppp/options-----
特别注意,将nas0改成你的tap0
另外,最好在/etc/resolve.conf配好你的DNS,我的modem如果不手动配上DNS便无法解析,不知道你会不会这样。
呵呵,怎么变成讨论globespan了?
 楼主| 发表于 2003-9-23 12:22:39 | 显示全部楼层
oklqh朋友,再次谢谢你的热情.
下面是/var/log/messages中的信息(好象在楼上的贴子里有的),在断线之后。此时tap0已没有了!
Sep 21 21:20:55 localhost pppd[4231]: local  IP address 218.57.32.185
Sep 21 21:20:55 localhost pppd[4231]: remote IP address 10.250.1.205
Sep 21 21:20:55 localhost pppd[4231]: primary   DNS address 202.102.128.68
Sep 21 21:20:55 localhost pppd[4231]: secondary DNS address 202.102.152.3                 //这应该是成功了吧?
Sep 21 21:21:29 localhost kernel: usb-uhci.c: interrupt, status 2, frame# 1337
Sep 21 21:21:34 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:34 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2 ep 0x2 len 192 ret -110               //不懂???
Sep 21 21:21:39 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:39 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2 ep 0x2 len 192 ret -110
Sep 21 21:21:44 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:44 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2 ep 0x2 len 192 ret -110
Sep 21 21:21:49 localhost kernel: usb_control/bulk_msg: timeout
Sep 21 21:21:49 localhost kernel: usbdevfs: USBDEVFS_BULK failed dev 2 ep 0x2 len 192 ret -110
Sep 21 21:21:50 localhost pppoe[4232]: recv (receivePacket): Network is down                                  //断线了,why???
Sep 21 21:21:50 localhost pppoe[4232]: recv (receivePacket): Network is down
Sep 21 21:21:50 localhost /etc/hotplug/net.agent: NET unregister event not supported

不知和其对威盛芯片的支持有没有关系,我用的是p2-133a的板子??

我试过了不用adsl-start,用pppd,但在初始化之后(我这儿是startmodem),
ifconfig tap0 up执行之后,pppd命令有些问题,如下:
[root@localhost adsl]# pppd
pppd: /usr/lib/pppd/plugins/pppoe.so: cannot open shared object file: No such file or directory
pppd: Couldn't load plugin /usr/lib/pppd/plugins/pppoe.so
不知using pppoe plugin 什么意思啊?

另外,我这儿可以dns解析,设不设/etc/resolv.conf都一样.能ping 出来一个域名,但不能ping通网络,好象网关没设一样??i don't know why?
ftp 10.141.3.141 是我们这儿的内网ip,我虽然分配的是外网ip(在windowsg下),但能连接上,最起码基本的设置也不错对吗?
-------------纵然不能连上,也谢谢朋友!
发表于 2003-9-23 12:49:46 | 显示全部楼层
这么麻烦,还不如看我的呢!
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=62193
发表于 2003-9-23 17:39:51 | 显示全部楼层
兄弟我看过你的了,是比较简单,但你的有局限性,既内核版本受限(我的虽然使用2.4.22,但那一步只是为了简化,可以使用其他内核然后自己编译驱动程序),还需要TCL/TK,但有一点是相同的,都没有人跟帖说他们使用咱们其中一个方法成功了,比较不解的说~~~~。
哪天针对不同发行版和自编译内核做个包,一个sh install搞定一切,将傻瓜进行到底,不知兄弟有没有兴趣?
发表于 2003-9-23 17:59:46 | 显示全部楼层
TO niugs:
pppd是一个拨号守护进程,如果想要通过pppoe拨号就需要一个pppoe插件,点击这里可以下载一个包含了 pppoe 插件的ppp,./configure&&make&&make install就可以了。
发表于 2003-9-24 18:15:03 | 显示全部楼层

想法不错啊

可惜我装LINUX的40G硬盘彻底坏了,革命要靠你们这些年轻人继续了!


最初由 oklqh 发表
兄弟我看过你的了,是比较简单,但你的有局限性,既内核版本受限(我的虽然使用2.4.22,但那一步只是为了简化,可以使用其他内核然后自己编译驱动程序),还需要TCL/TK,但有一点是相同的,都没有人跟帖说他们使用咱们其中一个方法成功了,比较不解的说~~~~。
哪天针对不同发行版和自编译内核做个包,一个sh install搞定一切,将傻瓜进行到底,不知兄弟有没有兴趣?
 楼主| 发表于 2003-9-24 19:12:21 | 显示全部楼层

pppoe 不能搞定一切....

RFC1483 IPoATM 衔接LLC封装(也就是在windows 下显示rfc1483 llc封装以太网的那一个) 这样的协议不被支持!!尽管也是pppoe和isp拨号的。
在现在的eciadsl驱动中不能上网,希望朋友们少走一些弯路,可以用tianyi-110的驱动(在windows)试一下,如果用不同的协议,会出现和在上面我的贴子里一模一样的毛病。能获得ip和dsn server,有的网能上,有的不行。在troubleshooting里有说明的,上面的协议不被支持!
  ------------------------谢谢oklqh兄的支持,没上成网但把linux用熟了。
晚几个月再用!
发表于 2003-9-24 23:34:07 | 显示全部楼层
别放弃啊,以前也有网友说官方已经有人说speedtouch在linux下是无法驱动的,但我心里有点不信那个邪,没事就到处找资料,琢磨琢磨,终于还是被我搞定了,另外,我认为rfc 2486/1483只是一个桥,用于衔接ATM->PPOE,现在已经被集成到2.4.xx内核里了,可靠性应该是没问题的,与其坐以待毙,不如死马当活马医,说不定明年3月份你可以不换modem了~~~。
继续尝试,我是没有你那modem,但我可以尽我的能力帮你分析原因,你也可以到其他论坛求助,说不定真会碰上个高手,那时候兄弟你就有福了。
发表于 2003-9-24 23:36:32 | 显示全部楼层
TO ibn:
想法不错啊

听口气,应该是前辈了,多谢鼓励,这两天我抽空做,可是我没那么多发行版测试咯~~~,不知有没有好心人帮帮忙~~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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