uclinux 中的拨号问题

发布于 2022-07-26 16:50:10 字数 5049 浏览 17 评论 0

我使用
pppd pty '/mnt/mtd/pppoe/bin/pppoe -I eth1' name test

打印出的log如下:
Micheal ---i= 3 open /dev/null
Micheal ---enter auth_check_options
Micheal --- user=test our_name=test
Micheal --- enter auth_check line 743
Micheal --- filename=/mnt/mtd/pppoe/pap-secrets
Micheal ---using pty device check
Micheal ---device name:
Micheal --- enter sys_init()
Micheal --- new_style_driver ppp_dev_fd=3
Micheal ---flags=2
Micheal ---sock_fd=4
Micheal ---init ok
Micheal ---getlogin=(unknown)
Micheal ---pppd 2.3.8 started by (unknown), uid 0
Micheal ---create linkpid file
Micheal --- open pid file
Micheal --- exit creater pidfile
Micheal --- enter 576
Micheal --- enter for loop
Micheal --- Get a pty master/slave pair if the pty
Micheal --- enter get_pty()
Micheal --- mfd=5, i=1ptyname=/dev/ptyp1
Micheal --- pty_name=/dev/ttyp1
Micheal --- sfd=6
MIcheal --- pty_slave=6
Micheal ---enter set_up_tty
Micheal ---enter set_up_tty 1006
Micheal ---enter set_up_tty 1009
Micheal ---crtscts=1
Micheal ---jump out switch
Micheal --- enter 1047
Micheal ---exit set_up_tty
Micheal ---line 650 debug
Micheal ---line 656 debug
Micheal ---line 671 debug
Micheal ---757
Micheal ---760
Micheal ---772
Micheal ---baud_rate=57600
Micheal ---set up the serial device
Micheal ---enter tty_establish_ppp
Micheal ---generic_establish_ppp
Micheal ---using channel 35Micheal ---Using version 0.0.0 of PPP driver
Micheal ---Using interface ppp0
Micheal ---create linkpid file
Micheal --- open pid file
Micheal --- exit creater pidfile
Micheal ---Connect: ppp0 <--> /dev/ttyp1
Micheal --- enter lcp_lowerup lcp.c line 405
Micheal ---set_xaccm: 00000000 00000000 00000000 60000000
Micheal ---send_config: mtu = 1500
Micheal ---send_config: asyncmap = ffffffff
Micheal ---fsm.c line 81 case initial
Micheal ---line 871
Micheal ---start protocol
Micheal ---lcp.c  line 348
Micheal ---fsm.c line 152
Micheal ---case closed
Micheal ---case closed re request
Micheal --- filename=/mnt/mtd/pppoe/pap-secrets
Micheal ---fd_ppp=5
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252    // nr = read(ppp_fd, buf, len); 为什么返回-1
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=1
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---getinput line 1181
Micheal --- new_style_driver=1
Micheal --- nr=-1 line 1252
Micheal --- enter her 1185
Micheal --- open_ccp_flag=0
Micheal --- got_sigchld=0
Micheal ---924

我的 /dev下面有: ppp c 108 0]
                            ptyp0 ptyp1 ptys0 pty s1 ttyp0 ttyp1 ttys0 ttys1
ifconfig,结果就是不出现ppp0
我怀疑是上面的nr=-1引起的,但是到底是什么原因导致 read(ppp_fd, buf, len)=-1呢????
大虾们救命啊!!!!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文