PPP protocol over serial port

ppp
orfruit picture orfruit · Mar 9, 2017 · Viewed 7.1k times · Source

Where can I find some low level information about old days PPP protocol modems, over serial line? I have a embedded WiFi SOC that I want to use from linux as a modem, so "connect" via AT commands, configure, etc, then relay all TCP packets transparently.

I know it can be done since a lot of GSM modems perform this (via AT) but I cannot find a useful start how to implement in SOC (a lot of garbage from google). I mean what will be the logical flow so linux drivers can see a standard modem.

I also presume that I can skip the PPP part and redirect somehow (make a virtual adapter in linux side) that will exchange packets over serial line in a proprietary format, eventually helped by flow control and or other GPIOs tied to my SOC but I feel that I am re-inventing the wheel.

Thanks for suggestions,

Answer

neonzeon picture neonzeon · Apr 24, 2017

You'll find the original PPP RFC documents listed at the bottom of this Wikipedia writeup on PPP.

I would start by reading Section 3 in RFC 1661.

LWIP is one of the better documented/supported lightweight implementations of PPP. (actually full TCP) However, the source is still several thousands of lines and in my opinion daunting to a newcomer.

This is the smallest working implementation of PPP that I know of. It's easy to get to work on mbed-supported boards AFTER following the instructions on how to set up PPP networking on Windows. (Did not test it on a Linux box)

Depending on your application, it might indeed be simpler to define your own protocol to transfer data between your WIFI SOC and a Linux box.

For example, this lab is a good guide on how to use node.js to move embedded data to the internet via a serial port and a PC.