Advance Innovation Centre
  • AIC Knowledge @ EEC for All
  • 😎Logical Thinking
    • Karel Robot
    • Code to Flowchart
    • Play with Docker
    • CNX Software
  • MCU & Interfacing with Infineon PSOC™
    • Basic MCU Interfacing
      • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
      • Development Environment Preparation
      • PSoC™ 6S2 Peripherals Interfacing (GPIO)
        • Hello World and LED Blinking
        • GPIO Principles
        • PSoC™ 6S2 GPIO-HAL LED Blink Lab
        • PSoC™ 6S2 GPIO-PDL LED Blink Lab
        • Button "Bounce" Principles
          • Push/Pull Button to Turn ON/OFF LED via HAL
          • Push/Pull Button to Turn ON/OFF LED via PDL
          • GPIO Button Interrupt via HAL
          • GPIO Button Interrupt via PDL
        • GPIO variables & functions
      • PSoC™ 6S2 Peripherals Interfacing (ADC, PWM)
        • PSoC™ 6S2 SAR ADC
          • ADC Principles
          • PSoC™ 6S2 with ADC Labs
            • Reading potentiometer sensor value via an ADC HAL
            • Reading potentiometer sensor value via an ADC PDL
        • PSoC™ 6S2 PWM & TCPWM
          • PWM Principles
          • PSoC™ 6S2 for PMW Function Labs
            • LED Brightness using PWM via HAL
            • LED Brightness using PWM via PDL
    • Sensor Interfacing and HMI
      • OLED Display
        • OLED Display Principles
        • Calling BDH’s OLED functions
        • Display ADC via Potentiometer on OLED
      • BDH Shell
        • Shell Principles
        • LED Blinking and CAPSENSE via BDH Shell
        • Adding "History" command
        • Adding "Reboot" command
        • CAPSENSE Button and Slider
          • CAPSENSE Button and Slider with Capsense Tuner
          • CAPSENSE Button and Slider using FreeRTOS
    • Serial Communication & Visualization
      • UART, I2C, SPI Communication via Infineon PSoC™6
      • BMX160 Sensor Communication via Infineon PSoC™6
        • Reading ADC via HAL with Potentiometer and Displaying GUI on Serial Studio
        • Reading XENSIV-DPS-3XX Pressure Sensor and Displaying GUI on Serial Studio
        • Motion Sensors GUI Integration via Serial Studio
    • IoT Connectivity & Data Analytics via Node-Red
      • Node-Red Installation
      • Setting MQTTS to MQTT Broker
      • Sending PSoC6’s sensor to MQTT (node-red)
    • Edge AI on PSoC™
      • Machine Learning on PSoC™6 via Edge-Impulse
    • Infineon PSoC™ Troubleshooting
  • IoT Development with Infineon PSOC™ & BDH Platform
    • PSoC™ IoT Development Kit
      • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
      • Development Environment Preparation
        • Hello World and LED Blinking
    • IoT Connectivity
      • Node-Red Installation
      • Controlling PSoC™ LED using MQTT
      • Setting MQTTS to MQTT Broker
      • Sending PSoC6’s sensor to MQTT (node-red)
    • BDH IoT Connectivity
    • WireLinX™ IoT PLC
    • BDH X-Brain Data Analytics
      • PSoC6 Data Collection to CSV log file
    • Data Visualization
      • สร้าง Dashboard ด้วย Looker Studio
  • 🖥️Operation Systems
    • Prerequisites
      • Guideline from Ubuntu
        • Ubuntu and VSCode on WSL2
      • ติดตั้ง WSL 2
      • Run Ubuntu on VirtualBox7
    • Zero to Linux Hero
      • Computer OS Architecture
      • Anatomy of Linux System
        • UNIX/Linux History
        • UNIX/Linux Evolution
        • GNU Project
        • Linux OS Architecture
        • Command Line Interface (CLI)
          • Basic Commands
          • 😎Level up your Linux Shell
          • File & Dir. Commands
          • Searching Commands
          • 😎ChatGPT-based Terminal
          • SysAdmin Commands
          • Network Commands
          • Hacker Commands
        • Busybox
        • Shell Script
          • Awk Script
          • Bash Shell Script
            • Bash Snippets
            • Bash Useful Examples
      • Anatomy of Linux Kernel
        • Linux Kernel Principles
        • Linux Environment for Developer
      • Anatomy of Embedded Linux
        • Embedded Linux
        • Host & Target
        • Cross Toolchains
        • Bootloader
        • Building Embedded Linux
    • Linux OS Dev. Engineer
      • Process Management
        • Process Basic
        • Process State
        • Basic Process Mgmt. Commands
        • Advance Process Mgmt. Commands
        • Process API Programming
      • IPC
        • IPC Anatomy
        • Signal Programming
        • Pipe Programming
        • FIFO Programming
        • Msg. Queue Programming
          • System V
        • Share Memory Programming
          • System V
        • Socket Programming
      • POSIX Threads
        • Multi-tasking Basic
        • POSIX Thread Anatomy
        • Threading Programming
      • Applied IPC
        • Remote Commander
        • Multi-Remote Commanders
      • Process Synchronization
        • Mutex Programming
        • Semaphore Programming
      • Applied IPC with Semaphore
  • ⌚Embedded Systems Development
    • Introduction to ESD
      • Why's ESD?
      • What it use for?
      • How it works?
    • Enbedded System Development via PSoC6
      • Basic MCU Interfacing
        • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
        • Development Environment Preparation
        • PSoC™ 6S2 Peripherals Interfacing (GPIO)
          • Hello World and LED Blinking
          • GPIO Principles
          • PSoC™ 6S2 GPIO-HAL LED Blink Lab
          • PSoC™ 6S2 GPIO-PDL LED Blink Lab
          • Button "Bounce" Principles
            • Push/Pull Button to Turn ON/OFF LED via HAL
            • Push/Pull Button to Turn ON/OFF LED via PDL
            • GPIO Button Interrupt via HAL
            • GPIO Button Interrupt via PDL
          • GPIO variables & functions
        • PSoC™ 6S2 Peripherals Interfacing (ADC, PWM)
          • PSoC™ 6S2 SAR ADC
            • ADC Principles
            • PSoC™ 6S2 with ADC Labs
              • Reading potentiometer sensor value via an ADC HAL
              • Reading potentiometer sensor value via an ADC PDL
          • PSoC™ 6S2 PWM & TCPWM
            • PWM Principles
            • PSoC™ 6S2 for PMW Function Labs
              • LED Brightness using PWM via HAL
              • LED Brightness using PWM via PDL
      • Sensor Interfacing and HMI
        • OLED Display
          • OLED Display Principles
          • Calling BDH’s OLED functions
          • Display ADC via Potentiometer on OLED
        • BDH Shell
          • Shell Principles
          • LED Blinking and CAPSENSE via BDH Shell
          • Adding "History" command
          • Adding "Reboot" command
          • CAPSENSE Button and Slider
            • CAPSENSE Button and Slider with Capsense Tuner
            • CAPSENSE Button and Slider using FreeRTOS
      • Serial Communication & Visualization
        • UART, I2C, SPI Communication via Infineon PSoC™6
        • BMX160 Sensor Communication via Infineon PSoC™6
          • Reading ADC via HAL with Potentiometer and Displaying GUI on Serial Studio
          • Reading XENSIV-DPS-3XX Pressure Sensor and Displaying GUI on Serial Studio
          • Motion Sensors GUI Integration via Serial Studio
    • Edge Computing and IoT Connectivity
    • Cloud-Based Data Analytics and Digital Twin
    • Edge Vision AI
    • Resources
      • Basic Hardware and Firmware
        • Environment Preparation
          • การติดตั้งโปรแกรม Arduino IDE
            • ตัวอย่างการเริ่มต้นใช้งาน Arduino IDE
          • การติดตั้งโปรแกรมสำหรับใช้งานเครื่องมือวัด NI MyDAQ
            • ตัวอย่างการตั้งค่าใช้ Digital Multimeter -NI ELVISmx
            • ตัวอย่างการตั้งค่าใช้ Oscilloscope-NI ELVISmx
          • ติดตั้งโปรแกรม KingstVIS
        • Basic measurement
          • Basic Digital and Analog I/O
            • LAB: Basic Digital Input/Output
            • LAB: Basic Analog Input/Output
          • Waveform
            • LAB: Oscilloscope
            • LAB: Oscilloscope and Function Generator
            • LAB: Pulse Width Modulation (PWM)
              • Homework
        • Interfacing and Communication
          • LAB: UART, RS485, RS232 Protocol
          • LAB: I2C Protocol
            • HOMEWORK
          • LAB: SPI Protocol
      • IoT Connectivity
        • Example: IoT with MQTT on Node-red
        • Data logger
        • LAB: Data Visualization
  • 🛠️C/C++ for Embedded Programming
    • Development Environment Preparation
      • ติดตั้ง WSL 2
      • ติดตั้ง Ubuntu environment
      • ติดตั้งโปรแกรม Visual Studio Code
      • การเชื่อมต่อ Virtual studio code เข้ากับ WSL
      • ติดตั้ง docker on WSL
    • Principle C/C++ Programming
      • Get started with C++
      • Makefile
        • Makefile Examples
      • Compiling and running
        • How to create a program that you can enter inputs.
          • Lab 1 Exercise
      • Arguments
        • Command line arguments in C and C++
      • signed and unsigned data types
      • Variable and Operator
      • If and If else
      • Loop, Infinite loop, and flag
        • Loop and Flag exercise
      • Array
        • Get to know with arrays
        • Implement example
      • Vector
    • Object Oriented Programming (OOP) in C++
      • Class and Object
      • Encapsulation and Abstraction
      • Polymorphism and Inheritance
    • C/C++ Preprocessing
      • Macro
        • Quiz Macro
      • File Inclusion
      • Conditional Compilation
      • Pragma directive
        • Quiz Pragma
    • String in C++
      • Concatenation
      • Split
    • Type conversions for C/C++
      • Conversion using Cast operator
    • Error handling
    • Data logger
      • การสร้างไฟล์และเขียนไฟล์
      • การอ่านไฟล์
      • การเก็บข้อมูลกับTime stamp
    • High performance programing
      • Multi-task and Multi-thread
        • Multi-threading example
      • Mutex
      • Queue
      • OpenCV
    • C/C++ Techniques
      • Makefile in action
      • Object Oriented Programming (OOP) in C++
        • Class and Object
        • Encapsulation and Abstraction
        • Polymorphism and Inheritance
      • C/C++ Preprocessing
        • Macro
          • Quiz Macro
        • File Inclusion
        • Conditional Compilation
        • Pragma directive
          • Quiz Pragma
      • Binary, Octal and Hexadecimal Numbers
      • Array and properties of an array
        • Get to know with arrays
        • Implement example
      • What's next?
  • 🤖Artificial Intelligence (AI)
    • VAMStack Design House, BUU
    • Data Analytics
      • Data cleansing
      • Data analytics
      • Data analytic exercise
    • Machine Learning
      • Neural Network Layers
      • Machine learning type
      • Dataset
      • Using Edge Impulse for AI Model
    • Basic Image Processing
      • Computer Vision using Python Language
        • Installation
        • Computer Vision Basics
          • Pixel and Color
          • Draw image
          • Basic Image processing
          • Morphology Transformations
          • Gaussian blur
          • Simple Thresholding
          • Contour
          • Canny edge detection
        • Case Study
          • Coin counting
          • Color detection & tracking
        • VAM_CV SDK
  • ⚙️FPGA Design and Development
    • Verilog HDL via Vivado IDE
      • LAB1: Setting Environment and Create Project
        • Create Vivado Project
      • LAB2: Hardware Description Language Work Flow
        • Simulation code
      • LAB3: Design HDL Project
        • Top Level Design
        • Top-level Simulation
      • LAB4: Asynchronous VS Synchronous Circuit
        • Simulation Synchronous counter
    • C/C++ Programming on Ultra96v2 FPGA Board
      • Application C/C++ on Ultra96v2 Part 1
        • Design Overview
        • Step 1 - Burn the image to SD card
        • Step 2 - Bring up Ultra96v2
        • Step 3 - Installing the Vitis-AI runtime packages
      • Application C/C++ on Ultra96v2 Part 2
        • STEP 1 : Setting auto boot Wifi
        • STEP 2 : How to working on Embedded
        • STEP 3 : How to run the test code
  • 🤖Robotics
    • Dobot Magician
      • Instruction of Dobot
      • Software Download
      • Basically of Program
        • Teaching and Playback
        • Write and Draw
        • LaserEngraving
        • 3D Printer
    • Robotino
      • Software Download
        • Robotino View
        • Robotino SIM
      • Charging
      • Connecting
      • Follow Line example
        • Basic block in Follow Line
    • RaspBlock
      • Get Started with Raspblock
  • 🚩Special Topics
    • Node-Red
      • Set up Raspberry Pi
      • Install node red in Raspberry Pi
      • Get started with Node Red
        • Open node-red
        • Turn off node red
        • Install Dashboard on Node-red
        • Use node red to show message
        • Using Ultrasonic sensor with node-red
    • IoT Cloud
      • Overview
        • How do they work?
          • Basic Knowlege
      • Installations
        • Install Docker
        • Install Mosquitto Broker
        • Install InfluxDB
        • Install Telegraf
        • Install Grafana
      • Get Sensor Value and Send to MQTT
        • Connect ESP3266 to sensor
        • Connect ESP3266 to MQTT
      • Integration
    • Senses IoT
      • SENSES IoT Platform
      • LAB8: MCU send data to IoT platform
    • CrowPi Dev Kit
      • Raspberry Pi with CrowPi
      • Remote to Raspberry Pi
      • Cross-Compile
        • Lab 1: Programming and cross complier
      • Hardware and Interfaces Usage CLI
        • LAB: Usage GPIO via CLI
        • LAB: Scan I2C bus via CLI
      • Python library for Crow Pi
      • wiringPi library (C) for CrowPi
        • Lab2: Crowpi and sensors
    • LVGL Development
      • LVGL - Light and Versatile Embedded Graphics Library
        • Setting program for LVGL Simulator
        • Get started with LVGL simulator
        • Example Library of LVGL
        • Create your own screen
          • Exercise
        • Style
          • Exercise
        • Event
    • Docker OS
      • Docker OS Part 1
        • Part 1 : Installation
        • Part 2 : Basic Docker OS and Linux CLI
      • Docker OS Part 2
        • Part 1 : Docker communication
        • Part 2 : Docker compose
      • Application Gstreamer on devcontainer
        • STEP 1 : Setting gstreamer environment
        • STEP 2 : Create the Gstreamer element on template
        • STEP 3 : Testing and application on your gst element
  • 🤟Recommended by AIC
    • Skill Roadmap
      • Embedded Engineer
      • Developer
    • Hardware Programming
    • Embedded Programming
    • General-propose Programming
    • Algorithmica
    • Thai Expert Knowledge
    • RT-Thread University Program
      • Infineon PSoC6
      • Kernel
        • Kernel Basics
        • Thread Management
        • Clock Management
        • Inter-thread synchronization
        • Inter-thread communication
        • Memory Management
        • Interrupt Management
        • Kernel porting
        • Atomic Operations
        • RT-Thread SMP
        • Kernel API Changelog
      • Tools
      • Devices & Drivers
        • SENSOR Devices
        • Touch Equipment
        • CRYPTO Devices
        • AUDIO Devices
        • Pulse Encoder Devices
      • Components
        • C Library (libc)
        • ISO/ANSI C Standard
        • POSIX Standard
          • FILE (File IO)
          • Pthread
          • Timer
          • IPC Semaphore
          • IPC Message Queues
          • Dynamic Modules
        • Network Components
          • FinSH Console
          • FAL: Flash Abstraction Layer
          • Virtual File System
          • tmpfs: temporary file system
          • ulog log
          • utest testing framework
          • Power Management
          • RT-Link
        • Software Packages
          • Internet of Things
            • MQTT-umqtt
            • Telnet
          • Tools
            • SystemView
            • SEGGER_RTT
          • LVGL Manual
            • Touch Screen Driver
      • Demo
        • Infineon Gateway
        • Handwriting Recognition (MNIST)
        • Object Detection (Darknet)
        • ROS using RT-Thread
        • Control the car using RT-Thread
        • LiDAR via RT-Thread
        • Detection via RT-Thread and ROS
        • Sensor Driver Development Guide
Powered by GitBook

Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University

On this page
  • Network Tools (NetUtils) User Guide
  • Introduction
  • NetUtils Component Introduction
  • Ping Tool
  • NTP Tools
  • TFTP Tools
  • Iperf tool
  • Introduction and use of other network debugging tools

Was this helpful?

  1. Recommended by AIC
  2. RT-Thread University Program
  3. Components
  4. Software Packages

Internet of Things

PreviousSoftware PackagesNextMQTT-umqtt

Last updated 7 months ago

Was this helpful?

This article introduces the usage of RT-Thread NetUtils to help developers better use RT-Thread NetUtils components to solve problems encountered during network development.

When developing and debugging network-related products, some useful tools can often achieve twice the result with half the effort. Based on this application scenario, the RT-Thread NetUtils component has developed and encapsulated a series of concise and easy-to-use network tool sets to provide convenience for developers.

In order to facilitate users to develop network applications, RT-Thread has created a NetUtils component package for commonly used network tools. Through Env dynamic configuration, it is ready to use and effectively reduces resource usage.

As a collection of network tools, RT-Thread NetUtils includes Ping commands for testing and debugging, NTP tools for time synchronization, Iperf and NetIO for performance and bandwidth testing, and TFTP, a lightweight file transfer tool widely used in embedded systems, which facilitates file transfer between two devices over the network. In addition, RT-Thread also provides some advanced auxiliary tools for practical problems in development, such as Telnet tools that can remotely log in to RT-Thread Finsh/MSH Shell, and tcpdump, a network packet capture tool based on lwIP.

The following is the classification and introduction of RT-Thread NetUtils:

name

Classification

describe

Ping

Debugging Tests

The "ping" command can be used to check whether the network is connected, which can help us analyze and determine network failures.

NTP

Time Synchronization

Network Time Protocol

TFTP

File Transfer

TFTP is a simple protocol for transferring files, which is even lighter than FTP.

Iperf

Performance Testing

Tests maximum TCP and UDP bandwidth performance, reporting bandwidth, latency jitter, and packet loss

NetIO

Performance Testing

Tools for testing network throughput

Telnet

Remote Access

Can remotely log in to RT-Thread's Finsh/MSH Shell

tcpdump

Network debugging

tcpdump is a network packet capture tool based on lwIP for RT-Thread

Each gadget can be enabled/disabled independently using menuconfig, and Finsh/MSH usage commands are provided. First, open the Env tool, enter the BSP directory, enter menuconfig in the Env command line to enter the configuration interface, configure the project, and select the appropriate NetUtils function according to your needs, as shown in the figure

Note

Note: Ping and TFTP depend on lwIP. You need to enable lwIP dependency before they can be displayed.

RT-Thread online packages
  -> IoT - internet of things
    -> netutils: Networking utilities for RT-ThreadcopymistakeCopy Success

The Ping tool depends on lwIP. You need to enable the lwIP dependency in the Env tool before it can be seen. The steps are as follows:

-> RT-Thread Components
  -> Network stack
    -> light weight TCP/IP stack
      -> Enable lwIP stackcopymistakeCopy Success

Enable the Ping option in the NetUtils menu bar:

RT-Thread online packages
  -> IoT - internet of things
    -> netutils: Networking utilities for RT-Thread
    [*] Enable Ping utilitycopymistakeCopy Success

Ping supports access IP 地址 or 域名, use Finsh/MSH command to test, the general use effect is as follows:

  • Ping Domain

msh />ping rt-thread.org
60 bytes from 116.62.244.242 icmp_seq=0 ttl=49 time=11 ticks
60 bytes from 116.62.244.242 icmp_seq=1 ttl=49 time=10 ticks
60 bytes from 116.62.244.242 icmp_seq=2 ttl=49 time=12 ticks
60 bytes from 116.62.244.242 icmp_seq=3 ttl=49 time=10 ticks
msh />
copymistakeCopy Success
  • Ping IP

msh />ping 192.168.10.12
60 bytes from 192.168.10.12 icmp_seq=0 ttl=64 time=5 ticks
60 bytes from 192.168.10.12 icmp_seq=1 ttl=64 time=1 ticks
60 bytes from 192.168.10.12 icmp_seq=2 ttl=64 time=2 ticks
60 bytes from 192.168.10.12 icmp_seq=3 ttl=64 time=3 ticks
msh />
copymistakeCopy Success

Enable the NTP option in the NetUtils menu bar:

RT-Thread online packages
  -> IoT - internet of things
    -> netutils: Networking utilities for RT-Thread
    [*] Enable NTP(Network Time Protocol) clientcopymistakeCopy Success

The prototype of the function to obtain UTC time is: time_t time_t ntp_get_time(void), if the return value is greater than 0, the time is obtained successfully, and if it is equal to 0, it fails.

Sample code:

#include <ntp.h>

void main(void)
{
    time_t cur_time;

    cur_time = ntp_get_time();

    if (cur_time)
    {
        rt_kprintf("NTP Server Time: %s", ctime((const time_t*) &cur_time));
    }
}copymistakeCopy Success

Local time has more time zone than UTC time, for example, Beijing time is in the Eastern Time Zone, which is 8 hours more than UTC time. menuconfigYou can set the current time zone in , the default is 8.

The prototype of the function to obtain the local time is: time_t ntp_get_local_time(void), if the return value is greater than 0, the time is obtained successfully, and if it is equal to 0, it fails. The usage of this API is ntp_get_time()similar to .

If the RTC device is enabled, you can also use the following commands and APIs to synchronize the local time of NTP to the RTC device.

The effects of the Finsh/MSH command are as follows:

msh />ntp_sync
Get local time from NTP server: Sat Feb 10 15:22:33 2018
The system time is updated. Timezone is 8.
msh />copymistakeCopy Success

The function prototype for synchronizing local time to RTC is: time_t ntp_sync_to_rtc(void), the return value is greater than 0 for success, and equal to 0 for failure.

Note

The NTP API method will occupy a large amount of thread stack when executed. Ensure that the stack space is sufficient (≥1.5K) when using it.

NTP API methods do not support reentrancy . Please be careful to lock them when using them concurrently.

RT-Thread currently supports TFTP server.

The TFTP tool depends on lwIP. You need to enable the lwIP dependency in the Env tool before it can be seen. The steps are as follows:

-> RT-Thread Components
  -> Network stack
    -> light weight TCP/IP stack
      -> Enable lwIP stackcopymistakeCopy Success

Enable the TFTP option in the NetUtils menu bar:

RT-Thread online packages
  -> IoT - internet of things
    -> netutils: Networking utilities for RT-Thread
    [*] Enable TFTP(Trivial File Transfer Protocol) servercopymistakeCopy Success
  • Install TFTP Client

The installation files are located at netutils/tools/Tftpd64-4.60-setup.exe. Please install the software before using TFTP.

  • Start TFTP Server

Before transferring files, you need to use the Finsh/MSH command on RT-Thread to start the TFTP server. The general effect is as follows:

msh />tftp_server
TFTP server start successfully.
msh />copymistakeCopy Success

Open the newly installed Tftpd64software and configure it as follows:

1. Select Tftp Client;

2. In Server interfacesthe drop-down box, be sure to select the network card that is in the same network segment as RT-Thread;

3. Fill in the IP address of the TFTP server. You can use ifconfigthe command to view it under MSH of RT-Thread;

4. Fill in the TFTP server port number, default:69

1. In Tftpd64the software, select the file to be sent;

2. Remote FileThe path where the server saves the file (including the file name). The option supports relative and absolute paths. Since RT-Thread turns on DFS_USING_WORKDIRthe option by default, the relative path is based on the directory currently entered by Finsh/MSH. Therefore, when using a relative path, be sure to switch the directory in advance;

3. Click Putthe button.

As shown in the figure below, send the file to the directory currently entered by Finsh/MSH. The relative path is used here :

Note

Note: If DFS_USING_WORKDIRis not enabled and Remote Fileis empty, the file will be saved in the root path.

1. In Tftpd64the software, fill in the file path (including the file name) to be saved;

2. Remote FileThe file path (including the file name) to be received by the server. The options support relative and absolute paths. Since RT-Thread has DFS_USING_WORKDIRthe option enabled by default, the relative path is based on the directory currently entered by Finsh/MSH. Therefore, when using a relative path, be sure to switch the directory in advance;

3. Click Getthe button.

As shown below, /web_root/image.jpgsave to local, here uses the absolute path :

msh /web_root>ls           ## 查看文件是否存在
Directory /web_root:
image.jpg           10559
msh /web_root>copymistakeCopy Success

Enable the Iperf option in the NetUtils menu bar:

RT-Thread online packages
  -> IoT - internet of things
    -> netutils: Networking utilities for RT-Thread
    [*] Enable iperf-liked network performance toolcopymistakeCopy Success

Iperf uses a master-slave architecture, that is, one end is the server and the other end is the client. The Iperf software package we provide implements TCP server mode and client mode, and does not support UDP testing. The following will explain how to use the two modes in detail.

You need to use the Finsh/MSH command on RT-Thread to obtain the IP address. The general effect is as follows:

msh />ifconfig
network interface: e0 (Default)
MTU: 1500
MAC: 00 04 9f 05 44 e5
FLAGS: UP LINK_UP ETHARP
ip address: 192.168.12.71
gw address: 192.168.10.1
net mask  : 255.255.0.0
dns server #0: 192.168.10.1
dns server #1: 223.5.5.5copymistakeCopy Success

Write down the obtained IP address 192.168.12.71 (record according to the actual situation)

You need to use the Finsh/MSH command on RT-Thread to start the Iperf server. The effect is as follows:

msh />iperf -s -p 5001copymistakeCopy Success

-s means start as a server -p means listen on port 5001

  • Install JPerf test software

The installation file is located at netutils/tools/jperf.rar, this is green software, the installation is actually a decompression process, just decompress it to a new folder.

  • Running jperf tests

Open jperf.batthe software and configure it as follows:

1. Select ClientMode;

2. Enter the IP address 192.168.12.71 you just obtained (fill in the actual address);

3. Change the port number to 5001;

4. Click run Lperf!to start the test;

5. Wait for the test to end. During the test, the test data will be displayed on the shell interface and JPerf software.

  • Get the IP address of your PC

Use the ipconfig command in the command prompt window of the PC to obtain the IP address of the PC, and write down the obtained PC IP address as 192.168.12.45 (record according to the actual situation).

  • Install JPerf test software

The installation file is located at netutils/tools/jperf.rar, this is green software, the installation is actually a decompression process, just decompress it to a new folder.

  • Start the jperf server

Open jperf.batthe software and configure it as follows:

1. Select ServerMode

2. Change the port number to 5001

3. Click run Lperf!Start Server

  • Start Iperf Client

You need to use the Finsh/MSH command on RT-Thread to start the Iperf client. The effect is as follows:

msh />iperf -c 192.168.12.45 -p 5001copymistakeCopy Success

-c means starting as a client, followed by the IP address of the PC running the server. -p means connecting to port 5001 and waiting for the test to end. During the test, the test data will be displayed on the shell interface and JPerf software.

In addition to the commonly used network tools mentioned above, RT-Thread also provides some practical network tools for development and debugging, such as NetIO tools, Telnet tools, and tcpdump tools.

RT-Thread currently supports NetIO TCP server.

For the usage of NetIO, please refer to the README in the component directory, which will not be described here.

RT-Thread currently supports Telnet server. After the Telnet client is successfully connected, it will remotely connect to the device's Finsh/MSH to achieve remote control of the device.

For the usage of Telnet, please refer to the README in the component directory, which will not be described here.

Tcpdump is a small tool based on RT-Thread for capturing IP packets. The captured data can be saved through the file system, or imported into the PC through the rdb tool and parsed using the wireshark software.

For the usage of tcpdump, please refer to the README in the component directory. I will not go into details here.

Env Configuration

is a network diagnostic tool used to test whether data packets can reach a specific host through the IP protocol. It estimates the packet loss rate (packet loss rate) and the round-trip delay time (network delay) between the host and the data packet.

is the Network Time Protocol, which is a protocol used to synchronize the time of each computer in the network. The NTP client is implemented on RT-Thread. After connecting to the network, the current UTC time can be obtained and updated to the RTC.

is also called the world unified time, world standard time, and international coordinated time. Beijing time is UTC+8 time, which is 8 hours more than UTC time, or 8 hours earlier.

(Trivial File Transfer Protocol) is a protocol in the TCP/IP protocol family used for simple file transfer between client and server. It provides simple and low-cost file transfer services. Its port number is 69. It is much lighter than the traditional FTP protocol and is suitable for small embedded products.

tftpd config

tftpd get

tftpd put

is a network performance testing tool. Iperf can test the maximum TCP and UDP bandwidth performance, has multiple parameters and UDP characteristics, can be adjusted as needed, and can report bandwidth, delay jitter and packet loss.

iperf server

iperf client

is a tool for testing network performance on OS/2 2.x, Windows, Linux and Unix. It tests the network throughput using packets of different sizes via TCP/UDP.

protocol is an application layer protocol used in the Internet and local area network. It uses a virtual terminal to provide two-way interactive functions based on text strings. It is one of the TCP/IP protocol family and is the standard protocol and main method for Internet remote login services. It is often used for remote control of web servers and allows users to run tasks on remote hosts on local hosts.

🤟
Network Tools (NetUtils) User Guide
Introduction
NetUtils Component Introduction
Ping Tool
Ping
NTP Tools
NTP
Get UTC time
UTC time
Get local time
Synchronize local time to RTC
TFTP Tools
TFTP
Transferring Files
Sending files to RT-Thread
Receive files from RT-Thread
Iperf tool
Iperf
Iperf Server Mode
Get IP address
Start Iperf Server
Iperf Client Mode
Introduction and use of other network debugging tools
NetIO Tools
NetIO
Telnet Tool
Telnet
tcpdump tool