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
QtWS25 Last Chance

QTcpServer with wifi dongle

Scheduled Pinned Locked Moved Solved General and Desktop
sockettcpsockettcpserverwifibluetooth
5 Posts 2 Posters 843 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 8 Jan 2020, 12:26 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

    J 1 Reply Last reply 8 Jan 2020, 12:34
    0
    • L LordMat
      8 Jan 2020, 12:44

      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

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 8 Jan 2020, 12:52 last edited by
      #4

      @LordMat QTcpSocket is OK

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

      L 1 Reply Last reply 8 Jan 2020, 12:56
      0
      • L LordMat
        8 Jan 2020, 12:26

        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

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 8 Jan 2020, 12:34 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 8 Jan 2020, 12:44 last edited by LordMat 1 Aug 2020, 12:45
          #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

          J 1 Reply Last reply 8 Jan 2020, 12:52
          0
          • L LordMat
            8 Jan 2020, 12:44

            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

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 8 Jan 2020, 12:52 last edited by
            #4

            @LordMat QTcpSocket is OK

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

            L 1 Reply Last reply 8 Jan 2020, 12:56
            0
            • J jsulm
              8 Jan 2020, 12:52

              @LordMat QTcpSocket is OK

              L Offline
              L Offline
              LordMat
              wrote on 8 Jan 2020, 12:56 last edited by
              #5

              @jsulm Thanks a lot

              1 Reply Last reply
              0

              2/5

              8 Jan 2020, 12:34

              • Login

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