TCP/IP over Serial Port

こ雲淡風輕ζ 提交于 2021-02-18 18:13:16

问题


I am trying to setup a network interface over one of serialports of the system.

I am using beaglebone and Xbee-wifi modules. Basically I'm trying to communicate 2 beaglebone over serialport bu using a TCP/IP protocole.

I need to connect to the beaglebone via ssh, telnet or via default web port 80. So I do not need a single port working on the serial interface. I need a newtork intarface running over serialport.

Is there anyway to do this?

Hardware : beaglebone black os : angstrom


回答1:


Here's the manual setup I have, run this command:

pppd proxyarp mtu 1280 persist nodeflate noauth lcp-echo-interval 10 crtscts lock 10.10.1.2:10.10.1.1 /dev/ttyUSB0 115200

on one host, and the same command on the other host with the IP addressed swapped. You should now have a ppp0 interface on both machines.

  • You need a null modem cable between the machines
  • Make sure you use the correct /dev/ entry and speed for the serial port
  • Embedded systems tend to configure a serial port as the kernel console, where kernel messages are written, and perhaps configure getty for login sessions over serial as well - you might need to find a way to disable those.

Setting up slip instead of ppp might be an alternative too.



来源:https://stackoverflow.com/questions/19941357/tcp-ip-over-serial-port

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!