Object-oriented Bluetooth distributed smart home network

Pick    To: This paper analyzes the characteristics of the distributed Bluetooth home network, and proposes a solution for establishing an object-oriented Bluetooth distributed smart home network. For this solution, an object-oriented Bluetooth communication model is established and its application in the smart home network is carried out. Analysis and prospect of the development prospect of object-oriented Bluetooth distributed smart home network.

introduction

With the development of communication technology, network technology, control technology and artificial intelligence technology, people's requirements for the comfort and intelligence of the home environment are becoming higher and higher, and intelligent networks have irresistibly entered the family. In recent years, with the rise of wireless network research in the world, the research on wireless smart home network has become a new research hotspot. Smart home network refers to a local area network that connects various electrical equipment and electrical subsystems through a certain transmission medium, adopts a unified communication protocol, realizes resource sharing internally, and externally exchanges information through a gateway and external network interconnection .

Figure 1 Distributed Bluetooth home network architecture

Picture 2   The structure of the port object

Bluetooth technology is a short-range wireless communication technology standard jointly formulated by the Bluetooth SIG (Special Interest Group) . Its purpose is to achieve a maximum data transmission rate of 1Mb / s ( effective data transmission rate is 721kb / s) and a maximum transmission distance of 10 meters ( after increasing the transmit power may be 100 meters) of radio communication. In May 1998, Ericsson, Nokia, Toshiba, IBM, and Intel and other five leading manufacturers put forward in the standardization activities carried out jointly by short-range wireless communications technology Bluetooth technology (Bluetooth), whose purpose is to provide a short-range, low-cost Wireless transmission application technology. Bluetooth technology has the following characteristics: ISM 2.4GHz operating in the (industrial, scientific and medical band) frequency band, no need to apply frequency license; the use of 1600hop / s fast frequency hopping technology; the use of forward error correction coding (FEC) technology It adopts FM modulation mode and the equipment is simple; supports point-to-point and point-to-multipoint communication; the protocol system is complete and fully supports the existing high-level protocols; the equipment is small in size , easy to carry or move , and low in cost. The home intelligent network based on Bluetooth technology is to replace cables with short-range wireless communication technology to build an intelligent wireless home network. Based on the characteristics of the distributed Bluetooth smart home network, this paper studies the application of object-oriented information processing technology to the distributed Bluetooth smart home network technology, builds an object-oriented communication model of the Bluetooth communication controller, and conducts application research on the model .

Bluetooth network home network appliance for Bluetooth, a Bluetooth communication Bluetooth module embedded controllers and other devices, linked by wireless way, so as to communicate with each other; the same time, is connected to the home gateway and an external Bluetooth network having a routing function, constituting the family The network system or home local area network provides centralized or off-site audio, video communication, computer control and management, etc., so that information can be fully circulated and shared within the home and with the outside. The Bluetooth distributed smart home network follows the industrial control scheme, and decentralizes the control function to the Bluetooth communication controller equivalent to the lower computer in the industrial control to realize the mode of decentralized control and centralized management. Its architecture is shown in Figure 1 .

Bluetooth home gateway: connect the home Bluetooth communication controller downwards, and connect with the local area network and the telephone network through the cable, and upload the home network information to the management center and the head of the household through the Internet and the telephone.

Bluetooth communication controller: communicate with Bluetooth devices, monitor the status of the device, and communicate and coordinate with other Bluetooth communication controllers to control their lower-level devices. Execute the command sent by the gateway, and upload the relevant information of the Bluetooth device.

Bluetooth devices: Bluetooth devices refer to home devices with embedded Bluetooth modules, such as Bluetooth air conditioners. They exchange information with the Bluetooth communication controller and accept their control, and can also communicate with other Bluetooth devices.

Although distributed systems have many advantages, in Bluetooth distributed smart home networks, due to the limitations of Bluetooth technology and information processing technology, its shortcomings can not be ignored. Its performance is as follows: Since each Bluetooth device can only keep up with 7 devices at the same time , and the Bluetooth communication controller needs to interact with more devices, if you want to coordinate with more devices, you need to switch the working mode, which affects the processing. Efficiency, and even lead to communication failure; because the same device may receive a lot of information, if the microprocessor uses the queue processing of the information, the time delay will increase; in the Bluetooth distributed smart home network, between Bluetooth communication controllers, Bluetooth communication controllers There is information transfer between the Bluetooth device and the Bluetooth device, causing crosstalk. At the same time, the more communication channels, the greater the crosstalk, and the communication distance and transmission rate are reduced. The communication mechanism and information processing mechanism of the Bluetooth distributed smart home network system are important factors that affect the performance of the system. Therefore, this paper proposes the application of object-oriented technology to the Bluetooth distributed smart home network system program, which helps to solve the above problems and improve the system. efficacy.

Object-oriented technology

Object-oriented technology is a data-flow-oriented engineering technology that combines modularization, data abstraction, information hiding, and message passing. It is suitable for both system analysis and programming. In recent years , object-oriented technology has been developing rapidly both in theory and in practice. The most important thing in object-oriented technology is the concept of "object". This kind of "object" has certain attributes and methods , where the attributes refer to various characteristic parameters of the object itself. A specific object can have many properties and methods . An important feature of object-oriented technology is the encapsulation of objects . For the outside world, it is not necessary to know what properties the object has , nor how to implement the methods of the object itself. method, but only need to call the provided object to perform specific functions. Object-oriented technology has the following advantages : simple maintenance, modularity is a feature in object-oriented programming, entities are represented as classes and classes with the same function in the same namespace , you can add a class in the namespace without affecting Other members of the namespace; extensibility, object-oriented programming essentially supports extensibility, if there is a class with a certain function , you can quickly expand this class , create a class with an expanded function; code Reuse, because the function is encapsulated in the class , and the class exists as an independent entity , providing a class library is relatively simple.

In the Bluetooth distributed smart home network, the information interaction and control center is a Bluetooth communication controller. Applying object-oriented technology to the Bluetooth distributed smart home network means that when designing the Bluetooth communication controller, the objects in the program correspond to the external application object entities, by establishing the correspondence between the program objects and the external world objects and The correspondence between the functions in the program and the processes in the external world can provide developers with a convenient development path. The combination of object-oriented technology and distributed home network system is the port object communication model.

In the port object communication mechanism, the basic unit of communication is the port object PO (Port Object) . A typical PO object is shown in Figure 2 .

Ports are channels for information exchange between port objects , and can be divided into three types according to their functions : namely, variable input and output ports , which are interfaces for exchanging data information required for operation between port objects; The interface for the exchange of parameter settings is the basis for the dynamic reconfiguration of the system. The message input and output port, which is a special port, is an interface for calling related operations between port objects. The port object is essentially a message processor, which responds to messages input by the message input port, that is, invokes related operations, and at the same time can output corresponding messages through the message output port to invoke operations of other port objects. A port object has multiple internal states and operations, and its operation calls follow the message-driven principle. But relative to other objects, only its external ports are visible. Each port object belongs to a specific port object class, and all objects in this class have the same internal operating framework. The port object supports the inheritance mechanism, that is, the subclass can inherit all the attributes and operations of the parent class, and can also have its own unique attributes and operations.

In the Bluetooth distributed smart home network, the Bluetooth communication controller is a Bluetooth-enabled processor, which uses a single-task multi-thread concurrent execution model, that is, a single application can be divided into several independent tasks, each processor is assigned One task, but each task can create multiple threads as needed, and multiple threads distributed on multiple processors interact to complete an application. Threads communicate through shared objects. Shared objects can be accessed by any thread on the Bluetooth communication controller. Access to the object ( excluding local access to the object ) is called inter-module connection; local objects in the model can only be accessed by the local Bluetooth communication controller Thread access, access to local objects ( including local access to shared objects ) is called intra-module connection. Only when the connection between modules occurs, the Bluetooth communication controllers communicate with each other, thereby reducing the amount of air communication. For intra-module connections, since each module supports parallel processing, the processing efficiency is greatly increased.

The Bluetooth communication controller is the core of the Bluetooth distributed smart home network. For the above-mentioned port object communication model, the communication is realized through the Bluetooth communication controller. The communication model between Bluetooth communication controllers is shown in Figure 3 .

The object-oriented Bluetooth communication controller is mainly composed of 3 layers: hardware layer, protocol layer and application layer. The hardware layer mainly completes some hardware-dependent functions, including wireless signal transceiving, codec and other functions. The port object communication mechanism isolates the hardware details of the system from the core part of the upper layer. When the underlying hardware of the system changes, it is only necessary to change the underlying hardware driver to enhance the portability of the system. The protocol layer follows the reference model standard of the Bluetooth core protocol and the protocol profile ( including OBEX, etc. ) corresponding to the Bluetooth distributed smart home network . The application layer is the key to achieving distribution. The communication mechanism based on port objects is implemented at this layer.

The application layer is mainly composed of port object manager, object list, procedure interface, local procedure call and remote procedure call module. Its structure is shown in Figure 4 . The task of the port object manager is to complete the creation, deletion, positioning and other management tasks of the port object, and provide the name service for the system. The process interface is the interface between the user process and the application layer. Whether the user's process call is remote or local is the same for the user. The distinction between calls is done by the process interface. It first accesses the object list to determine the type of call, and then sends the process call to different process call modules for processing. The local procedure call module handles intra-module connections, it directly transfers local calls to local execution and returns results; only those inter-module connections are responsible for remote call modules. The remote calling module is responsible for packaging the message and communicating with the protocol layer.

Picture 3   Object-oriented communication model of Bluetooth communication controller

Picture 4   Internal structure of application layer

In the Bluetooth communication controller, each port object has its own name and identification code (ID number ) , and the corresponding information of the port object can be queried by name or ID . During system initialization, the port object manager establishes a port object list on each Bluetooth communication controller. The list includes a local object list and a shared object list. The object list saves the mapping relationship and status of all object names and ID numbers. The state of the object is dynamically updated by the system. In order to maintain the consistency of the data, the Bluetooth communication controller must broadcast the message when the shared object is created, deleted, and updated to keep the shared object table consistent. In the Bluetooth communication controller, both local and remote objects are accessed through a unified process interface. The process interface can obtain the ID number of the object by looking up the object table , and the location of the object can be located by the ID number. If the object is located locally, the process interface transfers the process to the local process call module, which directly calls the corresponding process, and returns the result to the user call through the process interface. If the object is a remote object, the process interface transfers the process to the remote procedure call module. The remote procedure call module wraps the relevant parameters and sends it to the remote Bluetooth communication controller, and then hangs waiting for the response of the remote Bluetooth communication controller; remote After receiving the request, the Bluetooth communication controller uploads the message to the remote procedure call module located in the remote Bluetooth communication controller through the protocol layer. After unpacking the message, the local interface located on the remote module is called by the process interface of the remote module After the processing is completed, the results are packaged and returned to the request node. After receiving the message, the request node returns to the calling process to end the suspended state and continue execution. During operation, the state of the object needs to be updated dynamically, so that although additional communication overhead will be added, when the shared object state needs frequent access, the system only needs to access the shared object state in the local object list without initiating the communication process .

Conclusion

Since the introduction of Bluetooth technology at the end of the last century, the research of Bluetooth technology and the development of Bluetooth products have attracted worldwide attention. The research of applying Bluetooth technology to smart home network is also emerging day by day. Due to the randomness of the installation of home devices, the distributed Bluetooth home network solves the problem of "plug and play" of Bluetooth home devices online. However, due to some inherent characteristics of Bluetooth technology and distributed processing, it affects the data transmission, processing rate and security of the distributed Bluetooth smart home network. In view of these problems, this paper applies object-oriented technology to the core of the distributed Bluetooth smart home network-the Bluetooth communication controller, and establishes a communication and processing mechanism model. The analysis shows that the solution solves the processing speed and security of the distributed Bluetooth smart home network. Problem, this will help to promote the further development of distributed Bluetooth smart home network.

Buzzer

Door Buzzer,Buzzer Alarm,Electric Buzzer,Buzzer Button

NINGBO SANCO ELECTRONICS CO., LTD. , https://www.sancobuzzer.com