Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Ethernet communication (RPI and PC) in Qt
QtWS25 Last Chance

Ethernet communication (RPI and PC) in Qt

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
ethernet in qtraspberry pi3windows desktopserver - client
7 Posts 4 Posters 1.7k 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.
  • B Offline
    B Offline
    bublee_jessie
    wrote on 4 Jul 2019, 09:36 last edited by bublee_jessie 7 Apr 2019, 12:50
    #1

    Hi there, this is Jessie.
    I m working on a Qt project that involves Ethernet communication between Raspberry Pi and windows PC. Here Raspberry pi is working as a server and as soon as i establish connection is established raspberry pi should send stream of bytes to the client(PC). I have successfully done Server-Client part from normal C code on Rpi console and windows console But i am not able to do the same through QT GUI app (not a console app).
    I have gone through fortunclient/server examples but don't understand them, also followed questions related to this topic on this forum but there seems to be no satisfactory answer. please help!, my knowledge is limited up-to making GUI's, this is new concept for me.
    note: i am cross compiling from Ubuntu to my Rpi.
    Best regards,
    Jessie.

    S V 2 Replies Last reply 4 Jul 2019, 10:10
    1
    • B bublee_jessie
      4 Jul 2019, 09:36

      Hi there, this is Jessie.
      I m working on a Qt project that involves Ethernet communication between Raspberry Pi and windows PC. Here Raspberry pi is working as a server and as soon as i establish connection is established raspberry pi should send stream of bytes to the client(PC). I have successfully done Server-Client part from normal C code on Rpi console and windows console But i am not able to do the same through QT GUI app (not a console app).
      I have gone through fortunclient/server examples but don't understand them, also followed questions related to this topic on this forum but there seems to be no satisfactory answer. please help!, my knowledge is limited up-to making GUI's, this is new concept for me.
      note: i am cross compiling from Ubuntu to my Rpi.
      Best regards,
      Jessie.

      S Offline
      S Offline
      sneubert
      wrote on 4 Jul 2019, 10:10 last edited by
      #2

      @bublee_jessie

      Comming from C you should read about object oriented concepts in c++.
      After this you can start with the qt´s signal slot concept.
      https://doc.qt.io/qt-5/signalsandslots.html
      Then you should be able to use the QTcpServer
      https://doc.qt.io/qt-5/qtcpserver.html#details

      B 1 Reply Last reply 9 Jul 2019, 09:33
      4
      • B bublee_jessie
        4 Jul 2019, 09:36

        Hi there, this is Jessie.
        I m working on a Qt project that involves Ethernet communication between Raspberry Pi and windows PC. Here Raspberry pi is working as a server and as soon as i establish connection is established raspberry pi should send stream of bytes to the client(PC). I have successfully done Server-Client part from normal C code on Rpi console and windows console But i am not able to do the same through QT GUI app (not a console app).
        I have gone through fortunclient/server examples but don't understand them, also followed questions related to this topic on this forum but there seems to be no satisfactory answer. please help!, my knowledge is limited up-to making GUI's, this is new concept for me.
        note: i am cross compiling from Ubuntu to my Rpi.
        Best regards,
        Jessie.

        V Offline
        V Offline
        vishbynature
        wrote on 9 Jul 2019, 09:07 last edited by
        #3

        @bublee_jessie
        follow the link at bogotobogo and incorporate it in your GUI.

        1 Reply Last reply
        2
        • S sneubert
          4 Jul 2019, 10:10

          @bublee_jessie

          Comming from C you should read about object oriented concepts in c++.
          After this you can start with the qt´s signal slot concept.
          https://doc.qt.io/qt-5/signalsandslots.html
          Then you should be able to use the QTcpServer
          https://doc.qt.io/qt-5/qtcpserver.html#details

          B Offline
          B Offline
          bublee_jessie
          wrote on 9 Jul 2019, 09:33 last edited by
          #4

          @sneubert
          I have followed the documents you have suggested.
          @vishbynature
          thanks for the link now I also have the same question as you how can we make server listen to only one address.

          J 1 Reply Last reply 9 Jul 2019, 12:05
          0
          • B bublee_jessie
            9 Jul 2019, 09:33

            @sneubert
            I have followed the documents you have suggested.
            @vishbynature
            thanks for the link now I also have the same question as you how can we make server listen to only one address.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 9 Jul 2019, 12:05 last edited by
            #5

            @bublee_jessie said in Ethernet communication (RPI and PC) in Qt:

            how can we make server listen to only one address

            What do you mean? Do you want your server to only accept connections from one specific client IP?

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

            B 1 Reply Last reply 9 Jul 2019, 13:12
            2
            • J jsulm
              9 Jul 2019, 12:05

              @bublee_jessie said in Ethernet communication (RPI and PC) in Qt:

              how can we make server listen to only one address

              What do you mean? Do you want your server to only accept connections from one specific client IP?

              B Offline
              B Offline
              bublee_jessie
              wrote on 9 Jul 2019, 13:12 last edited by
              #6

              @jsulm
              precisely.
              what I want for my application is to establish connection once. server should be in forever sending mode and my Client ( PC ) in forever receive mode.

              J 1 Reply Last reply 10 Jul 2019, 08:48
              1
              • B bublee_jessie
                9 Jul 2019, 13:12

                @jsulm
                precisely.
                what I want for my application is to establish connection once. server should be in forever sending mode and my Client ( PC ) in forever receive mode.

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 10 Jul 2019, 08:48 last edited by
                #7

                @bublee_jessie And what is the problem? On the server side check the client IP which is trying to connect and only accept connection if correct IP and not connected yet.

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

                1 Reply Last reply
                0

                1/7

                4 Jul 2019, 09:36

                • Login

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