Simplest way to add Wi-Fi support to a Qt demo application
-
Any advice re the simplest way to add Wi-Fi support to a Qt demo application?
(list available networks, choose one, enter password)- QtDeviceUtilities
- https://doc.qt.io/QtDeviceUtilities/qtdeviceutilities-wifitutorial.html
- "Qt Device Utilities is availabe via a public Git repository"
- i.e. not available via MaintenanceTool, but needs to be built separately?
- does not support wpa_supplicant directly
- requires ConnMan to be added
- wpa_supplicant D-Bus API
- wpa_ctrl.c
-
Hi,
Do you have any desktop environment running on your demo system ?
Which Linux distribution are you using ? -
Hi,
Do you have any desktop environment running on your demo system ?
Which Linux distribution are you using ?Hi @SGaist thank you for replying
Yocto Scarthgap
linux-imx forked from NXP
Wayland/Weston is an option, but we just use EGLFS KMS.Our devices have
- NXP i.MX 8X
- 7" or 12.3" touch screen displays
- Laird LWB5+ Bluetooth/Wi-Fi
We supply our customers with the Yocto SDK/toolchain and example QML applications.
All examples build/run for both target Linux and Host Linux and Windows.Being able to run UIs on host is to make it easier to demo them to stakeholders on video calls, and for a faster edit/deploy/run cycle when just making UI changes. Device-dependent functionality degrades gracefully.
We could build QtDeviceUtilities under Yocto for target.
For host, customers need to install their own Qt.
But Qt MaintenanceTool does not support QtDeviceUtilities.
So customers would need to clone that manually.Although guess we could use FetchContent from cmake, so that customers do not have to manually clone the extra repo?
Will give that a go. -
That will likely be the simplest.
As an other alternative, you would need to check what tool is managing the network with your distribution. Depending on that, you might be able to also interact directly with it using dbus or even QProcess as you would on the command line.
-
Thank you. We have Laird's version of wpa_supplicant in our Yocto. Update is:
We've done a POC using wpa_ctrl.c. Couple of issues currently:
- Initial connection works, but after restart, or reboot, wpa_supplicant fails to parse the conf file: failed to parse psk '*'.
That was set using set_network ... psk ... - scan while connected only shows currently connected SSID
We've also done a POC using Qt Device Utilities and adding ConnMan to our Yocto too:
That works better in terms of persisting the password.
To stop ConnMan from trying to manage wired ethernet too, needed:
[General]
NetworkInterfaceBlacklist=eth0,eth1
Scanning for other Wi-Fi networks, while connected to one, is still an issue. - Initial connection works, but after restart, or reboot, wpa_supplicant fails to parse the conf file: failed to parse psk '*'.