canavaroski90
canavaroski90

Reputation: 107

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

Upvotes: 4

Views: 13566

Answers (2)

Petr Vasiliev
Petr Vasiliev

Reputation: 41

By some reason pppd receipt not working on Raspberry PI and Orange PI.

So found working solution via Slip:

sudo slattach -p slip -s 115200 /dev/ttyAMA0 &
sudo ifconfig sl0 10.10.1.1 pointopoint 10.10.1.2 up

on second machine just swap IP's addresses

Upvotes: 0

nos
nos

Reputation: 229058

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.

Upvotes: 6

Related Questions