1307017 九、發明說明: 【發明所屬之技術領域】 本發明係關於檢測方法,尤指一種可用於分析外接气 電子裝置之裝置資訊之檢測方法。 【先前技術】 按’傳統通用序列匯排流(Universal Serial Bus, 以下簡稱USB)之測試程式僅能對USB裝置作讀寫測試, 並沒有對USB裝置傳送詢問封包、丨.丨/2. 〇的型態辨識以 及USB Host Controller 1· 1/2. 〇型態辨識等功能測試, 因此,如製造廠商欲進行上述功能測試,則必須添購Cwc Fixture等檢測儀器。然而,購買該等檢測儀器的費用亦 將造成製造廠商所f支出的成本大幅增加,且所增加之成 士亦必須藉由提高產品售伽时成本,造成產品價格過 高,而不易被消費者所接受。1307017 IX. DESCRIPTION OF THE INVENTION: TECHNICAL FIELD OF THE INVENTION The present invention relates to a detection method, and more particularly to a detection method that can be used to analyze device information of an external gas electronic device. [Prior Art] The test program of the "Universal Serial Bus" (USB) can only be used for reading and writing tests on USB devices, and there is no inquiry packet for USB devices. 丨.丨/2. 〇 The type identification and USB Host Controller 1· 1/2. 〇 type identification and other functional tests, therefore, if the manufacturer wants to perform the above functional test, it must purchase Cwc Fixture and other testing instruments. However, the cost of purchasing such testing equipment will also result in a significant increase in the cost of the manufacturer's expenditure, and the increased number of the taxi must also increase the price of the product, resulting in excessive product prices and not being easily consumed by consumers. Accepted.
此外’由於古前科技日益越新的高度發展,造成各種 傳輸技術的新制規袼不斷推陳出新,因此,若觀廠商為 了推出產品’而購買了該等檢測儀而卻又有新型傳 輸^見格的問世,將造成製造廠商為了回收成本,而仍舊推 出舊=傳輸規格的產品’此舉,將造成製造廠商發展力低 t跳f力不足,如此紐循環,婦造絲造廠商在這 现f激烈之廣大市場巾不易生存。因此,如何餅出一種 =用於^析外接式電子裝置之裝置資訊之檢測方法之設 =^需購買價格昂貴之CATCHY等檢測儀器,實 乃目則刻不容緩而㈣梅決之-重要課題。 1307017 【發明内容】 =鑑於前述通用序列匯排_SB)測試程式及檢測儀 際制時所具有之諸多缺點,因此,發明人乃根據 =來之撕驗,额累積之專•識,崎上述問題, =設計出本發明之—财崎分析外接式電子裝置之裝 置貢訊之檢測方法。 !^本目的’係提供—種可驗分析外接式電子 “^置㈣之檢測方法’該檢測方法係應用至一電腦 =中’使得該電腦系統與—外接式電子裝置相連接時, 且透過該電«統之—傳 =、、且’將該請求封包傳輸到該外接式電子裝置中,騎, =檢測軟_斷該電職統自該外接式電子裝置中接收 ==,該檢測軟體即自該回應封包中讀取出該 ^封包各個櫊位内所儲存之資料,再依該等資料之内 析出該外接式電子裝置之狀態及裝置資訊,並顯示 在違電腦糸統之-顯示模組(如:_上。藉 系統之使用者無須再二 等外 置二===:::目的、形狀、構造裝 配合圖式,詳細說步之錢與瞭解,鱗實施例 【實施方式】 1307017 本發明係一種可用於分析外接式電子装置之装置資訊 之檢測方法’請糊第1圖所*,該方法係顧在一電腦 系統20上’且藉由安裝在該電腦系統2〇中之一檢測軟體 30達成。當一外接式電子裝置電氣連接該電腦系統2〇時, 該電腦系統20之使用者可執行該檢離體3(),藉以產生 符合使用者需求之-請求封包4〇 (如第3圖所示),且透 過該電腦魏20之-傳輪餘22 (如:通用序列匯排流 (Universal Senal Bus,以下簡稱卿)集線器),將該 請求封包40傳輸到該外接式電子震置中。該外接式電 置在接收到該請求封包4〇後,即依該請求封包4〇之内容 之傳幹模@ 22 H 4檢測軟體3G判斷該電腦系統20 傳輸模、,且22自4、外接式電子裝置中 5〇時,該檢測軟體30即自^^亥回應封包 封包50各個__ : = 5Q中讀取出該回應 分析出料接式電料㈣之内容, 電腦系統20之—顯示楔 :^置貝讯’並顯示在該 令該電腦_ 20之使由本伽之檢測方法, 藉由該電腦系統2_示;;:置=新的 式電子裝置之裝置資訊之目的H達到分析該等外接 請參閱第1圖所示,春 式硬物連接該電腦系二外= 裝置(如··外接 之-儲存模組24令之該 :存在糊系統20 別季人體30被執行時,請參閱第 7 1307017 2圖所示,該檢測軟體3G包含下列步驟: (101) (Request Packet); 於(7令該電腦系統2。之一控制模㈣,透過該傳 輸麻22 ’將該請求封包40傳輪出去; 、悉w(击3)在。又定時間中’判斷該控制模組21是否可 Ρ“::杈組22 ’接收到-回應封包50 (ResP_ ^ ±是’即麵驟(1G4) _進行處理;否則, 在S又疋日守間到達後,即結束; (104)分析各該回應封包5〇 ’並自該回應封包5〇之 各個構成攔位中讀取出其内所儲存之資料; 次^105)刀析及等身料’並自該檢測軟體30之一對昭 :二中’取出符合該等資料之裝置資訊 : 顯不杈組23上,即結束。 长茨 復請參閱第1圖所示,該檢 卻之顯示獅上 σ °亥θ斷視自上顯不出該回應封包50中所記錄之次 S’料庫35中對應該等資料之裝置: 田"亥外接式電子裴置在接收該 該外接式電子裳置即依該請求封包40中所儲广U夺’ 令,針對該外接式電子裝置之 -子之吻求指 ^ ^ 5〇 到該電腦系統20上,如此,& 、'…子包50傳輪 々此^亥電腦系統20取得該回應 1307017 封包5〇時’即可針對該回應封包50中所儲存之回應訊息, 自麟照貪料庫35中搜尋並取出對應各該回應訊息之裝 置資訊,並顯示在該顯示模組23上,以供該電腦系統2〇 之·相_外接料t置之裝置纽(例如:通訊協 定)。 在本發明之一實施例中,請參閱第3圖所示,該請求 封包4G係由8個位元組(8 Bytes)所構成,包含五個棚 .位’分別為第-攔位41、第二攔位42、第三搁位犯、第 四攔位44以及第五攔位45。 其中該第一攔位41又可稱型態攔位 (bmReqUestType),使用一個位元組,該第—攔位41係可 供儲存位it圖(Bit-Map),用以記錄該請求封包4Q之型態 之裝置資訊,可用來觸出各種請求指令之特性,且可斤 制傳送資料時之傳送方向,且該位元圖包含8個位: (Bit),並以二進位(Binary)狀態表示,又將該8個位 > 元分隔成三健間,其巾第—關使用—個位元,當其值 為〇 係用來表不該請求封包4〇係由該電腦系統2〇(如 第1圖所示)發送到該外接式電子裝置上,反之,當其值 為1時,則係表示該請求封包4〇係由該外接式電子裝置傳 送到5亥電腦系統20 ;第二區間使用二個位元,係用來表示 傳送型悲,當其值為〇時,表示標準、當其本' 不等級,當其值為2時,表示供應商,當其值為3時,則 表示其他,用以定義裝置等級及展置供應商等褒置資訊’· 9 1307017 而第三區間則使用五個位元,用於表示接收方,當其值為 〇 N*,表示裝置,當其值為1時,表示介面,當其值為2 Ν',表不端點,當其值為3時,則表示其他,其餘則皆未 使用(或稱保留); s亥第一欄位42又可稱請求攔位(bReqUest),使用一 個位元組,可供儲存數值,該等數值係由〇至丨2所構成, 其中數值0代表取得狀態(GET一STATUS),數值1代表清除 特徵(CLEAR—FEATURE),數值2代表保留,數值3代表設 疋特徵(SET—FEATURE) ’數值4代表保留,數值5代表設 疋位址(SET—ADDRESS ),數值6代表取得描述元 (Get_Descriptor) ’數值7代表設定描述元(SET_In addition, due to the increasing development of the ancient technology, the new regulations for various transmission technologies are constantly being updated. Therefore, if the manufacturers purchase the detectors for the launch of the product, they have a new type of transmission. The advent of the market will cause manufacturers to recycle the old = transmission specifications in order to recover the cost. This will cause the manufacturer to have low development power and lack of strength, so the cycle of the wire-making industry is fierce. The vast market towel is not easy to survive. Therefore, how to make a kind of test method for the device information used to analyze the external electronic device = ^ need to purchase expensive CATCHY and other testing instruments, but it is not difficult to delay (4) Mei decided - important topics. 1307017 [Summary of the Invention] = In view of the above-mentioned general sequence _SB) test program and the many disadvantages of the instrumental system, the inventor is based on the test of the amount of the test. Problem, = Designing the detection method of the device for the invention of the invention - Kisaki analysis of the external electronic device. !^ The purpose of this is to provide an assay for the analysis of an external electronic "^ (4) detection method" is applied to a computer = medium 'to make the computer system and - external electronic device connected, and through The electric device transmits the request packet to the external electronic device, rides, detects the soft_off, and the electric service receives from the external electronic device ==, the detection software That is, the data stored in each of the fields of the ^ packet is read from the response packet, and the status and device information of the external electronic device are extracted according to the data, and displayed in the computer-based display. Module (such as: _ on. The user of the system does not need to be second-hand externally ===::: purpose, shape, structure and fit diagram, detailed step-by-step money and understanding, scale example [implementation 】 1307017 The present invention is a detection method for analyzing device information of an external electronic device, please paste the first picture*, the method is on a computer system 20' and is installed in the computer system 2 One of the detection software 30 is reached. When one When the connected electronic device is electrically connected to the computer system 2, the user of the computer system 20 can execute the detected object 3 (), thereby generating a request packet 4 that meets the user's needs (as shown in FIG. 3). And transmitting the request packet 40 to the external electronic shock through the computer Wei 20 - transmission wheel 22 (for example, Universal Senal Bus (hereinafter referred to as "Qing" hub). After receiving the request packet 4, the mode is based on the content of the request packet 4 @H 4 detection software 3G to determine the computer system 20 transmission mode, and 22 from 4, external electronic When the device is 5 ,, the detection software 30 reads the content of the response analysis output material (4) from the __: = 5Q of the ^^hai response packet package 50, and the display system of the computer system 20: ^置贝讯' and display the computer _ 20 by the method of detection of the gamma, by the computer system 2_;;: set = the device information of the new electronic device for the purpose of H to analyze such For external connection, please refer to Figure 1. The spring type is connected to the computer system. · Externally-storage module 24: This is the existence of the paste system 20 When the human body 30 is executed in the season, please refer to the 71307017 2 diagram, the detection software 3G includes the following steps: (101) (Request Packet) (7) The computer system 2. One of the control modules (4), through the transmission hemp 22 'transfer the request packet 40 out; and know w (hit 3) in. In a fixed time 'determine the control module 21 can be Ρ ":: 杈 group 22 'received - response packet 50 (ResP_ ^ ± is the instant sniper (1G4) _ processing; otherwise, after S arrives at the next day, the end of the squad; Analysing each of the response packets 5' and reading the data stored therein from the respective constituent blocks of the response packet 5; sub-105) analyzing and waiting for the body 'and one of the detection software 30 For Zhao: Erzhong 'to take out the information of the device that meets the data: It is not the group 23, it is over. Please refer to Figure 1 for the check, which shows that the lion on the lion is not able to display the corresponding information in the S's library 35 recorded in the response packet 50. : Tian "Hai external electronic device receives the external electronic device, according to the request of the package 40, and for the external electronic device - the kiss of the child ^ ^ 5 〇 到 到 到 到 到 到 到 到 到 到 到 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Searching for and extracting device information corresponding to each of the response messages from the lining database 35, and displaying the device information on the display module 23 for the computer system 2 : Communication Agreement). In an embodiment of the present invention, as shown in FIG. 3, the request packet 4G is composed of 8 bytes (8 Bytes), and includes five sheds. The bits are respectively - the first block 41. The second stop 42, the third hold, the fourth stop 44, and the fifth stop 45. The first block 41 can also be called a type buff (bmReqUestType), and a bit group is used. The first block 41 is available for storing a bit map (Bit-Map) for recording the request packet 4Q. The device information of the type can be used to touch the characteristics of various request commands, and can transfer the transmission direction when transmitting data, and the bit map contains 8 bits: (Bit), and the state of Binary It is said that the 8 bits > yuan is divided into three health rooms, and the towel is used as the first bit. When the value is used, the system is used to indicate that the request packet is not required. (as shown in Figure 1) is sent to the external electronic device; conversely, when the value is 1, it indicates that the request packet 4 is transmitted by the external electronic device to the 5H computer system 20; The second interval uses two bits, which is used to indicate the transmission type sorrow. When the value is 〇, it means the standard, when its 'no grade, when its value is 2, it means the supplier, when its value is 3 , which means that the other is used to define the device level and the placement of the supplier, etc., and the third section makes Five bits, used to indicate the receiver, when its value is 〇N*, means the device, when its value is 1, it means the interface, when its value is 2 Ν ', the table is not the endpoint, when its value is 3 When it is the other, the rest are not used (or reserved); the first field 42 of the shai can also be called the request block (bReqUest), using a byte, which can be used to store the value, the values are 〇 to 丨 2, where the value 0 represents the acquisition status (GET_STATUS), the value 1 represents the clear feature (CLEAR-FEATURE), the value 2 represents the reservation, and the value 3 represents the set feature (SET-FEATURE) 'value 4 represents Reserved, the value 5 represents the setting address (SET_ADDRESS), and the value 6 represents the acquisition description element (Get_Descriptor) 'Value 7 represents the setting description element (SET_
Descriptor ),數值8表示取得配置值 (GET—CONFIGURATION ),數值9表示取得配置 (SET_C0NFIGURATI0N )、數值1〇表示取得介面 (GET一INTERFACE )、數值Η表示設定介面 (SET—INTERFACE ),數值12表示同步圖框 (SYNCH—FRAME)。 該第三攔位43又可稱字長度攔位(wValue),使用二 個位元組,其係依請求封包4〇之内容而相異,用來傳送參 數到該外接式電子裝置; 第四欄位44又可稱字長度攔位(wIndex),使用二個 位元組,其係依請求封包4〇之内容而相異,用來傳送參數 到該外接式電子裝置;及 1307017 第五攔位45又可稱傳送位元組數攔位(wLength),使 甩二個位元組,係用來控制傳送資料的長度,且資料傳送 之方向由第二欄位42之-方向位元所指定,並當該第五棚 位45所儲存之數值為〇時,方向位元的狀態會被忽略。Descriptor ), the value 8 indicates that the configuration value (GET_CONFIGURATION) is obtained, the value 9 indicates the acquisition configuration (SET_C0NFIGURATI0N), the value 1 indicates the acquisition interface (GET-INTERFACE), the value indicates the setting interface (SET-INTERFACE), and the value 12 indicates Sync frame (SYNCH-FRAME). The third block 43 can also be called a word length block (wValue), which uses two bytes, which are different according to the content of the request packet, and are used to transmit parameters to the external electronic device; Field 44 can also be called a word length block (wIndex), using two bytes, which are different according to the content of the request packet, for transmitting parameters to the external electronic device; and 1307017 fifth block Bit 45 can also be called a transfer bit number block (wLength), so that two bytes are used to control the length of the transmitted data, and the direction of data transfer is from the second field 42-direction bit When specified, and when the value stored in the fifth booth 45 is 〇, the state of the direction bit is ignored.
此外,在此特別一提者,乃該回應封包5〇係各該外接 式電子裝置,針對本發明之檢測軟體3〇及其請求封包4〇 而對應產生。請參閱第4圖所示,該回應封包5〇係由1〇 個位元組所構成,且包含九_位,分顺第-回應棚位 5卜第二回應攔位52、第三回應攔位53、第四回應棚位 54、第五回應欄位55、第六回應攔位邡、第七回應搁位 57、第八回應欄位58及第九回應攔位59。 其中該第-回應攔位51又可稱位元組長度搁位 (bLength),使用-個位元組,用以記錄該回應封包讪(或 稱裝置描述元)之位元組長度; 該第二回應攔位52又可稱裝置描述元攔位 (bDescriptorType) ’使用一個位元组,用以記錄該回應 封包50 (或稱裝置描述元)型式; 該第三回應攔位53又可稱規範欄位(_SB),使用 ,個位元組,用以儲存該外接式電子襄置之傳輸規格(或 稱版本),例如:USB 1.1版或2. 〇版; §亥弟四回應攔位54又可撐裝置等級 (bDeViceClass),使用一個位元組,用以儲存該 子裝置之裝置等級之特性; > 1307017 δ亥苐五回應攔位55又可稱作為次等級碼棚位 ⑽,eSubClass),使用一個位元組,用以儲存該外接 式電子裝置之轉_,献係由該轉式電子裝 置所分配’且配合該第三喃麻53崎儲存之資料,者 第四回應攔位54被重置為〇時,該第五回應攔位55亦二 須重設為0 ’而當該第四回應攔位54未被設定杨即時, 則第五回應攔位55係保留給外接式電子裝置進行分配; 該第六回應攔位56又可稱通信協定碼攔位 (bDeViceProtocol),使用一個位元組,用以儲存該外接 式電子裝置之通信龄碼’該通信協定碼係_外接式電 子裝置所分配’且由該第四回應攔位54及第五回應棚位 55中儲存之資料所設定,若料接錢子裝置可被指定裝 置等級時’該外接式f子裝置之觀協定係_外接式電 子裝置為基礎’而非以該傳輸模式之軌協定為基礎,再 者,當該第六回應欄位56 _儲存之數值被重設為〇時, 該外接式電子裝置將不會使用預設之通信協定,反之,當 该第六回應攔位56設為〇xFF時,該外接式電子裝置即可 使用預設之通信協定; 該第七回應攔位57又可稱最大封包尺寸攔位 (bMaxPacketSizeO) ’使用一個位元組,用以記錄在不同 傳輸速度下時,該回應封包5〇之最大尺寸; 5亥第八回應攔位58又可稱配置攔位 (bNumConfigurations) ’使用一個位元組,用以記錄數 1307017 值,以對應其他速度設定;及 該第九回應攔位59又可稱保留欄位(bReserved ) ’使 用一個位元組,係作為保留腳位而未使用,其内所儲存之 數值係為0。 按,以上所述,僅為本發明最佳之一具體實施例,惟 本發明之構造特徵並不侷限於此,任何熟悉該項技藝者在In addition, it is specifically mentioned that the response packet 5 corresponds to each of the external electronic devices, and is generated correspondingly to the detection software 3 of the present invention and the request packet 4〇. Please refer to FIG. 4, the response packet 5 is composed of one byte, and includes nine _ bits, a sub-response-response shed 5, a second response block 52, and a third response block. Bit 53, fourth response booth 54, fifth response field 55, sixth response block, seventh response pad 57, eighth response field 58 and ninth response block 59. The first-response block 51 may also be referred to as a bit length (bLength), using a byte to record the length of the byte of the response packet (or device description element); The second response block 52 may also be referred to as a device description metablock (bDescriptorType) 'using a byte to record the response packet 50 (or device description element) type; the third response block 53 may also be called a specification Field (_SB), use, a byte to store the transmission specification (or version) of the external electronic device, for example: USB version 1.1 or 2. 〇 version; § 希弟四 response block 54 It can also be used to support the device level (bDeViceClass), using a byte to store the characteristics of the device level of the sub-device; > 1307017 δ海苐5 response block 55 can also be called as sub-level code booth (10), eSubClass ), using a byte for storing the transfer of the external electronic device, and distributing the data allocated by the rotary electronic device and cooperating with the data stored by the third wireless device, the fourth response block When the 54 is reset to 〇, the fifth response block 55 is also heavy. If the fourth response block 54 is not set to Yang instant, the fifth response block 55 is reserved for the external electronic device to perform the allocation; the sixth response block 56 can also be called the communication protocol code block. (bDeViceProtocol), using a byte for storing the communication age code of the external electronic device 'The communication protocol code system _ the external electronic device is assigned' and the fourth response block 54 and the fifth response shed The data stored in bit 55 is set, and if the money sub-device can be assigned a device level, the view protocol of the external f-sub-device is based on the external electronic device instead of the track protocol of the transmission mode. Basically, in addition, when the value of the sixth response field 56_store is reset to 〇, the external electronic device will not use the preset communication protocol, and vice versa, when the sixth response block 56 is set For xFF, the external electronic device can use the preset communication protocol; the seventh response block 57 can also be called the maximum packet size block (bMaxPacketSizeO) 'Use a byte to record in different transmissions At speed, Respond to the maximum size of the packet 5; 5 Hai eighth response block 58 can also be called configuration block (bNumConfigurations) 'Use a byte to record the number 1307017 value to correspond to other speed settings; and the ninth response Block 59 can also be called a reserved field (bReserved) 'Use a byte, which is used as a reserved pin and is unused. The value stored in it is 0. According to the above, it is only one of the best embodiments of the present invention, but the structural features of the present invention are not limited thereto, and any one skilled in the art is
本發明領域内,可輕易思及之變化或修飾,皆可涵蓋在以 下本案之專利範圍。 【圖式簡單說明】 第1圖係本發明中,-電腦系統之電路方塊示意圖; 第2圖係本發明中,該電腦系_所安裝之-檢測軟體之 動作流程圖;Variations or modifications that can be easily conceived in the field of the invention are encompassed by the scope of the patents herein. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of a circuit of a computer system in the present invention; FIG. 2 is a flow chart showing the operation of the computer-system-detected software in the present invention;
,3圖係本發日种,—請求封包之結構示意圖; 第4圖係本發明中,—回應封包之結構示意圖。 【主要元件符號說明】 電腦系統...............20 傳輸模組...............22 儲存模組...............24 對照資料庫............35 第一攔位...............41 第三攔位...............43 弟五棚位...............45 第一回應攔位.........51 控制模組...............21 顯示模組...............23 檢測軟體...............30 請求封包...............40 弟一搁位...............42 弟四搁位...............44 回應封包...............50 第二回應攔位.........52 1307017 第三回應欄位.........53 第五回應攔位.........55 第七回應欄位.........57 第九回應攔位.........59 第四回應攔位.........54 第六回應欄位.........56 第八回應攔位.........583 is a daily diagram of the present invention, a schematic diagram of the structure of the request packet; and FIG. 4 is a schematic diagram of the structure of the response packet in the present invention. [Main component symbol description] Computer system..................20 Transmission module...............22 Storage module.... ...........24 Control database............35 First stop...............41 Third Block...............43 Brother Five Booth...............45 First Response Block....... ..51 Control Module..................21 Display Module...............23 Detection Software....... ........30 Request for a packet...............40 A younger seat...............42 Bit...............44 Response Packet...............50 Second Response Block.........52 1307017 Third response field.........53 Fifth response block.........55 Seventh response field......57 Ninth response block Bit.........59 Fourth Response Block.........54 Sixth Response Field.........56 Eighth Response Block.... .....58
1414