W5500 + STM32 + HAL Library - Mobile APP communication
W5500 + STM32 + HAL Library - Mobile APP communication

【1】Introduction to routines
The W5500 is a full hardware TCP/IP embedded Ethernet controller that provides easier Internet connectivity for embedded systems
Solution. Use hardware logic gates to realize the transport layer and network layer of the TCP/IP protocol stack (such as: TCP, UDP, ICMP, IPv4,
ARP, IGMP, PPPoE and other protocols), and integrates data link layer, physical layer, and 32K bytes on-chip RAM as data
Send and receive buffer. The main control chip of the upper computer only needs to undertake the processing task of the control information of the TCP/IP application layer. thus greatly saving on
The workload of the bit machine for data replication, protocol processing, and interrupt processing has improved, and the system utilization rate and reliability have been improved.
The W5500 chip is integrated on the YS-F1Pro development board, which can realize network communication.
This routine realizes the establishment of the W5500 network environment, and finally verifies the network path through ping.
【2】Jumper cap
********* For the routine to work properly, the following jumper caps must be inserted ***********
Silkscreen No. IO Port Target Function Pin Factory Default Setting
JP1 PA10 TXD(CH340G) connected
JP2 PA9 RXD(CH340G) connected
JP8 PF9 INTn(W5500) connected
JP9 PF11 SCSn(W5500) connected
【3】Operation and phenomenon
Use a network cable to connect to the network port on the upper right of the YS-F1Pro development board and connect to the router; use the MINI USB cable that comes with the development board to connect to the development board.
The MIMI USB interface marked with "debug serial port" on the board (need to install the driver), open the serial port debugging assistant tool on the computer side, set
The parameter is 115200 8-N-1. Open the network debugging assistant, set it to the TCP Server type, and the IP address is your computer host IP, port
Set it to 8080, and open the TCP Server of the network debugging assistant. Set the relevant parameters in the w5500_conf.c file according to your own network environment,
Here, set the remote IP as the computer host IP, and the remote port as 8080, compile the program and download it.
The assistant window can receive information. Then you can input the sending data in the sending window of the network debugging assistant;
The hand will print the received data and send it back to the network communication assistant.