Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. How to create ad-hoc WiFi network
Forum Updated to NodeBB v4.3 + New Features

How to create ad-hoc WiFi network

Scheduled Pinned Locked Moved Unsolved Brainstorm
6 Posts 2 Posters 3.2k Views 1 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.
  • H Offline
    H Offline
    hfrmobile
    wrote on last edited by
    #1

    How can I create an ad-hoc WiFi network using Qt?

    Using QNetworkConfigurationManager it is easy to connect to an existing WLAN. But how I can establish an ad-hoc network?

    +++ Programming is a kind of art but not all programmers are artists. +++

    mrjjM 1 Reply Last reply
    0
    • H hfrmobile

      How can I create an ad-hoc WiFi network using Qt?

      Using QNetworkConfigurationManager it is easy to connect to an existing WLAN. But how I can establish an ad-hoc network?

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @hfrmobile
      Hi
      Do you mean to enable the mobile hotspot feature ?
      http://stackoverflow.com/questions/6394599/android-turn-on-off-wifi-hotspot-programmatically

      H 1 Reply Last reply
      2
      • mrjjM mrjj

        @hfrmobile
        Hi
        Do you mean to enable the mobile hotspot feature ?
        http://stackoverflow.com/questions/6394599/android-turn-on-off-wifi-hotspot-programmatically

        H Offline
        H Offline
        hfrmobile
        wrote on last edited by
        #3

        @mrjj Thank you for your reply!

        I am not sure to be honest. Hotspot feature is used to share internet connectivity. My (embedded) device has no access to the internet. What I am trying to do: Creating an ad-hoc network, so that others (e.g. Smartphone) are able to access my device via WLAN. On the device a web server is running providing some services to users.

        This already works using bash shell scripts using shell commands like iw etc. But I have to do this in a C++ app using Qt so there is no need to call external bash scripts or shell commands.

        +++ Programming is a kind of art but not all programmers are artists. +++

        mrjjM 1 Reply Last reply
        0
        • H hfrmobile

          @mrjj Thank you for your reply!

          I am not sure to be honest. Hotspot feature is used to share internet connectivity. My (embedded) device has no access to the internet. What I am trying to do: Creating an ad-hoc network, so that others (e.g. Smartphone) are able to access my device via WLAN. On the device a web server is running providing some services to users.

          This already works using bash shell scripts using shell commands like iw etc. But I have to do this in a C++ app using Qt so there is no need to call external bash scripts or shell commands.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @hfrmobile
          Hi, it does sound like a ad-hoc wifi.
          I think this feature is on driver level
          so not sure you can do it from Qt (directly)

          What about snooping around iw code and see what it does?

          Alternatively, use QProcess to run cmd line tool. Its pretty solid and
          can be hidden from the user.

          H 1 Reply Last reply
          1
          • mrjjM mrjj

            @hfrmobile
            Hi, it does sound like a ad-hoc wifi.
            I think this feature is on driver level
            so not sure you can do it from Qt (directly)

            What about snooping around iw code and see what it does?

            Alternatively, use QProcess to run cmd line tool. Its pretty solid and
            can be hidden from the user.

            H Offline
            H Offline
            hfrmobile
            wrote on last edited by
            #5

            @mrjj Yes, we are talking about ad-hoc.

            Already having a solution that's using a similar approach (QProcess) you mentioned.

            iw tool is saying the following:
            Do NOT screenscrape this tool, we don't consider its output stable.

            So the idea was born doing it with Qt only ...

            Looking into the iw code is a good idea: http://git.sipsolutions.net/iw.git

            But I am wondering that I am the first person on this planet who likes to create an ad-hoc WLAN with Qt ...

            https://www.google.at/search?q=create+"ad-hoc"+with+Qt
            (we are the first)

            +++ Programming is a kind of art but not all programmers are artists. +++

            mrjjM 1 Reply Last reply
            0
            • H hfrmobile

              @mrjj Yes, we are talking about ad-hoc.

              Already having a solution that's using a similar approach (QProcess) you mentioned.

              iw tool is saying the following:
              Do NOT screenscrape this tool, we don't consider its output stable.

              So the idea was born doing it with Qt only ...

              Looking into the iw code is a good idea: http://git.sipsolutions.net/iw.git

              But I am wondering that I am the first person on this planet who likes to create an ad-hoc WLAN with Qt ...

              https://www.google.at/search?q=create+"ad-hoc"+with+Qt
              (we are the first)

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @hfrmobile
              \o/
              well if iw works and target is linux, and you mostly depend on this tool to turn it on, then
              it might work ok.
              Other reason is:

              "iw is a new nl80211 based Linux CLI configuration utility for wireless devices.

              It supports all new drivers that have been added to the kernel recently. "

              So it might not be easy to ask to turn it on if its via drivers.

              1 Reply Last reply
              1

              • Login

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