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. Send message via wifi
Forum Updated to NodeBB v4.3 + New Features

Send message via wifi

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 3.1k 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.
  • M Offline
    M Offline
    mansi
    wrote on last edited by
    #1

    Hello,

    I am trying to send a message via wifi now... after kind of giving up on bluetooth.

    My first step has to be to scan available wifi connections on phone. (May be on the click of a button) but How do I go about scanning of wifi ?

    There is something called a QTCPserver and networkconfiguration manager... Are they the same ?
    What do I have to use for wifi.. I tried searching for some code snippets, but couldn't find any.
    Can you please help.

    Thanks a lot in advance,
    Mansi

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi Mansi,
      Did you see this example "BearerMonitor":http://doc.qt.digia.com/qtmobility-1.0/bearermonitor.html ?
      Its lists all avaliable Wifi's using QNetworkConfiguration.

      After that once you connect to a Network, you will be in that network and an IP address will be assigned to the device.

      Then just create a server and client using QTcpServer and QTcpSocket.
      Follow these example for more details.
      "Fortune Server":http://qt-project.org/doc/qt-5.0/qtnetwork/fortuneserver.html
      "Fortune Client":http://qt-project.org/doc/qt-5.0/qtnetwork/fortuneclient.html.

      157

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mansi
        wrote on last edited by
        #3

        Hello,

        Thanks a ton for those links... my bad that I wasn't able to find those links.
        But im trying to develop an app that runs on phone and scans for wifi connections on phone and then send message...
        First step for me is to scan wifi , something similar to "wifi scan" app available on play store... I am totally lost here...

        Will that link help ?

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          For which phone you want it to work ?

          157

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mansi
            wrote on last edited by
            #5

            acer tablet B1A71

            1 Reply Last reply
            0
            • p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by
              #6

              Well from the .pro file it seems that it can be used on symbian phones. But i guess if you compile the same source code using Android Qt 5.1.1 it may work on it with some modifications. Other than that you will need to set the respective Permissions for Android from Projects > Run > Package configurations > Permissions

              157

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mansi
                wrote on last edited by
                #7

                Permissions like what ? As of now I can see this in that option:

                android.permission.INTERNET
                android.permission.WRITE_EXTERNAL_STORAGE

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jobin
                  wrote on last edited by
                  #8

                  only show wlan0.cannot display other wireless devices

                  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