We use FreeRTOS + TCP in our systems to provide networking to our applications. In the recent years we have added ethernet, wifi and modem support as well. Our modem support is based on a PPP library which isn’t know where it’s originating from. The issue is that it’s already a heavily patched one, and I appear to get blocked due to it. I really want to replace that PPP crap with a properly working one.

I’ve already done some research. The Linux PPP stack is way too complex and would take too much effort to port (if possible at all). There are some other PPP libraries for other embedded OSes, some of them is open source, but would need a considerable amount of time to port to FreeRTOS. lwIP also seems to support PPP, but our networking is already based on +TCP and I really don’t want to throw all these away for the sake of lwIP. I haven’t examined it deeper, if there’s an easy way to cut out PPP from lwIP and used alongside with +TCP that’d be suitable solution.

What are your proposals for a working PPP library on FreeRTOS? LTE modem + PAP/CHAP authentication would be desired. Modem handling (AT commands etc) is managed by us (no problems).

Thanks, regards,
Tamas Selmeci

Hello Tamás, I am sorry to see that your post has stayed unanswered for more than 3 weeks. I had looked at it, but my knowledge of PPP is not enough to answer your questions.
In case you want to write the PPP layer your self, we can give support and provide the necessary hooks in the code.
Regards, Hein

Hello Hein!

The least I want to do is to implement a new PPP library by myself… mostly because I was unable to find a comprehensive description on PPP. It’s described in many dozens of RFC documents and didn’t have the time (yet) to locate the most appropriate RFCs or read them through. I wasn’t in the mood to do so, and had no time either.

I have done some investigation in the topic of “open/free PPP implementations for embedded OSes” and the consequences are the following: either I pick the linux pppd package and strip down to our needs (and resource limitations), or I consider lwip’s PPP stack (which is also a derivative of the linux pppd) and make it run with FreeRTOS properly. Either way, it’s not gonna be an easy ride.

(The third solution is that I find out how to fix our current PPP stack to work with the LTE modem. That PPP stack works perfectly with an older 3G modem using CHAP authentication, but with the new modem the service provider wants PAP authentication and it fails for some reason - most probably our PPP stack is buggy. My idea now is that somehow we make the LTE modem work in 3G mode and perhaps the service provider will ask for CHAP with the new modem too. By the way, the network speed is not that important, because the modem is connected to the MCU via UART @ 115200 bps.)

Hi there Tamas,

I had the “pleasure” to implement PPP some 25 years back. The RFCs you want to look for are 1661 and 1662 for the basic HDLC encoding/layer and 1994 for CHAP (PAP is a no brainer, acceptable exercise for a first year student).

If I remember correctly, I adapted the encoder/decoder from the Berkeley Unix code base and wrote the PAP/CHAP layers myself. Later on my customer bought a license for KADAKs KwikNet which had PPP including those layers built-in. KADAK is out of business now; I’m not sure what the means in terms of licensing and whether the code is now up for grabs if you find a public copy somewhere.

I understand that lwip also has a PPP implementation. Since lwip and FreeRTOS are fairly well integrated, that might be a reasonable starting point.

Many thanks. At least now I know which RFCs to read through as an entry.