TW201943249A - Bluetooth adaptation method and terminal device based on Android system - Google Patents

Bluetooth adaptation method and terminal device based on Android system Download PDF

Info

Publication number
TW201943249A
TW201943249A TW107134670A TW107134670A TW201943249A TW 201943249 A TW201943249 A TW 201943249A TW 107134670 A TW107134670 A TW 107134670A TW 107134670 A TW107134670 A TW 107134670A TW 201943249 A TW201943249 A TW 201943249A
Authority
TW
Taiwan
Prior art keywords
bluetooth adapter
bluetooth
terminal device
adapter
information
Prior art date
Application number
TW107134670A
Other languages
Chinese (zh)
Inventor
曾引
Original Assignee
晨星半導體股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 晨星半導體股份有限公司 filed Critical 晨星半導體股份有限公司
Publication of TW201943249A publication Critical patent/TW201943249A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/18Information format or content conversion, e.g. adaptation by the network of the transmitted or received information for the purpose of wireless delivery to users or terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a Bluetooth adaptation method and a terminal device based on an Android system. The method includes steps of: reading a matching information of a Bluetooth adapter to obtain corresponding information of a Bluetooth adapter currently performing a plugging/unplugging operation; identifying the Bluetooth adapter that performs the plugging/unplugging operation according to the matching information of the Bluetooth adapter, and issuing a corresponding setting instruction according to the corresponding information of the Bluetooth adapter; calling an attribute parameter matching the Bluetooth adapter according to the setting instruction to drive the Bluetooth adapter according to the attribute parameter. In this way, the Bluetooth adaptation method of the present invention can adapt the Android system-based terminal device to different Bluetooth chips, thereby facilitating the usage.

Description

基於安卓(Android)系統的藍牙適配方法及終端設備Bluetooth adaptation method and terminal equipment based on Android system

本發明涉及藍牙適配技術領域,特別是涉及一種基於安卓系統的藍牙適配方法及終端設備。The invention relates to the technical field of Bluetooth adaptation, in particular to a Bluetooth adaptation method and terminal device based on the Android system.

隨著科技的發展以及人們日常生活需求的提高,短距離無線資料傳輸——藍牙的應用越來越廣泛。當前基於Android系統的終端設備,如電視機、機上盒等,通常採用內建的藍牙晶片的方式來實現相應的藍牙功能。With the development of technology and the improvement of people's daily needs, the short-range wireless data transmission-Bluetooth is more and more widely used. Currently, terminal devices based on the Android system, such as televisions, set-top boxes, etc., usually use built-in Bluetooth chips to implement the corresponding Bluetooth functions.

然而,本申請的發明人在長期的研發過程中發現,當前基於Android系統的終端設備內部內建的藍牙晶片的方式不能夠支援藍牙模組的熱插拔,從而為用戶使用帶來不便。However, the inventor of the present application found in the long-term research and development process that the current built-in Bluetooth chip in the terminal device based on the Android system cannot support the hot plugging of the Bluetooth module, thereby causing inconvenience to users.

本發明主要解決的技術問題是提供一種基於Android系統的藍牙適配方法及終端設備,使得該基於Android系統的終端設備能夠使得基於安卓(Android)系統的終端設備適配不同的藍牙晶片,從而為使用者使用提供便利。The technical problem mainly solved by the present invention is to provide a Bluetooth adaptation method and a terminal device based on the Android system, so that the terminal device based on the Android system can enable the terminal device based on the Android system to adapt to different Bluetooth chips, so that User convenience.

為解決上述技術問題,本發明採用的一個技術方案是:提供一種基於Android系統的藍牙適配方法,包括:讀取藍牙轉接器的匹配資訊,以獲知當前執行插拔操作的藍牙轉接器的對應資訊;根據所述藍牙轉接器的匹配資訊而識別出執行插拔操作的所述藍牙轉接器,並根據所述藍牙轉接器的對應資訊發出相應的設置指令;根據所述設置指令而調用匹配所述藍牙轉接器的屬性參數,從而根據所述屬性參數而驅動所述藍牙轉接器。In order to solve the above technical problem, a technical solution adopted by the present invention is to provide a Bluetooth adaptation method based on the Android system, including: reading the matching information of the Bluetooth adapter to obtain the Bluetooth adapter currently performing the plugging operation. Corresponding information of the Bluetooth adapter; identifying the Bluetooth adapter performing the plug-in operation according to the matching information of the Bluetooth adapter, and issuing a corresponding setting instruction according to the corresponding information of the Bluetooth adapter; according to the setting The instruction calls matching attribute parameters of the Bluetooth adapter, thereby driving the Bluetooth adapter according to the attribute parameters.

為解決上述技術問題,本發明採用的另一個技術方案是:提供一種基於Android系統的終端設備,包括:讀取模組,其中,所述讀取模組用於接收外設的藍牙轉接器的插拔操作,且讀取藍牙轉接器的資訊以獲知所述藍牙轉接器的匹配資訊;識別模組,與所述讀取模組連接,以接收所述藍牙轉接器的匹配資訊並根據所述藍牙轉接器的匹配資訊而識別出所述藍牙轉接器,並生成相應的設置指令;屬性設置模組,與所述識別模組連接,以接收所述設置指令並根據所述設置指令調用匹配所述藍牙轉接器的屬性參數,從而使所述終端能夠根據所述屬性參數而驅動所述藍牙轉接器。In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a terminal device based on the Android system, including: a reading module, wherein the reading module is used for receiving a Bluetooth adapter for a peripheral device. The plug-in operation, and read the information of the Bluetooth adapter to obtain the matching information of the Bluetooth adapter; an identification module is connected to the reading module to receive the matching information of the Bluetooth adapter And identify the Bluetooth adapter according to the matching information of the Bluetooth adapter and generate corresponding setting instructions; an attribute setting module is connected with the identification module to receive the setting instructions and The setting instruction calls matching attribute parameters of the Bluetooth adapter, so that the terminal can drive the Bluetooth adapter according to the attribute parameters.

本發明的有益效果是:區別於習知技術的情況,本發明基於Android系統的藍牙適配方法包括:讀取藍牙轉接器的資訊,以獲知當前執行插拔操作的藍牙轉接器的對應資訊;根據藍牙轉接器的匹配資訊而識別出執行插拔操作的藍牙轉接器,並根據藍牙轉接器的對應資訊發出相應的設置指令;根據設置指令而調用匹配藍牙轉接器的屬性參數,從而根據屬性參數而驅動藍牙轉接器。通過上述方式,可在基於Android系統的終端設備的USB介面上插接不同的藍牙轉接器,而在插接不同的藍牙轉接器時,調用對應的藍牙轉接器的屬性參數即可,從而不限定終端設備所使用的藍牙晶片,使得使用者能夠根據自己的需求選擇使用不同的藍牙晶片,從而為使用者使用提供便利。The beneficial effect of the present invention is that, in contrast to the case of the conventional technology, the Bluetooth adaptation method based on the Android system of the present invention includes: reading information of the Bluetooth adapter to know the correspondence of the Bluetooth adapter currently performing the plugging operation. Information; identify the Bluetooth adapter that performs the plug-in operation according to the matching information of the Bluetooth adapter, and issue the corresponding setting instruction according to the corresponding information of the Bluetooth adapter; according to the setting instruction, call the properties of the matching Bluetooth adapter Parameters to drive the Bluetooth adapter according to the attribute parameters. In the above manner, different Bluetooth adapters can be plugged into the USB interface of a terminal device based on the Android system, and when different Bluetooth adapters are plugged in, the corresponding attribute parameters of the Bluetooth adapter can be called, Never limit the Bluetooth chip used by the terminal device, so that users can choose to use different Bluetooth chips according to their needs, thereby providing convenience for users.

在以下描述中闡述了具體的細節以便充分理解本發明。但是本發明能夠以多種不同於在此描述的其他方式來實施,本領域技術人員可以在不違背本發明內涵的情況下做類似推廣。因此本發明不受下面公開的具體實施方式的限制。Specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar promotion without departing from the content of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

藍牙是一種支援設備短距離通信的無線電技術,能在包括智慧電視、機上盒、行動電話、PDA、無線耳機、筆記型電腦、相關外設等眾多設備之間進行無線資訊交換。利用藍牙技術,能夠有效地簡化移動通信終端設備之間的通信,也能夠成功地簡化設備與網際網路Internet之間的通信,從而提高資料的傳輸效率。Bluetooth is a radio technology that supports short-range communication of devices. It can exchange wireless information between many devices, including smart TVs, set-top boxes, mobile phones, PDAs, wireless headsets, notebook computers, and related peripherals. The use of Bluetooth technology can effectively simplify the communication between mobile communication terminal devices, and also successfully simplify the communication between the device and the Internet, thereby improving the efficiency of data transmission.

需要指出的是,當前運載Android系統的終端設備通常採用在該終端設備中內建藍牙晶片的方式,以實現相應的藍牙功能。然而,這種內建藍牙晶片的方式使得使用者購買終端設備後只能夠使用出廠前廠家在該終端設備內所內建的藍牙晶片進行工作,而不能夠支援其它廠家藍牙模組,進而產生一定的局限性;另外,藍牙晶片內建的方式也不能夠支援藍牙模組隨機熱插拔的操作。It should be pointed out that the terminal devices currently carrying the Android system usually adopt the way that a Bluetooth chip is built in the terminal device to implement the corresponding Bluetooth function. However, this method of built-in Bluetooth chip allows users to use the Bluetooth chip built in the terminal device by the manufacturer before leaving the factory to work, and cannot support other manufacturers' Bluetooth modules, which will result in certain problems. Limitations; In addition, the built-in method of the Bluetooth chip cannot support the random hot plug operation of the Bluetooth module.

針對背景技術中提到的缺陷,本發明提供一種基於Android系統的藍牙適配方法。下面將結合附圖和實施方式對本發明作進一步的詳細描述。In view of the defects mentioned in the background, the present invention provides a Bluetooth adaptation method based on the Android system. The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

請參閱圖1,圖1是本發明基於Android系統的藍牙適配方法一實施方式的流程示意圖。Please refer to FIG. 1, which is a schematic flowchart of an embodiment of a Bluetooth adaptation method based on the Android system of the present invention.

區別於習知技術的情況,本實施方式用於運載Android系統的終端設備,具體地,本實施方式中,基於Android系統的藍牙適配方法包括:Different from the case of the conventional technology, this embodiment is used to carry a terminal device of the Android system. Specifically, in this embodiment, a Bluetooth adaptation method based on the Android system includes:

步驟S101:讀取藍牙轉接器的匹配資訊,以獲知當前執行插拔操作的藍牙轉接器的對應資訊;Step S101: read the matching information of the Bluetooth adapter to obtain the corresponding information of the Bluetooth adapter currently performing the plugging operation;

本實施方式中,藍牙轉接器是指能夠插接在運載Android系統的終端設備的外部介面上,進而使得該運載Android系統的終端設備能夠通過該藍牙轉接器與藍牙設備之間建立連接從而能夠通過藍牙進行資料傳輸的介面轉換器。具體地,該藍牙轉接器可以為USB藍牙轉接器。In this embodiment, the Bluetooth adapter refers to being able to be plugged into the external interface of the terminal device carrying the Android system, thereby enabling the terminal device carrying the Android system to establish a connection with the Bluetooth device through the Bluetooth adapter, thereby Interface converter capable of data transmission via Bluetooth. Specifically, the Bluetooth adapter may be a USB Bluetooth adapter.

其中,USB介面是電腦與外調設備,例如鍵盤、磁帶機、印表機及可寫入光碟機等之間標準的介面。該介面不但負載能力好,而且易用性也好,具有“隨插即用”的功能,可串接127個外設以上。Among them, the USB interface is a standard interface between a computer and external adjustment equipment, such as a keyboard, a tape drive, a printer, and a writable optical drive. This interface not only has good load capacity, but also good ease of use. It has the function of "plug and play" and can be connected to more than 127 peripherals in series.

本實施方式中,USB介面包括USB任務和USB驅動,將USB藍牙轉接器通過終端設備的USB介面插接在基於Android系統的終端設備上,從而進一步能夠實現基於Android系統的隨插即用的藍牙資料傳輸。In this embodiment, the USB interface includes a USB task and a USB driver, and the USB Bluetooth adapter is connected to the terminal device based on the Android system through the USB interface of the terminal device, thereby further enabling plug-and-play based on the Android system. Bluetooth data transmission.

具體地,可以在基於Android系統的終端設備的記憶體中預先存儲與該終端設備相容的藍牙轉接器的相關資訊,在終端設備發現藍牙轉接器時,即檢測到USB介面處有藍牙轉接器插入或拔出時,向當前藍牙轉接器發送上傳其相關資訊的指令,該藍牙轉接器根據終端設備的指令向其發送對應的相關資訊,並進一步與終端設備的記憶體中存儲的對應資訊進行對比,確認當前藍牙轉接器是否是與該終端設備相容的藍牙轉接器。Specifically, information about a Bluetooth adapter compatible with the terminal device can be stored in the memory of the terminal device based on the Android system. When the terminal device finds the Bluetooth adapter, it detects that there is Bluetooth at the USB interface. When the adapter is inserted or unplugged, it sends an instruction to upload the relevant information to the current Bluetooth adapter. The Bluetooth adapter sends the corresponding relevant information to the terminal device according to the instruction of the terminal device, and further communicates with the terminal device's memory. The stored corresponding information is compared to confirm whether the current Bluetooth adapter is a Bluetooth adapter compatible with the terminal device.

其中,當前執行插拔操作的藍牙轉接器的對應信息可以包括該藍牙轉接器自身的資訊,如能夠對應存儲在終端設備的記憶體中的上述相關資訊,或者終端設備檢測到的,該藍牙轉接器當前與終端設備的插接狀態等。The corresponding information of the Bluetooth adapter currently performing the plugging operation may include information of the Bluetooth adapter itself, such as being able to correspond to the above-mentioned related information stored in the memory of the terminal device, or detected by the terminal device. The current state of the Bluetooth adapter with the terminal device.

具體地,請參閱圖2,步驟S101可包括:Specifically, referring to FIG. 2, step S101 may include:

步驟S1011:讀取當前執行插拔操作的藍牙轉接器的匹配資訊;Step S1011: read the matching information of the Bluetooth adapter currently performing the plugging operation;

本實施方式中,藍牙轉接器的匹配資訊是指藍牙轉接器本身所固有的資訊,可包括藍牙轉接器的廠家識別字和版本序號等。In this embodiment, the matching information of the Bluetooth adapter refers to information inherent in the Bluetooth adapter itself, and may include a manufacturer identification word and a version number of the Bluetooth adapter.

步驟S1012:識別藍牙轉接器執行的是插入操作還是拔出操作,並生成相應的插拔操作識別信號;Step S1012: identify whether the Bluetooth adapter performs an insert operation or an unplug operation, and generate a corresponding plug operation identification signal;

進一步地,在終端設備發現當前藍牙轉接器時,進一步判斷當前的藍牙轉接器是插入該終端設備,還是從該終端設備的USB介面中拔出。並根據檢測到的結果生成對應的插拔信號,例如,在當前藍牙轉接器執行的是插入操作時,對應的插拔識別信號為1,執行的是拔出操作時,對應的插拔識別信號為2。Further, when the terminal device finds the current Bluetooth adapter, it is further determined whether the current Bluetooth adapter is inserted into the terminal device or is unplugged from the USB interface of the terminal device. The corresponding plug-in signal is generated according to the detected result. For example, when the current Bluetooth adapter performs the plug-in operation, the corresponding plug-in identification signal is 1, and when the plug-in operation is performed, the corresponding plug-in identification is performed. The signal is 2.

步驟S1013:根據藍牙轉接器的匹配資訊,生成相應的藍牙轉接器的匹配資訊信號,以生成對應資訊。Step S1013: According to the matching information of the Bluetooth adapter, a corresponding matching information signal of the Bluetooth adapter is generated to generate corresponding information.

需要指出的是,藍牙轉接器的廠家識別字以及對應的版本序號可唯一確定一個或者確定同一款的藍牙轉接器。類似地,在偵測到當前藍牙轉接器的匹配資訊後,可進一步根據終端設備記憶體內預先存儲的相關資訊生成對應的匹配資訊信號。例如,在廠家識別字為A,版本序號為a時,生成的藍牙轉接器的匹配信號為11。It should be noted that the manufacturer identification of the Bluetooth adapter and the corresponding version number can uniquely identify one or the same Bluetooth adapter. Similarly, after detecting the matching information of the current Bluetooth adapter, a corresponding matching information signal may be further generated according to the related information pre-stored in the memory of the terminal device. For example, when the manufacturer identification word is A and the version number is a, the matching signal of the generated Bluetooth adapter is 11.

在此實施例中,當前執行插拔操作的藍牙轉接器的對應資訊則包括插拔識別信號和匹配資訊信號。In this embodiment, the corresponding information of the Bluetooth adapter currently performing the plugging operation includes a plugging identification signal and a matching information signal.

步驟S102:根據藍牙轉接器的匹配資訊而識別出執行插拔操作的藍牙轉接器,並根據藍牙轉接器的對應資訊發出相應的設置指令;Step S102: identify the Bluetooth adapter that performs the plug-in operation according to the matching information of the Bluetooth adapter, and issue a corresponding setting instruction according to the corresponding information of the Bluetooth adapter;

需要指出的是,終端設備根據藍牙轉接器的匹配資訊能夠識別出該藍牙轉接器是否與當前終端設備相容,並根據識別結果發出相應的設置指令。It should be noted that the terminal device can identify whether the Bluetooth adapter is compatible with the current terminal device according to the matching information of the Bluetooth adapter, and issue a corresponding setting instruction according to the recognition result.

其中,設置指令是指對當前藍牙轉接器進行控制的指令,例如在識別出當前藍牙轉接器與該終端設備相容時,可以發出對當前藍牙轉接器進行驅動的相關設置指令,而在識別出當前藍牙轉接器與該終端設備不相容時,可以發出終止終端設備運行相關程式的指令。The setting instruction refers to an instruction for controlling the current Bluetooth adapter. For example, when it is recognized that the current Bluetooth adapter is compatible with the terminal device, a related setting instruction for driving the current Bluetooth adapter may be issued, and When it is identified that the current Bluetooth adapter is not compatible with the terminal device, an instruction may be issued to terminate the terminal device from running related programs.

具體地,請參閱圖3,步驟S102可包括:Specifically, referring to FIG. 3, step S102 may include:

步驟S1020:根據藍牙轉接器的匹配資訊,判斷當前的藍牙轉接器與該終端設備是否相容;Step S1020: determine whether the current Bluetooth adapter is compatible with the terminal device according to the matching information of the Bluetooth adapter;

具體地,終端設備可預先存儲與該終端設備相容的藍牙轉接器的廠家識別字和/或對應的版本序號,在檢測到有藍牙轉接器與該終端設備發生連接時,獲取當前的藍牙轉接器的對應的廠家識別字以及對應的版本序號,並確認在終端設備的記憶體中是否存儲有與之對應的廠家識別字以及對應的版本序號,在存儲有當前藍牙轉接器的上述匹配資訊時,則說明當前的藍牙轉接器與該終端設備相容,則執行步驟S1021;否則,當前的藍牙轉接器與該終端設備不相容,執行步驟S1023。Specifically, the terminal device may store a manufacturer identifier and / or a corresponding version number of a Bluetooth adapter compatible with the terminal device in advance, and when a connection between the Bluetooth adapter and the terminal device is detected, the current The corresponding manufacturer identification word and corresponding version number of the Bluetooth adapter, and confirm whether the corresponding manufacturer identification word and corresponding version number are stored in the memory of the terminal device. When the above matching information indicates that the current Bluetooth adapter is compatible with the terminal device, step S1021 is performed; otherwise, the current Bluetooth adapter is not compatible with the terminal device, and step S1023 is performed.

步驟S1021:根據藍牙轉接器的對應資訊中的插拔操作識別信號產生相應的插拔操作通知信號;Step S1021: Generate a corresponding plugging operation notification signal according to the plugging operation identification signal in the corresponding information of the Bluetooth adapter;

容易理解地,插拔操作通知信號是對插拔操作識別信號進行分析得出的當前藍牙轉接器執行的是插入操作還是拔出操作的信號。It is easy to understand that the plug-in operation notification signal is a signal that the current Bluetooth adapter performs the plug-in operation or the pull-out operation obtained by analyzing the plug-in operation identification signal.

步驟S1022:根據插拔操作通知信號和藍牙轉接器的對應資訊中的匹配資訊信號而生成相應的設置指令。Step S1022: Generate a corresponding setting instruction according to the plug-in operation notification signal and the matching information signal in the corresponding information of the Bluetooth adapter.

具體地,終端設備根據插拔操作通知信號,獲知所發現的藍牙轉接器執行的是插接在該終端設備上的操作,還是從該終端設備上拔出的操作。並進一步根據藍牙轉接器的匹配資訊信號,即其中包含的廠家識別字和/或對應的版本序號,生成控制該藍牙轉接器的設置指令。Specifically, the terminal device learns whether the discovered Bluetooth adapter performs an operation of plugging in or unplugging from the terminal device according to the plugging operation notification signal. Further, according to the matching information signal of the Bluetooth adapter, that is, the manufacturer identification word and / or the corresponding version number contained therein, a setting instruction for controlling the Bluetooth adapter is generated.

容易理解地,當插拔操作通知信號表明藍牙轉接器執行的是拔出操作時,可將設置指令設置成空值,從而可以不再執行後續操作。It is easy to understand that when the plug-in operation notification signal indicates that the Bluetooth adapter is performing a pull-out operation, the setting instruction may be set to a null value, so that subsequent operations may not be performed.

步驟S1023:發出終止終端設備運行相關程式的設置指令。Step S1023: A setting instruction is issued to terminate the terminal device from running the related program.

步驟S103:根據設置指令而調用匹配藍牙轉接器的屬性參數,從而根據屬性參數而驅動藍牙轉接器。Step S103: The attribute parameter of the matching Bluetooth adapter is called according to the setting instruction, so as to drive the Bluetooth adapter according to the attribute parameter.

需要指出的是,本實施方式中,在終端設備的記憶體中存儲有相容的藍牙轉接器匹配的屬性參數,該屬性參數與由當前執行插拔操作的藍牙轉接器的對應資訊生成的設置指令具有對應關係,在終端設備生成相應的設置指令後,可以進一步根據該設置指令調用相應的藍牙轉接器的屬性參數。It should be noted that, in this embodiment, a compatible Bluetooth adapter matching attribute parameter is stored in the memory of the terminal device, and the attribute parameter is generated from the corresponding information of the Bluetooth adapter currently performing the plugging operation. The setting instructions have a corresponding relationship. After the terminal device generates the corresponding setting instructions, the corresponding attribute parameters of the Bluetooth adapter can be further called according to the setting instructions.

其中,藍牙轉接器的屬性參數是指終端設備驅動該藍牙轉接器所需要調用的程式、檔等。例如,藍牙轉接器的屬性參數可包括對應的驅動程式、動態鏈接程式庫(Dynamic Link Library, DLL)文件和服務程式等。The attribute parameters of the Bluetooth adapter refer to programs, files, etc. that the terminal device needs to call to drive the Bluetooth adapter. For example, the attribute parameters of the Bluetooth adapter may include corresponding drivers, dynamic link library (DLL) files, and service programs.

具體地,請參閱圖4,步驟S103可包括:Specifically, referring to FIG. 4, step S103 may include:

步驟S1031:根據設置指令而調用藍牙轉接器所對應的驅動程式和服務程式,並生成對應的動態鏈接程式庫文件調用指令;Step S1031: calling the driver and service program corresponding to the Bluetooth adapter according to the setting instruction, and generating a corresponding dynamic link library file calling instruction;

步驟S1032:根據動態鏈接程式庫文件調用指令而調用相應的動態鏈接程式庫文件;Step S1032: calling the corresponding dynamic link library file according to the dynamic link library file calling instruction;

步驟S1033:存儲調用出的驅動程式、動態鏈接程式庫文件和服務程式,並根據調用出的驅動程式、動態鏈接程式庫文件和服務程式而驅動藍牙轉接器。Step S1033: Store the called driver, dynamic link library file, and service program, and drive the Bluetooth adapter according to the called driver, dynamic link library file, and service program.

其中,終端設備中可預先存儲有調用相容的藍牙轉接器所需要的驅動程式、動態鏈接程式庫文件和服務程式,在接收到對藍牙轉接器的設置指令時,根據指令中所包含的資訊,調用相應的程式、檔進行後續操作。Wherein, the terminal device may have stored in advance a driver, a dynamic link library file and a service program required to call a compatible Bluetooth adapter. When receiving a setting instruction for the Bluetooth adapter, according to the instruction contained in the instruction, Information, call the corresponding program, file for subsequent operations.

例如,在插拔通知信號表明藍牙轉接器執行的是插入操作,且藍牙轉接器的匹配資訊信號表明在終端設備中存儲有匹配當前藍牙轉接器的廠家識別字和版本序號時,則可調用存儲在記憶體中的藍牙轉接器對應的驅動程式和服務程式,並進一步根據驅動程式和服務程式調用對應的動態鏈接程式庫文件,即終端設備根據藍牙轉接器的配置資訊運行Android系統中的藍牙應用層和藍牙協定疊(protocol stack),並在USB介面與藍牙協定疊間建立連接。其中,動態鏈接程式庫文件即藍牙協定疊庫,不同生產廠商的藍牙轉接器對應不同的動態鏈接程式庫文件。For example, when the plug-in notification signal indicates that the Bluetooth adapter is performing a plug-in operation, and the matching information signal of the Bluetooth adapter indicates that the terminal device stores the manufacturer identification word and version number that match the current Bluetooth adapter, then Can call the corresponding driver and service program of the Bluetooth adapter stored in the memory, and further call the corresponding dynamic link library file according to the driver and service program, that is, the terminal device runs Android according to the configuration information of the Bluetooth adapter The Bluetooth application layer and the Bluetooth protocol stack in the system establish a connection between the USB interface and the Bluetooth protocol stack. Among them, the dynamic link library file is the Bluetooth protocol stack library, and Bluetooth adapters of different manufacturers correspond to different dynamic link library files.

進一步地,藍牙轉接器將終端設備通過USB介面發送的主機控制介面(Host Controller Interface,HCI)命令通過該藍牙轉接器中內建的藍牙晶片發出,並將自身的藍牙晶片接收到的射頻信號轉化為HCI事件,並通過USB介面發送至終端設備,進而為終端設備提供藍牙功能。Further, the Bluetooth adapter sends a host controller interface (HCI) command sent by the terminal device through the USB interface through the built-in Bluetooth chip in the Bluetooth adapter, and receives the radio frequency received by the Bluetooth chip. The signal is converted into an HCI event and sent to the terminal device through the USB interface, which provides the terminal device with a Bluetooth function.

具體地,在一個應用場景中,藍牙轉接器A插入終端設備的USB介面當中,自動載入藍牙轉接器A驅動,並調用藍牙轉接器A對應廠商的協定疊庫,驅動藍牙轉接器A進行工作,從而實現終端設備的藍牙功能。而在藍牙轉接器A從終端設備的USB介面拔出時,系統自動關閉藍牙清除藍牙轉接器A協定疊庫資訊,並卸載藍牙A的驅動程式、服務程式;進一步地,在藍牙轉接器B的USB介面當中,自動載入藍牙轉接器B驅動,並調用藍牙轉接器B對應廠商的協定疊庫,驅動藍牙轉接器B進行工作,終端設備實現藍牙功能。在藍牙轉接器B從終端設備的USB介面拔出時,系統自動關閉藍牙清除藍牙轉接器B協定疊庫資訊,並卸載藍牙B的驅動程式、服務程式。Specifically, in an application scenario, the Bluetooth adapter A is inserted into the USB interface of the terminal device, the Bluetooth adapter A driver is automatically loaded, and the protocol stack library corresponding to the manufacturer of the Bluetooth adapter A is called to drive the Bluetooth adapter. Device A works to achieve the Bluetooth function of the terminal device. When the Bluetooth adapter A is unplugged from the USB interface of the terminal device, the system automatically turns off Bluetooth to clear the Bluetooth adapter A protocol stack information, and uninstalls the Bluetooth A driver and service program; further, the Bluetooth adapter In the USB interface of the device B, the Bluetooth adapter B driver is automatically loaded, and the protocol stack library corresponding to the manufacturer of the Bluetooth adapter B is called to drive the Bluetooth adapter B to work, and the terminal device implements the Bluetooth function. When the Bluetooth adapter B is unplugged from the USB interface of the terminal device, the system automatically turns off Bluetooth to clear the Bluetooth adapter B protocol stack information, and uninstalls the Bluetooth B driver and service program.

而在終端設備根據插拔操作通知信號獲知藍牙轉接器當前執行的是拔出操作,或者藍牙轉接器的匹配資訊信號表明在終端設備中沒有存儲匹配當前藍牙轉接器的廠家識別字和版本序號時,顯然,藍牙轉接器無需再進行後續操作。And the terminal device learns that the Bluetooth adapter is currently performing the unplug operation according to the plug-in operation notification signal, or the matching information signal of the Bluetooth adapter indicates that the manufacturer ’s identification word and the current Bluetooth adapter are not stored in the terminal device. When the version is serialized, it is clear that the Bluetooth adapter does not need to perform subsequent operations.

在終端設備的USB介面上插接不同廠商生產的藍牙轉接器時,調用對應的動態鏈接程式庫文件即可,從而不限定終端設備對應的藍牙晶片,使得使用者能夠根據自己的需求選擇使用不同廠商的藍牙晶片,而無需限定於習知技術中基於Android系統的終端設備內所內建的藍牙晶片。同時,在一些情況下,使用者可能不需要使用終端設備的藍牙功能,此時,便可以在終端設備中不內建藍牙晶片,從而能夠降低終端設備的成本。When plugging Bluetooth adapters from different manufacturers on the USB interface of the terminal device, the corresponding dynamic link library file can be called, so that the Bluetooth chip corresponding to the terminal device is not limited, so that users can choose to use according to their needs. The Bluetooth chips of different manufacturers need not be limited to the Bluetooth chips built into the terminal devices based on the Android system in the conventional technology. At the same time, in some cases, the user may not need to use the Bluetooth function of the terminal device. At this time, the Bluetooth chip may not be built in the terminal device, thereby reducing the cost of the terminal device.

請參閱圖5,圖5是本發明基於Android系統的終端設備一實施方式的結構示意圖。Please refer to FIG. 5, which is a schematic structural diagram of an embodiment of a terminal device based on the Android system according to the present invention.

其中,該基於Android系統的終端設備是指運載有Android系統的終端設備,例如基於Android系統的智慧電視、機上盒等,進一步需要指出的是,本實施方式中的終端設備是指沒有在內部內建藍牙晶片的終端設備。Wherein, the terminal device based on the Android system refers to a terminal device carrying the Android system, such as a smart TV based on the Android system, a set-top box, and the like. It should further be noted that the terminal device in this embodiment refers to a terminal device that is not internally connected. A terminal device with a built-in Bluetooth chip.

具體地,該基於Android系統的終端設備包括:讀取模組11、識別模組12以及屬性設置模組13。Specifically, the terminal device based on the Android system includes a reading module 11, an identification module 12, and an attribute setting module 13.

其中,讀取模組11用於接收外設的藍牙轉接器的插拔操作,且讀取藍牙轉接器的匹配資訊,以獲知當前執行插拔操作的藍牙轉接器的一對應資訊;識別模組12,與讀取模組11連接,以接收藍牙轉接器的匹配資訊並根據藍牙轉接器的匹配資訊而識別出藍牙轉接器,並根據藍牙轉接器的對應資訊根據藍牙轉接器的對應資訊生成相應的設置指令;屬性設置模組13,與識別模組12連接,以接收設置指令並根據設置指令調用匹配藍牙轉接器的屬性參數,從而使終端設備能夠根據屬性參數而驅動藍牙轉接器。其中,讀取模組11、識別模組12以及屬性設置模組13與處理器和記憶體相連接,是通過處理器執行記憶體中存儲的相應的程式指令而實現的。The reading module 11 is used to receive the plug-in operation of the Bluetooth adapter of the peripheral device, and read the matching information of the Bluetooth adapter to obtain a corresponding information of the Bluetooth adapter currently performing the plug-in operation; The identification module 12 is connected to the reading module 11 to receive the matching information of the Bluetooth adapter and identify the Bluetooth adapter based on the matching information of the Bluetooth adapter. The corresponding information of the adapter generates corresponding setting instructions; the property setting module 13 is connected to the identification module 12 to receive the setting instructions and call matching attribute parameters of the Bluetooth adapter according to the setting instructions, so that the terminal device can Parameters while driving the Bluetooth adapter. The reading module 11, the identification module 12, and the attribute setting module 13 are connected to the processor and the memory, and are implemented by the processor executing corresponding program instructions stored in the memory.

具體地,藍牙轉接器為USB藍牙轉接器。Specifically, the Bluetooth adapter is a USB Bluetooth adapter.

本實施方式中,USB介面包括USB任務和USB驅動,USB藍牙轉接器能夠通過終端設備的USB介面插接在該終端設備上,從而進一步能夠實現基於Android系統的隨插即用的藍牙資料傳輸。In this embodiment, the USB interface includes a USB task and a USB driver. The USB Bluetooth adapter can be connected to the terminal device through the USB interface of the terminal device, thereby further enabling plug-and-play Bluetooth data transmission based on the Android system. .

具體地,請參閱圖6,讀取模組11包括:讀取單元111,插拔操作識別單元112及匹配信號生成單元113。Specifically, referring to FIG. 6, the reading module 11 includes a reading unit 111, a plug-in operation identification unit 112, and a matching signal generating unit 113.

其中,讀取單元111用於接收藍牙轉接器的插拔操作,且讀取藍牙轉接器的匹配資訊;The reading unit 111 is configured to receive a plug-in operation of a Bluetooth adapter, and read matching information of the Bluetooth adapter;

在一個應用場景中,藍牙轉接器的匹配資訊包括藍牙轉接器的廠家識別字和版本序號。In one application scenario, the matching information of the Bluetooth adapter includes the manufacturer identification and version number of the Bluetooth adapter.

插拔操作識別單元112連接讀取單元111,以識別藍牙轉接器執行的是插入操作還是拔出操作,並生成相應的插拔操作識別信號;The plug-in operation identification unit 112 is connected to the reading unit 111 to identify whether the Bluetooth adapter performs a plug-in operation or a pull-out operation, and generates a corresponding plug-in operation identification signal;

匹配信號生成單元113連接讀取單元111及讀取單元111,以根據藍牙轉接器的匹配資訊生成相應的藍牙轉接器的匹配資訊信號。The matching signal generating unit 113 is connected to the reading unit 111 and the reading unit 111 to generate a matching information signal of the corresponding Bluetooth adapter according to the matching information of the Bluetooth adapter.

具體地,請參閱圖7,識別模組12包括:判斷單元120,插拔操作通知單元121,和指令生成單元122。Specifically, referring to FIG. 7, the identification module 12 includes a determination unit 120, a plug-in operation notification unit 121, and an instruction generation unit 122.

其中,判斷單元120,用於根據藍牙轉接器的匹配資訊,判斷當前的藍牙轉接器與該終端設備是否相容;The judging unit 120 is configured to judge whether the current Bluetooth adapter is compatible with the terminal device according to the matching information of the Bluetooth adapter;

具體地,終端設備可預先存儲與該終端設備相容的藍牙轉接器的廠家識別字和/或對應的版本序號,在檢測到有藍牙轉接器與該終端設備發生連接時,獲取當前的藍牙轉接器的對應的廠家識別字以及對應的版本序號,並確認在終端設備的記憶體中是否存儲有與之對應的廠家識別字以及對應的版本序號,在存儲有當前藍牙轉接器的上述匹配資訊時,則說明當前的藍牙轉接器與該終端設備相容,反之,藍牙轉接器與該終端設備不相容。Specifically, the terminal device may store a manufacturer identifier and / or a corresponding version number of a Bluetooth adapter compatible with the terminal device in advance, and when a connection between the Bluetooth adapter and the terminal device is detected, the current The corresponding manufacturer identification word and corresponding version number of the Bluetooth adapter, and confirm whether the corresponding manufacturer identification word and corresponding version number are stored in the memory of the terminal device. The above matching information indicates that the current Bluetooth adapter is compatible with the terminal device; otherwise, the Bluetooth adapter is not compatible with the terminal device.

插拔操作通知單元121,與所述判斷單元120連接,用於在判斷單元120的判斷結果為相容時接收對應資訊中的插拔操作識別信號產生相應的插拔操作通知信號;The plugging operation notification unit 121 is connected to the judging unit 120, and is configured to receive a plugging operation identification signal in corresponding information to generate a corresponding plugging operation notification signal when the judgment result of the judging unit 120 is compatible;

指令生成單元122,與所述判斷單元120和所述插拔操作通知單元121連接,用於在判斷單元120的判斷結果為相容時,接收從插拔操作通知單元121所傳來的插拔操作通知信號和從匹配資訊生成單元113所傳來的藍牙轉接器的匹配資訊信號,根據插拔操作通知信號和藍牙轉接器的匹配資訊信號而生成相應的設置指令;在判斷單元120的判斷結果是不相容時,發出終止終端設備運行相關程式的設置指令。The instruction generating unit 122 is connected to the judging unit 120 and the plugging operation notification unit 121, and is configured to receive the plugging and unplugging from the plugging operation notification unit 121 when the judgment result of the judging unit 120 is compatible. The operation notification signal and the matching information signal of the Bluetooth adapter transmitted from the matching information generating unit 113 generate corresponding setting instructions according to the plugging operation notification signal and the matching information signal of the Bluetooth adapter; in the determination unit 120, When the judgment result is incompatible, a setting instruction for terminating the operation of the terminal device related program is issued.

容易理解地,當指令生成單元122所接收的插拔操作通知信號表明藍牙轉接器執行的是拔出操作時,指令生成單元將設置指令設置成空值。具體地,藍牙轉接器的屬性參數包括對應的驅動程式、動態鏈接程式庫文件和服務程式。It is easy to understand that when the plug-in operation notification signal received by the instruction generating unit 122 indicates that the Bluetooth adapter is performing the unplugging operation, the instruction generating unit sets the setting instruction to a null value. Specifically, the attribute parameters of the Bluetooth adapter include corresponding drivers, dynamic link library files, and service programs.

其中,請參閱圖8,屬性設置模組13包括:屬性處理單元131、動態鏈接程式庫文件處理單元132及存儲單元133。Referring to FIG. 8, the attribute setting module 13 includes an attribute processing unit 131, a dynamic link library file processing unit 132, and a storage unit 133.

屬性處理單元131用於根據設置指令而調用藍牙轉接器所對應的驅動程式和服務程式,並生成對應的動態鏈接程式庫文件調用指令;The attribute processing unit 131 is configured to call a driver and a service program corresponding to the Bluetooth adapter according to a setting instruction, and generate a corresponding dynamic link library file calling instruction;

動態鏈接程式庫文件處理單元132,與屬性處理單元131連接,用於接收動態鏈接程式庫文件調用指令從而調用相應的動態鏈接程式庫文件;The dynamic link library file processing unit 132 is connected to the attribute processing unit 131 and is configured to receive a dynamic link library file call instruction to call a corresponding dynamic link library file;

存儲單元133,與屬性處理單元131及動態鏈接程式庫文件處理單元132連接,用於存儲調用出的驅動程式、動態鏈接程式庫文件和服務程式。The storage unit 133 is connected to the attribute processing unit 131 and the dynamic link library file processing unit 132, and is configured to store the called driver program, the dynamic link library file, and the service program.

其中,上述實施方式中,讀取模組11、識別模組12及屬性設置模組13及其包括的各單元所執行的操作與上述本發明基於Android系統的藍牙適配方法實施方式中的流程相同,具體請參見上述實施方式,此處不再贅述。Wherein, in the foregoing embodiment, the operations performed by the reading module 11, the identification module 12, the attribute setting module 13 and the units included in it, and the processes in the foregoing embodiment of the Bluetooth system adaptation method of the present invention based on the present invention It is the same. For details, refer to the foregoing embodiment, and details are not described herein again.

上述實施方式中,可在終端設備的USB介面上插接不同廠商生產的藍牙轉接器,而在插接不同廠商生產的藍牙轉接器時,調用對應的動態鏈接程式庫文件即可,從而不限定終端設備對應的藍牙晶片,使得使用者能夠根據自己的需求選擇使用不同廠商的藍牙晶片。同時,在一些情況下,使用者可能不需要使用終端設備的藍牙功能,此時,不在終端設備中內建藍牙晶片,能夠降低終端設備的成本。In the above embodiment, a Bluetooth adapter made by a different manufacturer can be plugged into the USB interface of the terminal device, and when a Bluetooth adapter made by a different manufacturer is plugged in, the corresponding dynamic link library file can be called, so that The Bluetooth chip corresponding to the terminal device is not limited, so that users can choose to use Bluetooth chips of different manufacturers according to their own needs. At the same time, in some cases, the user may not need to use the Bluetooth function of the terminal device. At this time, the Bluetooth chip is not built in the terminal device, which can reduce the cost of the terminal device.

以上所述僅為本發明的實施方式,並非因此限制本發明的專利範圍,凡是利用本發明說明書及附圖內容所作的等效結構或等效流程變換,或直接或間接運用在其他相關的技術領域,均同理包括在本發明的申請專利範圍內。The above description is only an embodiment of the present invention, and thus does not limit the scope of the patent of the present invention. Any equivalent structure or equivalent process transformation made by using the description and drawings of the present invention, or directly or indirectly applied to other related technologies The fields are equally included in the scope of patent application of the present invention.

11‧‧‧讀取模組11‧‧‧Read Module

12‧‧‧識別模組12‧‧‧Identification Module

13‧‧‧屬性設置模組13‧‧‧Attribute Setting Module

111‧‧‧讀取單元111‧‧‧Reading unit

112‧‧‧插拔操作識別單元112‧‧‧Plug-out operation identification unit

113‧‧‧匹配信號生成單元113‧‧‧matching signal generating unit

120‧‧‧判斷單元120‧‧‧ Judgment Unit

121‧‧‧插拔操作通知單元121‧‧‧ Plug-in operation notification unit

122‧‧‧指令生成單元122‧‧‧Instruction generating unit

131‧‧‧屬性處理單元131‧‧‧Attribute processing unit

132‧‧‧動態鏈接程式庫文件處理單元132‧‧‧Dynamic link library file processing unit

133‧‧‧存儲單元133‧‧‧Storage unit

S101~S103、S1011~S1013、S1020~S1023、S1031~S1033‧‧‧步驟S101 ~ S103, S1011 ~ S1013, S1020 ~ S1023, S1031 ~ S1033‧‧‧Steps

[圖1]為本發明基於Android系統的藍牙適配方法一實施方式的流程示意圖; [圖2]為圖1中步驟S101的流程示意圖; [圖3]為圖1中步驟S102的流程示意圖; [圖4]為圖1中步驟S103的流程示意圖; [圖5]為本發明基於Android系統的終端設備一實施方式的功能方塊圖; [圖6]為圖5中讀取模組11的功能方塊圖; [圖7]為圖5中識別模組12的功能方塊圖;以及 [圖8]為圖5中設置模組13的功能方塊圖。[FIG. 1] is a schematic flowchart of an embodiment of the Bluetooth-based adaptation method based on the Android system of the present invention; [FIG. 2] is a schematic flowchart of step S101 in FIG. 1; [FIG. 3] is a schematic flowchart of step S102 in FIG. 1; [Fig. 4] is a schematic flowchart of step S103 in Fig. 1; [Fig. 5] is a functional block diagram of an embodiment of a terminal device based on the Android system of the present invention; [Fig. 6] is a function of the reading module 11 in Fig. 5 Block diagram; [Fig. 7] is a functional block diagram of the identification module 12 in Fig. 5; and [Fig. 8] is a functional block diagram of the setting module 13 in Fig. 5.

Claims (16)

一種基於安卓(Android)系統的藍牙適配方法,包括: 讀取藍牙轉接器的匹配資訊,以獲知當前執行插拔操作的藍牙轉接器的對應資訊; 根據所述藍牙轉接器的匹配資訊而識別出執行插拔操作的所述藍牙轉接器,並根據所述藍牙轉接器的對應資訊發出相應的設置指令; 根據所述設置指令而調用匹配所述藍牙轉接器的屬性參數,從而根據所述屬性參數而驅動所述藍牙轉接器。A Bluetooth adaptation method based on the Android system includes: reading matching information of a Bluetooth adapter to obtain corresponding information of a Bluetooth adapter currently performing a plug-in operation; and matching according to the Bluetooth adapter Information to identify the Bluetooth adapter that performs the plug and unplug operation, and issue a corresponding setting instruction according to the corresponding information of the Bluetooth adapter; and call and match the attribute parameters of the Bluetooth adapter according to the setting instruction So as to drive the Bluetooth adapter according to the attribute parameter. 如申請專利範圍第1項所述的藍牙適配方法,其中,所述藍牙轉接器為一USB藍牙轉接器。The Bluetooth adaptation method according to item 1 of the scope of patent application, wherein the Bluetooth adapter is a USB Bluetooth adapter. 如申請專利範圍第1項所述的藍牙適配方法,其中,讀取藍牙轉接器的匹配資訊以獲知當前執行插拔操作的藍牙轉接器的對應資訊的步驟,進一步包括: 讀取當前執行插拔操作的藍牙轉接器的匹配資訊; 識別所述藍牙轉接器執行的是插入操作還是拔出操作,並生成相應的插拔操作識別信號; 根據所述藍牙轉接器的匹配資訊,生成相應的所述藍牙轉接器的匹配資訊信號,以生成所述對應資訊; 其中所述對應資訊包含所述插拔操作識別信號和所述匹配資訊信號。The Bluetooth adaptation method according to item 1 of the scope of patent application, wherein the step of reading the matching information of the Bluetooth adapter to obtain the corresponding information of the Bluetooth adapter currently performing the plugging operation further comprises: reading the current Matching information of the Bluetooth adapter performing the plug-in operation; identifying whether the Bluetooth adapter is performing the plug-in operation or the pull-out operation, and generating a corresponding plug-in operation identification signal; according to the matching information of the Bluetooth adapter To generate a corresponding matching information signal of the Bluetooth adapter to generate the corresponding information; wherein the corresponding information includes the plugging operation identification signal and the matching information signal. 如申請專利範圍第3項所述的藍牙適配方法,其中,所述藍牙轉接器的匹配資訊包括所述藍牙轉接器的廠家識別字和版本序號。The Bluetooth adaptation method according to item 3 of the scope of patent application, wherein the matching information of the Bluetooth adapter includes a manufacturer identification word and a version number of the Bluetooth adapter. 如申請專利範圍第3項所述的藍牙適配方法,其中,根據所述藍牙轉接器的匹配資訊而識別出執行插拔操作的所述藍牙轉接器,並根據所述藍牙轉接器的對應資訊發出相應的設置指令的步驟,進一步包括: 根據藍牙轉接器的匹配資訊,判斷當前的藍牙轉接器與該終端設備是否相容; 在判斷結果是相容時,根據所述藍牙轉接器的對應資訊中的所述插拔操作識別信號產生相應的插拔操作通知信號; 在判斷結果是相容時,根據所述插拔操作通知信號和所述藍牙轉接器的對應資訊中的匹配資訊信號而生成相應的所述設置指令;以及 在判斷結果是不相容時,發出終止終端設備運行相關程式的設置指令。The Bluetooth adaptation method according to item 3 of the scope of patent application, wherein the Bluetooth adapter that performs the plug-in operation is identified according to the matching information of the Bluetooth adapter, and according to the Bluetooth adapter The step of issuing a corresponding setting instruction corresponding to the corresponding information further includes: determining whether the current Bluetooth adapter is compatible with the terminal device according to the matching information of the Bluetooth adapter; and when the determination result is compatible, according to the Bluetooth The plugging operation identification signal in the corresponding information of the adapter generates a corresponding plugging operation notification signal; when the determination result is compatible, according to the plugging operation notification signal and the corresponding information of the Bluetooth adapter The corresponding information setting instruction is generated by the matching information signal; and when the judgment result is incompatible, a setting instruction for terminating the terminal device to run the related program is issued. 如申請專利範圍第5項所述的藍牙適配方法,其中,當所述插拔操作通知信號表明所述藍牙轉接器執行的是拔出操作時,所述設置指令設置成空值。The Bluetooth adaptation method according to item 5 of the scope of patent application, wherein the setting instruction is set to a null value when the plug-in operation notification signal indicates that the Bluetooth adapter performs a pull-out operation. 如申請專利範圍第5項所述的藍牙適配方法,其中,所述藍牙轉接器的屬性參數包括對應的驅動程式、動態鏈接程式庫文件和服務程式。The Bluetooth adaptation method according to item 5 of the scope of patent application, wherein the attribute parameters of the Bluetooth adapter include a corresponding driver, a dynamic link library file, and a service program. 如申請專利範圍第7項所述的藍牙適配方法,其中,根據所述設置指令而調用匹配所述藍牙轉接器的屬性參數從而根據所述屬性參數而驅動所述藍牙轉接器的步驟,進一步包括: 根據所述設置指令而調用所述藍牙轉接器所對應的驅動程式和服務程式,並生成對應的動態鏈接程式庫文件調用指令; 根據所述動態鏈接程式庫文件調用指令而調用相應的動態鏈接程式庫文件; 存儲調用出的所述驅動程式、動態鏈接程式庫文件和服務程式,並根據調用出的所述驅動程式、動態鏈接程式庫文件和服務程式而驅動所述藍牙轉接器。The Bluetooth adaptation method according to item 7 of the scope of patent application, wherein the step of matching the attribute parameter of the Bluetooth adapter according to the setting instruction is invoked to drive the Bluetooth adapter according to the attribute parameter. And further comprising: calling a driver and a service program corresponding to the Bluetooth adapter according to the setting instruction, and generating a corresponding dynamic link library file calling instruction; and calling according to the dynamic link library file calling instruction The corresponding dynamic link library file; storing the called driver, dynamic link library file and service program, and driving the Bluetooth converter according to the called driver, dynamic link library file and service program接 器。 Connector. 一種基於安卓(Android)系統的終端設備,包括: 一讀取模組,其中,所述讀取模組用於接收外設的藍牙轉接器的插拔操作,且讀取藍牙轉接器的匹配資訊以獲知所述藍牙轉接器的對應資訊; 一識別模組,與所述讀取模組連接,以接收所述藍牙轉接器的匹配資訊並根據所述藍牙轉接器的匹配資訊而識別出所述藍牙轉接器,並根據所述藍牙轉接器的對應資訊生成相應的設置指令; 一屬性設置模組,與所述識別模組連接,以接收所述設置指令並根據所述設置指令調用匹配所述藍牙轉接器的屬性參數,從而使所述終端能夠根據所述屬性參數而驅動所述藍牙轉接器。A terminal device based on the Android system includes: a reading module, wherein the reading module is used for receiving a plug-in operation of a Bluetooth adapter of a peripheral device, and reading a Bluetooth adapter; Matching information to obtain the corresponding information of the Bluetooth adapter; an identification module connected to the reading module to receive the matching information of the Bluetooth adapter and according to the matching information of the Bluetooth adapter The Bluetooth adapter is identified, and a corresponding setting instruction is generated according to the corresponding information of the Bluetooth adapter; an attribute setting module is connected with the identification module to receive the setting instruction and The setting instruction calls matching attribute parameters of the Bluetooth adapter, so that the terminal can drive the Bluetooth adapter according to the attribute parameters. 如申請專利範圍第9項所述的終端設備,其中,所述藍牙轉接器為一USB藍牙轉接器。The terminal device according to item 9 of the scope of patent application, wherein the Bluetooth adapter is a USB Bluetooth adapter. 如申請專利範圍第9項所述的終端設備,其中,所述讀取模組包括: 一讀取單元,用於接收所述藍牙轉接器的插拔操作,且讀取藍牙轉接器的資訊以偵測所述藍牙轉接器的匹配資訊; 一插拔操作識別單元,連接所述讀取單元,以識別所述藍牙轉接器執行的是插入操作還是拔出操作,並生成相應的插拔操作識別信號; 一匹配資訊生成單元,連接所述讀取單元,以根據所述藍牙轉接器的匹配資訊,生成相應的所述藍牙轉接器的匹配資訊信號。The terminal device according to item 9 of the scope of patent application, wherein the reading module includes: a reading unit for receiving a plug-in operation of the Bluetooth adapter, and reading a Bluetooth adapter; Information to detect the matching information of the Bluetooth adapter; a plug-in operation identification unit connected to the reading unit to identify whether the Bluetooth adapter is performing an insert operation or a pull operation, and generate a corresponding Identification signal for plug-in operation; a matching information generating unit connected to the reading unit to generate a corresponding matching information signal of the Bluetooth adapter according to the matching information of the Bluetooth adapter. 如申請專利範圍第11項所述的終端設備,其中,所述藍牙轉接器的匹配資訊包括所述藍牙轉接器的廠家識別字和版本序號。The terminal device according to item 11 of the scope of patent application, wherein the matching information of the Bluetooth adapter includes a manufacturer identification word and a version number of the Bluetooth adapter. 如申請專利範圍第11項所述的終端設備,其中,所述識別模組包括: 一判斷單元,用於根據藍牙轉接器的匹配資訊判斷當前的藍牙轉接器與該終端設備是否相容; 一插拔操作通知單元,與所述判斷單元連接,用於在所述判斷單元的判斷結果是相容時,接收所述插拔操作識別信號從而產生相應的插拔操作通知信號; 一指令生成單元,與所述判斷單元和所述插拔操作通知單元連接,用於在所述判斷單元的結果為相容時,接收從所述插拔操作通知單元所傳來的插拔操作通知信號和從所述匹配信號生成單元所傳來的所述藍牙轉接器的匹配資訊信號,以根據所述插拔操作通知信號和所述藍牙轉接器的匹配資訊信號而生成相應的所述設置指令;並且在所述判斷單元的結果為不相容時,發出終止終端設備運行相關程式的設置指令。The terminal device according to item 11 of the scope of patent application, wherein the identification module includes: a judging unit for judging whether the current Bluetooth adapter is compatible with the terminal device according to the matching information of the Bluetooth adapter A plugging operation notification unit connected to the judging unit and configured to receive the plugging operation identification signal to generate a corresponding plugging operation notification signal when the judgment result of the judging unit is compatible; an instruction A generating unit, connected to the judging unit and the plugging operation notification unit, and configured to receive a plugging operation notification signal transmitted from the plugging operation notification unit when the result of the judging unit is compatible And the matching information signal of the Bluetooth adapter transmitted from the matching signal generating unit to generate the corresponding setting according to the plugging operation notification signal and the matching information signal of the Bluetooth adapter. An instruction; and when the result of the judgment unit is incompatible, a setting instruction for terminating the operation of the terminal-related program is issued. 如申請專利範圍第13項所述的終端設備,其中,當所述指令生成單元所接收的所述插拔操作通知信號表明所述藍牙轉接器執行的是拔出操作時,所述指令生成單元將所述設置指令設置成空值。The terminal device according to item 13 of the scope of patent application, wherein when the plug-in operation notification signal received by the instruction generating unit indicates that the Bluetooth adapter is performing a plug-out operation, the instruction is generated The unit sets the setting instruction to a null value. 如申請專利範圍第13項所述的終端設備,其中,所述藍牙轉接器的屬性參數包括對應的驅動程式、動態鏈接程式庫文件和服務程式。The terminal device according to item 13 of the scope of patent application, wherein the attribute parameters of the Bluetooth adapter include corresponding drivers, dynamic link library files, and service programs. 如申請專利範圍第15項所述的終端設備,其中,所述屬性設置模組包括: 一屬性處理單元,用於根據所述設置指令而調用所述藍牙轉接器所對應的驅動程式和服務程式,並生成對應的動態鏈接程式庫文件調用指令; 一動態鏈接程式庫文件處理單元,用於接收所述動態鏈接程式庫文件調用指令從而調用相應的動態鏈接程式庫文件; 一存儲單元,用於存儲調用出的所述驅動程式、動態鏈接程式庫文件和服務程式。The terminal device according to item 15 of the scope of patent application, wherein the attribute setting module comprises: an attribute processing unit for invoking a driver and a service corresponding to the Bluetooth adapter according to the setting instruction A program and generates a corresponding dynamic link library file call instruction; a dynamic link library file processing unit for receiving the dynamic link library file call instruction to call the corresponding dynamic link library file; a storage unit for The stored driver, the dynamic link library file and the service program are stored.
TW107134670A 2018-03-30 2018-10-01 Bluetooth adaptation method and terminal device based on Android system TW201943249A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
??201810288748.4 2018-03-30
CN201810288748.4A CN108738000A (en) 2018-03-30 2018-03-30 Based on Android(Android)The bluetooth adaptation method and terminal device of system

Publications (1)

Publication Number Publication Date
TW201943249A true TW201943249A (en) 2019-11-01

Family

ID=63940631

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107134670A TW201943249A (en) 2018-03-30 2018-10-01 Bluetooth adaptation method and terminal device based on Android system

Country Status (2)

Country Link
CN (1) CN108738000A (en)
TW (1) TW201943249A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819108B (en) * 2019-01-04 2021-03-02 Oppo广东移动通信有限公司 Method and device for adjusting driving parameters, electronic equipment and storage medium
CN110366039A (en) * 2019-07-12 2019-10-22 四川长虹电器股份有限公司 The compatibility method of different bluetooth mould groups under a kind of android system
CN110333790B (en) * 2019-07-12 2024-04-02 北京科加触控技术有限公司 Fitting device and writing equipment
CN111954039B (en) * 2020-07-02 2022-07-01 深圳市华曦达科技股份有限公司 Set top box Bluetooth configuration method and device, electronic equipment and storage medium
CN114615527A (en) * 2020-11-25 2022-06-10 中兴通讯股份有限公司 Hot-plug equipment information transmission method, computer equipment and readable medium
CN114070721B (en) * 2021-11-16 2023-07-28 中国联合网络通信集团有限公司 Module information determining method, terminal and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040058521A (en) * 2002-12-27 2004-07-05 주식회사 하이닉스반도체 Multifounctional bluetooth device having function of interfacing Universal Serial Bus
CN101634976B (en) * 2009-08-27 2012-02-29 中兴通讯股份有限公司 Method and terminal for providing Bluetooth function for computer
CN101730303B (en) * 2009-11-19 2013-03-27 杭州竞天数码科技有限公司 System compatible with multiple wireless transmission modules and implementation method thereof
CN102082969B (en) * 2010-10-29 2013-03-27 广东星海数字家庭产业技术研究院有限公司 External Bluetooth equipment driving system for set-top box
CN102314171B (en) * 2011-04-29 2013-05-08 重庆长安汽车股份有限公司 Parameter matching calibration tool based on CAN (Controller Area Network) bus
CN104469482A (en) * 2014-12-19 2015-03-25 乐视致新电子科技(天津)有限公司 Control method and device for connection of intelligent terminal and Bluetooth devices
CN105162498B (en) * 2015-09-28 2018-09-25 飞天诚信科技股份有限公司 Bluetooth adapter and its communication means
CN205644464U (en) * 2016-04-11 2016-10-12 曲天昱 Multi -functional bluetooth wireless mouse

Also Published As

Publication number Publication date
CN108738000A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
TW201943249A (en) Bluetooth adaptation method and terminal device based on Android system
US7415563B1 (en) Method and system for allowing a media player to determine if it supports the capabilities of an accessory
TW457428B (en) Computer system, memory device, converter system and recording medium
US8943232B2 (en) System method for enumerating client devices embedded in a user device during reboot, wake up or restart of user device
US8725082B2 (en) Dongle and method for operating external input means, and external input system with the dongle
US20150100707A1 (en) Re-enumeration of usb 3.0 compatible devices
US20060160569A1 (en) Cellular phone and portable storage device using the same
US8533370B2 (en) Device and method for enabling a host apparatus to access a peripheral device
US10782799B2 (en) Smart pen pairing and connection
US10146554B2 (en) Extraction of operating system-specific characteristics via a communication interface
US10423566B2 (en) Electronic device and method for controlling external electronic device connected to USB type-C connector
CN115066877B (en) Electronic device and method for identifying an audio output device connected to a USB Type-C connector
KR20210034431A (en) An electronic device supporting connection with external device and power consumption reducing method when using in connection with the external device
US10257363B2 (en) Coordinating input on multiple local devices
CN109144586A (en) A kind of driving adaptation method, device, computer equipment and storage medium
US10521385B2 (en) Inter-device digital audio
US10515025B2 (en) Communication protocol adapter
CN101163304A (en) Method and system for processing files of peripheral equipment and a mobile terminal
CN114691568A (en) Protocol adaptation method, storage medium, device and system for interconnection between devices
WO2017004876A1 (en) Method and terminal for configuring output current
CN108231131B (en) eMMC test method and device
CN101562007A (en) Display control device capable of automatically updating firmware and update method thereof
KR101475472B1 (en) Apparatus for controlling connection between devices
CN111045632B (en) Audio playing device and operation method thereof
TWI728363B (en) Integrated electronic apparatus for data access, data transmission and power management and method thereof