iTOP-4418 development board QtE_TCPsocket_communication
[Copy link]
Socket communication must first ensure that the networks at both ends of the communication can pass the Ping test.
For the source code of socket communication application, please refer to "iTOP-4418-QtE4.7-TCPsocket
communication_V1.0.rar"
in "iTOP4418 development board data summary (excluding CD content)\08_iTOP-4418 development board QtE application development environment and source code\02_QtE application routine" .
Test method 1: Communication between two development boards
The test program is a socket communication program based on TCP. This test program uses two 4418 development boards for communication. It
can also be used to communicate with the development board using Ubuntu. The operation steps and principles are the same as above.
Use the command "vi etc/eth0-setting" to change the IP addresses of the two development boards to "192.168.0.30" and
"192.168.0.31". Use a network cable to connect the two 4418 development boards.
Set the IP address "192.168.0.31" as the server, run the QT socket communication test program "NetworkTcp",
and click to start the server, as shown in the figure below.
(, downloads: 0)
The other development board also runs the test program "NetworkTcp", enters the port number and the other party's IP address, and clicks Connect to
Server, as shown in the figure below.
(, downloads: 0)
When the development board serving as the server clicks the send button, the client will receive the print information from the server, as shown below.
(, downloads: 0)
Method 2: The development board communicates with the PC, based on wifi (or Ethernet) socket communication.
Ubuntu on the PC runs the test program under "build-NetworkTcp-Desktop_Qt_5_3_GCC_64bit-Debug"
, as shown below.
(, downloads: 0)
The following steps are the same as method 1.
|