Design and Implementation of an Embedded Network Management System Based on arm9-

Source: Internet
Author: User
Tags network function sqlite database
Design and Implementation of an Embedded Network Management System Based on arm9-
[Date:] Source:China Power GridAuthor:Yang yongwan Xiaoxu fan zifu, Next Generation Network Application Technology Research Institute, Chongqing University of Posts and Telecommunications [Font:Large Medium Small]

 

Preface

The Multi-Service optical fiber access system uses traditional SDH and optical fiber resources to extend the coverage of the original TDM leased line through optical fiber, so that traditional fixed network operators can continue to provide and expand leased line services.

In addition to traditional network management software, the multi-service optical fiber access system also adopts a Web-based embedded network management system. In this paper, the application of embedded web server and Embedded Database Technology in the access device network management system is combined to discuss the Design and Implementation of Network Management System Based on the arm9-platform and embedded web server and embedded database.

Embedded Network Management System Design Overview

The embedded network management system is based on the arm9-hardware platform and Linux operating system. It uses embedded web servers to configure the functions of devices and embedded databases to collect, analyze, and store alarm information. Management personnel can directly access the Web server on the device through the IE browser to achieve network management. The structure 1 of the embedded monitoring system is shown in. The embedded network management system provides graphical management for each device. It provides easy-to-use interfaces and features that are easy to operate without loss.

In the original system, the hardware platform is based on the at91rm9200 chip. The chip uses a 16/32-bit ARM920T kernel and operates at a speed of 180 MHz. It is integrated with 64 k ram and 128 k rom, the external bus Extended Interface (EBI) supports multiple types of external memory. For the operating system, this article selects openSource codeAnd Linux with rich network resources. The embedded Linux operating system is highly portable. After you reconfigure the system, the kernel file is smaller than 500 kb after the kernel is compiled.

Transplantation of Embedded Web servers and embedded Databases

Cross-compilation environment Establishment

To establish a cross-compilation environment, first install the cross-compilation tool arm-linux-gcc. here, the cross-2.95.3.tar.gz toolkit is installed. Decompress and install the toolkit to the/OPT directory of the host machine, configure the environment variables, and then create the required cross-compilation development environment. Porting embedded Web Servers

Embedded Web servers use open-source BOA servers. Boa is an HTTP server for a single task. It creates an HTTP request list to process multiple HTTP connection requests. At the same time, it is only CGIProgramCreating new processes greatly saves system resources.

Decompress the boa0.94 source code and run. /configure -- Host = arm-Linux-GCC -- target = arm-Linux Command to generate the MAKEFILE file, modify GCC to arm-Linux-GCC, and execute the make command, you can generate a boa application running on the arm board.

Web Server Configuration

To run the Web server boa on arm, you need to set the runtime environment and parameters, and place the final configuration file boa. conf in the appropriate position. You can modify the configuration file boa. conf to configure the web server. Some configurations are as follows: the listening port uses port 80 and the access log accesslog is stored in/var/log/BOA/access_log. The error log errorlog is located in/var/log/BOA/error. log. The root directory of the file, DocumentRoot, is located at/home/web/. The keepalivemax value and keepalivetimeout value use the default value. Set the CGI script program path to/cgi-bin /, set the servername value of the server name to webserver. Set the modified configuration file boa. conf is stored in the root file/home/web directory of the embedded file system. Finally, the ramdisk file system containing the boa application, the BoA. conf configuration file, and other CGI script programs is downloaded to the flash memory through the TFTP server.

Transplantation of embedded Databases

Embedded databases use open-source SQLite databases, which are lightweight relational databases and have a three-level structure system, namely the user mode, logic mode, and storage mode. To enable the database application to run in the at91rm9200 + Linux environment, you need to port SQLite to the Linux platform and download it to the lib directory of the target Linux system through FTP, after the database application is cross-compiled, it can be downloaded to the Linux system on the target board through FTP.

Software Structure Design of Embedded near System

The software structure of the monitoring system based on the ARM platform is shown in 2. After the hardware platform is powered on, the loader is responsible for setting the necessary hardware for the microprocessor and initializing the memory. Decompress the kernel image file and initialize the kernel and user State after necessary checks. Finally, start shell to run the embedded monitoring system. In the specific design, the hardware driver and network function support are all completed by compiling the Linux kernel.

In the monitoring system, the main task is completed by two different programs (processes): Real-time Data Collection and processing programs and network service programs that respond to user requests. Because the data collection processing program exclusive RS-232 serial port, and CGI script program also needs to be issued through the serial port command, in order to avoid multiple open serial port, the CGI script program communicates with the data collection and processing program through message queue, so that multiple processes can share one serial port at the same time.

The real-time data collection program consists of data collection, data processing, and data storage modules. The data acquisition module is responsible for sending the query command through the serial port cycle of the RS-232 according to the user's preset communication protocol, and save the received data to the data cache area. The data processing module parses the collected data based on the protocol and classifies the parsing results according to different fields. The data storage module stores the parsing results in the corresponding fields as required by the SQLite database partitioning method.

The network service program that responds to user requests consists of the Web server (BOA) and the CGI script program that responds to user requests. The server listens to user requests from the network through port 80, when a user sends a request to the server through the IE browser, the CGI script program that responds with the response will convert the request information into a data format that the server can recognize, read the required information from the sqlile database, and then the CGI program converts the information into a format that can be recognized by the web browser, and sends the HTTP response message back to the client for display. The CGI script provides the following functions: configuration, query of device information, and query of device alarm information. CGI script for querying Device Alert InformationCodeAs follows.


Conclusion

In the embedded network management system, using embedded WCB servers and embedded databases to operate and manage data is the development direction of embedded network management systems. The system described in this article shortens the application development process, reduces the development cost of the network management software, and achieves multi-user data sharing. Practice has proved that the embedded network management system based on the arm9-platform has high application value.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.