gpt4 book ai didi

linux - 两台机器之间通过串行方式进行 ppp 传输,无需调制解调器

转载 作者:太空宇宙 更新时间:2023-11-04 05:47:39 25 4
gpt4 key购买 nike

无法删除此问题。它已移至另一个论坛。

我正在尝试通过串行线路在两台 Linux 计算机之间建立 PPP 连接。我关注了these instructions但没有成功。两台机器分别是Fedora 28 LinuxIntel(R) Core(TM) i7-7600U CPU @ 2.80GHz上和一个带有 Linux 4.14.0-xilinx-v2018.2 的定制板在ARMv7 A上。

以下是我在 Fedora 上得到的命令和输出机器:

$ sudo pppd -detach debug passive lock xonxoff 192.168.10.100:192.168.10.1 /dev/ttyUSB0 9600
[sudo] password for user:
using channel 3
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0xa0000> <magic 0x888f0bcb> <pcomp> <accomp>]
LCP: timeout sending Config-Requests

这是我得到的命令和输出 Linux 4.14.0-xilinx-v2018.2

root@cpe-08:/data# pppd -detach debug passive lock xonxoff 192.168.10.1:192.168.10.100 /dev/ttyS0 9
600

是的,你没有看错,没有其他输出 Linux4.14.0-xilinx-v2018.2 .

我期待看到ppp0两台机器上都有界面,但没有看到任何一个。

这是 ifconfig 的输出上Fedora 28运行后pppd命令

$ ifconfig
enp0s20f0u2u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.24.176.116 netmask 255.255.255.0 broadcast 172.24.176.255
inet6 fe80::63fd:53b6:8b94:1abf prefixlen 64 scopeid 0x20<link>
ether 00:0e:c6:a5:94:88 txqueuelen 1000 (Ethernet)
RX packets 5016 bytes 457454 (446.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1368 bytes 141981 (138.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 54:e1:ad:8c:32:a5 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xec200000-ec220000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 184264 bytes 109696260 (104.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 184264 bytes 109696260 (104.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:62:c0:6c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp58s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 100.96.37.134 netmask 255.255.255.192 broadcast 100.96.37.191
inet6 fe80::3728:7f03:ba95:5757 prefixlen 64 scopeid 0x20<link>
inet6 2620:10d:c0be:2226:7261:932:1670:38bb prefixlen 64 scopeid 0x0<global>
ether f8:34:41:af:1a:0e txqueuelen 1000 (Ethernet)
RX packets 13305344 bytes 16391874252 (15.2 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5691206 bytes 1228184162 (1.1 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

这是 ifconfig 的输出在Linux 4.14.0-xilinx-v2018.2上运行 pppd 后命令

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:35:00:01:08
inet addr:172.24.176.208 Bcast:172.24.176.255 Mask:255.255.255.0
inet6 addr: fe80::204:35ff:fe00:108/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2515 errors:0 dropped:0 overruns:0 frame:0
TX packets:753 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:221227 (216.0 KiB) TX bytes:93698 (91.5 KiB)
Interrupt:27 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:36160 errors:0 dropped:0 overruns:0 frame:0
TX packets:36160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1516794 (1.4 MiB) TX bytes:1516794 (1.4 MiB)

我知道Linux 4.14.0-xilinx-v2018.2编译后包含ppp支持。我本来会包含“.config”的摘录,但构建时并未提供它。我知道的原因ppp支持在内核中是因为我问了我们的构建人员,他说他包含了它。如果有任何帮助,我将不胜感激。

最佳答案

经过一段时间的摸索,我终于让它工作了。这是 Fedora 机器的命令

sudo 0pppd -detach local debug noauth passive lock 192.168.10.100:192.168.10.1 /dev/ttyUSB0 9600

这是适用于 Linux 4.14.0-xilinx-v2018.2 机器的命令

pppd -detach persist debug local noauth passive lock 192.168.10.1:192.168.10.100 /dev/ttyS0 9600

过去两个月我一直在努力解决这个问题。不知道为什么这个问题最初被降级。我想其他人也有同样的问题。

关于linux - 两台机器之间通过串行方式进行 ppp 传输,无需调制解调器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52524552/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com