Search code examples
serial-portip

TCP/IP over Serial Port


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


Solution

  • 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.