I am trying to create a socket connection through lwip.
on the call
lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) fails on a routing error. Stepping through the code I can see that ip4.c returns NULL as it can’t find a
netif which has the correct settings for the requested dest ip address.
I think the modem itself is properly set in ppp mode. I used the following sequence to get it in ppp:
Get IP Address
(I can’t ping this, I think it’s shielded of by provider)
Enable ppp mode
I have lwip sio.h functions implemented, so that they read/write from/to my LTE modem. I can see data being transferred in and out of lwip core, so I think I have this part working properly as well.
I suspect I am missing proper configuration before calling
pppos_create. I can see that the implementation of
pppos_create also takes care of adding the
netif, but it does that with “any” ipaddress/broadcast/subnet. I tried to take care of the
netif_add myself, where I also supply the IP address of the modem, its subnet, and its default gateway. Unfortunately this makes no change for the ip_route. It still returns NULL.
I would really appreciate some help / guidance.
I published the current state of this project here:
Many thanks in advance!