Raspberry Pi 3 Ethernet over serial

Old school internet!

There is some trickery because of the Raspberry 3 bluetooth feature. See [1].

By default, the nice hardware serial port /dev/ttyAMA0 is dedicated to the bluetooth connection.

Disable bluetooth in /boot/config.txt:

dtoverlay=pi3-disable-bt

Disable kernel use of the serial port by removing from /boot/cmdline.txt (/dev/serial0 is an alias for /dev/ttyAMA0):

console=serial0,115200

Test the connection with minicom on each side:

sudo minicom -b 9600 -D /dev/ttyAMA0 -o

Finally the pppd command on each side (do not forget the invert the IP addresses):

sudo pppd nodetach noauth proxyarp /dev/ttyAMA0 115200 10.0.0.2:10.0.0.1 passive local maxfail 0 nocrtscts xonxoff
Using interface ppp0
Connect: ppp0 <--> /dev/ttyAMA0
Deflate (15) compression enabled
Cannot determine ethernet address for proxy ARP
local  IP address 10.0.0.2
remote IP address 10.0.0.1

You get a nice ppp0 network interface:

ppp0      Link encap:Point-to-Point Protocol
          inet addr:10.0.0.1  P-t-P:10.0.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:55 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:4346 (4.3 KB)  TX bytes:5610 (5.6 KB)

Start a python webserver to test the connection:

python3 -m http.server 8080

Downloading at 20-40 kilobyte per second, amazing!

References

[1]"Configuring The GPIO Serial Port On Raspbian Jessie Including Pi 3", https://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3/
[2]"How-To: Ethernet Bridge over serial", https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=149927