Connect to wifi via Qt
I am developing an application on Qt for Android. The application serves the role of a TCP client that connects to a server written in C++ and retrieves data from it. I also have deployed it on my Android phone.
I am also trying to connect to a wifi network programmatically via Qt. I have read the documentation of Bearer Management and QNetworkConfiguration and I am able to find all the available configurations in the wlan0 interface. I am also able to start a new session for a configuration and see all available interfaces etc.
Therefore I think I have understood how the documentation works, but I am not able to connect to a wifi.
I have read in the forum that there is no built-in way in Qt to do that, and that I need to use some native api.
Another thing that i've tried is to execute a QProcess with Linux system calls, such as ifconfig and iwconfig to connect to the wifi in the same way as in Linux terminal (Qt desktop version) but I haven't seen any results and if I see any, I don't know if that will work in Android.
Is there a way to connect to wifi via Qt? Is there anything in the documentation that i have not seen or understood yet? If not, is it possible to do it in C++ with some API for Linux? (I have found out that there are APIs on Windows that do this but my server needs to be running on a Linux device)
Thanks in advance,
Hi and welcome to devnet,
Interesting questions but I'm not sure you're on the best place for them. You should try asking on the android-development mailing list or the necessitas irc channel