[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] 2 netifs and using netif_set_default() problems

From: zulu4711
Subject: [lwip-users] 2 netifs and using netif_set_default() problems
Date: Fri, 25 Jan 2019 09:23:49 -0700 (MST)

Hope someone can explain or help with this...

I have a small problem with lwIP (or rather the problem is me not
understanding how things work).

I have lwIP (2.1.2 STABLE) running with 2 different netif at the same time,
one is using PPP (over 3G/4G cellular) and the other is using wireless LAN
(WINC1500 module).

All is sweet and dandy, I have multiple socket connections, multiple UDP
"connections", two MQTT publish running, FTP client and HTTP file download
running, all at the same time.

In a separate test, I establish connections on both the PPP link and on the
WiFi connection (to my local network with access to internet) at the same
time. If I use the netif_set_default() function I can change between the 2
active interfaces just fine (using a ping on the device to check slower
response when running over PPP netif).

However (this is where my lack of understanding kicks in ;) if I have f.ex
an active socket connection to a server (on the internet), the moment I
change the default netif to "the other" interface, the data stalls (both
netifs are active and connected all the time). Only if I do a socket
close/open (with this new netif set as default) the socket connection will
work again. If I then change back to the previous netif, the same happens,
data does not come thru (tcp_sndbuf() shows accumulated data).

Basically, is there a way to get around this, or is this something
fundamental that I don't understand ?

Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]