“Information appliances and next-generation broadband wireless communication are the two main application fields of IPv6. With the rapid development of the Internet and the gradual popularization of home broadband, the home network composed of microcomputers, information appliances and consumer Electronic equipment in the family has become a important consumer hotspots. IPv6 technology has unique advantages in home networks. It can make household appliances such as refrigerators and air conditioners have an independent global IPv6 address; fully support quality of service (QoS), which is very beneficial for digital entertainment and multimedia information applications. Therefore, the application of IPv6 in the home network has broad prospects.
Authors: Wang Zhongyong; An Yongshuai; Song Yuquan
Information appliances and next-generation broadband wireless communication are the two main application fields of IPv6. With the rapid development of the Internet and the gradual popularization of home broadband, the home network composed of microcomputers, information appliances and consumer electronic equipment in the family has become a important consumer hotspots. IPv6 technology has unique advantages in home networks. It can make household appliances such as refrigerators and air conditioners have an independent global IPv6 address; fully support quality of service (QoS), which is very beneficial for digital entertainment and multimedia information applications. Therefore, the application of IPv6 in the home network has broad prospects.
The rapid development of the network brings great convenience to people, but also brings serious network security problems. In the home network, security issues are also prominent. The wide application of various new technologies in the home improves the performance of information appliances on the one hand, and puts forward new requirements for simplified operation and management on the other hand. All these need to be set and managed through a unified home network WSB platform, and dynamic interaction with the client can be realized.
This paper proposes an IPv6-based embedded home network WEB platform solution, using the high-performance 32-bit ARM core microprocessor S3C2410 as the hardware platform, and by transplanting the new version of the embedded linux-2.6.18 kernel, to achieve home Network management platform function.
2 Home network system structure
The system consists of client, broadband access port, home network HUB, home gateway and home appliance controller. As shown in Figure 1:
Figure 1 Schematic diagram of the system structure
The system is divided into three parts.
The first part is that the clients located outside the home network, home network users and maintenance personnel of information appliance manufacturers, access the external unified platform of the home network through the Internet, that is, the WEB server embedded in the gateway.
The second part is the gateway and the PC host. The gateway is not only the unified interface of each home appliance controller inside the home network, but also responsible for unified control and management of the home appliance controllers in each information appliance. On the one hand, it receives the control information sent by the user through the Internet, and on the other hand, it collects the status of the information appliances and provides it for the user’s reference.
the third part. It is a home appliance control module, which is connected to the executive mechanism of the home appliance, receives the control commands from the gateway, operates the home appliance, and at the same time collects and uploads the information of the home appliance according to the command of the gateway.
3 Hardware Development Environment
The choice of the hardware platform of the embedded system is mainly the choice of the embedded processor. In view of the needs of developing the embedded gateway and considering the peripheral equipment of the system, the system adopts the Samsung S3C2410 processor with the embedded ARM920T core. ARM920T is a high-performance, The best general-purpose packaged microprocessor in terms of low power consumption, it adopts 5-stage pipeline, has instruction and data cache, and supports technologies such as coprocessor, on-chip debugging and MMU. In addition, it also includes some embedded peripheral devices, including storage devices (16-bit NOR Flash memory with 8MB capacity composed of one E28F640 and 32-bit SDRAM memory with 32MB capacity composed of two pieces of HY57V281620), interface devices (asynchronous serial port, Ethernet Port and USB interface), Display device (LCD and touch screen module), these together constitute the hardware development environment.
4 Software Design
Compared with other embedded operating systems, Linux has the advantages of open source, small kernel, powerful functions, stable operation and good portability. It can give full play to the powerful functions of the ARM920T core with MMU (memory unit management). Open source advantage. The Linux kernel supports IPv6 comprehensively, so this system chooses Linux as the embedded operating system.
4.1 Establishment of Linux development environment
Due to the limited resources of the embedded system, the development of embedded Linux usually adopts the method of adding a host machine and a target board, that is, a PC with Linux is required as the compilation and debugging environment of the system. Since the PC host in the home network usually uses the Windows operating system to meet the daily needs, the virtualization method is adopted to solve this contradiction.
Install the virtual machine software VMware (version 5.0.0) on the PC host. VMware runs on the operating system of the host. It adds a layer of virtual operating platform (VMware Virtual Platform) between the Guest OS and the Host OS. The system transparently runs on the virtual operating platform. Then install RedHatLinux9.0 on the virtual machine as a host to perform kernel clipping, transplanting, and compiling of the operating system used by the Japanese standard board, compiling and debugging applications, and packaging the kernel and file system into an image (image ) file, and then download it to the target board to run, and the two sides establish a connection relationship through the serial El or Ethernet interface.
4.2 Management through VMware
The PCs in the home network have two different operating systems, which need to be managed through VMware Workstation to solve the problem that the two cannot access each other, transfer programs and files, and enable Linux and Windows to operate simultaneously without affecting each other. In other cases, connect to the Internet respectively.
The first step is to install VMware Tools in Linux to get enhanced support for the X windows interface, networking, etc.
The second step is to set VMWare to host-only mode. Set the shared directory in sharefolders in options. Set the network card of the PC host to “Allow Sharing”, set the network interface to VMnetl, enter Linux, set ethO to 192.168.0.2, and default gateway to 192.168.0.1. You can achieve independent access to the Internet for Linux and Windows.
The third step is to use the smb (Server Message Block) service to realize the sharing of files between Linux and Windows. Start the samba server in Linux, modify its configuration file /etc/smb.conf, and add IPX/SPX and NETBEUI protocols in Windows.
As can be seen from the above steps, in different occasions, the Linux configuration in the virtual machine is different. For the users of the home network, such configuration is too difficult. Therefore, the system uses the virtualized “clone” technology to “clone” the configuration under different occasions in VMware. Their names are “shareholders”, “Internet” and “test”, as shown in Figure 2, so that they can be easily switched.
Figure 2 Configuration of the virtual machine
4.3 Kernel configuration, protocol stack optimization and server settings
Considering the stable and reliable requirements of embedded systems, the newer version of the Linux 2.6.18 kernel is selected, which provides better support for the IPv6 protocol stack, wireless network card and Cisco’s LEAP wireless authentication protocol, and has undergone a period of The running of time is relatively stable.
In the IPv6 network, the neighbor discovery and IP address automatic configuration implemented by the ICMPv6 (Internet Control Messages Protocol) protocol is the most practical part of the IPv6 protocol in embedded applications, and its neighbor discovery function replaces the ARP (ARP ( Address Resolution Protocol), ICMP router discovery and packet redirection functions, and automatic configuration realizes “plug and play” for devices to access the network. Therefore, this embedded system platform focuses on optimizing the ICMPv6 protocol according to actual needs. configuration.
mini_httpd is one of the few lightweight WEB servers supporting IPv6 protocol under embedded Linux. It has a small kernel and is very suitable for the home network WEB environment with limited on-board resources and generally single-tasking. Therefore, this system chooses mini_httpd-1.19 as the embedded WEB server, download it to the host, decompress it, formulate a cross compiler, and then compile it to generate a binary executable file. Add the command “mini_httpd/jffs2 cgi-bin/” to the gateway’s system configuration file /usr/etc/rc.local to automatically load the JFFS2 (Journalling Flash File System flash journal type) to the gateway’s flash storage device when the system starts. Filesystem 2nd Edition) in the filesystem.
In order to configure and test the IPv6 network environment and protocol, BusyBox also needs to be installed. This is a single executable implementation that integrates more than a hundred commonly used standard Linux tools, is very lightweight by making these tools share the same elements, and can be configured under graphical tools, known as the Switzerland of Linux tools Saber, its installation configuration is similar to the process of the aforementioned embedded server, and will not be repeated here.
4.4 Writing CGI programs for authentication and management
At present, there are CGI and server scripts, such as JSP, ASP, etc., to generate dynamic web pages in the web technology, but the latter requires the web server to have running support modules for these scripts. In the embedded Web server, considering the problem of resource limitation, only CGI (Common Gateway Interface) support is generally provided, so the Web application in the embedded device is actually a CGI-based program development.
CGI provides the interface between the client and the server. The server executes the corresponding CGI program after responding to the client’s request, and returns the execution result to the client, thus realizing the dynamic interaction based on WEB. Using the FORM mode as the input interface, the information entered by the user in the FORM is processed by URL encoding and then sent to the CGI program. This is the key to CGI. After the program finishes processing the input and ends the work, it transmits the result to the server in the form of information flow, and the server is responsible for encapsulating the information flow to be fed back in the form of HTTP and converting it to the client’s browser.
The CGI program is divided into the following parts: ① The user accesses the gateway on the client’s browser, loads the user interface, enters the ID and password in the FORM, and submits it using the get method; ② The server responds to the request and analyzes the resources requested by the browser. It is found that it is a CGI program, so it leads to the CGI program at the specified location; ③ URL encoding decoding, the program extracts information from the environment variable “QUERY_STRING (path&info)”; ④ Use the printf() function to generate the HTML source code, which will be decoded The post data is correctly returned to the browser.
5 Networking and testing of IPv6 home network
The configuration in the home network mainly includes the configuration of the PC host and the gateway.
Install the Windows XP operating system commonly used by home users on the PC host, use the command “ipv6 install” to install the IPv6 protocol stack in DOS mode, and then use the command “ipconfig /all” to check, you can find that under the local connection, in addition to the IPv4 address, there are also An IP address “fe80::20c:76ff:fe67:5832%5” is added, indicating that the interface index of the network card in the operating system is 5, so use the following command. Specify the local link IPv6 address for the PC host and the gateway respectively, that is, “ipv6 adu 5/ 3ffe::1”, etc., and then assign addresses to each home appliance controller in turn in the CGI control program of the gateway.
The last thing to note is that the IE browser does not support IPv6 access yet, and it needs to be accessed through the Firefox browser.
Figure 3 Home network login interface
This paper designs an embedded WEB platform based on IPv6, and optimizes the situation of home network from the aspect of virtualization management, which has certain practical value. There are still some areas worthy of improvement and further efforts in the system, such as the introduction of the Display module belonging to the gateway and the integration of the control bus, etc. The realization of these technologies will further promote the application of IPv6 in the home network.
The author’s innovation point: he designed the embedded WEB platform of home network based on IPv6 and Linux-2.6.8 kernel, and simplified the management and use from the aspects of virtualization management and so on.
The Links: LTB190E1-L01 FP30R06W1E3 IGBTCOMPANY