免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3394 | 回复: 13
打印 上一主题 下一主题

急:开发板ADSL拨号问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-21 12:08 |只看该作者 |倒序浏览
小弟在自己的电脑LINUX下通过中国电信的ADSL MODEM拨号上网成功。

但移植到开发板上发生了问题,总是收不到包,郁闷了好几天,找不出原因。

以下是在开发板运行#DEBUG=1 adsl-start得到的DEBUG结果

请做过的大侠指点一二,万分感激!!!

---------------------------------------------
* The following section contains information about your system
Tue Feb 7 11:09:28 UTC 2006
Output of uname -a
Linux fa 2.4.18-rmk7-pxa1 #7 二 11月 15 19:32:00 CST 2005 armv4l unknown
---------------------------------------------
* The following section contains information about your network
* interfaces. The one you chose for PPPoE should contain the words:
* 'UP' and 'RUNNING'. If it does not, you probably have an Ethernet
* driver problem.
Output of ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:00:C0:FF:EE:08
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)
Interrupt:37 Base address:0x300

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)

sit0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)

---------------------------------------------
* The following section contains information about kernel modules
* If the module for your Ethernet card is 'tulip', you might
* want to look for an updated version at http://www.scyld.com
Output of lsmod
Module Size Used by Not tainted
usbkbd 2708 0 (unused)
rf 4112 0 (unused)
evdev 3356 0 (unused)
mousedev 4276 0 (unused)
keybdev 1716 0 (unused)
input 3536 0 [usbkbd evdev mousedev keybdev]
---------------------------------------------
* The following section lists your routing table.
* If you have an entry which starts with '0.0.0.0', you probably
* have defined a default route and gateway, and pppd will
* not create a default route using your ISP. Try getting
* rid of this route.
Output of netstat -n -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
---------------------------------------------
Contents of /etc/resolv.conf
* The following section lists DNS setup.
* If you can browse by IP address, but not name, suspect
* a DNS problem.
nameserver 202.96.134.134
nameserver 202.96.128.68
search localhost
---------------------------------------------
* The following section lists /etc/ppp/options.
* You should have NOTHING in that file.
Contents of /etc/ppp/options

---------------------------------------------
* The following section identifies your Ethernet interface
* and user name. Some ISP's need 'username'; others
* need 'username@isp.com'. Try both
ETH=eth0; USER=*****@163.gd
---------------------------------------------
* The following section shows the pppd command we will invoke
pppd invocation
/usr/local/sbin/pppd pty '/usr/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I eth0 -T 80 -U -m 1412 ' noipdefault noauth default-asyncmap defaultroute hide-password nodetach usepeerdns mtu 1492 mru 1492 noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user ******@163.gd lcp-echo-interval 20 lcp-echo-failure 3 debug
---------------------------------------------
using channel 5
Using interface ppp0
Connect: ppp0 <--> /dev/pts/0
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
LCP: timeout sending Config-Requests
Connection terminated.
using channel 6
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
Waiting for 2 child processes...
script /usr/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I eth0 -T 80 -U -m 1412 -D /tmp/pppoe-debug-462/pppoe-debug.txt-0, pid 569
script /usr/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I eth0 -T 80 -U -m 1412 -D /tmp/pppoe-debug-462/pppoe-debug.txt-0, pid 567
sent [LCP ConfReq id=0x2 <mru 1492> <magic 0xcd85dc8>]
pppoe: Timeout waiting for PADO packets
Script /usr/sbin/pppoe -p /var/run/pppoe.conf-adsl.pid.pppoe -I eth0 -T 80 -U -m 1412 -D /tmp/pppoe-debug-462/pppoe-debug.txt-0 finished (pid 567), status = 0x1
sent [LCP ConfReq id=0x2 <mru 1492> <magic 0xcd85dc8>]
sending SIGTERM to process 569
tcflush failed: Bad file descriptor
---------------------------------------------
* The following section is an extract from your log.
* Look for error messages from pppd, such as
* a lack of kernel support for PPP, authentication failure
* etc.
Can't find messages file (looked for /var/{log,adm}/messages
Tue Feb 7 11:10:07 UTC 2006
---------------------------------------------
* The following section is a dump of the packets
* sent and received by rp-pppoe. If you don't see
* any output, it's an Ethernet driver problem. If you only
* see three PADI packets and nothing else, check your cables
* and modem. Make sure the modem lights flash when you try
* to connect. Check that your Ethernet card is in
* half-duplex, 10Mb/s mode. If all else fails,
* try using pppoe-sniff.
rp-pppoe debugging dump
rp-pppoe-3.5
11:10:01.961 SENT PPPoE Discovery (8863) PADI sess-id 0 length 12
SourceAddr 00:00:c0:ff:ee:08 DestAddr ff:ff:ff:ff:ff:ff
01 01 00 00 01 03 00 04 3a 02 00 00 ........:...

11:10:07.078 SENT PPPoE Discovery (8863) PADI sess-id 0 length 12
SourceAddr 00:00:c0:ff:ee:08 DestAddr ff:ff:ff:ff:ff:ff
01 01 00 00 01 03 00 04 3a 02 00 00 ........:...

pppoe: Timeout waiting for PADO packets

论坛徽章:
0
2 [报告]
发表于 2006-02-22 08:44 |只看该作者
我遇到过一回类似的,是/dev/下差文件,ttypX,呵呵,仅供参考。

论坛徽章:
0
3 [报告]
发表于 2006-02-22 10:55 |只看该作者

回复 2楼 独孤九贱 的帖子

我也觉得好象是/dev下差点什么设备

eth0 Link encap:Ethernet HWaddr 00:00:C0:FF:EE:08
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)
Interrupt:37 Base address:0x300

lo Link encapocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)

sit0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)

电脑里的第3个选项不是sit0,而是ppp0

请问大侠,那么我是否应该执行下面这个指令呢?

#ln -s /dev/ttypx ppp0

论坛徽章:
0
4 [报告]
发表于 2006-02-22 11:53 |只看该作者

回复 2楼 独孤九贱 的帖子

我在我的开发板上的/dev下看到有 tty      tty1      ttyS0     ttyS1   ttyS2  ppp      

但是没有看到ttypX,  但我的电脑里的/dev下却有不少ttypX

请问我是不是应该建一个ttypX设备呢?

如何建?

多谢大侠!

论坛徽章:
0
5 [报告]
发表于 2006-02-22 13:15 |只看该作者
原帖由 specialroc 于 2006-2-22 11:53 发表
我在我的开发板上的/dev下看到有 tty      tty1      ttyS0     ttyS1   ttyS2  ppp      

但是没有看到ttypX,  但我的电脑里的/dev下却有不少ttypX

请问我是不是应该建一个ttypX设备呢?

如何建?

多 ...


如何建?你看看原生主机上边的设备属性,然后对照着建一个就是了

论坛徽章:
0
6 [报告]
发表于 2006-02-22 15:39 |只看该作者

回复 5楼 独孤九贱 的帖子

我先在我的电脑上用

#ls -l /dev/ttyp0

它显示 crw-rw-rw-    1 root     tty        3,   0 2003-01-30  /dev/ttyp0

然后我到板上用

#mknod /dev/ttyp0 b 3 0

在/dev里是出现了一个ttyp0

但重新启动,并且播号,还是TIME OUT

在DEBUG产生的文件中,以下部分
using channel 5
Using interface ppp0
Connect: ppp0 <--> /dev/pts/0
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x6202c420>]
LCP: timeout sending Config-Requests
Connection terminated.
我觉得是不是/dev/pts/0没有联接起来?还是它有什么问题呢?


以下是我开发板启动信息(关于网络部分)
Kernel command line: noinitrd root=/dev/mtdblock/0 init=/linuxrc console=ttyS0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
CPU clock = 200.000 Mhz, HCLK = 100.000 Mhz, PCLK = 50.000 Mhz
Initializing S3C2410 buffer pool for DMA workaround
ttyS%d0 at I/O 0x50000000 (irq = 52) is a S3C2410
ttyS%d1 at I/O 0x50004000 (irq = 55) is a S3C2410
ttyS%d2 at I/O 0x50008000 (irq = 5 is a S3C2410
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
eth0: cs8900 rev K(3.3 Volts) found at 0xd0000300
cs89x0 media RJ-45, IRQ 37
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled).
CSLIP: code copyright 1989 Regents of the University of California.
SLIP linefill/keepalive option.
PPP generic driver version 2.4.1
PPP Deflate Compression module registered
PPP BSD Compression module registered
Linux video capture interface: v1.00
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
SIOCADDRT: Network is unreachable

下面是我的pppoe.conf

#***********************************************************************
#
# pppoe.conf
#
# Configuration file for rp-pppoe.  Edit as appropriate and install in
# /etc/ppp/pppoe.conf
#
# NOTE: This file is used by the adsl-start, adsl-stop, adsl-connect and
#       adsl-status shell scripts.  It is *not* used in any way by the
#       "pppoe" executable.
#
# Copyright (C) 2000 Roaring Penguin Software Inc.
#
# This file may be distributed under the terms of the GNU General
# Public License.
#
# LIC: GPL
# $Id: pppoe.conf,v 1.10 2002/04/09 17:28:38 dfs Exp $
#***********************************************************************

# When you configure a variable, DO NOT leave spaces around the "=" sign.

# Ethernet card connected to ADSL modem
ETH=eth0

# ADSL user name.  You may have to supply "@provider.com"  Sympatico
# users in Canada do need to include "@sympatico.ca"
# Sympatico uses PAP authentication.  Make sure /etc/ppp/pap-secrets
# contains the right username/password combination.
# For Magma, use xxyyzz@magma.ca
USER=****@163.gd

# Bring link up on demand?  Default is to leave link up all the time.
# If you want the link to come up on demand, set DEMAND to a number indicating
# the idle time after which the link is brought down.
DEMAND=no
#DEMAND=300

# DNS type: SERVER=obtain from server; SPECIFY=use DNS1 and DNS2;
# NOCHANGE=do not adjust.
DNSTYPE=SERVER

# Obtain DNS server addresses from the peer (recent versions of pppd only)
# In old config files, this used to be called USEPEERDNS.  Changed to
# PEERDNS for better Red Hat compatibility
PEERDNS=yes

DNS1=
DNS2=

# Make the PPPoE connection your default route.  Set to
# DEFAULTROUTE=no if you don't want this.
DEFAULTROUTE=yes

### ONLY TOUCH THE FOLLOWING SETTINGS IF YOU'RE AN EXPERT

# How long adsl-start waits for a new PPP interface to appear before
# concluding something went wrong.  If you use 0, then adsl-start
# exits immediately with a successful status and does not wait for the
# link to come up.  Time is in seconds.
#
# WARNING WARNING WARNING:
#
# If you are using rp-pppoe on a physically-inaccessible host, set
# CONNECT_TIMEOUT to 0.  This makes SURE that the machine keeps trying
# to connect forever after adsl-start is called.  Otherwise, it will
# give out after CONNECT_TIMEOUT seconds and will not attempt to
# connect again, making it impossible to reach.
CONNECT_TIMEOUT=30

# How often in seconds adsl-start polls to check if link is up
CONNECT_POLL=2

# Specific desired AC Name
ACNAME=

# Specific desired service name
SERVICENAME=

# Character to echo at each poll.  Use PING="" if you don't want
# anything echoed
PING="."

# File where the adsl-connect script writes its process-ID.
# Three files are actually used:
#   $PIDFILE       contains PID of adsl-connect script
#   $PIDFILE.pppoe contains PID of pppoe process
#   $PIDFILE.pppd  contains PID of pppd process
CF_BASE=`basename $CONFIG`
PIDFILE="/var/run/$CF_BASE-adsl.pid"

# Do you want to use synchronous PPP?  "yes" or "no".  "yes" is much
# easier on CPU usage, but may not work for you.  It is safer to use
# "no", but you may want to experiment with "yes".  "yes" is generally
# safe on Linux machines with the n_hdlc line discipline; unsafe on others.
SYNCHRONOUS=no

# Do you want to clamp the MSS?  Here's how to decide:
# - If you have only a SINGLE computer connected to the ADSL modem, choose
#   "no".
# - If you have a computer acting as a gateway for a LAN, choose "1412".
#   The setting of 1412 is safe for either setup, but uses slightly more
#   CPU power.
CLAMPMSS=1412
#CLAMPMSS=no

# LCP echo interval and failure count.
LCP_INTERVAL=20
LCP_FAILURE=3

# PPPOE_TIMEOUT should be about 4*LCP_INTERVAL
PPPOE_TIMEOUT=80

# Firewalling: One of NONE, STANDALONE or MASQUERADE
FIREWALL=NONE

# Linux kernel-mode plugin for pppd.  If you want to try the kernel-mode
# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
LINUX_PLUGIN=

# Any extra arguments to pass to pppoe.  Normally, use a blank string
# like this:
PPPOE_EXTRA=""

# Rumour has it that "Citizen's Communications" with a 3Com
# HomeConnect ADSL Modem DualLink requires these extra options:
# PPPOE_EXTRA="-f 3c12:3c13 -S ISP"

# Any extra arguments to pass to pppd.  Normally, use a blank string
# like this:
PPPD_EXTRA=""


########## DON'T CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
# If you wish to COMPLETELY overrride the pppd invocation:
# Example:
# OVERRIDE_PPPD_COMMAND="pppd call dsl"

# If you want adsl-connect to exit when connection drops:
# RETRY_ON_FAILURE=no

是不是我内核中少了什么选项,还是配置上不对?

请大侠指导一下.

论坛徽章:
0
7 [报告]
发表于 2006-02-22 16:25 |只看该作者
原帖由 specialroc 于 2006-2-22 15:39 发表
我先在我的电脑上用

#ls -l /dev/ttyp0

它显示 crw-rw-rw-    1 root     tty        3,   0 2003-01-30  /dev/ttyp0

然后我到板上用

#mknod /dev/ttyp0 b 3 0

在/dev里是出现了一个ttyp0

但重 ...


1、我好久不搞这个了,也记不清了,不敢肯定我的思路就能解决你的问题;
2、ttyp0类型是c,你在目标板上建立是的b
3、我当时解决问题后,修改笔记,贴在http://www.skynet.org.cn/viewthread.php?tid=82&fpage=1的持续更新某一个版本中,希望对你有所帮助
4、至于内核,与PPP协议相关的当然要全部选上

[ 本帖最后由 独孤九贱 于 2006-2-22 16:27 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2006-02-22 21:36 |只看该作者

多谢大侠

万分感谢!

论坛徽章:
0
9 [报告]
发表于 2006-02-23 09:29 |只看该作者
原帖由 specialroc 于 2006-2-22 21:36 发表
万分感谢!

如果你解决了,贴个贴子把解决办法发上来大家分享一下吧!

论坛徽章:
0
10 [报告]
发表于 2006-02-23 10:01 |只看该作者

如果解决就贴上来,现在还在看你的笔记。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP