cancel
Showing results for 
Search instead for 
Did you mean: 

How to use lwip + pppos with STM32F4 and CubeMx ?

YCARD
Associate

Hi all,

I'm currently working on a GPS tracker module with STM32F446RE. We have the whole GPS feature done but now we are trying to implement communication.

When it comes to sending messages (SMS) or doing phone calls everything is fine. But now we want to do some secure connection to AWS server. They require TLS 1.2 so we can't use our module to communicate with AWS.

So far so good, we just need to use lwip + mbedtls with our board! But CubeMX does not allow us to do so because we don't have Ethernet, that firstly seems logical, but we want to do PPP over serial, so we don't need (and don't have anyway) Ethernet enabled.

So that is our first problem; the second problem we are facing is that we can't find any good resources or example for the use of lwip (ppp os) + mbed tls + stm32.

Does any one have an example of lwip working with pppos and also using Mbed TLS ? If one would only have an example working with lwip and pppos that would be wonderful and would help us advance in the project.

Regards,

Y.

10 REPLIES 10
Ken CK
Associate II

Unfortunately I cannot help you but looking for an answer on the same issue. I need to set up an AWS IoT communication with STM32F4 and a GPRS modem. Have you been able to solve the problem or do you have any hints where I should look at? Thank you!

Mark Reds
Associate II

Hi everybody,

me too I'm facing this today. I need to setup lwip + pppos with STM32F4 and CubeMX. It is past a few time since you wrote here, have you solved it?

BSzek.1
Associate

I still haven’t ... Simply built a manual tcp socket connection, until I can get some hints on how to implement PPPOS.

Mark Reds
Associate II

Have you already seen this post? https://habr.com/ru/post/419037/

It's written in russian but Google Translate works fine. I've found other similars articles to this one and, due to my poor experience, I didn't understand how to get it work on a board without any ethernet hardware on it.

Lix Paulian
Senior

I find it really weird that ST did not adapt CubeMX in such a way as to allow configuring LwIP over PPP. An UART should be sufficient to allow LwIP. This is a totally valid configuration. CubeMX insisting to have an Ethernet peripheral configured to allow activating LwIP is rather an annoying bug than a feature!

Piranha
Chief II

For using lwIP over serial you would have to implement a serial driver for lwIP on your own. In that case the question becomes - what does CubeMX give you over just taking lwIP from it's homepage?

Ken CK
Associate II

I think lwIP is far from trivial, also PPP needs significant efforts to collect detailed descriptions and learn it ... I would expect a simple guide with at least a few comments to "implement this and that" which would help us to get started. Just like CubeMX generates all other codes for e.g. Ethernet. Now I feel I'm in the dark with this problem to get solved, though I believe this solution would be used by many others, so the community would benefit from it.

Lix Paulian
Senior

PPP is not really that complicated, I used to do a lot of PPP on Unix machines end of the 90s, so I know how it works. However, the point is here that I find it really annoying that one can not enable LwIP in cube without ethernet; on the other hand, MBEDTLS can be enabled, even without a TCP/IP stack.

Probably I will go the direct way and get LwIP from its original GIT repo.

FatihTaşt.
Associate

greetings to everyone. Has anyone found the solution? What would you suggest for my project? Thank you.