CN106775897B - Method and system for starting driver of set top box - Google Patents
Method and system for starting driver of set top box Download PDFInfo
- Publication number
- CN106775897B CN106775897B CN201710026021.4A CN201710026021A CN106775897B CN 106775897 B CN106775897 B CN 106775897B CN 201710026021 A CN201710026021 A CN 201710026021A CN 106775897 B CN106775897 B CN 106775897B
- Authority
- CN
- China
- Prior art keywords
- driver
- configuration file
- communication equipment
- top box
- port number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Abstract
The invention relates to the field of set top boxes, in particular to a method and a system for starting a driver of a set top box. The processor model and the communication equipment model of the set top box are identified through S1; s2, acquiring a preset drive configuration file corresponding to the processor model to obtain a first drive configuration file; s3, acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file; s4, setting the value of the driver path parameter of the second driver configuration file according to the communication equipment model to obtain a third driver configuration file; and S5, starting a driver corresponding to the communication equipment model according to the third driver configuration file. A universal method for automatically loading drivers of communication equipment of different models is provided for set-top boxes with processors of different models.
Description
Technical Field
The invention relates to the field of set top boxes, in particular to a method and a system for starting a driver of a set top box.
Background
The existing set top box generally comprises a WIFI module and a Bluetooth module, but the situation that the supply of the WIFI module or the Bluetooth module of a certain specific model is insufficient often occurs in the market. Therefore, the set top box needs to be compatible with various models of WIFI modules or bluetooth modules to meet market demands. However, once replacing the WIFI module or the bluetooth module requires replacing software and hardware at the same time, which is time consuming and costly.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a universal method for automatically loading drivers of communication equipment of different models is provided for set-top boxes with processors of different models.
In order to solve the technical problems, the invention adopts the technical scheme that:
the invention provides a method for starting a driver of a set top box, which comprises the following steps:
s1, identifying the processor model and the communication equipment model of the set top box;
s2, acquiring a preset drive configuration file corresponding to the processor model to obtain a first drive configuration file;
s3, acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file;
s4, setting the value of the driver path parameter of the second driver configuration file according to the communication equipment model to obtain a third driver configuration file;
and S5, starting a driver corresponding to the communication equipment model according to the third driver configuration file.
The present invention also provides a driver starting system for a set-top box, comprising:
the identification module is used for identifying the processor model and the communication equipment model of the set top box;
the acquisition module is used for acquiring a preset drive configuration file corresponding to the processor model to obtain a first drive configuration file;
the write-in module is used for acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file;
the setting module is used for setting the value of the driver path parameter of the second driver configuration file according to the communication equipment model to obtain a third driver configuration file;
and the starting module is used for starting a driving program corresponding to the communication equipment model according to the third driving configuration file.
The invention has the beneficial effects that: according to the processor model and the communication equipment model of the set top box, the communication port number parameter value of the communication between the processor and the communication equipment and the drive program path parameter value corresponding to the communication equipment in the drive configuration file corresponding to the processor model are automatically set, and then the corresponding drive program is started according to the configuration file, so that a universal method for automatically loading the drive programs of the communication equipment of different models is provided for the set top box with processors of different models, and the efficiency and the convenience for replacing the communication equipment of different models for the set top box are improved.
Drawings
Fig. 1 is a flowchart of a specific embodiment of a driver compatibility method for a set-top box according to the present invention;
FIG. 2 is a block diagram of a specific embodiment of a driver compatibility system for a set-top box according to the present invention;
description of reference numerals:
1. an identification module; 2. an acquisition module; 3. a write module; 4. setting a module; 5. and starting the module.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: and automatically configuring a corresponding drive configuration file according to the processor model and the communication equipment model of the set top box, and starting a corresponding drive program according to the drive configuration file.
As shown in fig. 1, the present invention provides a method for starting a driver of a set-top box, including:
s1, identifying the processor model and the communication equipment model of the set top box;
s2, acquiring a preset drive configuration file corresponding to the processor model to obtain a first drive configuration file;
s3, acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file;
s4, setting the value of the driver path parameter of the second driver configuration file according to the communication equipment model to obtain a third driver configuration file;
and S5, starting a driver corresponding to the communication equipment model according to the third driver configuration file.
Further, acquiring a first port number connecting the processor and the communication device specifically includes:
starting to increase the port number of the traversal set top box from 0 to obtain a second port number;
and if the type of the communication equipment connected with the second port number is the same as the type corresponding to the communication equipment type, setting the first port number as the second port number.
Further, the S4 specifically includes:
searching a driving program in the set top box to obtain a search result; the search result comprises a driver name and a second driver path;
and matching the communication equipment model and the driver program name in the search result, and if the matching is successful, setting the driver program path corresponding to the driver program name as the value of the driver program path parameter.
According to the description, the path where the driver program matched with the communication equipment model is located is automatically acquired.
Further, the S5 specifically includes:
and loading the corresponding driver according to the value of the path parameter of the driver.
As can be seen from the above description, automatic loading of drivers is achieved.
Further, still include:
and adding a driving program and a driving configuration file to a preset path.
As can be seen from the above description, the driver corresponding to the existing communication device model and the configuration file corresponding to the driver and the different processor model are stored in the preset path. The communication equipment comprises a WIFI module and a Bluetooth module. With the development of science and technology, a driver and a driver configuration file corresponding to the communication equipment of the new model can be added into the preset path, so that the communication equipment compatible with the set top box can be expanded.
As shown in fig. 2, the present invention further provides a driver starting system for a set-top box, including:
the identification module 1 is used for identifying the processor model and the communication equipment model of the set top box;
the acquisition module 2 is used for acquiring a preset drive configuration file corresponding to the processor model to obtain a first drive configuration file;
the write-in module 3 is used for acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file;
the setting module 4 is configured to set a value of a driver path parameter of the second driver configuration file according to the communication device model to obtain a third driver configuration file;
and the starting module 5 is used for starting a driving program corresponding to the communication equipment model according to the third driving configuration file.
Further, the write module includes:
the traversal unit is used for starting to increment and traverse the port number of the set top box from 0 to obtain a second port number;
and the setting unit is used for setting the first port number as the second port number if the type of the communication equipment connected with the second port number is the same as the type corresponding to the communication equipment model.
Further, the setting module includes:
the searching unit is used for searching the driving program in the set top box to obtain a searching result; the search result comprises a driver name and a second driver path;
and the matching unit is used for matching the communication equipment model and the driver program name in the search result, and if the matching is successful, setting the driver program path corresponding to the driver program name as the value of the driver program path parameter.
Further, the starting module comprises:
and the loading unit is used for loading the corresponding driver according to the value of the path parameter of the driver.
Further, still include:
and the adding module is used for adding the driving program and the driving configuration file to the preset path.
As can be seen from the above description, the driver starting system for the set-top box according to the present invention automatically runs the corresponding driver according to the processor model and the communication device model of the set-top box, so that the set-top box is compatible with communication devices of various models.
The first embodiment of the invention is as follows:
step 4, acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file; the method specifically comprises the following steps: starting to increase the port number of the traversal set top box from 0 to obtain a second port number; if the type of the communication equipment connected with the second port number is the same as the type corresponding to the type of the communication equipment, setting the first port number as the second port number;
step 6, starting a driving program corresponding to the communication equipment model according to the third driving configuration file; the method specifically comprises the following steps: and loading the corresponding driver according to the value of the path parameter of the driver.
The second embodiment of the invention is as follows:
the different types of Bluetooth module drivers of AP series are preset in the SDK source code, and comprise AP6210/BT/BCM20702.hcd, AP6330/BT/BCM4330.hcd and AP6212/BT/4343. hcd. And copying the Bluetooth module driver to system/etc/bluetooth under the operating firmware system directory. And presetting a corresponding drive configuration file to a running firmware system directory system (system/etc/bluetooth) according to the CPU models of different manufacturers, wherein the drive configuration file comprises Conf/bcm _ usb _ bt/bt _ vendor. And identifying the processor model of the set top box as samsung according to the environment variable $ (PLATFORM) of the android system. Setting corresponding interface parameters to ensure that the corresponding interface is in normal communication (such as uart baud rate), and interactively reading the model BCM4330 of the equipment Bluetooth module through a standard protocol (such as a Bluetooth protocol HCI command). Starting to automatically increase and traverse the port number of the set top box from 0, opening the equipment by using a system function, continuing to traverse if a return value is less than 0, and indicating that the equipment exists if the return value is greater than or equal to 0; reading the device type, judging the character content of the type, and determining the type as the target port number if the type is consistent (such as bluetooth). The target port number is written into a configuration file Conf/samsung/BT _ vendor. Conf, and the device can be operated according to the target port number, for example, the device is powered ON, the device state control bit is written into UPIO _ BT _ POWER _ OFF and UPIO _ BT _ POWER _ ON, and the io operation POWER supply is controlled by the bottom layer. Searching all driver files in the android system, performing matching operation according to the obtained model BCM4330 of the Bluetooth module and the searched driver files, and setting the value of the driver path parameter as system/etc/bluetooth/AP6330/BT/BCM4330.hcd according to the matching result. And calling the corresponding function according to the configuration file to complete corresponding configuration, and loading the corresponding drive BCM4330. hcd.
In summary, according to the driver starting method for the set top box provided by the invention, according to the processor model and the communication device model of the set top box, the communication port number parameter value of the communication between the processor and the communication device in the driver configuration file corresponding to the processor model and the driver path parameter value corresponding to the communication device are automatically set, and then the corresponding driver is started according to the configuration file, so that a universal method for automatically loading drivers of communication devices of different models for set top boxes with processors of different models is provided, and the efficiency and convenience for replacing communication devices of different models for the set top box are improved. Furthermore, the dynamic allocation of the port number to the communication equipment is realized. Further, the path where the driver program matched with the communication equipment model is located is automatically acquired. Furthermore, the communication port number of the processor of the set top box and the communication equipment is automatically configured, and the driver is automatically loaded. Furthermore, the communication equipment compatible with the expandable set top box is realized.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.
Claims (8)
1. A driver startup method for a set-top box, comprising:
s1, identifying the processor model and the communication equipment model of the set top box;
s2, acquiring a preset drive configuration file corresponding to the processor model to obtain a first drive configuration file;
s3, acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file;
s4, setting the value of the driver path parameter of the second driver configuration file according to the communication equipment model to obtain a third driver configuration file;
s5, starting a driver corresponding to the communication equipment model according to the third driver configuration file;
the S5 specifically includes:
and loading the corresponding driver according to the value of the path parameter of the driver.
2. The method for starting the driver for the set-top box according to claim 1, wherein the obtaining of the first port number connecting the processor and the communication device specifically comprises:
starting to increase the port number of the traversal set top box from 0 to obtain a second port number;
and if the type of the communication equipment connected with the second port number is the same as the type corresponding to the communication equipment type, setting the first port number as the second port number.
3. The method for starting the driver for the set-top box according to claim 1, wherein the S4 specifically is:
searching a driving program in the set top box to obtain a search result; the search result comprises a driver name and a second driver path;
and matching the communication equipment model and the driver program name in the search result, and if the matching is successful, setting a second driver program path corresponding to the driver program name as the value of the driver program path parameter.
4. The driver startup method for a set top box according to claim 1, wherein the step S1 is preceded by:
and adding a driving program and a driving configuration file to a preset path.
5. A driver startup system for a set-top box, comprising:
the identification module is used for identifying the processor model and the communication equipment model of the set top box;
the acquisition module is used for acquiring a preset drive configuration file corresponding to the processor model to obtain a first drive configuration file;
the write-in module is used for acquiring a first port number for connecting the processor and the communication equipment; writing the first port number into the first drive configuration file to obtain a second drive configuration file;
the setting module is used for setting the value of the driver path parameter of the second driver configuration file according to the communication equipment model to obtain a third driver configuration file;
the starting module is used for starting a driving program corresponding to the communication equipment model according to the third driving configuration file;
the starting module comprises:
and the loading unit is used for loading the corresponding driver according to the value of the path parameter of the driver.
6. The driver startup system for a set top box according to claim 5, wherein the writing module comprises:
the traversal unit is used for starting to increment and traverse the port number of the set top box from 0 to obtain a second port number;
and the setting unit is used for setting the first port number as the second port number if the type of the communication equipment connected with the second port number is the same as the type corresponding to the communication equipment model.
7. The driver startup system for a set-top box according to claim 5, wherein the setup module comprises:
the searching unit is used for searching the driving program in the set top box to obtain a searching result; the search result comprises a driver name and a second driver path;
and the matching unit is used for matching the communication equipment model and the driver program name in the search result, and if the matching is successful, setting a second driver program path corresponding to the driver program name as the value of the driver program path parameter.
8. The driver startup system for a set top box according to claim 5, wherein the identification module further comprises before:
and the adding module is used for adding the driving program and the driving configuration file to the preset path.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710026021.4A CN106775897B (en) | 2017-01-13 | 2017-01-13 | Method and system for starting driver of set top box |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710026021.4A CN106775897B (en) | 2017-01-13 | 2017-01-13 | Method and system for starting driver of set top box |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106775897A CN106775897A (en) | 2017-05-31 |
CN106775897B true CN106775897B (en) | 2020-10-13 |
Family
ID=58945839
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710026021.4A Expired - Fee Related CN106775897B (en) | 2017-01-13 | 2017-01-13 | Method and system for starting driver of set top box |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106775897B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107908430B (en) * | 2017-11-01 | 2022-08-30 | 福建新大陆支付技术有限公司 | Method for configuring POS file system and POS machine |
CN108415857B (en) * | 2018-03-01 | 2021-03-23 | 合肥威艾尔智能技术有限公司 | Universal processing method for serial port data |
CN111954039B (en) * | 2020-07-02 | 2022-07-01 | 深圳市华曦达科技股份有限公司 | Set top box Bluetooth configuration method and device, electronic equipment and storage medium |
CN112148376A (en) * | 2020-09-28 | 2020-12-29 | 上海摩勤智能技术有限公司 | Terminal starting method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100188215A1 (en) * | 2008-10-02 | 2010-07-29 | Certusview Technologies, Llc | Methods and apparatus for generating alerts on a marking device, based on comparing electronic marking information to facilities map information and/or other image information |
CN102413374A (en) * | 2006-08-18 | 2012-04-11 | 索尼株式会社 | Automatically reconfigurable multimedia system with interchangeable personality adapters |
CN103118281A (en) * | 2012-12-28 | 2013-05-22 | 四川九洲电器集团有限责任公司 | Set top box device and control method |
CN103412832A (en) * | 2013-08-27 | 2013-11-27 | 深圳市视维科技有限公司 | Automatic WIFI (Wireless Fidelity) adaptation method |
CN106020837A (en) * | 2016-05-27 | 2016-10-12 | 深圳创维数字技术有限公司 | Method and system for loading set top box drive |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103914315B (en) * | 2012-12-31 | 2017-05-24 | 展讯通信(上海)有限公司 | Configuration method of drivers |
CN104980356A (en) * | 2014-04-09 | 2015-10-14 | 广西大学 | Integrated smart home router and control method |
CN105516239A (en) * | 2015-11-23 | 2016-04-20 | 王丽华 | Router integrated with smart home, and control method |
-
2017
- 2017-01-13 CN CN201710026021.4A patent/CN106775897B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102413374A (en) * | 2006-08-18 | 2012-04-11 | 索尼株式会社 | Automatically reconfigurable multimedia system with interchangeable personality adapters |
US20100188215A1 (en) * | 2008-10-02 | 2010-07-29 | Certusview Technologies, Llc | Methods and apparatus for generating alerts on a marking device, based on comparing electronic marking information to facilities map information and/or other image information |
CN103118281A (en) * | 2012-12-28 | 2013-05-22 | 四川九洲电器集团有限责任公司 | Set top box device and control method |
CN103412832A (en) * | 2013-08-27 | 2013-11-27 | 深圳市视维科技有限公司 | Automatic WIFI (Wireless Fidelity) adaptation method |
CN106020837A (en) * | 2016-05-27 | 2016-10-12 | 深圳创维数字技术有限公司 | Method and system for loading set top box drive |
Also Published As
Publication number | Publication date |
---|---|
CN106775897A (en) | 2017-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106775897B (en) | Method and system for starting driver of set top box | |
CN109451472B (en) | Dynamic management method for multiple Bluetooth chips on Android intelligent device | |
CN106909362B (en) | Method and device for generating BMC (baseboard management controller) firmware and method and device for starting BMC system | |
US20140057620A1 (en) | Method, system, and terminal for performing system update between mobile communication terminals | |
CN103473097A (en) | System, device and method for upgrading Android system firmware | |
CN105579953A (en) | Flexible bootstrap code architecture | |
CN102945173A (en) | User program on-line upgrading system and method | |
CN105354071A (en) | Method for realizing compatibility between embedded software and hardware | |
CN104156221A (en) | Chip and method and device for modifying chip configuration | |
CN104679540A (en) | Computer system and computer system starting method | |
CN109947482A (en) | A kind of loading method of USB device, storage medium and smart television | |
CN105159716B (en) | A kind of memory device initial method and electronic equipment | |
CN109947450B (en) | System file upgrading method and device, mobile terminal and readable storage medium | |
CN102609290B (en) | The method for upgrading software of electronic product | |
CN106663016A (en) | Upgrade method, apparatus and device for terminal device | |
CN114138333B (en) | Program loading method and related device | |
TW201814546A (en) | Device component loading method, apparatus and internet of things system | |
WO2020118719A1 (en) | Firmware upgrading method, firmware upgrading device and control device of unmanned aerial vehicle, unmanned aerial vehicle and medium | |
WO2018166322A1 (en) | Repairing method and device for system partition | |
CN114816491A (en) | System upgrading method and device for multi-system mobile terminal and terminal | |
CN105159714B (en) | A kind of PMIC initial method and electronic equipment | |
CN110618908A (en) | Method for quickly verifying screen and machine display interface | |
CN115934114A (en) | Software firmware online programming method and device and computer readable storage medium | |
CN108052337A (en) | A kind of firmware upgrade method and device of eMMC production tools | |
CN115269021A (en) | Operation processing method, device and medium for network card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20201013 Termination date: 20220113 |