-
Notifications
You must be signed in to change notification settings - Fork 555
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
Need to Implement Global Switching Between Wi-Fi and GSM for WebSocket Connections. #910
Comments
build_flags =
-D WEBSOCKETS_NETWORK_TYPE=NETWORK_W5100 the part you showing is the auto detection if nothing is defined by the user / compiler flags yet. |
@Links2004 thanks for your response. but is there any solution to Switch between Wi-Fi and GSM dynamically. |
what exactly do you mean by the "easiest" way that I see is to write a wrapper class for the TCP server/client that does the switching inside this wrapper. I really wished that the arduino framework had a "interface" class that defined the TCP server / client functions, but thats not the cases which makes it next to impossible to do this generic for all the different TCP stacks of all the µC out there. there is a other option for lwip based µC (example ESP), but not sure how easy it is. |
@Links2004 I am working on a project using ESP32 and the WebSockets library, where I need to switch between Wi-Fi and GSM networks dynamically. I would like to globally define WEBSOCKETS_NETWORK_TYPE to control whether the WebSocket connection uses Wi-Fi (NETWORK_WIFI) or GSM (NETWORK_GSM) without modifying the core WebSocket library files.
Currently, I am using TinyGSM for GSM and WiFi.h for Wi-Fi. I would like to know the best approach to handle this globally so that I can toggle between Wi-Fi and GSM by simply setting WEBSOCKETS_NETWORK_TYPE in the project.
for reference kindly check the screenshot.
The text was updated successfully, but these errors were encountered: