Skip to content

Compatibility with esp_modem? #39

@smartinick

Description

@smartinick

Sorry that i'm missusing an Issued to ask a question!

I've been trying to get wireguard running over via sim800/sim7000 GSM/LTE Modems and to run mqtt (not via http bit via native protocol) over the wireguard tunnel.

My old solution uses arduino-libs, e.g. tinygsm and pubsubclient which both do not work with wireguard.
(Pubsubclient needs a client object in it's initializer which could be wifi client or gsmclient, but not (arduino-)wireguard, and the arduino-wireguard tunnel will not run over tinygsm links).

As this (and the Arduino "version" of wireguard) uses lwip, bit tinygsm client does not I guess the trick is to switch to espidf and libs that use lwip.

So I came to the idea that using esp_modem for the PPP link and this wireguard lib here I should have a basis to use an lwip aware mqtt client.

But I've no idea about lwip interfaces, routes,.... IMHO my guess would be that wireguard registers a lwip interface (

wg_netif = netif_add(
) and somehow the default-route is applied to it.
But on the other hand the esp_modem would like to do the same, but there's no netif_add in it's code (https://github.com/espressif/esp-protocols/tree/master/components/esp_modem) and there's no hint about adding routes?

So both interfaces would need to be daisy-chained from a routing point - wireguard if should be default gateway, but it should have a route that forwards everything to the PPP interface.

But how could this be accomplished?
I'm thankful for any hint as I'm stuck.

Thanks and Best Regards, Martin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions