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. ethernet doesn't work in other computer
Qt 6.11 is out! See what's new in the release blog

ethernet doesn't work in other computer

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 5 Posters 3.7k Views 2 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.
  • C Offline
    C Offline
    cdcc0606
    wrote on last edited by
    #1

    I have an application in Qt, which use the ethernet version. My problem is the installation application used in my computer, the ethernet works fine, however, this communication doesn't work in other computer. Do I lack some dll? when i try the application in other computer all the fonction works fine a part from the ethernet fonction.
    Any one got idea why? see part of the fonction below

    bool NetworkOverspeed::isOSBCard(QString IP) {
    
    
        QByteArray datagram="P";
        tcpSocket->connectToHost(IP,2001,QIODevice::ReadWrite);
        tcpSocket->write(datagram);
        tcpSocket->waitForBytesWritten(500);
    
        tcpSocket->waitForReadyRead(1000);
        QByteArray temp = tcpSocket->read(1);
            if( !temp[0].operator ==(1) ) {
                tcpSocket->close();
                return 0;
            }
        tcpSocket->close();
        return 1;
    }
    
    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! What error do you get?

      C 1 Reply Last reply
      2
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        On Windows use the deployment tool to deploy your binaries

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        C 1 Reply Last reply
        1
        • C Offline
          C Offline
          cdcc0606
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • ? A Former User

            Hi! What error do you get?

            C Offline
            C Offline
            cdcc0606
            wrote on last edited by
            #5

            @Wieland
            I don't have any error, just when i try to detect the ip needed by using others computer i find nothing. I try to add the time of wait to be sure to get the information back, however I have nothing. But all works fine with my computer.

            1 Reply Last reply
            0
            • VRoninV VRonin

              On Windows use the deployment tool to deploy your binaries

              C Offline
              C Offline
              cdcc0606
              wrote on last edited by
              #6

              @VRonin
              Yes, that's exactly what I used. Even if i doesn't create a new install application just copy the whole folder which includs all the files necessary to execute the .exe, the file .exe can be launched. It works also fine with COM port, but If i try the ethernet part, i don't have the reply with other computer.

              1 Reply Last reply
              0
              • VRoninV Offline
                VRoninV Offline
                VRonin
                wrote on last edited by
                #7

                what do you pass as IP?

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                jsulmJ C 2 Replies Last reply
                1
                • VRoninV VRonin

                  what do you pass as IP?

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

                  @VRonin As @Wieland said you should check whether you get any error. See here how to do this: http://doc.qt.io/qt-5/qabstractsocket.html#error

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

                  mrjjM 1 Reply Last reply
                  3
                  • VRoninV VRonin

                    what do you pass as IP?

                    C Offline
                    C Offline
                    cdcc0606
                    wrote on last edited by
                    #9
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #10

                      ... or maybe just turn off the firewall ;-)

                      1 Reply Last reply
                      2
                      • jsulmJ jsulm

                        @VRonin As @Wieland said you should check whether you get any error. See here how to do this: http://doc.qt.io/qt-5/qabstractsocket.html#error

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        Hi
                        as @Wieland hinted, you MUST include error handling and output.
                        Else its like try driving with eyes closed. :)

                        IF using windows, the firewall can often block stuff so to test use:
                        To Turn Off:
                        NetSh Advfirewall set allprofiles state off
                        To Turn On:
                        NetSh Advfirewall set allrprofiles state on
                        To check the status of Windows Firewall:
                        Netsh Advfirewall show allprofiles

                        1 Reply Last reply
                        1

                        • Login

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