Intelligent set top box and dynamic identification method of Bluetooth module

By responding to the power-on event of the Bluetooth module in the smart set-top box, obtaining the Bluetooth module's attribute information through the serial interface, and loading the adapted Bluetooth system components, the hardware and software limitations caused by multiple Bluetooth modules are solved, improving the scalability and user experience of the smart set-top box.

CN121309906APending Publication Date: 2026-01-09HISENSE BROADBAND MULTIMEDIA TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410910103.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

When integrating Bluetooth modules from multiple manufacturers or models into a smart set-top box, existing technologies lead to increased limitations between hardware and software, impacting the user experience.

Method used

The system establishes a communication connection with the Bluetooth module via a serial interface. In response to a power-on event, it initializes the serial interface and sends an information acquisition command to obtain the target attribute information of the Bluetooth module. Based on the response information, it loads the adapted Bluetooth system components, including the Bluetooth protocol stack library and driver library, in the Bluetooth driver directory and uses the compilation switch to adapt to the operating system settings.

Benefits of technology

It enables accurate identification of Bluetooth module models in scenarios with multiple Bluetooth modules, reducing limitations and improving the scalability and user experience of smart set-top boxes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121309906A_ABST
    Figure CN121309906A_ABST
Patent Text Reader

Abstract

Some embodiments of the invention provide an intelligent set top box and a dynamic identification method for a Bluetooth module, and the method can respond to a power-on event of the Bluetooth module, initialize a serial interface, and control the serial interface to send an information acquisition command to the Bluetooth module. And receiving response information fed back by the Bluetooth module aiming at the information acquisition command, and loading the Bluetooth system component in the Bluetooth driving directory according to the response information. Wherein the response information comprises attribute information used for indicating the type of the Bluetooth module, the Bluetooth system components comprise a Bluetooth protocol stack library and a driver library which are suitable for the Bluetooth module, and the Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories. According to the method, the type of the Bluetooth module can be automatically identified after the Bluetooth module is powered on, and the Bluetooth system component matched with the Bluetooth module is loaded, so that the Bluetooth module is accurately driven in a multi-Bluetooth-module scene, the limitation of multiple Bluetooth modules is reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of set-top boxes, and in particular to a smart set-top box and a dynamic identification method of a Bluetooth module. BACKGROUND

[0002] A set-top box is a device that can connect a display device and an external signal source. It can convert compressed digital signals into realizable picture content and display it on a display device. The signals accessed by the set-top box can come from a cable, a satellite antenna, a broadband network or a terrestrial broadcast, such as a set-top box that can receive HyperText Transfer Protocol (HTTP) code streams, etc. Taking a smart set-top box as an example, the smart set-top box is a set-top box device with an open operating system, an open application platform, and a bidirectional man-machine interaction function, which integrates video, entertainment, data and other functions to meet the personalized needs of users.

[0003] The smart set-top box can be built-in with a Bluetooth module, and the Bluetooth function of the smart set-top box can be realized through the Bluetooth module, such as wireless earphones, sound boxes or Bluetooth remote controllers, etc. In order to meet the communication needs of the Bluetooth function, the related codes and configurations of the Bluetooth module need to be integrated into the operating system of the smart set-top box to ensure the compatibility of the firmware, the driver and the Bluetooth protocol stack in the Bluetooth module with the operating system of the smart set-top box. When the smart set-top box starts, the operating system of the smart set-top box will automatically load the codes and configurations of the Bluetooth module in the operating system, so that the Bluetooth module works according to the loaded codes and configurations, and the Bluetooth function of the smart set-top box is realized.

[0004] However, for a single manufacturer or model of Bluetooth module, the above-mentioned method of integrating codes and configurations into the operating system is relatively stable, but if multiple manufacturers or models of Bluetooth modules are integrated into the smart set-top box, the method of integrating codes and configurations into the operating system will increase the limitations between hardware devices and software, such as software 1 generated according to Bluetooth module A and Bluetooth module B can only be applied to the smart set-top box built-in with Bluetooth module A and Bluetooth module B, but cannot be applied to the smart set-top box built-in with Bluetooth module A and Bluetooth module C, which affects the user's experience. SUMMARY

[0005] The present application provides a smart set-top box and a dynamic identification method of a Bluetooth module to solve the problem of increased limitations between hardware devices and software caused by multiple Bluetooth modules.

[0006] In a first aspect, some embodiments of the present application provide a smart set-top box, comprising a Bluetooth module and a controller. The Bluetooth module is configured to establish a communication connection with the controller through a serial interface. The controller runs an operating system, and the controller is configured to perform the following program steps: initializing the serial interface in response to a power-on event of the Bluetooth module; controlling the serial interface to send an information acquisition command to the Bluetooth module, the information acquisition command being used to request target attribute information of the Bluetooth module, the target attribute information being used to indicate a model of the Bluetooth module; receiving response information fed back by the Bluetooth module in response to the information acquisition command, the response information including the target attribute information of the Bluetooth module; loading Bluetooth system components in a Bluetooth driver directory according to the response information, so as to drive the Bluetooth module by the loaded Bluetooth system components; the Bluetooth system components include a Bluetooth protocol stack library and a driver library suitable for the Bluetooth module, Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories, the Bluetooth driver directory is provided with a compilation switch, and a state of the compilation switch is set according to an operating system run by the controller.

[0007] In a second aspect, some embodiments of the present application further provide a dynamic identification method of a Bluetooth module, which can be applied to the intelligent set-top box provided in the first aspect, and the dynamic identification method comprises the following steps: initializing the serial interface in response to a power-on event of the Bluetooth module; controlling the serial interface to send an information acquisition command to the Bluetooth module, the information acquisition command being used to request target attribute information of the Bluetooth module, the target attribute information being used to indicate a model of the Bluetooth module; receiving response information fed back by the Bluetooth module in response to the information acquisition command, the response information including the target attribute information of the Bluetooth module; loading Bluetooth system components in a Bluetooth driver directory according to the response information, so as to drive the Bluetooth module by the loaded Bluetooth system components; the Bluetooth system components include a Bluetooth protocol stack library and a driver library suitable for the Bluetooth module, Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories, the Bluetooth driver directory is provided with a compilation switch, and a state of the compilation switch is set according to an operating system run by the controller.

[0008] According to the technical solution, the intelligent set-top box and the dynamic identification method of the Bluetooth module provided by some embodiments of the present application can respond to the power-on event of the Bluetooth module, initialize the serial interface, and control the serial interface to send an information acquisition command to the Bluetooth module. Then, the method receives the response information fed back by the Bluetooth module in response to the information acquisition command, and loads the Bluetooth system component in the Bluetooth driver directory according to the response information, so as to drive the Bluetooth module through the loaded Bluetooth system component. The response information includes target attribute information for indicating the Bluetooth module model, the Bluetooth system component includes a Bluetooth protocol stack library and a driver library suitable for the Bluetooth module, the Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories, and the Bluetooth driver directory is provided with a state compilation switch set by an operating system. The method can automatically identify the Bluetooth module model after the Bluetooth module is powered on, load the Bluetooth system component suitable for the Bluetooth module, and thus accurately drive the Bluetooth module in a multi-Bluetooth module scenario, reduce the limitations of the multi-Bluetooth module, and improve the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0010] Figure 1 The schematic diagram of the operation scene between the intelligent set-top box and the control device provided by some embodiments of the present application; Figure 2 The hardware configuration schematic diagram of the intelligent set-top box provided by some embodiments of the present application; Figure 3 The software configuration schematic diagram of the intelligent set-top box provided by some embodiments of the present application; Figure 4 The architecture diagram of the IPTV set-top box provided by some embodiments of the present application; Figure 5 The schematic diagram of the Bluetooth architecture provided by some embodiments of the present application; Figure 6 The identification flowchart of connecting the Bluetooth module through the extended bus system provided by some embodiments of the present application; Figure 7 The flowchart of the dynamic identification method of the Bluetooth module provided by some embodiments of the present application; Figure 8 The flowchart of sending the information acquisition command to the Bluetooth module provided by some embodiments of the present application; Figure 9A flowchart example of sending an information obtaining command to a Bluetooth module is provided for some embodiments of the present application. Figure 10 A flowchart example of loading a Bluetooth system component is provided for some embodiments of the present application. Figure 11 A flowchart example of an identification procedure in a scenario where a Bluetooth module does not support a communication protocol is provided for some embodiments of the present application. DETAILED DESCRIPTION

[0011] The embodiments will be described in detail with reference to the drawings, wherein like reference numerals refer to like parts throughout the several views. The following description is intended only to teach those skilled in the art how to make and use the best mode of the application. The following description is not intended to limit the scope of the application.

[0012] It should be noted that the brief description of terms in the present application is only for the convenience of understanding the following described embodiments, and is not intended to limit the embodiments of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and customary meanings.

[0013] The terms "first", "second", "third", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar or like objects or entities, and do not necessarily mean a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchanged under appropriate circumstances.

[0014] The terms "include" and "have" and any variations thereof are intended to cover but not exclusively include, for example, a product or device that includes a list of components without necessarily being limited to all the components clearly listed, but can include other components not clearly listed or inherent to such products or devices.

[0015] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that can perform the functions associated with that element.

[0016] Figure 1 A use scenario diagram of a smart set-top box is provided according to some embodiments. As shown in FIG. 1, a smart set-top box 100 is connected to a television 101, a remote control 102, a Bluetooth module 103, a network interface 104, a storage device 105, and a display device 106. Figure 1As shown, in some embodiments, a user can operate the set-top box 100 via the control device 101 of the smart set-top box and operate the display device 200 via the remote control device 201 of the display device. The control device 101 and the remote control device 201 can be remote controllers, and communication between the remote controller and the smart set-top box 100 can include infrared protocol communication, Bluetooth protocol communication, and other communication methods. Similarly, communication between the remote controller and the display device 200 can also include infrared protocol communication, Bluetooth protocol communication, and other communication methods, controlling the display device 200 wirelessly or via wired means.

[0017] In some embodiments, the control device 101 can send data packets, such as Bluetooth broadcasts or key value information of buttons, to the smart set-top box 100 via the protocol corresponding to the near-field communication module. That is, the control device 101 can send corresponding data packets to the smart set-top box 100 via WiFi, Bluetooth, or NFC protocol encoding. For example, the Bluetooth protocol can be GAP (Generic Access Profile), A2DP (Advanced Audio Distribution Profile), GATT (Generic Attribute Profile), HID (Hunter Interface Device Profile), AVRCP (Audio Video Remote Control Protocol), or LE Audio (Low Energy Audio), etc.

[0018] In some embodiments, the smart set-top box 100 and the display device 200 also communicate with the server 400. The smart set-top box 100 and the display device 200 may communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 can provide various content and interactive features to the smart set-top box 100 and the display device 200. The server 400 can be a cluster or multiple clusters, and may include one or more types of servers. For example, the smart set-top box 100 may be an IPTV set-top box, utilizing a broadband cable television network, integrating multiple technologies such as the Internet, multimedia, and communications.

[0019] Figure 2 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of the Zhongzhi Smart Set-Top Box 100.

[0020] like Figure 2As shown, in some embodiments, the smart set-top box 100 includes at least one of the following: a controller 110, a first interface 120, a second interface 130, a communication module 140, a memory, a power supply, a decoder, a tuner / demodulator, a return channel, a CA (Conditional Access) interface, and a serial interface 150.

[0021] In some embodiments, the first interface 120 is a network interface used to connect to the server 400 to obtain corresponding data packets, such as program data and application data, from the server 400. The first interface 120 can support wired and wireless networks. For example, the first interface 120 can be an RJ45 network interface, a WIFI interface, etc.

[0022] In some embodiments, the second interface 130 is an audio / video output interface, used to output displayable and playable multimedia signals, such as audio / video signals of program data, audio / video signals of the application interface provided by the application, etc. The second interface 130 can be connected to a display device 200, thereby displaying the screen corresponding to the multimedia signal and playing the audio signal through the display device 200. For example, the second interface 130 can be an A / V audio / video interface, an HDMI interface, etc.

[0023] In some embodiments, the communication module 140 is a component used to communicate with external devices or the server 400 according to various communication protocol types. The smart set-top box 100 may have multiple communication modules 140 depending on the supported communication methods. For example, when the smart set-top box 100 supports wireless network communication, it may have a WiFi module 141 with WiFi functionality. When the smart set-top box 100 supports Bluetooth connectivity, it needs to have a Bluetooth module 142 with Bluetooth functionality. When the smart set-top box 100 supports wired network communication, it needs to have an Ethernet module 130 with wired network communication functionality.

[0024] In some embodiments, the memory of the smart set-top box 100 may include at least one of EMMC (Embedded Multi MediaCard) and DDR (Double Data Rate Synchronous Dynamic Random Memory).

[0025] In some embodiments, the controller 110 is responsible for managing and coordinating various hardware and software components within the smart set-top box 100. For example, it controls decoders within the smart set-top box 100 to read and parse data packets from programs, converting the data packets into displayable multimedia signals, and then sending the multimedia signals to the display device 200 for display via the second interface 130. The controller 110 may include a central processing unit, a graphics processing unit, etc.

[0026] In some embodiments, the serial interface 150 may also be referred to as a serial communication interface or simply a serial port. The serial interface 150 is a full-duplex extension interface for communication between smart set-top boxes 100. The serial interface 150 can transmit data bit by bit sequentially through a connected transmission line. For example, the serial interface can be RS-232, SPI, or I2C.

[0027] In some embodiments, the serial interface 150 can be classified according to the number of serial port lines. For example, the serial interface 150 may include H4 and H5. H4 is a five-wire serial port, including five lines: TxD (transmit data), RxD (receive data), GND (ground), CTS (clear transmit), and RTS (request transmit); H5 is a three-wire serial port, including three lines: xD, RxD, and GND.

[0028] To enhance the expandability of the set-top box 500, in some embodiments, the smart set-top box 100 may also be configured with different types of external interfaces, such as a USB (Universal Serial Bus) interface, an IDE (Integrated Drive-Electronics) interface, a PCMCIA (Personal Computer Memory Card International Association) interface, and an Ethernet interface. The USB interface is also one type of serial interface 150.

[0029] To enable user interaction, in some embodiments, the controller 110 of the smart set-top box 100 may run an operating system. The operating system is a computer program used to manage and control the hardware and software resources of the smart set-top box 100. The operating system allows users to interact with the smart set-top box 100. For example, a user can send key value information to the smart set-top box 100 via the power button on the control device 101, and the operating system of the smart set-top box 100 can parse the key value information and execute a program to put the operating system into a sleep state.

[0030] In some embodiments, the operating system's running states include a power-on state, a power-off state, and a hibernation state. The state of the operating system is the running state of the smart set-top box 100. When the smart set-top box 100 is powered on and enters the power-on state, the smart set-top box 100 will start the operating system, causing the smart set-top box 100 to enter the power-on state. When the smart set-top box 100 enters the hibernation state, the smart set-top box 100 will run the operating system at low power consumption, causing the smart set-top box 100 to enter the hibernation state. At this time, the operating system will save the smart set-top box 100's running data in the database.

[0031] When the smart set-top box 100 loses power and enters the shutdown state, both the operating system and hardware of the smart set-top box 100 are powered off, and the runtime data stored in the operating system database will be cleared. The runtime data stored in the database includes at least one of the following: temporary data, unsaved program states, network connections, processes and sessions, memory contents, and system logs.

[0032] For the aforementioned operating systems, such as Figure 3 As shown, Figure 3 Provided for some embodiments of this application Figure 1 A software configuration block diagram of the smart set-top box 100. In some embodiments, the operating system of the smart set-top box 100 may include an application layer, an intermediate interpretation layer, and a driver layer, and each layer contains a certain number of programs or interfaces.

[0033] The application layer mainly includes the applications of the smart set-top box 100, as well as the application framework. The applications can be browser-based applications, such as HTML5 apps, or native apps.

[0034] The application framework is a complete program model containing all the basic functionalities required by standard application software, such as file access, data exchange, and the user interfaces for these functionalities (toolbars, status bars, menus, dialog boxes). Native apps can support online or offline operation, push notifications, or local resource access. The middleware layer includes various multimedia protocols and system components. The driver layer can include Bluetooth drivers, Wi-Fi drivers, USB drivers, HDMI drivers, and power drivers.

[0035] It should be noted that the above examples are merely a simple division of operating system functions and do not limit the specific form of the operating system of the smart set-top box 100 in this application embodiment. Depending on factors such as the functions of the smart set-top box 100 and the type of operating system, the number and specific types of layers included in the operating system can take other forms. For example, the operating system of the smart set-top box 100 can be Linux or Android, etc.

[0036] like Figure 4 As shown, based on the hardware and software configuration of the smart set-top box 100 described above, in some embodiments, the first interface 120 of the smart set-top box 100 can access the IPTV (Internet Protocol Television) service line via DSL (Digital Subscriber Line) or Ethernet. The second interface 130 then converts the media streams and other data transmitted through the IPTV network into multimedia signals and outputs them to the display device 200, thereby enabling the display device 200 to perform different types of functions such as live TV, video-on-demand, and web browsing. IPTV provides on-demand or multicast media asset services over an IP-based network, involving technologies at the support layer, service layer, bearer layer, and access layer, as well as audio and video encoding / decoding technology, streaming technology, content distribution technology, multicast technology, and DRM technology.

[0037] In some embodiments, the interface between the smart set-top box 100 and the IPTV network includes an authentication interface, a payment interface, and a service usage interface. The authentication interface includes network layer authentication and application layer authentication, which is the process of an internet user accessing the internet. For example, network layer access authentication methods can be PPPoE and DHCP+Web. Application layer authentication is the authentication process of the set-top box 500 within the IPTV network; only users who pass application layer authentication can use the services provided by IPTV.

[0038] like Figure 5 As shown, based on the above-described smart set-top box 100, in some embodiments, the smart set-top box 100 can... Figure 5 The Bluetooth architecture shown drives the Bluetooth module 142, thereby enabling the Bluetooth function of the smart set-top box 100, such as wireless connection functions like connecting wireless headphones, speakers, or Bluetooth remote controls. Figure 5The Bluetooth architecture of the Smart Set-Top Box 100 includes an Application layer, a BluetoothManagerService layer, a BluetoothService layer, a JNI (Java Native Interface) layer, a protocol stack layer, and a Bluetooth chip layer. The Application layer is the layer that directly interacts with the user. It provides applications that can communicate and interact with the underlying BluetoothService layer through specific interfaces, such as APIs.

[0039] In some embodiments, the BluetoothManagerService layer is responsible for managing Bluetooth-related tasks, such as Bluetooth device discovery, pairing, connection, and data transfer. The BluetoothManagerService layer can provide an interface for interaction with the application layer, allowing applications to request Bluetooth services. Through the bind operation, the BluetoothManagerService layer can interact with other services, such as the BluetoothService layer, to perform actual Bluetooth operations.

[0040] In some embodiments, the BluetoothService layer is the core service layer for Bluetooth functionality. The BluetoothService layer provides various API interfaces required for communication with the Bluetooth module 142. The BluetoothService layer relies on the BluetoothManagerService layer to receive requests from the application and perform corresponding operations. The JNI layer allows Java code to interact with corresponding code in other languages. Figure 5 In the Bluetooth architecture shown, JNI is used to load and call native libraries, such as libbluetooth.so, which contain native code required for communication with Bluetooth module 142.

[0041] In some embodiments, the protocol stack layer includes a BTIF (Bluetooth Interface), which is an interface layer for implementing the Bluetooth protocol stack, located between libbluetooth.so and the Bluetooth module 142. It is used to translate service requests from the upper layer into specific hardware operations of the Bluetooth module 142. Bta (Bluetooth Application) is the Bluetooth application, and stack is the implementation of the Bluetooth protocol stack. HIDL (Host-Independent Direct Link) defines the interface for communication with the Bluetooth module 142. The Bluetooth chip layer can handle Bluetooth communication tasks through the Controller, such as sending and receiving wireless signals and processing the Bluetooth protocol. The Bluetooth chip layer can receive commands from the HOST (host), i.e., commands sent by the controller 110, and convert them into wireless signals for transmission, or convert received wireless signals into data and send them to the controller 110.

[0042] This explanation will use the Android system as an example. Figure 5 The Bluetooth architecture shown in the diagram, the workflow of the Bluetooth module 142 in the smart set-top box 100, can be composed of three parts: bluetooth.apk, bluedroid, and libbt-vendor. bluetooth.apk is the application package, running as a Bluetooth service. It communicates with the underlying Bluetooth protocol stack through the JNI layer. bluetooth.default.so is the concrete implementation of the Bluetooth protocol stack, providing an interface for communication with the Bluetooth hardware. bluetooth.default.so and bluetooth.apk interact through the JNI layer and call libbt-vendor to communicate directly with the Bluetooth hardware. libbt-vendor is a library provided by the Bluetooth module 142, used for the initialization and control of the module, implementing functions such as physical communication interface with the module 142, firmware download, and power supply control.

[0043] For ease of description, in this embodiment of the application, bluetooth.apk is represented as a Bluetooth service application, bluedroid is represented as the Bluetooth protocol stack library of the Bluetooth module 142, libbt-vendor is represented as the driver library of the Bluetooth module 142, and the Bluetooth protocol stack library and driver library are uniformly represented as Bluetooth system components.

[0044] Clearly, based on the Bluetooth architecture of the smart set-top box 100 described above, the operating system of the smart set-top box 100 needs to integrate the Bluetooth system component corresponding to the Bluetooth module 142. Therefore, in some embodiments, when the smart set-top box 100 is turned on, the Bluetooth module 142 automatically powers on, and the controller 110 of the smart set-top box 100 loads the Bluetooth system component integrated in the operating system, enabling the controller 110 to drive the Bluetooth module 142 through the loaded Bluetooth system component, thereby realizing the Bluetooth function of the smart set-top box 100.

[0045] However, for Bluetooth modules 142 from a single manufacturer or model, the code and configuration used by Bluetooth module 142 are the same, meaning the Bluetooth system components are identical. In this case, integrating the Bluetooth system components into the operating system of the smart set-top box 100 allows the smart set-top box 100 to accurately load the Bluetooth system components corresponding to Bluetooth module 142 after startup. But for Bluetooth modules 142 from multiple manufacturers or models, the code and configuration used by different types of Bluetooth modules 142 are different.

[0046] Therefore, in some embodiments, based on the model of Bluetooth module 142, the Bluetooth system components corresponding to Bluetooth module 142 are uniformly ported to the smart set-top box 100, and Bluetooth service applications, such as service and application, are generated based on the Bluetooth system components corresponding to Bluetooth module 142. The controller 110 of the smart set-top box 100 can load and use the Bluetooth system components through the Bluetooth service applications, and drive Bluetooth module 142 through the Bluetooth system components.

[0047] However, this approach increases limitations between hardware and software, specifically between the Bluetooth module 142 and the Bluetooth service application. For example, application A, generated from Bluetooth modules A and B, can only be applied to smart set-top boxes α with built-in Bluetooth modules A and B, but not to smart set-top boxes β with built-in Bluetooth modules A and C, thus limiting the expandability of the smart set-top box 100. Furthermore, the presence of multiple Bluetooth system components can easily lead to confusion between different types of components, such as mismatched Bluetooth protocol libraries and driver libraries, or version incompatibility, resulting in configuration errors in the Bluetooth service application. This can cause malfunctions in the Bluetooth function of the smart set-top box 100, impacting the user experience.

[0048] Therefore, such as Figure 6As shown, in some embodiments, the smart set-top box 100 can power on and start the Bluetooth module 142 in response to a power-on command. Then, in response to the power-on event of the Bluetooth module 142, the smart set-top box 100 scans its system bus to obtain the bus device directory. For example, the system bus can be a USB bus or an SDIO bus, and the corresponding bus device targets can be / sys / bus / usb / devices and / sys / bus / sdio / devices. After obtaining the bus device directory, the smart set-top box 100 can obtain the target attribute information of the Bluetooth module 142 based on the bus device directory. The target attribute information is used to characterize the model of the Bluetooth module 142, such as VID (Manufacturer ID) or PID (Product ID). Then, the target attribute information is matched with pre-stored Bluetooth system components, and the successfully matched Bluetooth system components are loaded to drive the Bluetooth module 142, thereby realizing the Bluetooth function of the smart set-top box 100. In this way, when the smart set-top box 100 has multiple built-in Bluetooth modules 142, it can automatically identify the Bluetooth module 142 by scanning the system bus and load the Bluetooth system components corresponding to the Bluetooth module 142, which can improve the reliability and expandability of the smart set-top box 100.

[0049] In some embodiments, the Bluetooth system components stored in the smart set-top box 100 are associated with attribute information. When matching target attribute information and Bluetooth system components, the smart set-top box 100 can query the Bluetooth system components associated with the target attribute information and load the Bluetooth system components associated with the target attribute information.

[0050] However, for some models of Bluetooth module 142, such as Bluetooth module 142 with integrated UART (Universal Asynchronous Receiver / Transmitter) interface, the smart set-top box 100 cannot obtain the target attribute information of Bluetooth module 142 by scanning the system bus, which causes Bluetooth module 142 to be unable to be automatically recognized and unable to accurately load the Bluetooth system components corresponding to Bluetooth module 142.

[0051] Therefore, based on the above scenarios, some embodiments of this application provide a smart set-top box 100. The smart set-top box 100 can automatically identify different models of Bluetooth modules 142 and automatically load the corresponding Bluetooth system components for each Bluetooth module 142. This enables dynamic selection and loading of Bluetooth system components in scenarios with multiple types of Bluetooth modules 142, improving the scalability of the smart set-top box 100 and enhancing the user experience. Furthermore, the smart set-top box 100 provided in this application embodiment can also isolate data for different types of Bluetooth system components, thereby ensuring the independence and accuracy of the data corresponding to the Bluetooth system components.

[0052] like Figure 7 As shown, in some embodiments, the smart set-top box 100 may include a Bluetooth module 142 and a controller 110. The Bluetooth module 142 is configured to establish a communication connection with the controller 110 via a serial interface 150; the controller 110 runs the operating system of the smart set-top box 100 and is configured to execute the following program steps: S7001: In response to the power-on event of the Bluetooth module, initialize the serial interface.

[0053] Users can input a power-on command to the smart set-top box 100 in different ways to start the smart set-top box 100. For example, users can input a power-on command to the smart set-top box 100 via the power button on the smart set-top box 100 or via the control device 101 to start the smart set-top box 100.

[0054] When the smart set-top box 100 powers on, it uses the controller 110 to power on the Bluetooth module 142, starts the Bluetooth module 142, and automatically generates a power-on event for the Bluetooth module 142. In some embodiments, the smart set-top box 100 first performs a reset operation on the Bluetooth module 142 before powering it on. The reset operation and power-on setup of the Bluetooth module 142 can be implemented using preset commands or functions of the smart set-top box 100, such as a reset command and the `set_bluetooth_power` function.

[0055] In order to identify the target attribute information of the Bluetooth module 142, the smart set-top box 100, upon detecting the power-on event of the Bluetooth module 142, initializes the serial interface 150 in response to the power-on event, so as to perform subsequent processing through the serial interface 150.

[0056] In some embodiments, when the smart set-top box 100 initializes the serial interface 150, it enables the serial interface 150 through a first preset function, and then sets the parameters of the serial access rights, baud rate, data bits, stop bits, and check bits of the serial interface according to the communication protocol. The communication protocol is either a first communication protocol or a second communication protocol. Both the first and second communication protocols are applicable to the serial interface, and they are different. The parameters of the check bits set under the first communication protocol are also different from those set under the second communication protocol. For example, for the UART Bluetooth module 142, the first and second communication protocols can be H4 and H5 protocols, respectively. Under the H4 protocol, the check bit parameter is NONE, and under the H5 protocol, the check bit parameter is EVEN.

[0057] For example, when the smart set-top box 100 initializes the serial interface 150, it does so through the `userial_init()` function. The first preset function to enable the serial interface 150 can be `userial_open()`: setting the baud rate to 11520, data bits to 8, stop bits to 1, parity bit to none, disabling flow control, and setting the serial port baud rate: `userial_to_tcio_baud()`. It should be noted that the specific data presented in this example is merely illustrative and not intended to limit its application.

[0058] S7002: Control the serial interface to send an information acquisition command to the Bluetooth module.

[0059] After the smart set-top box 100 completes the initialization of the serial interface 150, it can control the serial interface 150 to send an information acquisition command to the Bluetooth module 142. The information acquisition command can be used to request target attribute information of the Bluetooth module 142. The target attribute information is used to indicate the model of the Bluetooth module 142. For example, the information acquisition command can be vendor_info[].

[0060] like Figure 8 As shown, in some embodiments, when the smart set-top box 100 controls the serial interface 150 to send an information acquisition command to the Bluetooth module 142, it can first send a first verification command using a first communication protocol to verify whether the Bluetooth module 142 supports the first communication protocol. If the Bluetooth module 142 supports the first communication protocol, the smart set-top box 100 then sends the information acquisition command to the Bluetooth module 142 based on the first communication protocol; if the Bluetooth module 142 does not support the first communication protocol, the smart set-top box 100 sends a second verification command using a second communication protocol to verify whether the Bluetooth module 142 supports the second communication protocol. Similarly, if the Bluetooth module 142 supports the second communication protocol, the smart set-top box 100 then sends the information acquisition command to the Bluetooth module 142 based on the second communication protocol.

[0061] In some embodiments, the smart set-top box 100 may also determine a communication protocol based on the Bluetooth module 142 and the serial interface 150. The communication protocol may include the first and second communication protocols described above, or other protocols. In this case, the smart set-top box 100 sequentially sends verification commands to the Bluetooth module 142 according to the determined communication protocol to verify whether the Bluetooth module 142 supports the current communication protocol.

[0062] For ease of description, the communication protocols determined by the Bluetooth module 142 and the serial interface 150 in this application embodiment are referred to as the first communication protocol and the second communication protocol, but this is not a limitation. The communication protocols may include more types depending on the actual application scenario. This application does not impose any limitations on this.

[0063] Therefore, in some embodiments, the controller 110 of the smart set-top box 100 can set the communication parameters of the serial interface 150 according to the first communication protocol, and then control the serial interface to send a first verification command to the Bluetooth module 142. The first verification command is a command generated based on the first communication protocol. After receiving the first verification command, the Bluetooth module 142 will respond by sending first verification information to the controller 110 of the smart set-top box 100. The first verification information is the response data packet of the first verification command.

[0064] The controller 110 of the smart set-top box 100 receives first verification information from the Bluetooth module 142 based on the first verification command, and parses the first verification information to determine whether the Bluetooth module 142 supports the first communication protocol. If the first verification information does not include the first feature code, the controller 110 controls the serial interface 150 to send a first information acquisition command to the Bluetooth module 142 based on the first communication protocol. The first feature code indicates that the Bluetooth module does not support the first communication protocol, and the first information acquisition command is an information acquisition command under the first communication protocol.

[0065] If the first verification information includes a first feature code, in some embodiments, the controller 110 of the smart set-top box 100 sets the communication parameters of the serial interface 150 according to a second communication protocol. This second communication protocol is different from the first communication protocol and is applicable to the serial interface. The controller then controls the serial interface 150 to send a second verification command to the Bluetooth module 142 and receives second verification information from the Bluetooth module 142 based on the second verification command. The second verification command is a command generated based on the second communication protocol. Finally, a second information retrieval command is sent based on the second verification information; this second information retrieval command is an information retrieval command under the second communication protocol.

[0066] Similarly, in some embodiments, when the controller 110 of the smart set-top box 100 sends a second information acquisition command based on the second verification information, if the second verification information does not include the second feature code, it controls the serial interface 150 to send the second information acquisition command to the Bluetooth module 142 based on the second communication protocol. The second feature code is used to characterize that the Bluetooth module 142 does not support the second communication protocol. Then, it receives the response information from the Bluetooth module 142 in response to the second information acquisition command and reads the target address of the response information to obtain the target attribute information of the Bluetooth module 142.

[0067] In other words, the smart set-top box 100 can first communicate with the Bluetooth module 142 through the first communication protocol. If the communication is successful, it indicates that the Bluetooth module 142 supports the first communication protocol, and the smart set-top box 100 can send an information acquisition command to the Bluetooth module 142 based on the first communication protocol. Otherwise, the smart set-top box 100 establishes communication with the Bluetooth module 142 through the second communication protocol. If the communication is successful, it indicates that the Bluetooth module 142 supports the second communication protocol, and the smart set-top box 100 can send an information acquisition command to the Bluetooth module 142 based on the second communication protocol.

[0068] For example, such as Figure 9 As shown, Bluetooth module 142 is a UART Bluetooth module. When the first communication protocol is H4 and the second communication protocol is H5, the controller 110 of the smart set-top box 100 first starts H4 initialization, including: calling serial port initialization and sending a reset command, i.e., the first verification command. If the first verification information returned by Bluetooth module 142 according to the first verification command does not include the first feature code, i.e., start_vendor_cmd(vendor_reset) is successful, the controller 110 of the smart set-top box 100 sends an information acquisition command to Bluetooth module 142: get_vendor_info(), to obtain target attribute information.

[0069] If the first verification information returned by Bluetooth module 142 according to the first verification command includes the first signature code, and `start_vendor_cmd(vendor_reset)` fails, then it jumps to the start H5 initialization, including calling serial port initialization and sending the synchronization command, i.e., the second verification command. If the first verification information returned by Bluetooth module 142 according to the first verification command does not include the first signature code, i.e., `h5_send_vendor_cmd(vendor_sync)` succeeds, then it can directly obtain the synchronization response packet `h5_read_vendor_event()` to obtain the target attribute information of Bluetooth module 142. In this case, the synchronization command serves as both a verification command and a second information acquisition command.

[0070] It is understandable that the process of the smart set-top box 100 establishing communication with the Bluetooth module 142 through the serial interface 150 can also first send a verification command based on the H5 protocol. If the H5 protocol fails, then a verification command can be sent based on the H4 protocol. This application embodiment does not limit the verification order of each protocol.

[0071] In order to enable the smart set-top box 100 to call the serial interface 150 to send information acquisition commands, in some embodiments, the smart set-top box 100 also modifies the serial port permission of the serial interface 150 for the Bluetooth function, so that the controller 110 can control the serial interface 150 to communicate with the Bluetooth module 142.

[0072] For example, the permissions for the Bluetooth function of the Smart Set-Top Box 100 to use the serial port can be modified as follows: Init_bt.rc chmod 600 / dev / ttyAMA1 chown Bluetooth net_bt_admin / dev / ttyAMA1 chmod 600 / sys / class / rfkill / rfkill0 / state chown bluetooth net_bt_admin / sys / class / rfkill / rfkill0 / state S7003: Receive the response information from the Bluetooth module in response to the information acquisition command, the response information including the target attribute information of the Bluetooth module.

[0073] After the controller 110 of the smart set-top box 100 sends an information acquisition command to the Bluetooth module 142, such as the first information acquisition command and / or the second information acquisition command in the above embodiment, the Bluetooth module 142 sends corresponding response information back to the controller 110 in response to the information acquisition command. The controller 110 of the smart set-top box 100 can then obtain the target attribute information of the Bluetooth module 152 by parsing the response information, and determine the Bluetooth system component corresponding to the Bluetooth module 142 according to the target attribute information.

[0074] In some embodiments, the Bluetooth system components include a Bluetooth protocol stack library and a driver library suitable for the Bluetooth module 142, and the Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories. The Bluetooth driver directories are equipped with a compilation switch, and the state of the compilation switch is set according to the operating system running on the controller 110.

[0075] For example, to facilitate differentiation, this application embodiment refers to the Bluetooth module built into the smart set-top box 100 as Bluetooth module 142, and all models of Bluetooth modules as basic Bluetooth modules. This application embodiment constructs different directories for basic Bluetooth modules with different attribute information; that is, it sets multiple different Bluetooth driver directories based on the basic Bluetooth modules, ensuring the uniformity of the Bluetooth configuration platform. Each Bluetooth driver directory is also configured with a compiler switch, which is used to enable and disable the data stored in this directory.

[0076] Correspondingly, for smart set-top boxes 100 with different operating systems and corresponding data, the availability of various Bluetooth driver directories can be modified by changing the state of the compilation switch. This allows for selective compilation of the Bluetooth module 142 based on different platforms. For example, in Linux kernel configuration, the menuconfig tool can be used to select and configure the compilation process of the Bluetooth module 142, while in embedded systems, makefiles or similar scripts are used to control the compilation process. Alternatively, platform differences such as development toolchains, operating system versions, and processor architectures can also be considered. In this way, by selectively including or excluding data from specific Bluetooth driver directories through the compilation switch, unified management of Bluetooth system components can be achieved while reducing the workload of the smart set-top box 100 in querying Bluetooth driver directories, thereby reducing system resource consumption.

[0077] In some embodiments, Bluetooth system components may be stored in the memory of the smart set-top box 100. The memory is configured to store Bluetooth system components according to a Bluetooth driver directory, wherein the names of the Bluetooth system components include preset identifiers, the preset identifiers are associated with attribute information, and the Bluetooth driver directory also includes files for automating the building of software projects, such as Makefiles.

[0078] For example, when defining compilation switches for the smart set-top box 100, a `muti_bt.mk` file can be added to select the compilation switches supported by the Bluetooth module 142, such as `BLUETOOTH_DEVICE_F:=y`, `BLUETOOTH_DEVICE_S:=y`, `BLUETOOTH_DEVICE_T:=y`, etc. Then, based on the attribute information of the basic Bluetooth modules, a Bluetooth driver `drv` directory is created for each basic Bluetooth module. For example, the `Makefile` adds the compilation paths for `BLUETOOTH_F`, `BLUETOOTH_DEVICE_S`, and `BLUETOOTH_DEVICE_T`, where the driver compilation path is added to `bluetooth / drv / Makefile`. ifeq($(BLUETOOTH_DEVICE_F),y) objects += bluetooth_f endif ifeq($(BLUETOOTH_DEVICE_S),y) objects += bluetooth_s endif ifeq($(BLUETOOTH_DEVICE_T),y) objects += bluetooth_t Endif Correspondingly, a Makefile is added to the directory of each basic Bluetooth module to compile and package the driver and protocol stack of the current basic Bluetooth module, such as compiling the Bluetooth driver and protocol stack for multiple Bluetooth modules: Create the files bluetooth_f, bluetooth_s, and bluetooth_t in the Bluetooth / drv / directory. 1)mkdir –p / bluetooth / drv / bluetooth_f mkdir –p / bluetooth / drv / bluetooth_s mkdir –p / bluetooth / drv / bluetooth_t Then place the corresponding Bluetooth driver and protocol stack into the corresponding directory. Place the bluetooth_f_driver / bludroid directory in the bluetooth_f directory. Place the bluetooth_s_driver / bludroid directory in the bluetooth_s directory. Place the bluetooth_t_driver / bludroid directory in the bluetooth_t directory. Then, add a makefile to the corresponding directory: directory bluetooth / drv / bluetooth_f / makefile directory bluetooth / drv / bluetooth_s / makefile directory bluetooth / drv / bluetooth_t / makefile Add to makefile Obj -y +=bluetooth_f_driver\ Then modify the Makefile in the Bluetooth driver and protocol stack to adapt to various platforms. bluetooth / drv / bluetooth_f / bluetooth_f_driver / makefile bluetooth / drv / bluetooth_s / bluetooth_s_driver / makefile bluetooth / drv / bluetooth_t / bluetooth_t_driver / makefile Correspondingly, the current platform can be set to y, and other platforms can be set to n, such as: CONFIG_PLATFORM1=y CONFIG_PLATFORM2=n CONFIG_PLATFORM3=n ifeq ($(CONFIG_PLATFORM1),y) endif Add `bt_*.mk` to the corresponding `android.mk` file, and define recognizable names as `bt_*.mk` according to different basic Bluetooth modules. `bt_*.mk` mainly includes the necessary Bluetooth system components such as packaging, copying the protocol stack, and the `bt-vendor` library, for example: ifeq ($(BLUETOOTH_DEVICE_F),=y) include bluetooth / drv / bluetooth_f / bt_f.mk endif ifeq ($(BLUETOOTH_DEVICE_S),=y) include bluetooth / drv / bluetooth_s / bt_s.mk endif ifeq ($(BLUETOOTH_DEVICE_T),=y) include bluetooth / drv / bluetooth_t / bt_t.mk endif Based on the above, since different basic Bluetooth modules use different Bluetooth system components, adaptation can be completed separately in the respective directories of the basic Bluetooth modules. The compiled files are copied to the corresponding directories, and the bt-vendor library is modified during compilation. It needs to be compiled with a name containing a preset identifier, such as libbt_vendor_*.so. Specifically, Bluetooth system components can include firmware, configuration files, driver libraries, and Bluetooth protocol library files, such as: Firmware: system / vendor / etc / firmare / firmware_f.bin, firmware_s.bin, firmware_t.bin Configuration file: system / etc / bluetooth / auto_pair_devlist_f.conf, auto_pair_devlist_s.conf, auto_pair_devlist_t.conf bt_did_f.conf, bt_did_s.conf, bt_did_t.conf bt_stack_f.conf, bt_stack_s.conf, bt_stack_t.conf Driver library: system / vendor / lib / libbt_vendor_f.so, libbt_vendor_s.so, libbt_vendor_t.so Bluetooth protocol library files: system / lib / hw / bluetooth.f.so, bluetooth.s.so, bluetooth.t.so It should be noted that the configuration method of the Bluetooth driver directory in the above example is only an illustrative example, and the preset identifiers, parameters, status values, etc. used can be in other forms. This application does not impose any restrictions on this.

[0079] S7004: Load Bluetooth system components in the Bluetooth driver directory according to the response information, so as to drive the Bluetooth module through the loaded Bluetooth system components.

[0080] After receiving a response message, the controller 110 of the smart set-top box 100 can load the corresponding Bluetooth system component from the Bluetooth driver directory using the target attribute information contained in the response message. This allows the controller 110 to drive the Bluetooth module 142 using the loaded Bluetooth system component. For example, the smart set-top box 100 can... Figure 5 The Bluetooth architecture shown is used to load Bluetooth system components.

[0081] like Figure 10 As shown, in some embodiments, when loading the Bluetooth system components, the smart set-top box 100 obtains a Bluetooth enumeration list and queries a target identifier based on the Bluetooth enumeration list. The Bluetooth enumeration list includes the association between attribute information and preset identifiers. The target identifier is a preset identifier associated with the target attribute information. The preset identifier may include one or more of the following: numeric characters such as binary characters, decimal characters, or hexadecimal characters; English characters; and Chinese characters.

[0082] After finding the target identifier, the smart set-top box 100 then queries the target Bluetooth driver directory based on the target identifier. The target Bluetooth driver directory is a Bluetooth driver directory whose name includes the target identifier and whose compilation switch is enabled. Enabled Bluetooth driver directories are those compatible with the operating system. Then, the controller 110 of the smart set-top box 100 loads the Bluetooth system components based on the target Bluetooth driver directory to obtain Bluetooth system components compatible with the Bluetooth module 142.

[0083] For example, taking the UART Bluetooth module as an example, the Bluetooth enumeration list can be in the following form: struct uart_device_info{ vendor_id; device_name

[20] ; vendor_lib_name

[64] ; }; Strut uart_device_list[]={ {0x5D00,"rtl_bt","libbt-vendor_rtlMutil.so"}, {0x5848,”xihao_bt”,”libbt-vendor_xihaoMutil.so”}, {0x2A05,"xdt_bt","libbt-vendor_xdtMutil.so"}, {0x0F00,"bcm_bt","libbt-vendor_bcmMutil.so"}, {0x2A05,"xdt_bt","libbt-vendor_xdtMutil.so"}, } The smart set-top box 100 can accurately identify the Bluetooth module 142 through the above Bluetooth enumeration list, and then load the Bluetooth system components corresponding to the Bluetooth module 142.

[0084] like Figure 10 As shown, in some embodiments, when the smart set-top box 100 loads the Bluetooth system components, it also sets the attribute information of the Bluetooth module 140 to the target attribute information to query the target identifier according to the target attribute information. Then, it calls the second preset function to close the serial interface 150, thereby ending the current serial port-based Bluetooth module 142 identification process.

[0085] For example, taking a UART Bluetooth module as an example, the attribute information set by the smart set-top box 100 for the Bluetooth module 142 may include: persist.vendor.libbt_vendor, persist.vendor.bt_module, persist.vendor.bt_name, and persist.bluetooth.stack. After obtaining the target attribute information, the process by which the smart set-top box 100 sets the attribute information of the Bluetooth module 142 through the Bluetooth enumeration list may include: matching the Bluetooth module: match_vendor_lib(), matching the Bluetooth module type: enum_uart_type(vendor_id) searches in the supported UART modules, and if a matching vendor_id is found, sets vendor_lib_name to persist.vendor.libbt_vendor, and sets the name of the Bluetooth module 142.

[0086] In addition, such as Figure 11 As shown, in scenarios where Bluetooth module 142 supports neither the first nor the second communication protocol, in some embodiments, if the second response information includes a second feature code, the smart set-top box 100 can also obtain the system bus device directory, i.e., scan the system bus. Then, it obtains the target attribute information of the Bluetooth module according to the bus device directory and loads the Bluetooth system component in the Bluetooth driver directory according to the target attribute information. In this way, regardless of the model of Bluetooth module 142, the smart set-top box 100 can accurately identify Bluetooth module 142 upon power-on, thereby correctly loading the Bluetooth system component corresponding to Bluetooth module 142 to drive Bluetooth module 142 to provide Bluetooth functionality.

[0087] Based on the aforementioned smart set-top box 100, some embodiments of this application also provide a dynamic identification method for a Bluetooth module. This dynamic identification method can be applied to the smart set-top box 100 provided in the above embodiments, or it can be applied to other smart devices equipped with a Bluetooth module 142, such as display devices 200 like televisions, projectors, and computers. Figure 7 As shown, the dynamic recognition method may include the following steps: S7001: In response to the power-on event of the Bluetooth module, initialize the serial interface; S7002: Control the serial interface to send an information acquisition command to the Bluetooth module. The information acquisition command is used to request the target attribute information of the Bluetooth module. The target attribute information is used to indicate the model of the Bluetooth module. S7003: Receive response information from the Bluetooth module in response to the information acquisition command, wherein the response information includes the target attribute information of the Bluetooth module; S7004: Load Bluetooth system components in the Bluetooth driver directory according to the response information, so as to drive the Bluetooth module through the loaded Bluetooth system components; the Bluetooth system components include Bluetooth protocol stack library and driver library applicable to the Bluetooth module, and Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories. The Bluetooth driver directory is equipped with a compilation switch, and the state of the compilation switch is set according to the operating system running the controller.

[0088] As can be seen from the above technical solutions, the dynamic identification method for a smart set-top box and Bluetooth module provided in some embodiments of this application can respond to the power-on event of the Bluetooth module 142, initialize the serial interface 150, and control the serial interface 150 to send an information acquisition command to the Bluetooth module 142. Then, it receives the response information from the Bluetooth module 142 in response to the information acquisition command, and loads Bluetooth system components in the Bluetooth driver directory according to the response information, so as to drive the Bluetooth module 142 through the loaded Bluetooth system components. The response information includes target attribute information indicating the model of the Bluetooth module 142. The Bluetooth system components include a Bluetooth protocol stack library and a driver library suitable for the Bluetooth module 142. Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories, and the Bluetooth driver directories are set with a compilation switch whose status is set according to the operating system. This method can automatically identify the Bluetooth module model after the Bluetooth module is powered on, load the Bluetooth system components adapted to the Bluetooth module, thereby accurately driving the Bluetooth module 142 in multi-Bluetooth module scenarios, reducing the limitations of multiple Bluetooth modules, and improving the user experience.

[0089] The same or similar parts among the various embodiments in this specification can be referred to mutually, and will not be repeated here.

[0090] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or certain parts of the embodiments of the present invention.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0092] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.

Claims

1. A smart set-top box, characterized in that, include: The Bluetooth module is configured to establish a communication connection with the controller via a serial interface; The controller, running an operating system, is configured as follows: In response to the power-on event of the Bluetooth module, the serial interface is initialized; The serial interface is controlled to send an information acquisition command to the Bluetooth module. The information acquisition command is used to request the target attribute information of the Bluetooth module, and the target attribute information is used to indicate the model of the Bluetooth module. The system receives response information from the Bluetooth module in response to the information acquisition command, the response information including the target attribute information of the Bluetooth module. According to the response information, the Bluetooth system components are loaded in the Bluetooth driver directory to drive the Bluetooth module. The Bluetooth system components include a Bluetooth protocol stack library and a driver library suitable for the Bluetooth module. Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories. The Bluetooth driver directory is equipped with a compilation switch, and the state of the compilation switch is set according to the operating system running on the controller.

2. The smart set-top box according to claim 1, characterized in that, The controller initializes the serial interface and controls the serial interface to send an information acquisition command to the Bluetooth module, configured as follows: The communication parameters of the serial interface are set according to the first communication protocol, wherein the first communication protocol is a communication protocol applicable to the serial interface. The serial interface is controlled to send a first verification command to the Bluetooth module, wherein the first verification command is a command generated based on the first communication protocol. Receive the first verification information fed back by the Bluetooth module according to the first verification command; If the first verification information does not include the first feature code, the serial interface is controlled to send a first information acquisition command to the Bluetooth module based on the first communication protocol. The first feature code is used to characterize that the Bluetooth module does not support the first communication protocol.

3. The smart set-top box according to claim 2, characterized in that, The controller is also configured to: If the first verification information includes the first feature code, the communication parameters of the serial interface are set according to the second communication protocol, wherein the second communication protocol is a communication protocol different from the first communication protocol and applicable to the serial interface. The serial interface is controlled to send a second verification command to the Bluetooth module, the second verification command being a command generated based on the second communication protocol; Receive the second verification information fed back by the Bluetooth module according to the second verification command; Send a second information retrieval command based on the second verification information.

4. The smart set-top box according to claim 3, characterized in that, The controller executes a command to send a second information retrieval based on the second verification information, and is configured as follows: If the second verification information does not include the second feature code, the serial interface is controlled to send a second information acquisition command to the Bluetooth module based on the second communication protocol. The second feature code is used to characterize that the Bluetooth module does not support the second communication protocol. Receive the response information from the Bluetooth module in response to the command to obtain the second information; Read the target address of the response information to obtain the target attribute information of the Bluetooth module.

5. The smart set-top box according to claim 4, characterized in that, The controller is also configured to: If the second response information includes the second feature code, obtain the bus device directory of the system bus; Obtain the target attribute information of the Bluetooth module according to the bus device catalog; The Bluetooth system component is loaded in the Bluetooth driver directory according to the target attribute information.

6. The smart set-top box according to claim 2 or 3, characterized in that, The communication protocol is either a first communication protocol or a second communication protocol, wherein the first communication protocol and the second communication protocol are applicable to the serial interface, and the first communication protocol and the second communication protocol are different; the controller performs the setting of the communication parameters of the serial interface, and is configured as follows: The serial interface is enabled by calling the first preset function; The serial access parameters, baud rate, data bits, stop bits, and parity bits of the serial interface are set according to the communication protocol. The parity bit parameters set under the first communication protocol are different from those set under the second communication protocol.

7. The smart set-top box according to claim 1, characterized in that, It also includes a memory configured to store the Bluetooth system components according to a Bluetooth driver directory, the name of which includes a preset identifier that is associated with the attribute information, and the Bluetooth driver directory also includes files for automating the construction of software projects.

8. The smart set-top box according to claim 7, characterized in that, The controller is also configured to: Obtain a Bluetooth enumeration list, wherein the Bluetooth enumeration list includes the association between the attribute information and the preset identifier; The target identifier is queried according to the Bluetooth enumeration list, and the target identifier is a preset identifier associated with the target attribute information; Query the target Bluetooth driver directory, which is a Bluetooth driver directory whose name includes the target identifier and whose compilation switch is in the enabled state. The enabled Bluetooth driver directory is a Bluetooth driver directory applicable to the operating system. The Bluetooth system components are loaded according to the target Bluetooth driver directory.

9. The smart set-top box according to claim 8, characterized in that, The controller is configured to load Bluetooth system components in the Bluetooth driver directory according to the response information, and is also configured to: The attribute information of the Bluetooth module is set as the target attribute information, so as to query the target identifier according to the target attribute information; Call the second preset function to close the serial interface.

10. A dynamic identification method for a Bluetooth module, characterized in that, include: In response to the power-on event of the Bluetooth module, initialize the serial interface; The serial interface is controlled to send an information acquisition command to the Bluetooth module. The information acquisition command is used to request the target attribute information of the Bluetooth module, and the target attribute information is used to indicate the model of the Bluetooth module. The system receives response information from the Bluetooth module in response to the information acquisition command, the response information including the target attribute information of the Bluetooth module. According to the response information, the Bluetooth system components are loaded in the Bluetooth driver directory to drive the Bluetooth module. The Bluetooth system components include a Bluetooth protocol stack library and a driver library suitable for the Bluetooth module. Bluetooth system components corresponding to different attribute information are stored in different Bluetooth driver directories. The Bluetooth driver directory is equipped with a compilation switch, and the state of the compilation switch is set according to the operating system running on the controller.

Citation Information

Cited By

  • A method for Android to identify Bluetooth and load corresponding manufacturer library

    CN122431752A