Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to change to a new WIFI network using Qt 5.13?

How to change to a new WIFI network using Qt 5.13?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 710 Views
  • 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.
  • O Offline
    O Offline
    Oshio
    wrote on 26 Aug 2019, 01:27 last edited by Oshio
    #1

    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.

    P 1 Reply Last reply 26 Aug 2019, 18:15
    0
    • O Oshio
      26 Aug 2019, 01:27

      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.

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 26 Aug 2019, 18:15 last edited by
      #2

      @oshio what about Bearer Management support?

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • O Offline
        O Offline
        Oshio
        wrote on 27 Aug 2019, 18:15 last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Aug 2019, 18:18 last edited by
          #4

          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.

          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
          • O Offline
            O Offline
            Oshio
            wrote on 27 Aug 2019, 18:38 last edited by Oshio
            #5

            Now that you mentioned, it makes sense that this should not be handled by Qt.
            Thanks!

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 27 Aug 2019, 19:17 last edited by
              #6

              You can use Qt to run the tools if you want to. QProcess comes to mind for that.

              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

              3/6

              27 Aug 2019, 18:15

              • Login

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