You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to bind web server to both station and AP network.
When I run Station and IP without setting an IP and station receive the same IP as AP then web server works on both.
I was thinking about a PR to enable correct behavior. My one idea was to replace IP_ADDR_ANY with provided IP in following line:
err_t res = tcp_bind(tcp, IP_ADDR_ANY, port);
However, it will require running 2 web servers at the same time, which is inefficient.
Another idea is to modify this line to bind to both networks regardless the IP. I saw this working when IP is the same for both Station and IP. However, due to lack of lwIP knowledge, I don't know how to enforce that for different ip.
I'm willing to make a PR for that but I would need some guidance / ideas first.
Regards,
Matzz
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to bind web server to both station and AP network.
When I run Station and IP without setting an IP and station receive the same IP as AP then web server works on both.
However when I set different IP for station then only AP is accessible. My sample code is here:
https://github.com/Matzz/Sming/blob/StationAndApHttpServer/samples/StationAndApHttpServer/app/application.cpp
I was thinking about a PR to enable correct behavior. My one idea was to replace
IP_ADDR_ANY
with provided IP in following line:However, it will require running 2 web servers at the same time, which is inefficient.
Another idea is to modify this line to bind to both networks regardless the IP. I saw this working when IP is the same for both Station and IP. However, due to lack of lwIP knowledge, I don't know how to enforce that for different ip.
I'm willing to make a PR for that but I would need some guidance / ideas first.
Regards,
Matzz
The text was updated successfully, but these errors were encountered: