| As people’s attention and participation on sports participation is increasing, Large-scale, comprehensive stadium springing up around the country. Unlike previous small gymnasium, Modern stadium is more functional, its control is more intelligent and humane. However, there are still insufficient, for example, too much centralized control, the control is not flexible enough. To solve this problem, This paper proposes the use of Android SHD (smart handheld devices) as a mobile terminal, and together with the server, working to further improve the functionality of the system.Intelligent lighting control system of stadium based on CAN bus is the theme. Combining with WiFi wireless technology, Android handheld device can establish the communication with the server. Through the interaction between the Android handheld device and the server, Android SHD achieve indirect control of stadium lighting, intelligent lighting system, it make up for the existing fixed-point control and not flexible enough control, also not Convenient. Therefore, the work of this paper include the followings:(1) Select the communication protocol. The main work of this paper is the establishment of communication based on the client and server. In this paper, my choice is TCP protocol, it is continuous transmission, safe and reliable.(2)Establish communication. This is the foundation work, also is the key content. To connect the client and server, we use Socket communication protocol.(3) The problem of multi clients. The paper needs to establish the communication of multi clients and server, The server how to respond to so many requests from the clients, so as not to affect the system work, and don’t lose the request from the client, This is one of the difficulties in this work. This paper uses multithreading to solve this problem, at the same time to carry on the management to the thread by thread pool, to effectively utilize system resources. This paper also uses the Spring IOC to obtain the core system, enhance the system maintainability and flexibility.(4)Define the command set. After we realize the communication between the client and the server, we can carry out data transmission, then we must be unified the command format, to ensure that the server and the client can understand the content of each command, This work is based on the analysis in the specific function gymnasium intelligent lighting control system and client demand.(5) Design the interface of Android SHD. The user is directly related to the operation of the control in the UI, so a good user experience, image flexible interface design are needed to study, also is the emphasis of this paper.(6) The security of the system. The stadium is a public place, so we must strictly limit the users of the client software, to ensure the security of the system, which is also the focus of this study.This paper realizes the communication between the client and the server, and realizes a detailed and comprehensive function of client, through the Android SHD with the server, the original gymnasium intelligent lighting control system functions can be improve, and it has great practical significance. |