-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.0 Network Refactoring #8760
Conversation
Now all libs have been checked yet. More to do on WiFi side
👋 Hello me-no-dev, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
Closes #8735 |
libraries/WiFiProv/src/WiFiProv.cpp
Outdated
@@ -17,6 +17,10 @@ | |||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |||
|
|||
*/ | |||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#pragma once is necessary in a cpp file?
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems to be a copy&paste result.
Nice work anyway! Kudos!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funny... I do not remember touching this file at all 😆 maybe it felt left out and decided to make a statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good. Just some suggestions. Everything I've tested so far works flawlessly. Will do more testing and report if anything is out of the ordinary.
* else error code | ||
*/ | ||
/* | ||
* Deprecated Methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mark all the newly deprecated functions with the deprecated
attribute ?
https://en.cppreference.com/w/cpp/language/attributes/deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. There is too much code out there that uses those functions. Let's roll out as-is and re-think deprecation with 3.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirming. Is this supposed updated in this PR or is it a leftover from tests ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to update the libs for some things to work
@@ -0,0 +1,62 @@ | |||
/* | |||
Server.h - Server class for Raspberry Pi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should update this line to reflect the actual description of this file. I think as long as the copyright and the license stays untouched it should be fine. (might be wrong though)
@@ -0,0 +1,115 @@ | |||
/* | |||
Client.h - Base class that provides Client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should update this line to reflect the actual description of this file. I think as long as the copyright and the license stays untouched it should be fine. (might be wrong though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I am also a bit scared of touching other's headers, so I would rather not
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Create ESP_NetworkInterface class and have Ethernet extending it * Update CMakeLists.txt * Split networking from WiFi (H2 can now use Ethernet) Now all libs have been checked yet. More to do on WiFi side * Fix build errors * Guard WiFi classes and fix RMII ETH examples * Decouple network related libraries from WiFi * Fix examples and WiFiUpdate * Guard WiFiProv lib to compile only on WiFi chips * Add periman string for network and "fix" mdns on the first ETH * Revert back location of Client/Server/Udp in order to accept some PRs * Fix periman * Some fixes from merging master * Fix web server missing fs.h * Move Client, Server and Udp out of WiFi * More fixes * more fixes * Fix CMakekLists and rework lib menu dependencies * Fix CMake issues * move back WiFiClient to rebase with master * Update ETH_TLK110.ino * Move back WiFiClient * Update progress * Update WiFiGeneric.cpp * More fixes * Switch AP to the new interface * Cleanup * Rename AP methods * Add extra interface info for Printable * Rename IPv6 getters to clarify that they are returning LinkLocal address cc @sgryphon * Rename network classes cc @sgryphon * Update NetworkManager.h * Rename WiFi Server and UDP * Rename WiFiClient and WiFiClientSecure * Update CMakeLists.txt * Update on-push.sh * Rename Network library * Remove unnecessary guard * Get the correct interface MAC address for mDND Workstation service * Apply suggestions from code review --------- Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com> Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
* Create ESP_NetworkInterface class and have Ethernet extending it * Update CMakeLists.txt * Split networking from WiFi (H2 can now use Ethernet) Now all libs have been checked yet. More to do on WiFi side * Fix build errors * Guard WiFi classes and fix RMII ETH examples * Decouple network related libraries from WiFi * Fix examples and WiFiUpdate * Guard WiFiProv lib to compile only on WiFi chips * Add periman string for network and "fix" mdns on the first ETH * Revert back location of Client/Server/Udp in order to accept some PRs * Fix periman * Some fixes from merging master * Fix web server missing fs.h * Move Client, Server and Udp out of WiFi * More fixes * more fixes * Fix CMakekLists and rework lib menu dependencies * Fix CMake issues * move back WiFiClient to rebase with master * Update ETH_TLK110.ino * Move back WiFiClient * Update progress * Update WiFiGeneric.cpp * More fixes * Switch AP to the new interface * Cleanup * Rename AP methods * Add extra interface info for Printable * Rename IPv6 getters to clarify that they are returning LinkLocal address cc @sgryphon * Rename network classes cc @sgryphon * Update NetworkManager.h * Rename WiFi Server and UDP * Rename WiFiClient and WiFiClientSecure * Update CMakeLists.txt * Update on-push.sh * Rename Network library * Remove unnecessary guard * Get the correct interface MAC address for mDND Workstation service * Apply suggestions from code review Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> * Tasmota changes * 3.0.0 Network Refactoring (espressif#8760) * Create ESP_NetworkInterface class and have Ethernet extending it * Update CMakeLists.txt * Split networking from WiFi (H2 can now use Ethernet) Now all libs have been checked yet. More to do on WiFi side * Fix build errors * Guard WiFi classes and fix RMII ETH examples * Decouple network related libraries from WiFi * Fix examples and WiFiUpdate * Guard WiFiProv lib to compile only on WiFi chips * Add periman string for network and "fix" mdns on the first ETH * Revert back location of Client/Server/Udp in order to accept some PRs * Fix periman * Some fixes from merging master * Fix web server missing fs.h * Move Client, Server and Udp out of WiFi * More fixes * more fixes * Fix CMakekLists and rework lib menu dependencies * Fix CMake issues * move back WiFiClient to rebase with master * Update ETH_TLK110.ino * Move back WiFiClient * Update progress * Update WiFiGeneric.cpp * More fixes * Switch AP to the new interface * Cleanup * Rename AP methods * Add extra interface info for Printable * Rename IPv6 getters to clarify that they are returning LinkLocal address cc @sgryphon * Rename network classes cc @sgryphon * Update NetworkManager.h * Rename WiFi Server and UDP * Rename WiFiClient and WiFiClientSecure * Update CMakeLists.txt * Update on-push.sh * Rename Network library * Remove unnecessary guard * Get the correct interface MAC address for mDND Workstation service * Apply suggestions from code review --------- Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com> Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --------- Co-authored-by: me-no-dev <hristo@espressif.com> Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com> Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
I know this has already been merged. It is still not working that well for IPv6. I tested across multiple network types:
(1) Dual-stack initially worked for some, but then started failing. I suspect it is lack of support for IPv6, and because I have DNS64 everything has an IPv6 address. Could be a race condition that worked before DNS64 was resolved. Some of the errors: Dual-stack+NAT64 network, IPv6 destination:
|
@sgryphon given that you have a full environment and test case, maybe you can figure out what is missing? Try maybe some menuconfig options and rebuild the libs? |
When running on WiFi-AP mode server's start() method returned true while in fact UDP listening socket was never created Regression introduced in espressif#8760 Closes espressif#10330
* DNSServer: fix improper startup code in WiFi mode When running on WiFi-AP mode server's start() method returned true while in fact UDP listening socket was never created Regression introduced in #8760 Closes #10330 * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Better explanation will come later