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 last edited by bublee_jessie
    #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.

    sneubertS V 2 Replies Last reply
    1
    • B bublee_jessie

      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.

      sneubertS Offline
      sneubertS Offline
      sneubert
      wrote on 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
      4
      • B bublee_jessie

        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 last edited by
        #3

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

        1 Reply Last reply
        2
        • sneubertS sneubert

          @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 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.

          jsulmJ 1 Reply Last reply
          0
          • B bublee_jessie

            @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.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on 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
            2
            • jsulmJ jsulm

              @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 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.

              jsulmJ 1 Reply Last reply
              1
              • B bublee_jessie

                @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.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on 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

                • Login

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