TW201122803A - Method and system for testing USB peripheral module of electronic device - Google Patents

Method and system for testing USB peripheral module of electronic device Download PDF

Info

Publication number
TW201122803A
TW201122803A TW98144008A TW98144008A TW201122803A TW 201122803 A TW201122803 A TW 201122803A TW 98144008 A TW98144008 A TW 98144008A TW 98144008 A TW98144008 A TW 98144008A TW 201122803 A TW201122803 A TW 201122803A
Authority
TW
Taiwan
Prior art keywords
usb
storage unit
electronic device
identification code
usb device
Prior art date
Application number
TW98144008A
Other languages
Chinese (zh)
Inventor
Qing-Hua Liu
Original Assignee
Hon Hai Prec Ind Co Ltd
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 Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW98144008A priority Critical patent/TW201122803A/en
Publication of TW201122803A publication Critical patent/TW201122803A/en

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

A method for testing USB peripheral module of an electronic device, includes following steps. Provide a storage module, which stores a product ID. A test module reads a product ID of a USB peripheral module which is connected to the electronic device. The product ID of the USB peripheral module is compared to the product ID of the storage module. If the two product IDs are same, the connection between the electronic device and the USB peripheral module is well. If the two product IDs are different, the connection are not the same.

Description

201122803 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及一種測試方法與系統,尤指一種測試電子裝 置之USB設備之方法與系統。 【先前技術3 [0002] 隨著電子技術之快速發展,各種電子裝置之週邊設備越 來越多,例如電腦,各種週邊設備如鍵盤、滑鼠、印表 機、掃描器、攝像頭等均需要連接到電腦之主機上,以 0 實現各種功能,為能讓該等設備方便地與電子裝置相連 ,USB介面被廣泛地應用。 [〇〇〇3]根據USB規範之規定,所有USB設備均有供應商識別碼( VID)與產品識別碼(PID),電子裝置藉由不同之供應 商識別碼與產品識別碼來區別不同之設備,供應商識別 瑪與產品識別碼均係兩個位元組長,其中,供應商識別 碼由供應商向USB標準協切請’每個供應商之供應商識 別碼是唯一的,產品識別碼由供應商自行決定,一般情 〇 況下,不同之產品、相同產品之不同型號、相同型號之 不同設計之產品具有不同之產品識別碼,以便區別相同 廠家之不同設備。 [0004]於電子裝置組裝完成後’需要檢測各種USB週邊設備是否 與電子裝置連接完好’通常之測織方法係人工逐一檢測 ,測試效率低,且測試準確率不高。 【發明内容】 _]黎於以上内容,有必要提供-種可高效地測試電子裝置 之USB設備之方法與系統。 098144008 表單編號A0101 第3頁/共12頁 0982075338-0 201122803 [0006] [0007] [0008] [0009] [0010] [0011] 一種測試電子裝置之USB設備之方法,用以測試一設有 USB介面之電子裝置與對應之USB設備是否連接完好,該 測試方法包括以下步驟: 提供一存儲單元’該存儲單元中存儲了應連接到該USB介 面之USB設備之產品識別碼; 一測試模組查看連接到該USB介面之USB設備之產品識別 碼;及 將該USB設備之產品識別碼與該存儲單元中之產品識別碼 進行比較,若相同’則該電子裝置與對應之USB設備連接 完好,若不相同,則該電子裝置與對應之USB設備未連接 完好。 :: 一種測試電子裝置之USB設備之系統,用以測試電子裝置 與對應之USB設備是否連接完好,該系統包括一測試模組 ,該測試模組中設有一存儲單元〖該存儲單元中存儲了 該電子裝置之各個USB介面與應該連接到電子裝置之各個 USB介面之USB設備之產品識別碼,該測試模組分別連接 到每一USB介面,查看連接到對應USB介面上之USB設備 之產品識別碼是否與存儲單元中—致,從而判斷該電子 裝置與對應之USB設備是否連接完好。 相較於習知技術,本發明測試電子裝置之USB設備之方法 與系統可尚效地測試電子裝置與對應之Usb設備是否連接 完好。 【實施方式】 請參閱圖1與圖2,本發明測試電子裝置之USB設備之系統 098144008 表單編號A0101 第4頁/共12頁 0982075338-0 [0012] 201122803 用以測試一電子裝置10與對應之USB設備是否連接完好’ 該電子裝置10設有複數個USB介面’例如第一 USB介面、 第二USB介面、第三USB介面等,對應之USB設備分別連 接到該等USB介面,例如一第一USB設備連接到第一USB 介面,一第二USB設備連接到第二USB介面,一第三USB 設備連接到一第三USB介面等,上述連接到USB介面之 USB設備可為USB鍵盤、USB滑鼠、USB攝像頭等,該等 USB設備分別設有對應之供應商識別碼與產品識別碼。 0 [0013] 該電子裝置10内設有一測試模组12,該測試模組12可連 接到電子裝置10之各個USB介面,該測試模組12内設有一 存儲單元121,存儲單元121中存儲了電子裝置1〇之各個 USB介面與應該連接到電子裝置1 〇之各個USB介面之USB 設備之供應商識別碼與產品識別碼,例如存館單元121中 存儲有[USB Port 1] : VID = 0x0000, PID = Oxffff ; 上述例子中VID表示供應商識別碼,PID表示產品識別碼 -,上述例子表示連接到第一 USB介面之USB設備之供應商 〇 識別碼應為0x0000、產品識別碼應為〇xf fff。對於不同 之電子裝置,其配置不同,與其連接之USB設備亦不相同 ,可藉由修改該測試模組12之存儲單元121而測試不同類 型之電子裝置。若某一介面沒有連接USB設備,則存儲單 元121中存儲之供應商識別碼與產品識別碼分別為〇。 [0014] 請參閱圖3 ,該測試模組12測試電子裝置1 〇與對應之USB 设備疋否連接元好之方法包括以下步驟: [0015] 步驟2 〇 1 ’測試模組12首先連接到第一 usb介面。 098144008 表單编號A0101 第5頁/共12頁 0982075338-0 201122803 [0016] [0017] [0018] [0019] [0020] [0021] [0022] 步驟2〇2,查看速接到該USB介面之USB設備之供應商識 別碼與產品識別瑪° 步驟203,將上述供應商識別碼與產品識別碼分別與存儲 單元121中之相同USB介面之供應商識別碼與產品識別碼 進行比較,查看是否相同,若不相同,到步驟204 ;若相 同,到步驟2 0 5。 步驟204,電子裝置10與對應之USB設備未連接完好,測 試結束。 步驟205,查看上述USB介面是否是電手裝置1〇之最後一 個USB介面,若是最後—個USB介面,到步驟2〇6 ;若不 是最後一個USB介面,到步驟go?。 步驟206,電子裝置1〇與對應之設備連接完好,測試 結束。 步驟207 ’測試模組12連接到下一個介面,而後回到 步驟202。 . 综上所述,本發明係合乎畚明專利申請條件,爰依法提 出專利中請。惟,以上所述僅為本發明之較佳實施例, 舉凡熟悉本案技藝之人士其所纽本案之創作精神所作 之等效修飾或變化,皆應涵蓋独τ之巾請專利範圍内 〇 【圖式簡單說明】 圖1係本發明測試電子裝置之USB設備之系統之_實施例 之框圖。 098144008 表單編號A0101 第6頁/共12頁 0982075338-0 [0023] 201122803 [0024] 圖2係圖1中電子裝置之框圖。 [0025] 圖3係本發明測試電子裝置之USB設備之方法之一實施例 之流程圖。 【主要元件符號說明】 [0026] 電子裝置:1 0 [0027] 測試模組:12 [0028] 存儲單元:121 〇 098144008 表單編號A0101 第7頁/共12頁 0982075338-0201122803 VI. Description of the Invention: [Technical Field] [0001] The present invention relates to a test method and system, and more particularly to a method and system for testing a USB device of an electronic device. [Prior Art 3 [0002] With the rapid development of electronic technology, more and more peripheral devices of various electronic devices, such as computers, various peripheral devices such as keyboards, mice, printers, scanners, cameras, etc., need to be connected. To the host of the computer, various functions are implemented with 0, and the USB interface is widely used in order to allow such devices to be easily connected to electronic devices. [〇〇〇3] According to the USB specification, all USB devices have a vendor identification number (VID) and a product identification number (PID). The electronic device distinguishes between different vendor identification codes and product identification codes. The equipment, supplier identification and product identification code are two bytes long. The supplier identification code is negotiated by the supplier to the USB standard. 'The supplier identification code of each supplier is unique, the product identification code. It is up to the supplier to decide. Under normal circumstances, different products, different models of the same product, and different designs of the same model have different product identification codes to distinguish different devices of the same manufacturer. [0004] After the electronic device is assembled, it is necessary to detect whether various USB peripheral devices are connected to the electronic device intact. Generally, the weaving method is manually detected one by one, the test efficiency is low, and the test accuracy is not high. SUMMARY OF THE INVENTION _] In the above content, it is necessary to provide a method and system for efficiently testing a USB device of an electronic device. 098144008 Form No. A0101 Page 3 / Total 12 Page 0992075338-0 201122803 [0006] [0009] [0011] [0011] A method of testing a USB device of an electronic device for testing a USB device Whether the electronic device of the interface is connected to the corresponding USB device, the testing method includes the following steps: providing a storage unit, wherein the storage unit stores a product identification code of the USB device to be connected to the USB interface; a product identification code of the USB device connected to the USB interface; and comparing the product identification code of the USB device with the product identification code in the storage unit, if the same, the electronic device is connected to the corresponding USB device, if If not, the electronic device is not connected to the corresponding USB device. A system for testing a USB device of an electronic device for testing whether an electronic device is connected to a corresponding USB device, the system comprising a test module, wherein the test module is provided with a storage unit, wherein the storage unit stores Each USB interface of the electronic device and a product identifier of a USB device that should be connected to each USB interface of the electronic device, the test module is respectively connected to each USB interface, and the product identification of the USB device connected to the corresponding USB interface is viewed. Whether the code is consistent with the storage unit, thereby determining whether the electronic device and the corresponding USB device are connected properly. Compared with the prior art, the method and system for testing a USB device of an electronic device of the present invention can effectively test whether the electronic device and the corresponding Usb device are properly connected. [Embodiment] Please refer to FIG. 1 and FIG. 2, a system for testing a USB device of an electronic device according to the present invention. 098144008 Form No. A0101 Page 4 / 12 pages 0982075338-0 [0012] 201122803 is used to test an electronic device 10 and corresponding Whether the USB device is properly connected or not, the electronic device 10 is provided with a plurality of USB interfaces, such as a first USB interface, a second USB interface, a third USB interface, etc., and the corresponding USB devices are respectively connected to the USB interfaces, for example, a first The USB device is connected to the first USB interface, a second USB device is connected to the second USB interface, a third USB device is connected to a third USB interface, etc., and the USB device connected to the USB interface can be a USB keyboard, USB sliding Mouse, USB camera, etc., these USB devices are respectively provided with corresponding supplier identification code and product identification code. [0013] The electronic device 10 is provided with a test module 12, and the test module 12 is connected to each USB interface of the electronic device 10. The test module 12 is provided with a storage unit 121, and the storage unit 121 stores [USB Port 1] : VID = 0x0000 is stored in each USB interface of the electronic device 1 and the USB device of the USB device that should be connected to each USB interface of the electronic device 1 , for example, the deposit unit 121 , PID = Oxffff; In the above example, VID represents the supplier identification code, and PID represents the product identification code - the above example indicates that the supplier USB identification code of the USB device connected to the first USB interface should be 0x0000, and the product identification code should be 〇 Xf fff. For different electronic devices, the configuration is different, and the USB devices connected thereto are different. The different types of electronic devices can be tested by modifying the storage unit 121 of the test module 12. If a USB device is not connected to an interface, the vendor identification code and the product identification code stored in the storage unit 121 are respectively 〇. [0014] Referring to FIG. 3, the test module 12 tests the electronic device 1 and the corresponding USB device. The method includes the following steps: [0015] Step 2 〇1 'The test module 12 is first connected to The first usb interface. 098144008 Form No. A0101 Page 5 / Total 12 Page 0992075338-0 201122803 [0017] [0019] [0022] [0022] Step 2〇2, view the connection to the USB interface Step 203: Comparing the vendor identifier and the product identifier with the vendor identifier of the same USB interface in the storage unit 121 and the product identifier to check whether the same is the same. If not, go to step 204; if they are the same, go to step 2 0 5. In step 204, the electronic device 10 and the corresponding USB device are not connected, and the test ends. Step 205: Check whether the USB interface is the last USB interface of the USB device. If it is the last USB interface, go to Step 2〇6; if it is not the last USB interface, go to step go?. In step 206, the electronic device 1 is connected to the corresponding device, and the test ends. Step 207' test module 12 is connected to the next interface and then returns to step 202. In summary, the present invention is in accordance with the conditions of the patent application, and the patent is filed according to law. However, the above description is only a preferred embodiment of the present invention, and equivalent modifications or changes made by those who are familiar with the art of the present invention should cover the scope of the patent. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an embodiment of a system for testing a USB device of an electronic device of the present invention. 098144008 Form No. A0101 Page 6 of 12 0982075338-0 [0023] FIG. 2 is a block diagram of the electronic device of FIG. 1. 3 is a flow chart of one embodiment of a method of testing a USB device of an electronic device of the present invention. [Main component symbol description] [0026] Electronic device: 1 0 [0027] Test module: 12 [0028] Storage unit: 121 〇 098144008 Form number A0101 Page 7 of 12 0982075338-0

Claims (1)

201122803 七、申請專利範圍: 1 · 一種測試電子裝置之USB設備之方法,用以測試一設有 USB介面之電子裝置與對應之USB設備是否連接完好,該 測試方法包括以下步驟: 提供一存儲單元’該存儲單元中存儲了應連接到該USB介 面之USB設備之產品識別碼; 一測試模組查看連接到該USB介面之USB設備之產品識別 碼;及 將該U S B設備之產品識別碼與該存儲單元中之產品識別碼 進行比較,若相同’則該電子裝置與對應之USB設備連接 完好,若不相同,則該電子裝置與對應之USB設備未連接 完好。 2 .如申請專利範圍第1項所述之方法,其中該存儲單元中還 存儲了應連接到該USB介面之USB設備之供應商識別碼, 該測試模組在查看該U S B設備之產品識別碼之同時亦查看 其供應商識別碼,並將該USB設備之供ϋ識別碼與存儲 單元中之供應商識別碼進行比較。 3 .如申請專利範圍第1項所述之方法,其中該電子裝置設有 多個USB介面並連接有多個USB設備,該存儲單元中存儲 了每一USB介面應連接之USB設備之產品識別碼,該測試 模組逐個查看每一 USB介面連接之USB設備之產品識別碼 ,並分別與存儲單元中之產品識別碼進行比較。 4 .如申請專利範圍第3項所述之方法,其中該USB設備可為 USB鍵盤、USB滑鼠、USB攝像頭中之一種或多種。 5 .如申請專利範圍第1項所述之方法,其中該存儲單元可被 098144008 表單編號A0101 第8頁/共12頁 0982075338-0 201122803 修改而對應測試不同配置之電子裝置。 6 . —種測試電子裝置之USB設備之系統,用以測試電子裝置 與對應之USB設備是否連接完好,該系統包括一測試模組 ,該測試模組中設有一存儲單元,該存儲單元中存儲了該 電子裝置之各個USB介面與應該連接到電子裝置之各個 USB介面之USB設備之產品識別碼,該測試模組分別連接 到每一 USB介面’查看連接到對應USB介面上之USB設備之 產品識別碼是否與存儲單元中一致,從而判斷該電子裝置 與對應之USB設備是否連接完好。 7 .如申請專利範圍第6項所述之系統’其中該USB設備可為 USB鍵盤、USB滑鼠、USB攝像頭中之一種或多種。 8 .如申請專利範圍第6項所述之,系統’其中該存儲單元可被 修改而對應測試不同配置之電子裝置。 9 .如申請專利範圍第6項所述之系統’其中該存儲單元中還 存儲了應連接到該USB介面之USB設備之供應商識別碼, 該測試模組在查看該USB設備之產品識別碼之同時亦查看 其供應商識別碼,並將該USB設僥之供應商識別碼與存儲 單元中之供應商識別碼進行比較。 0982075338-0 098144008 表單編號A0101 第9頁/共12頁201122803 VII. Patent application scope: 1 . A method for testing a USB device of an electronic device for testing whether a USB device having a USB interface and a corresponding USB device are connected properly. The test method comprises the following steps: providing a storage unit 'The storage unit stores a product identification code of the USB device to be connected to the USB interface; a test module checks the product identification code of the USB device connected to the USB interface; and the product identification code of the USB device and the The product identification code in the storage unit is compared. If the same, the electronic device is connected to the corresponding USB device. If not, the electronic device and the corresponding USB device are not connected. 2. The method of claim 1, wherein the storage unit further stores a vendor identification code of a USB device to be connected to the USB interface, and the test module is viewing the product identifier of the USB device. At the same time, the vendor identification code is also checked, and the supply identifier of the USB device is compared with the vendor identification code in the storage unit. 3. The method of claim 1, wherein the electronic device is provided with a plurality of USB interfaces and is connected to a plurality of USB devices, wherein the storage unit stores product identification of USB devices to which each USB interface should be connected. The test module checks the product identification code of each USB device connected to each USB interface one by one, and compares it with the product identification code in the storage unit. 4. The method of claim 3, wherein the USB device can be one or more of a USB keyboard, a USB mouse, and a USB camera. 5. The method of claim 1, wherein the storage unit is modified by 098144008 Form No. A0101, page 8 / page 12, 0982075338-0 201122803 to correspond to testing different configurations of the electronic device. 6. A system for testing a USB device of an electronic device for testing whether an electronic device is connected to a corresponding USB device, the system comprising a test module, wherein the test module is provided with a storage unit, and the storage unit stores The product identification code of each USB interface of the electronic device and the USB device that should be connected to each USB interface of the electronic device, the test module is respectively connected to each USB interface to view the product connected to the USB device corresponding to the USB interface Whether the identification code is consistent with the storage unit, thereby determining whether the electronic device is properly connected to the corresponding USB device. 7. The system of claim 6, wherein the USB device is one or more of a USB keyboard, a USB mouse, and a USB camera. 8. The system of claim 6, wherein the storage unit is modifiable to correspond to testing different configurations of electronic devices. 9. The system of claim 6, wherein the storage unit further stores a vendor identifier of a USB device to be connected to the USB interface, and the test module is viewing the product identifier of the USB device. At the same time, the supplier identifier is also checked, and the supplier identifier of the USB device is compared with the vendor identifier in the storage unit. 0982075338-0 098144008 Form No. A0101 Page 9 of 12
TW98144008A 2009-12-21 2009-12-21 Method and system for testing USB peripheral module of electronic device TW201122803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98144008A TW201122803A (en) 2009-12-21 2009-12-21 Method and system for testing USB peripheral module of electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98144008A TW201122803A (en) 2009-12-21 2009-12-21 Method and system for testing USB peripheral module of electronic device

Publications (1)

Publication Number Publication Date
TW201122803A true TW201122803A (en) 2011-07-01

Family

ID=45046353

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98144008A TW201122803A (en) 2009-12-21 2009-12-21 Method and system for testing USB peripheral module of electronic device

Country Status (1)

Country Link
TW (1) TW201122803A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164357A (en) * 2011-12-17 2013-06-19 鸿富锦精密工业(深圳)有限公司 Removal strategy setting method of electronic device and universal serial bus (USB) device
CN111737066A (en) * 2020-05-29 2020-10-02 浪潮电子信息产业股份有限公司 USB signal testing system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164357A (en) * 2011-12-17 2013-06-19 鸿富锦精密工业(深圳)有限公司 Removal strategy setting method of electronic device and universal serial bus (USB) device
US20130159688A1 (en) * 2011-12-17 2013-06-20 Hon Hai Precision Industry Co., Ltd. Electronic device and method of setting removal policy of usb device
CN103164357B (en) * 2011-12-17 2017-10-13 赛恩倍吉科技顾问(深圳)有限公司 The remove strategies establishing method of electronic installation and USB device
CN111737066A (en) * 2020-05-29 2020-10-02 浪潮电子信息产业股份有限公司 USB signal testing system and method

Similar Documents

Publication Publication Date Title
US8549478B2 (en) Graphical user interface input element identification
CN109558282B (en) PCIE link detection method, system, electronic equipment and storage medium
US11055628B2 (en) Program storage medium, method, and system for providing learning model difference
US7293204B2 (en) Computer peripheral connecting interface system configuration debugging method and system
US8943459B2 (en) Computing device and method for testing layout of power pin of chipset on circuit board
US20170192768A1 (en) Updating system of firmware of complex programmable logic device and updating method thereof
JP6283096B2 (en) Program test service
CN102053900A (en) Method and system for testing USB (Universal Serial Bus) equipment of electronic device
US11366800B2 (en) System and method to automate validating media redirection in testing process
US20130032633A1 (en) Chip test system
TW201301970A (en) Signal transmission line length check system and method
TW201122803A (en) Method and system for testing USB peripheral module of electronic device
CN113434542A (en) Data relation identification method and device, electronic equipment and storage medium
CN109214144A (en) The soft core property right protection of IP and infringement identification method based on USB3.2 agreement TS2 training sequence
CN109102436A (en) The soft core property right protection of IP and infringement identification method based on USB3.0 agreement TS1 training sequence
US10803219B1 (en) Method and system for combined formal static analysis of a design code
CN110018828B (en) Source code checking method and device and terminal equipment
CN107818061A (en) Data bus and management bus for associated peripheral devices
TW201439558A (en) Electronic apparatus, electro-static discharge detecting system and method thereof
CN113051171A (en) Interface test method, device, equipment and storage medium
CN105786658A (en) Computer system and method capable of detecting internal computer state
CN109145527A (en) The soft core property right protection of IP and infringement identification method based on USB3.1 agreement TS2 training sequence
CN109165481A (en) The soft core property right protection of IP and infringement identification method based on USB3.0 agreement TS2 training sequence
CN109214143A (en) The soft core property right protection of IP and infringement identification method based on USB3.2 agreement TS1 training sequence
US11960880B2 (en) Systems and methods for remediation of software configuration