200412080 玖、發明說明 (發明說明應敘明:發明所屬之技術領域、先前技術、內容、實施方式及圖式簡單說明) 【一、發明所屬之技術領域】 本發明係關於網路之鏈結方法的技術領 域,尤指一種藍芽分散式網路之鏈結方法。 【二、先前技術】 圖1係顯示一般藍芽技術用以傳遞資料的方 式,係將整個網路分割成數個孤立之微網路 (Piconet),在各個微網路中具有一主藍芽裝置 及複數個僕藍芽裝置,在一微網路中則由該主藍 芽裝置掌控所有資料之收送,然而此僅限於一微 網路中,在藍芽規格中雖有提及分散式網路 (S c a 11 e r n e t )但並未針對該分散式網路有任何 之規範,於圖2中雖然各微網路形成一分散式網 路,但在現行之微網路(P i c ο n e t)及分散式網路 (S c a 11 e r n e t)之技術及規範下僅能在該微網路 中收送資料而無法跨越微網路使之在分散式網 路中收送資料,因此,習知藍芽分散式網路之鏈 結設計仍有諸多缺失而有予以改進之必要。 發明人爰因於此,本於積極發明之精神,亟 思一種可以解決上述問題之「藍芽分散式網路之 鏈結方法」,幾經研究實驗終至完成此項發明。 【三、發明内容】 200412080 本發明之主要目的係在提供一種藍 式網路之鏈結方法,俾避免習知藍芽技術 微網路(Piconet)之内傳送資料缺點,且 資料傳收頻寬。 為達成前述之目的,所提出之一種以 散式網路為基礎之鏈結方法係用以使位 芽分散式網路内之藍芽裝置能互相傳送1 中該藍芽裝置包含複數個鏈結偵測計時器 偵測程序計時器、一初始程序執行計時器 始程序觸發計時器及一個遺失計時器,該 要包括下述程序:(A) —鏈結初始程序, 重置或一鏈結初始時,用以決定該藍芽裝 鏈結為主或僕藍芽裝置,並初始化相關 器;(B ) —鏈結搜尋建立程序,其係搜尋 遞之可能路徑並建立一鏈結路徑表;以2 鏈結相關之鏈結偵測計時器計時終了時, 鏈結偵測程序,以偵測該鏈結是否存在, 在則重回該鏈結初始程序,若存在則再判 需重行執行該鏈結初始程序,若需要,則 行該鏈結初始程序,若不需要,則重行執 偵測程序。 由於本發明設計新穎,能提供產業上 且確有增進功效,故依法申請發明專利。 【四、實施方式】 芽分散 僅能在 不影響 藍芽分 於該藍 料:其 ;、一個 、一初 方法主 其係當 置於此 之計時 資料傳 L (C)當 啟動該 若不存 斷是否 重行執 行鏈結 利用, 200412080 為使貴審查委員能進一步瞭解本發明之結 構、特徵及其目的,茲附以較佳具體實施例之詳 細說明如后: 圖3顯示本發明之藍芽裝置系統架構圖,其 有一藍芽協定層100及一藍芽基頻與實體層 200,該藍芽協定層100具有一邏輯鍵結控制與界 接協定層(Logic Link Control and Adaptation200412080 发明 Description of the invention (The description of the invention should state: the technical field to which the invention belongs, the prior art, the content, the embodiments, and the drawings, and a brief description) Technical field, especially a method of linking Bluetooth distributed network. [II. Prior Technology] Figure 1 shows the general Bluetooth technology used to transfer data. The entire network is divided into several isolated micro-networks (Piconet), with a main Bluetooth device in each micro-network. And multiple Bluetooth devices, the master Bluetooth device controls the sending and receiving of all data in a micro network. However, this is limited to a micro network. Although the distributed network is mentioned in the Bluetooth specification (S ca 11 ernet) but does not have any specifications for the decentralized network. Although each micro-network forms a decentralized network in Figure 2, the current micro-network (Pic ο net) And the distributed network (Sca 11 ernet) technology and specifications can only send data in the micronet and cannot cross the micronet to make it send data in the distributed network. The link design of the bud decentralized network still has many defects and needs to be improved. Because of this, the inventor, in the spirit of active invention, was thinking of a "chain method of Bluetooth decentralized network" that could solve the above problems. After several research experiments, the invention was completed. [III. Content of the Invention] 200412080 The main purpose of the present invention is to provide a blue-type network linking method, avoiding the shortcomings of transmitting data within the known Bluetooth technology micro network (Piconet), and the bandwidth of data transmission and reception . In order to achieve the foregoing objective, a chain-based link method based on a distributed network is proposed to enable Bluetooth devices in a distributed network to transmit to each other. The Bluetooth device includes a plurality of links. Detecting timer Detecting program timer, an initial program execution timer, starting program triggering timer, and a missing timer, which should include the following procedures: (A)-link initial procedure, reset or a link initial At the time, it is used to determine the bluetooth link as the master or slave bluetooth device and initialize the correlators; (B) — the link search and establishment process, which searches for possible paths and builds a link path table; 2 When the link detection timer of the link expires, the link detection program detects the existence of the link. If it does, it will return to the initial procedure of the link. If it exists, it will be judged that the chain needs to be executed again. Complete the initial procedure. If necessary, perform the initial procedure of the link. If not, repeat the detection procedure. Since the present invention is novel in design, can provide industry and indeed has an enhanced effect, it has applied for an invention patent in accordance with the law. [Fourth, the implementation mode] Bud dispersion can only be divided into the blue material without affecting the blue buds: it; one, the first method, which is the timing data transmission L (C) when it is placed here. Whether to re-execute the use of the link, 200412080 In order to allow your reviewers to further understand the structure, characteristics and purpose of the present invention, a detailed description of the preferred embodiment is attached as follows: Figure 3 shows the Bluetooth device of the present invention System architecture diagram, which has a Bluetooth protocol layer 100 and a Bluetooth base frequency and entity layer 200. The Bluetooth protocol layer 100 has a Logic Link Control and Adaptation layer
Protocol,L2CAP) 11 0 及一鏈結控制協定(Link Manager Protocol, LMP)120,其係處理藍芽之 相關協定,而該藍芽基頻與實體層200具有一基 頻處理器2 1 0及一射頻電路2 2 0,其係處理藍芽基 頻及相關射頻之相關事宜。當執行本發明之藍芽 分散式網路之鏈結方法而耗費藍芽無線頻寬且 影響資料傳收頻寬時,可如圖3所示,增加一藍 芽基頻與實體層300、 一内部連接層 140( Inter-Link Layer)以及一基頻驅動程式 130 (Baseband Driver),該藍芽基頻與實體層 3 0 0係專門執行鏈結控制協定(LMP )並與該基頻 驅動程式1 3 0界接’遠内部連接層1 4 0介於邏輯鍵 結控制與界接協定層1 1 0 ( L 2 C A P )及該基頻驅動 程式1 3 0之間。 該基頻驅動程式之架構圖如圖4所示,其具 有一控制實體1 3 1、資料傳送程序1 3 2、服務管理 1 3 3、資料傳輸基頻處理器驅動程式1 3 4、鏈結偵 測程序1 3 5及鏈結管理基頻處理器驅動程式 200412080 1 3 6,相較習知之藍芽基頻驅動程式,其新增一 鏈結偵測程序1 3 5及一鏈結管理基頻處理器驅動 程式1 3 6,藉此以避免增加資料傳收頻寬並執行 鏈結之相關事項。 圖5顯示本發明之藍芽分散式網路之鏈結方 法之一較佳實施例,以便使位於該藍芽分散式網 路内之藍芽裝置能藉由封包而互相傳送資料,其 中該藍芽裝置包含複數個鏈結偵測計時器、一個 偵測程序計時器、複數個主僕旗標、一初始程序 執行計時器、一初始程序觸發計時器及一個遺失 計時器,該方法首先執行一鏈結初始程序 (P 5 0 1 ),以當重置或一鏈結初始時,決定該藍芽 裝置於此鏈結為主或僕藍芽裝置,並初始化相關 之計時器,再執行一鏈結搜尋建立程序(P 5 0 2 ), 以搜尋資料傳遞之可能路徑並建立一鏈結路徑 表,最後執行一鏈結偵測程序(P 5 0 3 ),當鏈結相 關之鏈結偵測計時器計時終了時,啟動該鏈結偵 測程序,以偵測該鏈結是否存在,若不存在則重 回該鏈結初始程序,若存在則再判斷是否需重行 執行該鏈結初始程序(P5 0 1 ),若需要,則重行執 行該鏈結初始程序(P 5 0 1 ),若不需要,則重行執 行鏈結彳貞測程序(P 5 0 3 )。 圖6係顯示該鏈結初始程序(P501)所執行之 步驟,於步驟6 0 1中,將該初始程序執行計時器 設定並致能,於步驟6 0 2中,當重置或一鏈結初 200412080 始時,該藍芽裝置執行傾聽動作,以偵察在藍芽 無線通道上是否有查詢(inquiry)及呼叫 (paging)的封包。 於步驟6 0 3中判斷該藍芽裝置是否有無偵測 到任何之查詢及呼叫的封包,若判定並無偵測到 任何之查詢及呼叫的封包,則執行步驟6 0 5,若 步驟6 0 3判定該藍芽裝置有偵測到查詢及呼叫的 封包,則該藍芽裝置在該鏈結為僕藍芽裝置,並 設定該鍵結之主樸旗標為僕藍芽裝置(步驟 6 0 4 ),於步驟6 0 5中,傳送一查詢封包,於步驟 6 0 6中判斷該藍芽裝置是否有無接收到於步驟 6 0 5中所傳送查詢封包之回應封包,若步驟6 0 6 判定該藍芽裝置沒有接收到於步驟6 0 5中所傳送 查詢封包的回應封包,則執行步驟6 0 8,若步驟 6 0 6判定該藍芽裝置有接收到於步驟6 0 5中所傳 送查詢封包的回應封包,則傳送一呼叫封包與接 收其回應,該藍芽裝置在該鏈結為主藍芽裝置, 並設定該主僕旗標為主藍芽裝置。 於步驟6 0 8中判斷該初始程序執行計時器是 否逾時,若判定未逾時,則重回步驟6 0 2,若判 定逾時,則執行步驟6 0 9以設定該藍芽裝置之複 數個鏈結偵測計時器、該偵測程序計時器、該遺 失計時器及該初始程序觸發計時器,其中,若該 藍芽裝置具有η個鏈結,則建立並設定η個鏈結偵 9 200412080 測計時器,於步驟6 1 0中,將該初始程序觸發計 時器致能。 圖7係顯示該鏈結偵測程序(P 5 0 3 )所執行之 步驟,於步驟7 0 1中,當初使化該藍芽裝置之一 鍵結時5將該鍵結相關之鍵結彳貞測計時器致能, 於步驟7 0 2中,判斷該藍芽裝置之複數個鏈結偵 測計時器是否有一逾時,若步驟7 0 2中判定該複 數個鏈結偵測計時器均未逾時,則重回步驟7 0 2。Protocol (L2CAP) 11 0 and a Link Manager Protocol (LMP) 120, which are related protocols for processing Bluetooth, and the Bluetooth base frequency and the physical layer 200 have a base frequency processor 2 1 0 and A radio frequency circuit 2 2 0, which deals with the Bluetooth fundamental frequency and related radio frequency related matters. When the implementation of the Bluetooth distributed network linking method of the present invention consumes Bluetooth wireless bandwidth and affects data transmission and reception bandwidth, as shown in FIG. 3, a Bluetooth base frequency and a physical layer 300, Inter-Link Layer 140 and a baseband driver 130. The Bluetooth baseband and physical layer 300 are dedicated to implement the Link Control Protocol (LMP) and communicate with the baseband driver. 1 3 0 Boundary's far internal connection layer 1 40 is between the logical bond control and the boundary agreement layer 1 1 0 (L 2 CAP) and the base frequency driver 1 3 0. The architecture of the baseband driver is shown in Figure 4. It has a control entity 1 3 1, a data transfer program 1 3 2, service management 1 3 3, a data transmission baseband processor driver 1 3 4, a link Detection program 1 3 5 and link management baseband processor driver 200412080 1 3 6, compared with the conventional Bluetooth baseband driver, it adds a link detection program 1 3 5 and a link management base The frequency processor driver 1 3 6 is used to avoid increasing data transmission bandwidth and performing related matters of the link. FIG. 5 shows a preferred embodiment of a method for linking a Bluetooth distributed network according to the present invention, so that Bluetooth devices located in the Bluetooth distributed network can transmit data to each other through packets, wherein the Bluetooth The bud device includes a plurality of link detection timers, a detection program timer, a plurality of master-slave flags, an initial program execution timer, an initial program trigger timer, and a missing timer. The method first executes a The link initial procedure (P 5 0 1), when resetting or initializing a link, decides that the Bluetooth device is the master or slave Bluetooth device in this link, initializes the related timer, and then executes a chain The link search creation process (P 5 0 2) searches for possible paths for data transmission and creates a link path table, and finally executes a link detection process (P 5 0 3). When link-related link detection When the timer expires, start the link detection program to detect the existence of the link. If it does not exist, return to the initial program of the link. If it exists, determine whether to re-execute the initial program of the link P5 0 1), if needed, Then re-execute the link initial procedure (P 5 0 1), if not required, then re-execute the link test procedure (P 5 0 3). Figure 6 shows the steps performed by the link initial program (P501). In step 601, the initial program execution timer is set and enabled. In step 602, when resetting or a link At the beginning of 200412080, the Bluetooth device performed a listening action to detect whether there were any inquiry and paging packets on the Bluetooth wireless channel. In step 603, it is determined whether the Bluetooth device detects any query and call packets. If it is determined that no query and call packets are detected, then step 6 0 5 is performed. If step 6 0 3 It is determined that the Bluetooth device has detected a query and a call packet, then the Bluetooth device is a slave Bluetooth device on the link, and sets the main Park flag of the key to a slave Bluetooth device (step 60). 4) In step 605, a query packet is transmitted, and in step 606, it is determined whether the Bluetooth device has received the response packet of the query packet transmitted in step 605. If it is determined in step 606, The Bluetooth device does not receive the response packet of the query packet transmitted in step 605, and then executes step 608. If it is determined in step 606 that the Bluetooth device has received the query transmitted in step 605 In response to a packet, a call packet is transmitted and a response is received. The Bluetooth device is the master Bluetooth device at the link, and the master-slave flag is set as the master Bluetooth device. In step 608, it is determined whether the initial program execution timer has expired. If it is determined that the timeout has not expired, then return to step 602. If it is determined that the timeout has expired, perform step 609 to set the plural number of the Bluetooth device. Link detection timers, the detection program timer, the missing timer, and the initial program trigger timer, wherein if the Bluetooth device has n links, n links are established and set 9 200412080 Test the timer. In step 6 10, enable the initial program to trigger the timer. FIG. 7 shows the steps performed by the link detection program (P 5 0 3). In step 7 1, when one of the Bluetooth devices was bonded, 5 the key related to the bond was 彳The chastity timer is enabled. In step 702, it is determined whether a plurality of link detection timers of the Bluetooth device have expired. If it is determined in step 702 that the plurality of link detection timers are all If it has not timed out, go back to step 7 0 2.
若步驟7 0 2中判定該複數個鏈結债測計時器 有一逾時,則執行步驟7 0 3,於步驟7 0 3中依據該 主僕旗標之内容判斷該藍芽裝置為主藍芽裝置 或僕藍芽裝置,若步驟70 3中判定為主藍芽裝 置,則啟動一偵測程序並將該偵測程序計時器致 能,同時傳送一鏈結偵測要求以偵測該鏈結是否 仍存在(步驟70 5 );若步驟70 3中判定為僕藍芽裝 置,則啟動一偵測程序並將該偵測程序計時器致 能,同時偵測是否接收到一鏈結偵測要求(步驟 7 04 )。 於步驟7 0 6中判斷該偵測程序計時器是否逾 時,當執行步驟7 0 4後,僕藍芽裝置可接收到一 鏈結偵測要求,或執行步驟7 0 5後,主藍芽裝置 可獲得一回應,則將會判定為未逾時。若步驟7 0 6 中判定該偵測程序計時器未逾時表示該鏈結仍 正常存在,亦即主藍芽裝置仍可透過該鏈結傳遞 封包至相關之僕藍芽裝置俾交換相關資料,故於 10 200412080 步驟7 0 7中藉由該鏈結與相關之僕藍芽裝置交換 相關資料,其中藉由該鏈結與相關之藍芽裝置交 換包含該鏈結之仔列大小(q u e u e s i z e )、資料傳 送時間(data transmission period)及下一次偵 測時間(n e x t d e t e c t i ο n t i m e )等相關資料。If it is determined in step 7 02 that the plurality of linked debt measurement timers have timed out, step 7 0 3 is performed, and in step 7 0 3 the bluetooth device is determined to be the main bluetooth based on the content of the master-slave flag. Device or Bluetooth device, if it is determined as the master Bluetooth device in step 70 3, start a detection process and enable the detection process timer, and send a link detection request to detect the link Whether it still exists (step 70 5); if it is determined as a slave Bluetooth device in step 70 3, start a detection process and enable the detection process timer, and detect whether a link detection request is received (Step 7 04). In step 706, it is determined whether the detection program timer has expired. After performing step 704, the Bluetooth device can receive a link detection request, or after performing step 705, the main Bluetooth The device can get a response and it will be judged as not expired. If it is determined in step 7 06 that the detection program timer has not timed out, the link still exists normally, that is, the master Bluetooth device can still pass packets to the relevant slave Bluetooth device through the link and exchange related data, Therefore, in 10 200412080 step 7 0 7 the related data is exchanged with the related slave Bluetooth device through the link, and the related Bluetooth device is exchanged through the link with the queue size, queue size, Data transmission period (data transmission period) and next detection time (nextdetecti ο ntime) and other related data.
於步驟7 0 8中判斷該初始程序觸發計時器是 否逾時,若步驟7 0 8中判定該偵測程序計時器未 逾時,則執行步驟7 1 1,以重設該鏈結偵測計時 器並致能,再重回步驟7 0 2,若步驟7 0 8中判定該 偵測程序計時器逾時,則執行步驟5 0 1。 若步驟7 0 6中判定該偵測程序計時器逾時, 則將該遺失計時器致能(步驟7 0 9 ),於步驟7 1 0 中判斷該遺失計時器是否逾時,若步驟步驟7 1 0 中判定該遺失計時器逾時,表示該鏈結失敗,此 需執行鏈結搜索及初始化程序,故至該鏈結初始 程序(P 5 0 1 ),若步驟7 1 0中判定該遺失計時器未 逾時,表鏈結仍然存在,故執行步驟7 0 7。In step 708, it is determined whether the initial program trigger timer has expired. If it is determined in step 708 that the detection program timer has not expired, then step 7 1 1 is performed to reset the link detection timer. The device is enabled, and then returns to step 702. If it is determined in step 708 that the detection program timer has expired, step 501 is performed. If it is determined in step 7 06 that the detection program timer has expired, enable the missing timer (step 7 0 9), and determine whether the lost timer has expired in step 7 1 0. If step 7 It is determined in 10 that the missing timer has expired, indicating that the link has failed. This requires a link search and initialization procedure. Therefore, the link initial procedure (P 5 0 1) is performed. If the loss is determined in step 7 10 If the timer has not expired and the watch link still exists, go to step 7 0 7.
圖8係顯示經由本發明而將各位於微網路 (Pi conet)之藍芽裝置連接而建立起一分散式網 路(Scatternet)之示意圖,其中,實線之鏈結表 示由藍芽基頻與實體層2 0 0所傳收之資料鏈結, 實線表示由藍芽基頻與實體層2 0 0所傳收之資料 鏈結,虛線表示由藍芽基頻與實體層3 0 0所傳收 之鏈結控制協定。 11 200412080 由上述說明可知,本發明藉由内部連接層 1 4 0及基頻驅動程式可避免習知藍芽技術僅能在 微網路(P i c ο n e t )之傳送資料缺點,且不僅建立 起一分散式網路(Scatternet)且因增加一藍芽 基頻與實體層而不會影響資料傳收頻寬。 綜上所陳,本發明無論就目的、手段及功 效,在在均顯示其迥異於習知技術之.特徵,實為 一極具實用價值之發明,懇請 貴審查委員明 察,早日賜准專利,俾嘉惠社會,實感德便。惟 應注意的是,上述諸多實施例僅係為了便於說明 而舉例而已,本發明所主張之權利範圍自應以申 請專利範圍所述為準,而非僅限於上述實施例。 【五、圖式簡單說明】 圖1係習知藍芽技術用以傳遞資料之示意圖。 圖2係習知藍芽技術各微網路形成一分散式網路 之示意圖。FIG. 8 is a schematic diagram showing the establishment of a decentralized network (Scatternet) by connecting Bluetooth devices located in a piconet (Pi conet) according to the present invention, in which a solid line link indicates a Bluetooth fundamental frequency Linked with the data transmitted by the physical layer 200, the solid line indicates the data link transmitted by the Bluetooth fundamental frequency and the physical layer 200, and the dotted line indicates the data transmitted by the Bluetooth base frequency and the physical layer 300. Link Control Agreement for Transmission. 11 200412080 From the above description, it can be known that the present invention can avoid the shortcomings of the conventional Bluetooth technology that can only transmit data in the micro network (Pic ο net) through the internal connection layer 140 and the baseband driver, and not only establishes A decentralized network (Scatternet) does not affect the data transmission bandwidth due to the addition of a Bluetooth base frequency and a physical layer. To sum up, the present invention, regardless of the purpose, means and effect, shows that it is very different from the conventional technology. The feature is an invention of great practical value. I implore your reviewers to make a clear observation and grant a quasi-patent at an early date.俾 Jia Hui society, really feel virtuous. It should be noted that the above-mentioned embodiments are merely examples for the convenience of description. The scope of the claimed rights of the present invention should be based on the scope of the patent application, rather than being limited to the above-mentioned embodiments. [V. Brief Description of the Drawings] Figure 1 is a schematic diagram of the conventional Bluetooth technology used to transfer data. Fig. 2 is a schematic diagram of each decentralized network formed by the conventional Bluetooth technology.
圖3係本發明之藍芽裝置系統架構圖。 圖4係基頻驅動程式之架構圖。 圖5係本發明之方法之一實施例的流程圖。 圖6係本發明之鏈結初始程序的流程圖。 圖7係本發明之鏈結偵測程序的流程圖。 圖8係本發明將各位於微網路之藍芽裝置鏈結而建立 起一分散式網路之示意圖。 12 200412080FIG. 3 is a system architecture diagram of a Bluetooth device of the present invention. Figure 4 is the architecture diagram of the baseband driver. FIG. 5 is a flowchart of an embodiment of the method of the present invention. FIG. 6 is a flowchart of a link initial procedure of the present invention. FIG. 7 is a flowchart of a link detection procedure of the present invention. FIG. 8 is a schematic diagram of a distributed network created by linking Bluetooth devices located in a micro network according to the present invention. 12 200412080
【圖號說明】 藍芽協定層 100 鏈結控制協定(LMP) 110 邏輯鏈結控制與界接協 定層(L2CAP) 120 基頻驅動程式 130 内部連接層 140 藍芽基頻與實體層 200 基頻處理器 210 射頻電路 220 藍芽基頻與實體層 300 LMP基頻處理器 310 射頻電路 320 控制實體 131 資料傳送程序 132 服務管理 133 資料傳輸基頻處理器 驅動程式 134 鏈結偵測程序 135 鏈結管理基頻處理器 136 驅動程式[Illustration of figure number] Bluetooth protocol layer 100 Link control protocol (LMP) 110 Logical link control and interface agreement layer (L2CAP) 120 Fundamental frequency driver 130 Internal connection layer 140 Bluetooth fundamental frequency and physical layer 200 fundamental frequency Processor 210 RF circuit 220 Bluetooth baseband and physical layer 300 LMP baseband processor 310 RF circuit 320 control entity 131 data transfer program 132 service management 133 data transfer baseband processor driver 134 link detection program 135 link Manage Baseband Processor 136 Driver
1313