1 Introduction
The advent of the PC era has led to the emergence of information products, and the combination of the Internet and information products is a trend of development today. The emergence of embedded Internet technology just caters to this trend.
Due to the penetration of Internet technology, embedded systems are becoming more and more intelligent and have more and more network-friendly features. This paper mainly designs and tests the embedded Web server technology. The function of the Web server is to *client service requests and provide corresponding services according to the type of client requests. Embedded Web server refers to the introduction of Web server into the embedded device on site and resides in a limited code space. In the current embedded application field, most embedded systems are transformed into embedded Web servers. Web servers based on embedded devices can provide a unified browser-based operation and control interface to any legitimate user who accesses the network where it is located. At this time, the browser becomes the front-end control panel of the device.
In the management and interaction of embedded devices, Web-based applications have become the mainstream. This program structure is the B/S structure that everyone is very familiar with, that is, running a Web server that supports scripts or CGI functions on the embedded device, which can generate dynamic pages. On the user side, the embedded device can be managed and monitored only through a Web browser, which is very convenient and practical.
2 System Hardware and Architecture
2.1 Hardware Design Platform
The hardware platform of this system is shown in Figure 1. This hardware system has a simple structure and low cost. It can be directly connected to the Internet without a PC. On the client, a standard browser can be used to communicate with the embedded Web server through the Internet, successfully replacing a dedicated PC server (with a dedicated interface card and Ethernet interface card) or a dedicated communication chip. It conveniently realizes the needs of many embedded devices to directly interconnect with the Internet at a low cost.
Figure 1 Hardware platform.
2.2 Architecture of embedded web server
As shown in Figure 2, in this design, the client uses a web browser to communicate with the web server. The HTTP protocol is used in the web server. HTTP is a simple protocol that completes only one request per connection. Before the client exchanges data with the web server, it first establishes a connection using TCP/IP. The server program establishes a TCP type SOCKET and communicates on port 80. After receiving the request from the user, the server parses the HTTP protocol header of the client request, analyzes the client's request, and returns the corresponding data according to the client's request.
Figure 2. Architecture diagram.
3 Technical Analysis and Implementation
3.1 Software requirements and functional requirements
According to the requirements of this design, the software requirements process is shown in Figure 3. In the figure, the user as the core needs to complete the corresponding 7 requirements. Specifically: the client obtains the file list of the current directory of the server; obtains the specified file according to the requirements, and sends the file requested by the client to the client; the client sends the requested HTML type file to the client according to the requirements; the user obtains a plain text file; obtains a JPG image file; obtains a GIF image file; and finally processes and parses the user request, parsing the request information into the requested command, the requested file name, and the requested file type.
According to the above requirements, the specific data flow to achieve this process is shown in Figure 4. The structure of the entire system is shown in Figure 5. [page]
Figure 3 Software requirements.
As can be seen from the figure: the main program first establishes the environment settings and sets the signal processing method, establishes a listening TCP stream SOCKET and binds port 80, then receives a connection request, transmits the request to the connection processing module for processing, and continues*.
3.2 Algorithm Implementation
The algorithm flow for implementing this design is shown in Figure 6.
4 Testing
First, we need to build an embedded development environment based on S3C2410, burn the compiled booloader, ARML inux kernel and ramdisk into Flash, compile the data acquisition and marquee applications into dynamic links, and use the arrmv41-unknown-linuxgcc compiler when compiling. Generally, as long as we compile on the PC platform, we can modify the makefile slightly. The web server and other files such as dynamic link libraries must be in the same directory. When running, start the design server first, dynamically load the relevant drivers, enter the IP address of the embedded system on the PC browser, and the collected data can be dynamically displayed on the web page. At the same time, the working status of the remote device can be controlled through the control buttons on the web page.
This design is mainly to realize the dynamic display of the school's homepage. Enter http://192.168.0.115 (115 is the IP address of the UP-AMR2410-S experimental board) in the desktop browser, and observe the connection request results in the client's browser and the print information of the server on the development board. See Figure 7.
Figure 7: Test results of this machine.
5 Conclusion
Embedded Web server is a key component for realizing the interconnection between embedded system and Internet through Web. It directly affects the quality and efficiency of network application system operation. Research on it is of great significance to the development of Internet technology. This work proposes a design method of embedded Web server based on ARM-Linux operating system. The embedded Web server has the advantages of low cost, good openness, strong portability, etc., which is convenient for later maintenance and upgrading. Since the designed embedded Web server is a separate module and provides a standard interface, it can be easily applied to other embedded devices (such as smart home appliances, field nodes, etc.) with only a few modifications to the software, which has certain promotion value.
References:
[1]. PC datasheet http://www.dzsc.com/datasheet/PC+_2043275.html.
Previous article:Power quality online monitoring system based on GPRS technology
Next article:Cache mechanism and its principle that should be paid attention to in embedded programming
Recommended ReadingLatest update time:2024-11-16 15:54
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Solar Simple Automatic Tracker
- Questions about the constant current source composed of op amp and MOS tube
- 28 core issues of 5G
- How much year-end bonus did you get in 2019?
- CS+ compilation error, prompting that the specified file cannot be found, please help
- CCS7.3 Installation and Use Tutorial
- 16 times voltage rectifier circuit, the output voltage is low after each welding (30% of the design), occasionally one or two can reach the design purpose
- Arteli-Migration Manual_SXX32F0xx&GX32F3x0_to_AT32F415_V1.0
- MSP430 MCU Development Record (22)
- Encountered a difficulty, two 8-bit data failed to be spliced into a 16-bit data