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. QTcpServer with wifi dongle
Forum Update on Monday, May 27th 2025

QTcpServer with wifi dongle

Scheduled Pinned Locked Moved Solved General and Desktop
sockettcpsockettcpserverwifibluetooth
5 Posts 2 Posters 857 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.
  • L Offline
    L Offline
    LordMat
    wrote on last edited by
    #1

    Hi,
    my purpose is to use my program, that includes a QTcpServer to communicate through sockets with a 3-part robot connected to the server machine with wifi (with the usage of a wifi adapter).

    I tested my server and my client in localhost, now I would like to move the client to the 3-part robot. May it work?
    With bluetooth, it wouldn't work because there are a particular socket to use (QBluetoothSocket, https://doc.qt.io/qt-5/qbluetoothsocket.html ).

    With wifi adapter, is it a problem such as bluetooth or a similar code may work? Thanks

    [...]
    server = new QTcpServer(this);
    auto x = server->listen(QHostAddress::Any, 1024);
    [...]
    while (server->hasPendingConnections())
    {
        QTcpSocket *socket = server->nextPendingConnection();
        [...]
    }
    

    Thanks

    jsulmJ 1 Reply Last reply
    0
    • L LordMat

      Hi jsulm, my robot has linux as well.
      @jsulm
      "With wifi adapter, is it a problem such as bluetooth or a similar code may work?" - I don't understand this.
      ->
      I mean: with bluetooth, I need a "special" socket, QBluetoothSocket, instead of QTcpSocket.
      With a connection realised through wifi, do I need a special socket as well or QTcpSocket is ok?

      Thanks

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @LordMat QTcpSocket is OK

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply
      0
      • L LordMat

        Hi,
        my purpose is to use my program, that includes a QTcpServer to communicate through sockets with a 3-part robot connected to the server machine with wifi (with the usage of a wifi adapter).

        I tested my server and my client in localhost, now I would like to move the client to the 3-part robot. May it work?
        With bluetooth, it wouldn't work because there are a particular socket to use (QBluetoothSocket, https://doc.qt.io/qt-5/qbluetoothsocket.html ).

        With wifi adapter, is it a problem such as bluetooth or a similar code may work? Thanks

        [...]
        server = new QTcpServer(this);
        auto x = server->listen(QHostAddress::Any, 1024);
        [...]
        while (server->hasPendingConnections())
        {
            QTcpSocket *socket = server->nextPendingConnection();
            [...]
        }
        

        Thanks

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @LordMat said in QTcpServer with wifi dongle:

        now I would like to move the client to the 3-part robot. May it work?

        You did not say anything about the robot. What is the OS?
        If you can use Qt on it you can use your client code there.

        "With wifi adapter, is it a problem such as bluetooth or a similar code may work?" - I don't understand this.
        If your WiFi adapter is workingand you have WiFi connection QTcpSocket will work.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • L Offline
          L Offline
          LordMat
          wrote on last edited by LordMat
          #3

          Hi jsulm, my robot has linux as well.
          @jsulm
          "With wifi adapter, is it a problem such as bluetooth or a similar code may work?" - I don't understand this.
          ->
          I mean: with bluetooth, I need a "special" socket, QBluetoothSocket, instead of QTcpSocket.
          With a connection realised through wifi, do I need a special socket as well or QTcpSocket is ok?

          Thanks

          jsulmJ 1 Reply Last reply
          0
          • L LordMat

            Hi jsulm, my robot has linux as well.
            @jsulm
            "With wifi adapter, is it a problem such as bluetooth or a similar code may work?" - I don't understand this.
            ->
            I mean: with bluetooth, I need a "special" socket, QBluetoothSocket, instead of QTcpSocket.
            With a connection realised through wifi, do I need a special socket as well or QTcpSocket is ok?

            Thanks

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @LordMat QTcpSocket is OK

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            L 1 Reply Last reply
            0
            • jsulmJ jsulm

              @LordMat QTcpSocket is OK

              L Offline
              L Offline
              LordMat
              wrote on last edited by
              #5

              @jsulm Thanks a lot

              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