Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Simplest way to add Wi-Fi support to a Qt demo application
Forum Updated to NodeBB v4.3 + New Features

Simplest way to add Wi-Fi support to a Qt demo application

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 56 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    petero3
    wrote last edited by
    #1

    Any advice re the simplest way to add Wi-Fi support to a Qt demo application?
    (list available networks, choose one, enter password)

    1. 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
    1. wpa_supplicant D-Bus API
    • https://w1.fi/wpa_supplicant/devel/dbus.html
    1. wpa_ctrl.c
    • https://hostap.epitest.fi/wpa_supplicant/devel/ctrl_iface_page.html
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      Do you have any desktop environment running on your demo system ?
      Which Linux distribution are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you have any desktop environment running on your demo system ?
        Which Linux distribution are you using ?

        P Offline
        P Offline
        petero3
        wrote last edited by petero3
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            petero3
            wrote last edited by petero3
            #5

            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:

            1. 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 ...
            2. 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.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved