How to change to a new WIFI network using Qt 5.13?
-
I have a device that is running Qt 13 and a microcontroller(esp8266) that is running as an Access Point. So here is my network:
SSID1: "HomeRouter" Password: 1234 SSID2: "MCU" Password: 1234
The device running the Qt application is already connected to SSID1.
How I make the qt application change from SSID1 to SSID2?Although its a straightforward problem I could not found a explicit example or instruction that a newbie could figure out.
-
I have a device that is running Qt 13 and a microcontroller(esp8266) that is running as an Access Point. So here is my network:
SSID1: "HomeRouter" Password: 1234 SSID2: "MCU" Password: 1234
The device running the Qt application is already connected to SSID1.
How I make the qt application change from SSID1 to SSID2?Although its a straightforward problem I could not found a explicit example or instruction that a newbie could figure out.
@oshio what about Bearer Management support?
-
@Pablo-J-Rogina thanks for pointing out this link. But the documentation isn't clear.
The QNetworkSession seems to be responsible for telling the system to change to a new network. But how I tell the class to connect to the SSID2 from my original example?The docs says that configuration should be passed as a QNetworkConfiguration class to QNetworkSession's constructor. If we look at QNetworkConfiguration there is no instruction on how to set a name or password to connect in a new network.
-
Hi,
Because it is outside of Qt's scope. The setup and handling of network connections is handled by your OS and some dedicated tools like iwconfig.