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. IOT sending data to remote server

IOT sending data to remote server

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 472 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.
  • V Offline
    V Offline
    viju45
    wrote on last edited by
    #1

    hi everyone

    i am new to IOT ..i want to send data to remote server using Raspberry pi and Qt...pls seggest me how to do it ....
    i am able to send data to local host using Qtcpsoket and Qtcpserver ......

    thanks in advance

    jsulmJ 1 Reply Last reply
    0
    • V viju45

      hi everyone

      i am new to IOT ..i want to send data to remote server using Raspberry pi and Qt...pls seggest me how to do it ....
      i am able to send data to local host using Qtcpsoket and Qtcpserver ......

      thanks in advance

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

      @viju45 If you're able to send to local host then you should be able to send to other hosts.
      What exactly is the problem?

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

      1 Reply Last reply
      3
      • V Offline
        V Offline
        viju45
        wrote on last edited by
        #3

        @jsulm actually today i understood that my respbeery pi was server and the other computer was client ....i tested the code with Putty at receiver side .....and i an new to IOT concept ....i am not able to understand how to send it to server now.

        server = new QTcpServer(this);
        socket = new QTcpSocket(this);

         connect(server, SIGNAL(newConnection()), this, SLOT(newConnection()));
        
         if(!server->listen(QHostAddress::AnyIPv4, 1234))
            ui->lineEdit_2->setText("ERROR");
        

        this is how i am use to setup connection

        now i want to establish connection with remote server.

        jsulmJ 1 Reply Last reply
        0
        • V viju45

          @jsulm actually today i understood that my respbeery pi was server and the other computer was client ....i tested the code with Putty at receiver side .....and i an new to IOT concept ....i am not able to understand how to send it to server now.

          server = new QTcpServer(this);
          socket = new QTcpSocket(this);

           connect(server, SIGNAL(newConnection()), this, SLOT(newConnection()));
          
           if(!server->listen(QHostAddress::AnyIPv4, 1234))
              ui->lineEdit_2->setText("ERROR");
          

          this is how i am use to setup connection

          now i want to establish connection with remote server.

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

          @viju45 Please read documentation https://doc.qt.io/qt-5/qtcpsocket.html
          And take a look at examples: https://doc.qt.io/qt-5/qtnetwork-fortuneclient-example.html

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

          1 Reply Last reply
          2
          • V Offline
            V Offline
            viju45
            wrote on last edited by
            #5

            @jsulm thanks for replay ...

            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