200814564 九、發明說明: 【發明所屬之技術領域】 本發明係有關一種配對連線方法,特別是關於一種藍芽裝置自動配對 連線方法。 【先前技術】 隨著無線通信技術的蓬勃發展,其中藍芽(Bluet00th)的無線傳輸技 術,可讓顧者不需魏線就可方便縣速進行語音及數據傳輪服務,且 紐距離、低功率及低成本的新技術已被廣泛應用。無論是通訊、資訊、多 媒體等可献終端機,都可以使賤麵術,彼此溝通相互傳送訊束,使 得它的應用遍及了手機、電腦週邊相關產品、家電、汽車、數位相機、網 路存取設備和視聽器材等。 不管是應用於何種領域,藍芽產品在使用之前都需要先經過必要的配 對過程’達成連線’才能夠真正使用。以藍料機為例,藍料機因其與 其他裝置連線安全性之考量,其連線步驟μ,在此係以料耳機與行動 電話配對為例說明整個流程:如第—圖所示,首先,使用者係如步驟· '、、須先將瓜牙耳機打開’選擇讓藍芽耳機進人步驟讀之可配對模式 (Pairing node) ·’接著’如步驟_所示,使用者必須進入行動電話中選 擇立打開現有的藍錢體,再手動選擇「搜尋藍芽裝置」,使其如步驟_ 所示開始搜尋_置,糊日__艮多藍芽裝置,則如步驟_口 會將所有政置列出來’提供使用者選擇其中一個欲配對之藍芽裝置 200814564 (藍牙耳機),隨即進行步驟S112;若在步驟疆中,行動電話只搜尋到 -個可用的藍芽耳機時,仍需進行步驟S11G來由使用者選擇此藍芽裝置, 才可進仃步驟S112由使用者手動輸入藍芽耳機的配對碼(_ c〇de),此 時在行動電話中需輸人—個正確密碼鱗認身份;最後即可如步驟_所 不’仃動電話與藍料機已完成連線並可開始使用,使用者可藉由藍芽無 線傳輸之功能接收音樂或聲音訊號。 、 然而,在上述煩瑣的操作過程中,因配對與連線之動作相當複雜,卷 有錯誤產生時’使用者不㈣認進行到哪―步驟,也無法判斷是否有需要 重新開始,造献用者相當大的困擾。再者,因藍芽耳機輕薄短小的設計, 所以-般都只能藉由燈絲得知耳機目前的狀態,但每種品牌的藍芽耳機 之燈翻色不同’慢速嶋與快速閃麟㈣表不同的意思,導致使用者 使用前必須先熟讀使时冊,方可綱完成配對;另外由於配觸程中需 要輸入密碼’再加上各家藍料機之密碼不全然相同,使用者亦需花費韻 外的時間翻辭冊轉找正確之密碼,相當麻煩。 有於此本發明遂提供一種藍芽裝置自動配對連線方法,令使用者 旎更容易使用任何型式的藍芽裝置。 【發明内容】 本發明之主要目的係在提供一種藍芽裝置自動配對連線方法,其係可 簡化習知搜*、對及連線等繁雜的人為操作步驟,提供自動的連線設定 功月b ’讓使用者可達到隨插即_功能,免除使用者額外的學習與設定。 本發明之另一目的係在提供一種可「簡化操作流程、縮短操作時間」 200814564 的藍芽裝置自動配對連線方法,以達到使用藍隸置的便利性與快捷性。 為達到上述之目的,在本發明之方法中,首先開啟至少—藍芽裝置, 並啟動、、端機⑽藍芽自動轉連線軟體,使此終端機自動搜賴選周邊 的藍芽m只搜尋到-織芽裝置,則直接進行自動配對連線;若搜 尋到二個以上的藍芽裝置’則會㈣出所有搜尋到的藍芽裝置,以供使用 者選擇,在使用者確定欲崎之封裝置後,即會根據該藍雜置而自動 輸入相對應_觸至終韻,錄芽裝置與終端機雙方自動完成連線。 底下藉由具體實施麻合__式詳加說明,當更容練解本發明 之目的、技術内容、特點及其所達成之功效。 【貫施方式】 本發明係整合财歸的硬體控制軟體套件與終端機作㈣統之使用 者界面的結合,自_識仙者觸的歸裝置,並自動完成藍芽裝置的 配對連線舰,以取代原本使財需魏自操作_瑣過程。 本發明之自動配對連線_可廣泛制於終端機與任何藍芽裝置的 配對連線’當然,終謝轨電㈣記型_,樹動電話、個 人數位助理等個人行練置等,只要鱗有作料統或嵌人式系統的電子 _可完縣發明之流程;提供配對之料_ 料機、藍芽 狀藍牙鍵盤、皇牙全球定位裝置或藍»八等内建有藍芽收發晶片的 電子產品皆可適用。 芽耳機為貫施例,詳細說明本發明之技術 底下係藉由一行動電話與藍 特徵。 200814564 第二圖為本發明在進行配對連線的流程圖,如圖所示,使用者係如步 驟S200先打開藍芽耳機,並啟動行動電話中的藍芽自動配對連線軟體。啟 動後,如步驟S202所示,行動電話系統會先判斷此一藍芽耳機是否曾經配 對連線過;若此藍芽耳機曾經與該行動電話配對連線過,則直接進行步驟 S212 ’若否,表示此藍芽耳機係首次與該行動電話進行配對連線,此時則 進行下一步驟S204。 其中,如果藍芽耳機曾經與該行動電話配對連線過,則在上次的配對 連線過程巾,在行動電話之作鮮統絲人絲助即會記錄—些藍芽耳 機本身的資訊,包括藍料機的媒體存取控制位址( Address)、藍芽 耳機的名稱、藍料機的類型等;#該行動電話中之藍芽自動配對連線軟 體下次啟動、並且觸曾經與此藍料機配對連線過的時候,便會自動去 系統内的靖财料過去的龍,織錢藍料機進行連線動 作,直接省略巾_鱗_配解流程。在祕件下,如紐線動作無 法完成,祕會自動判斷使用者應該是未開啟電腦或嵌人絲統等終端機 端的藍芽裝置(例如,未插入藍芽㈣e),或是未開啟欲使用的藍芽裝置 (例如,藍料機);在此種情形下,线會提醒使用者終端機端的 藍芽裝则如’插人藍芽DQngle),或是開啟欲使__置,一旦使 用者經過提醒而執行了以上之動作,立即進行自動連線動作。 在步糊2判斷為未曾配對連線過之步驟後,隨即如步驟_所示, 行動電話會自紐尋纽瓣,彳爾糊藍芽自動 配對連線軟體會立即呼叫驗artI_ry()函式對附近周圍的藍芽裝置 200814564 (即该藍芽耳機)進行詢問動作,若藍芽裝置已被開啟並已進人配對模式 (pairing mode),此藍芽裝置會回送一個紀錄此裝置相關資訊的封包,再 利用OnDeviceReSp〇nded()函式接收此封包,並判讀封包中DEV_aASS欄 2 _ 3個位元組(byte)的内容,來決定接收到的是哪種類型的 藍芽裝置’並透過此判讀來進行篩選動作。 接著依序如圖之步驟S2〇6、%〇8及%1〇所示,在步驟犯〇6中判斷是否 只搜哥到-個Μ裝置(即該藍料機),在此步驟巾,行動電話中的系統 軟體主要係利用-個全域變數m—_—devices來累積所搜尋到的藍芽裝置 數1 旦搜哥結束,便會取出m—num一devices來判別目前所搜尋到的藍芽 裝置數目’若是只有搜尋到—個,則直接進人步驟S21G ;若否,則先進行 步驟s2〇8,將列出所有搜尋到的藍芽裝置(包含藍n㈤, 者界面提供使时選擇其巾—個欲配對之藍隸置,之後再進人步驟s2i〇。 在確定欲進行配對連線之藍«置之後,在此實施_為藍芽耳機, 即可進行步驟’,行動電話會根據該藍芽裝置的所有資訊,包括藍芽耳 機的媒體存取控制位址⑽施)、藍料機的名稱、㈣耳機的類 型等’自動輸人相對應的配對碼(pincQde)至該藍芽裝置進行配對動作, 其中行動電財可_有複數組不同之歸裝„訊與其㈣應之配對 碼,且此配對碼係根據不同藍芽裝置醜型、名稱而有不同的對應值。最 後,行動襄置可順利如步驟S212 —般,自動連線至藍芽耳機上,進而完成 整個自動配對連線過程,如步驟S214。 另外,在自動搜尋篩選藍芽裝置的步驟(S204)巾,由於藍芽的詢問 9 200814564 動作是以廣播(broadcast)的方式連鋒 容易接收到重複的侧^ 去的,因此附近的藍芽裝置 俯回 複地回應此詢問,造成在搜尋結束後出現多 目s的裝置(例如:只搜尋到— , 置a回應了五次)。此時,本發明可利用連:出現了五個裝置八,因為裝 … _賴列表(Link-list)的方式來 解決此問題,方法是將第—個 ㈣蓄到連結列表中,下次再接收到 此波置回應的時候,會先去比對 齡罢〜 域、、,。列表中的裝置資訊,如就存在相同 、裝置負讯,則丢棄此封包的判讀, 、 果未存在此裝置的資訊,則將此裝 置加入連結列表中,並進行下一牛 士 的藍芽裝置。 /、丨_作’藉由此來過麟重複回應 本U之具體存在的形式可為個人電腦上運作之應用軟體,包含已内 建設定好陳體歧須糾進行«者,村Μ人式紐中應用軟體。 另外上面所述之内容係以行動電話與藍芽耳機為例來說明,本發明, 不舰於此,舉凡任何電腦或嵌人式系統與任《«置之_自動= 連線,都屬於本發明涵蓋之範圍。 職是之故,本發明所揭露之藍芽裝置自動配對連線方法,不但可簡化 習知搜尋、晴及連靖綠_物,触自朗輪定功能, 更可咖糊_„峨,嫩咖轉物化尤其 疋對初人接觸U裝置的使用者而言,使用者唯—要做的動作即是將藍芽 自動配對連線軟體打開即可,因此,本發明更可大幅降低其所需學^時 間’且使用者後續繼續使用藍芽裝置時,所需連線操作的時間亦可降低, 確實可達到使賴芽裝置毅槪錄難。 ' 200814564 以上所述之實施例僅係為說明本發明之技術思想及特點,其目的在使 熟習此項技藝之人士能夠瞭解本發明之内容並據以實施,當不能以之限定 本發明之專利範圍,即大凡依本發明所揭示之精神所作之岣等變 飾,仍應涵蓋在本發明之專利範圍内。 化或修 【圖式簡單說明】 第一圖為習知藍芽耳機之配對流程圖。 第二圖為本發明之一實施例在進行配對連線的流程圖。 【主要元件符號說明】 益BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pairing connection method, and more particularly to a method for automatically pairing a Bluetooth device. [Prior Art] With the rapid development of wireless communication technology, the wireless transmission technology of Bluetooth (Bluet00th) allows users to conveniently carry out voice and data transmission services at the county speed without the need of Wei line, and the distance and low distance New technologies for power and low cost have been widely used. Whether it is communication, information, multimedia, etc., you can make face-to-face technology, communicate with each other and transmit signals to each other, making it applicable to mobile phones, computer peripheral related products, home appliances, automobiles, digital cameras, and network storage. Take equipment and audio-visual equipment. Regardless of the field, Bluetooth products need to be connected to the necessary matching process before they can be used. Taking the blue material machine as an example, the blue material machine is connected to the mobile phone for the safety considerations of its connection with other devices. In this case, the whole process is described by taking the pairing of the earphones and the mobile phone as an example: as shown in the figure First, the user is in the step of ', must first open the melon headset' to select the bluetooth headset to enter the step of reading the pairing mode (Pairing node) · 'Next' as shown in step _, the user must Into the mobile phone, select Open the existing blue money body, and then manually select "Search Bluetooth device" to start searching as shown in step _, set the paste day __ 艮 multi-blue device, then step _ mouth All the political boards will be listed to 'provide the user to select one of the Bluetooth devices 200814564 (Bluetooth headset) to be paired, and then proceed to step S112; if in the step, the mobile phone only searches for - available Bluetooth headsets Step S11G is still needed to select the Bluetooth device by the user, and the user can manually input the pairing code (_c〇de) of the Bluetooth headset by the user in step S112, and at this time, the mobile phone needs to be input. Correct passwords identify the identity; most After that, the mobile phone and the blue machine can be connected and can be used as the step _ does not. The user can receive music or audio signals through the Bluetooth wireless transmission function. However, in the above-mentioned cumbersome operation process, since the action of pairing and connection is quite complicated, when the volume has an error, the user does not (4) recognize the step-to-step, and cannot judge whether there is a need to restart, and the use is made. The problem is quite big. In addition, because of the light and short design of the Bluetooth headset, it is only possible to know the current state of the headset through the filament, but the lighting of each brand of Bluetooth headset is different. 'Slow speed and fast flash (4) The different meanings of the table, the user must first read the time book before use, in order to complete the pairing; in addition, because the password is required in the matching process, and the passwords of the blue machine are not completely the same, the user also needs It’s quite troublesome to spend the extravagant time to turn to the correct password. The present invention provides an automatic pairing connection method for a Bluetooth device, which makes it easier for the user to use any type of Bluetooth device. SUMMARY OF THE INVENTION The main object of the present invention is to provide an automatic pairing connection method for a Bluetooth device, which can simplify complicated human operation steps such as conventional search, alignment, and connection, and provide automatic connection setting power. b 'Let the user achieve the plug-and-play function, eliminating the user's extra learning and settings. Another object of the present invention is to provide an automatic pairing connection method for a Bluetooth device that can "simplify the operation flow and shorten the operation time" 200814564, so as to achieve the convenience and speed of using the blue stagnation. In order to achieve the above object, in the method of the present invention, at least the Bluetooth device is first turned on, and the Bluetooth (automatic connection software) of the terminal (10) is automatically activated, so that the terminal automatically searches for the surrounding blue buds. If the search-weaving device is found, the automatic pairing connection will be directly performed; if more than two Bluetooth devices are searched, then all the searched Bluetooth devices will be selected (4) for the user to select, and the user will determine After the device is sealed, the corresponding input is automatically input according to the blue miscellaneous _ to reach the final rhyme, and the recording device and the terminal device automatically complete the connection. The purpose of the present invention, the technical content, the features and the effects achieved by the present invention are further explained by the specific implementation of the masquerading. [Commonly applied method] The present invention is a combination of a hardware control software package integrated with a financial device and a user interface of a terminal device (4), a device that is touched by the sensible person, and automatically completes the pairing connection of the Bluetooth device. The ship, in order to replace the original need to make money from the operation of the _ trivial process. The automatic pairing connection _ of the invention can be widely used in the pairing connection between the terminal and any Bluetooth device, of course, the final singer (four) record type _, the tree phone, the personal digital assistant and the like, as long as The scale has a system of embedded or embedded systems - the process of inventing the invention; providing matching materials _ feeder, Bluetooth-like Bluetooth keyboard, Huangjia global positioning device or blue » eight built-in Bluetooth transceiver chip Electronic products are available. The bud headset is a general example, and the technique of the present invention is described in detail by a mobile phone and blue feature. 200814564 The second figure is a flow chart of the pairing connection in the present invention. As shown in the figure, the user first opens the Bluetooth headset in step S200 and starts the Bluetooth automatic matching connection software in the mobile phone. After the startup, as shown in step S202, the mobile phone system first determines whether the Bluetooth headset has been paired. If the Bluetooth headset has been paired with the mobile phone, proceed directly to step S212. , indicating that the Bluetooth headset is paired with the mobile phone for the first time, and then proceeds to the next step S204. Among them, if the Bluetooth headset has been paired with the mobile phone, then in the last pairing connection process, the mobile phone will be recorded in the mobile phone, and the information of the Bluetooth headset itself will be recorded. Including the media access control address (Address) of the blue machine, the name of the Bluetooth headset, the type of the blue machine, etc.; # The Bluetooth automatic matching connection software in the mobile phone is started next time, and the touch has been with this When the blue machine is paired, it will automatically go to the system in the past, the money of the blue dragon machine to connect the line, directly omit the towel _ scale _ distribution process. Under the secret, if the action of the button is not completed, the secret will automatically judge that the user should be a Bluetooth device that does not have a computer or embedded terminal (for example, no Bluetooth (4) e), or is not open. The Bluetooth device used (for example, the blue machine); in this case, the line will remind the user that the Bluetooth device on the terminal is like 'Blue DQngle', or the __ is set to open. The user performs the above actions through the reminder and immediately performs the automatic connection action. After Step 2 judges that the pair has not been paired, then as shown in step _, the mobile phone will automatically search for the button, and the automatic matching software will immediately call the artI_ry() function. Inquiring about the surrounding Bluetooth device 200814564 (that is, the Bluetooth headset). If the Bluetooth device has been turned on and has entered the pairing mode, the Bluetooth device will send back a record of the device. Packet, then use the OnDeviceReSp〇nded() function to receive the packet, and read the contents of the DEV_aASS column 2 _ 3 bytes (byte) in the packet to determine which type of Bluetooth device is received' and This interpretation is used to perform the screening action. Then, as shown in steps S2〇6, %〇8 and %1〇 in the sequence, it is judged in step 6 that it is only searched for a device (ie, the blue machine), in this step, The system software in the mobile phone mainly uses the global variable m__-devices to accumulate the number of searched Bluetooth devices. Once the search is over, the m-num device is taken to discriminate the currently searched blue. If the number of bud devices is only found, go directly to step S21G; if not, proceed to step s2〇8, which will list all the searched Bluetooth devices (including blue n (five), and the interface provides time selection. The towel is a pair of blues to be paired, and then enters the step s2i〇. After determining the blue line to be paired, here is the implementation of the bluetooth headset, the steps can be taken, the mobile phone will According to all the information of the Bluetooth device, including the media access control address (10) of the Bluetooth headset, the name of the blue machine, (4) the type of the headset, etc., the corresponding matching code (pincQde) of the automatic input to the blue The bud device performs a pairing action, in which the mobile power can be _ The pairings are different from the matching code of the message (4), and the pairing code has different corresponding values according to the ugly type and name of the different Bluetooth devices. Finally, the action device can be smoothly connected as in step S212. The line is connected to the Bluetooth headset, and then the entire automatic pairing connection process is completed, as in step S214. In addition, in the step of automatically searching for the blue-spot device (S204), the inquiry is based on the inquiry of the Bluetooth 9 200814564. The action is broadcast. The way the company is easy to receive the repeated side, so the nearby Bluetooth device responds to the query in response, causing multiple devices to appear after the search ends (for example: only search for -, a response) Five times. At this point, the present invention can be used to connect: there are five devices eight, because the _ _ list (Link-list) way to solve this problem, the method is to save the first (four) to the list of links The next time you receive this wave response, you will first go to the comparison of the age, the domain, the information in the list, if there is the same, the device is negative, then discard the interpretation of the packet,If there is no information about this device, the device will be added to the link list and the next bullfighter Bluetooth device will be executed. /, 丨_作' By this, the specific form of the U can be repeated. The application software running on the personal computer includes the built-in setting and the correction of the body. The application content of the above-mentioned content is based on the mobile phone and the Bluetooth headset. Invention, not in this case, any computer or embedded system and any "Zuozhi_automatic= connection, are covered by the scope of the present invention. For the sake of the job, the Bluetooth device disclosed in the present invention is automatically paired. The connection method not only simplifies the conventional search, the clear and the Jingjing green _ things, but also touches the function of the Lang wheel, and it is more okay to _ 峨, the tender coffee is turned into material, especially for the first person to contact the user of the U device. In other words, the user only needs to open the Bluetooth automatic matching connection software, so that the present invention can greatly reduce the required learning time and the user continues to use the Bluetooth device. The time required for the connection operation can also Low, really can reach the bud device Yi Lai Coming to record difficult. The above-mentioned embodiments are merely illustrative of the technical spirit and characteristics of the present invention, and the purpose of the present invention is to enable those skilled in the art to understand the contents of the present invention and to implement the patents of the present invention. The scope, that is, the variations made by the spirit of the present invention, should be covered by the scope of the present invention. Modification or repair [Simple description of the diagram] The first picture is the pairing flow chart of the conventional Bluetooth headset. The second figure is a flow chart for performing pairing connection according to an embodiment of the present invention. [Main component symbol description]