HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
  • GM-3568JHF

    • 1. Introduction

      • GM-3568JHF Introduction
    • 2. Quick Start

      • 01 Environment Construction
      • 02 Compilation Instructions
      • 03 Burning Guide
      • 04 Debugging Tools
      • 05 Software Update
      • 06 View information
      • 07 Test Command
      • 08 Application Compilation
      • 09 Source code acquisition
    • 3. Peripherals and Interfaces

      • USB
      • Display and touch
      • Ethernet
      • WIFI
      • Bluetooth
      • TF-Card
      • Audio
      • Serial Port
      • CAN
      • RTC
    • 4. Application Development

      • 01 UART read and write case
      • 02 Key detection case
      • 03 LED light flashing case
      • 04 MIPI screen detection case
      • 05 Read USB device information example
      • 06 FAN Detection Case
      • 07 FPGA FSPI Communication Case
      • 08 FPGA DMA read and write case
      • 09 GPS debugging case
      • 10 Ethernet Test Cases
      • 11 RS485 reading and writing examples
      • 12 FPGA IIC read and write examples
      • 13 PN532 NFC card reader case
      • 14 TF card reading and writing case
    • 5. QT Development

      • 01 ARM64 cross compiler environment construction
      • 02 QT program added automatic startup service
    • 6. Others

      • 01 Modification of the root directory file system
      • 02 System auto-start service

10 Ethernet Test Cases

1 Case Introduction

This case aims to introduce how to achieve Ethernet communication between the development board and the PC.

2. Preparation before the test

Connect the network ports of the PC and development board to the same switch via network cables.

Enter the following command in the development board terminal to query the IP address of the network interface. The execution result is shown in the figure below.

ifconfig
ETH_1

Enter the following command on the PC terminal to query the IP address of the PC network interface. The execution result is shown in the figure below.

ipconfig
ETH_2

Execute the ping command on the development board terminal and PC terminal respectively.

# On the development board terminal
ping <PC IP address>

# On the PC terminal
ping <Development board IP address>

#e.g:ping 192.168.49.20

The execution result is shown in the figure below, indicating that the network connection is unobstructed.

ETH_4

Open the software NetAssit in directory 04-Software Information\Tools\Windows . Select TCP Client as the protocol type , enter the queried IP address as the remote host address, and select 8080 as the remote host port . The configuration interface is shown in the figure below.

ETH_3

3 Operation process

Open the terminal and copy the executable program smdt_eth_demo in the bin directory of this case (05-Development Materials\Software Development Materials\linux_demo\smdt_eth_demo\bin) to the development board file system (the source code can be viewed in the src path).

Execute the following command in the terminal and switch to the directory where the smdt_eth_demo executable program is located.

#切换到 smdt_eth_demo 可执行程序所在目录
cd ‘the file's directory’

#查看 smdt_eth_demo 是否在该目录下
ls

If the executable file smdt_eth_demo is in the current directory, modify the permissions of the executable file.

#添加可执行权限
chmod +x smdt_eth_demo

Execute the following command, the development board waits for the PC to connect. Click Connect in the NetAssit software . The execution result is shown in the figure below. The two devices have successfully established an Ethernet connection and are waiting for the user to enter a command.

./smdt_eth_demo
ETH_5

Three commands can be entered at the input end: recv : receive data from the PC; send : send data to the PC; exit : disconnect the Ethernet connection between devices.

Enter recv in the command line , press Enter, and wait for the PC to send data. Enter "Hello SMDT" in the debugging assistant and click Send. The development board can receive the corresponding string. As shown in the figure below.

ETH_7

Enter send in the command line and press Enter. The development board sends the data "Hello ShiMetaPi" to the PC. In the debugging assistant window, you can see the string sent from the development board to the PC, as shown in the figure below.

ETH_9

Type exit in the command line to disconnect the Ethernet connection between the two devices.

ETH_8
Edit this page on GitHub
Last Updated:
Contributors: zsl, zwhuang
Prev
09 GPS debugging case
Next
11 RS485 reading and writing examples