CN110737582A - OTG port-based detection method and device - Google Patents

OTG port-based detection method and device Download PDF

Info

Publication number
CN110737582A
CN110737582A CN201910228723.XA CN201910228723A CN110737582A CN 110737582 A CN110737582 A CN 110737582A CN 201910228723 A CN201910228723 A CN 201910228723A CN 110737582 A CN110737582 A CN 110737582A
Authority
CN
China
Prior art keywords
lower computer
test
port
otg
file system
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201910228723.XA
Other languages
Chinese (zh)
Inventor
徐吉斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ingenic Semiconductor Co Ltd
Original Assignee
Beijing Ingenic Semiconductor 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 Beijing Ingenic Semiconductor Co Ltd filed Critical Beijing Ingenic Semiconductor Co Ltd
Publication of CN110737582A publication Critical patent/CN110737582A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides detection methods and devices based on OTG ports, wherein the method comprises the steps that a lower computer downloads a file system containing test codes from an OTG port of the lower computer into a memory of the lower computer through tool software running on an upper computer, the lower computer runs the file system and automatically executes a test script to complete the test of a target module in the lower computer, and the test codes are downloaded and the target module is tested through the OTG port, so that the technical problem that the existing test device and method are too complex is solved, and the technical effect of simply and efficiently completing the test is achieved.

Description

OTG port-based detection method and device
Technical Field
The invention relates to the technical field of equipment control, in particular to detection methods and devices based on an OTG (on-the-go) port.
Background
In order to realize the test of the upper computer on the module in the lower computer, generally has the obstacles of downloading the test program and communicating with the upper computer, in the existing mode , the test program is downloaded through a dedicated channel, and then data communication between the upper computer and the lower computer is completed through dedicated channels, which inevitably results in the complexity of the test system.
In order to simplify the test system and achieve the purpose of simple and efficient test, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides detection methods based on an OTG port, so as to achieve the aim of simply and efficiently completing the test, and the method comprises the following steps:
downloading a file system containing test codes from an OTG (on-the-go) port of the lower computer to a memory of the lower computer by the lower computer through tool software running on the upper computer;
and the lower computer operates the file system and automatically executes the test script to complete the test of the target module in the lower computer.
In embodiments, the th tool software is a burning tool.
In embodiments, downloading a file system including a test code from an OTG port of a lower computer into a memory of the lower computer includes:
sending a download control command to the OTG port;
and the OTG port responds to the download control command and downloads the file system to the specified position of the memory.
In embodiments, the designated location is a location for storing a file system that is set in advance.
In embodiments, after the lower computer runs the file system and automatically executes a test script to complete testing of a target module in the lower computer, the method further comprises:
taking the OTG port as a USB-to-serial port;
and transmitting the test result to the upper computer through the USB switching port.
The embodiment of the invention also provides detection devices based on the OTG port, which are positioned in the lower computer to achieve the aim of simply and efficiently completing the test, and the device comprises:
the downloading module is used for downloading a file system containing a test code from an OTG (on-the-go) port of the lower computer to an internal memory of the lower computer through tool software running on the upper computer;
and the execution module is used for operating the file system and automatically executing the test script to complete the test of the target module in the lower computer.
In embodiments, the th tool software is a burning tool.
In embodiments, the download module comprises:
a sending unit, configured to send a download control command to the OTG port;
and the downloading unit is used for controlling the OTG to respond to the downloading control command and download the file system to the specified position of the memory.
In embodiments, the designated location is a location for storing a file system that is set in advance.
In embodiments, the apparatus further comprises:
the appointed module is used for operating the file system in the lower computer and automatically executing a test script to complete the test of a target module in the lower computer, and then the OTG port is used as a USB-to-serial port;
and the transmission module is used for transmitting the test result to the upper computer through the USB-to-serial port.
In the embodiment of the invention, the lower computer downloads a file system containing test codes from an OTG (on-the-go) port of the lower computer to a memory of the lower computer through tool software running on the upper computer, then the lower computer runs the file system and automatically executes a test script to complete the test of a target module in the lower computer, and the test codes are downloaded and the target module is tested through the OTG port, so that the technical problem that the conventional test device and method are too complex is solved, and the technical effect of simply and efficiently completing the test is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and constitute a part of this application and not limiting of the invention, are illustrated in the accompanying drawings, in which:
FIG. 1 is a schematic diagram of an embedded test system according to an embodiment of the present invention;
FIG. 2 is a method flow diagram of a testing method according to an embodiment of the invention;
FIG. 3 is a flow chart of a method of an OTG port-based detection method according to an embodiment of the present invention;
fig. 4 is a block diagram of a detection device based on an OTG port according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further with reference to the following embodiments and accompanying drawings.
In view of the existing problem that has a test program downloaded and a communication barrier with the upper computer in order to test the modules in the lower computer by the upper computer, the existing method has a problem that the test program is downloaded through a -dedicated channel and data communication between the upper computer and the lower computer is completed through -dedicated channels , which inevitably causes the test system to be over-responsible.
Based on this, kinds of embedded test systems are provided in this example, as shown in fig. 1, the embedded test systems include an upper computer and a lower computer, wherein:
an OTG port and a memory are arranged on the lower computer;
the upper computer is computer equipment for operating a windows system;
and the lower computer downloads a file system carrying test codes to the memory through the OTG port, and the lower computer communicates the OTG port serving as a USB transfer serial port with the upper computer.
The lower computer can comprise at least of an audio module, a wifi module, a Bluetooth module and a key module, namely, the embedded test system can complete the test of the modules in the lower computer.
A burning tool can be operated in the upper computer. Specifically, the lower computer is provided with a CPU, and the CPU can be an X1000 chip.
In the above example, types of test codes can be downloaded and the communication between the upper computer and the lower computer can be completed only by using OTG ports, the interfaces are simple, the upper computer and the lower computer can automatically communicate without human intervention, the test codes can be automatically lost after power failure, and the original environment of equipment can not be polluted.
Based on the embedded test system, embedded device test solutions are also provided in this example, as shown in fig. 2, including the following steps:
and S1, the upper computer runs tool software, and the lower computer downloads the linux needs trace file system containing the test codes from the OTG port of the lower computer to the specified position of the memory of the lower computer through the tool software.
And S2, the lower computer runs the downloaded Linux system, the lower computer starts the Linux system, then the OTG port of the lower computer is used as a USB (universal serial bus) to be communicated with the upper computer, and after the Linux system runs, the test script is automatically executed to complete each function test of the lower computer and send the test result to the upper computer.
And S3, the upper computer runs another tool software, receives the test result sent by the lower computer through the USB-to-serial port of the lower computer and displays the test result, and the tool software can automatically acquire the port number of the USB-to-serial port and automatically open the communication function of the port.
For example, a Linux initramfs test program can be downloaded to a designated position of a memory of a lower computer through a cloner burning tool, a CPU of the lower computer can be an X1000 chip, after a test code is downloaded, the cloner burning tool of an upper computer sends a command through an OTG port of the lower computer, the lower computer starts to operate the downloaded Linux initramfs, after a Linux system is started, detection of each module (such as audio, wifi Bluetooth and keys) of the lower computer is automatically completed, a detection result is sent to the upper computer, and the upper computer automatically opens a USB transfer serial port through another tool Printest and receives and displays the test result.
In other words, in the above example, the lower computer downloads the test program to the memory through the OTG port, and then automatically downloads the test program, and the lower computer communicates with the upper computer through the USB to serial port, and the upper computer software can automatically communicate with the lower computer.
The upper computer can run a PC of a windows system, the lower computer can be an embedded device, a cloner burning tool is software for burning firmware, a USB-to-serial port is a virtual serial port of a USB port, a user sees a serial device but actually communicates with a USB, OTG is USB interfaces, Printest is tool software running in windows, Linux is open source operating systems and runs on the embedded device, Initramfs is Linux file systems based on a memory, and X1000 is microprocessors based on mips architecture.
Although the flow described below includes a number of operations that occur in a particular order, it should be clear that the processes may include more or less operations that may be performed sequentially or in parallel (e.g., using parallel processors or a multi-threaded environment). As shown in FIG. 3, the method includes:
step 301, the lower computer downloads a file system containing test codes from an OTG port of the lower computer into a memory of the lower computer through tool software running on the upper computer;
step 302: and the lower computer operates the file system and automatically executes the test script to complete the test of the target module in the lower computer.
In the above example, the lower computer downloads a file system containing test codes from an OTG port of the lower computer to a memory of the lower computer through -th tool software running on the upper computer, and then the lower computer runs the file system and automatically executes a test script to complete testing of a target module in the lower computer.
The -th tool software is a burning tool, i.e., a cloner burning tool.
The step 301 of downloading the file system including the test code from the OTG port of the lower computer to the memory of the lower computer may include:
s1: sending a download control command to the OTG port;
s2: and the OTG port responds to the download control command and downloads the file system to the specified position of the memory.
In embodiments, the designated location may be a location of a predetermined setting for storing the file system.
In order to realize the communication between the lower computer and the upper computer and realize the transmission of the test result, the lower computer runs the file system and automatically executes the test script to complete the test of the target module in the lower computer, and then the lower computer can also use the OTG port as a USB-to-serial port; and transmitting the test result to the upper computer through the USB switching port.
Based on the same inventive concept, detection devices based on the OTG port are further provided in the embodiments of the present invention, as described in the following embodiments, since the principle of solving the problem of the detection device based on the OTG port is similar to the detection method based on the OTG port, the implementation of the detection device based on the OTG port can refer to the implementation of the detection method based on the OTG port, and the repeated description is omitted.
The downloading module 401 is configured to download the file system including the test code from the OTG port of the lower computer to the memory of the lower computer through -th tool software running on the upper computer;
and the execution module 402 is used for operating the file system and automatically executing the test script to complete the test of the target module in the lower computer.
In embodiments, the tool software may be a burning tool.
In embodiments, the download module 401 may include a sending unit configured to send a download control command to the OTG port, and a download unit configured to control the OTG port to download the file system to a specified location of the memory in response to the download control command.
In embodiments, the designated location may be a location predetermined to store the file system.
In embodiments, the apparatus may further include a designation module configured to run the file system on the lower computer and automatically execute a test script to complete a test on a target module in the lower computer, and then use the OTG port as a USB to serial port, and a transmission module configured to transmit a test result to the upper computer through the USB to serial port.
In another embodiments, software is provided, which is used to implement the technical solutions described in the above embodiments and preferred embodiments.
In another embodiments, storage media are provided, which store the above software, including but not limited to optical disks, floppy disks, hard disks, removable memory, and the like.
From the above description, it can be seen that the embodiment of the present invention achieves the following technical effects that the lower computer downloads the file system containing the test code from the OTG port of the lower computer to the memory of the lower computer through the th tool software running on the upper computer, then the lower computer runs the file system and automatically executes the test script to complete the test of the target module in the lower computer, and the download of the test code and the test of the target module are completed through the OTG port, so that the technical problem that the existing test device and method are too complicated is solved, and the technical effect of simply and efficiently completing the test is achieved.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1, detection method based on OTG port, characterized in that, the method includes:
downloading a file system containing test codes from an OTG (on-the-go) port of the lower computer to a memory of the lower computer by the lower computer through tool software running on the upper computer;
and the lower computer operates the file system and automatically executes the test script to complete the test of the target module in the lower computer.
2. The method of claim 1, wherein the -th tool software is a burning tool.
3. The method of claim 1, wherein downloading a file system containing test code from an OTG port of a lower computer into a memory of the lower computer comprises:
sending a download control command to the OTG port;
and the OTG port responds to the download control command and downloads the file system to the specified position of the memory.
4. The method of claim 3, wherein the designated location is a predetermined set location for storing a file system.
5. The method of claim 1, wherein after the lower computer runs the file system and automatically executes a test script to complete testing of a target module in the lower computer, the method further comprises:
taking the OTG port as a USB-to-serial port;
and transmitting the test result to the upper computer through the USB switching port.
6, detection device based on OTG mouth, its characterized in that is located the next machine, includes:
the downloading module is used for downloading a file system containing a test code from an OTG (on-the-go) port of the lower computer to an internal memory of the lower computer through tool software running on the upper computer;
and the execution module is used for operating the file system and automatically executing the test script to complete the test of the target module in the lower computer.
7. The apparatus of claim 6, wherein the -th tool software is a burning tool.
8. The apparatus of claim 6, wherein the download module comprises:
a sending unit, configured to send a download control command to the OTG port;
and the downloading unit is used for controlling the OTG to respond to the downloading control command and download the file system to the specified position of the memory.
9. The apparatus of claim 8, wherein the designated location is a predetermined set location for storing a file system.
10. The apparatus of claim 6, further comprising:
the appointed module is used for operating the file system in the lower computer and automatically executing a test script to complete the test of a target module in the lower computer, and then the OTG port is used as a USB-to-serial port;
and the transmission module is used for transmitting the test result to the upper computer through the USB-to-serial port.
CN201910228723.XA 2018-07-20 2019-03-25 OTG port-based detection method and device Pending CN110737582A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2018108026722 2018-07-20
CN201810802672 2018-07-20

Publications (1)

Publication Number Publication Date
CN110737582A true CN110737582A (en) 2020-01-31

Family

ID=69236657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910228723.XA Pending CN110737582A (en) 2018-07-20 2019-03-25 OTG port-based detection method and device

Country Status (1)

Country Link
CN (1) CN110737582A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159957A (en) * 2007-10-25 2008-04-09 中兴通讯股份有限公司 Data terminal equipment updating, renovating method and device
CN102143266A (en) * 2011-02-18 2011-08-03 深圳桑菲消费通信有限公司 Method for extending universal serial bus (USB) interface of mobile terminal into serial communication interface
US20140211021A1 (en) * 2013-01-25 2014-07-31 Samsung Electronics Co., Ltd. Test system for evaluating mobile device and driving method thereof
CN104836877A (en) * 2015-02-10 2015-08-12 数据通信科学技术研究所 Method for debugging and detecting mobile phone
CN204948361U (en) * 2015-09-01 2016-01-06 深圳市创维电器科技有限公司 A kind of information safety protection terminal
JP2017224105A (en) * 2016-06-14 2017-12-21 株式会社リコー Information processing device, information processing method and program
CN207571202U (en) * 2017-08-28 2018-07-03 三诺生物传感股份有限公司 A kind of device for being applied to detection USB and turning serial port module

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159957A (en) * 2007-10-25 2008-04-09 中兴通讯股份有限公司 Data terminal equipment updating, renovating method and device
CN102143266A (en) * 2011-02-18 2011-08-03 深圳桑菲消费通信有限公司 Method for extending universal serial bus (USB) interface of mobile terminal into serial communication interface
US20140211021A1 (en) * 2013-01-25 2014-07-31 Samsung Electronics Co., Ltd. Test system for evaluating mobile device and driving method thereof
CN104836877A (en) * 2015-02-10 2015-08-12 数据通信科学技术研究所 Method for debugging and detecting mobile phone
CN204948361U (en) * 2015-09-01 2016-01-06 深圳市创维电器科技有限公司 A kind of information safety protection terminal
JP2017224105A (en) * 2016-06-14 2017-12-21 株式会社リコー Information processing device, information processing method and program
CN207571202U (en) * 2017-08-28 2018-07-03 三诺生物传感股份有限公司 A kind of device for being applied to detection USB and turning serial port module

Similar Documents

Publication Publication Date Title
CN104471537A (en) Intermediary virtual machine task management
US10572623B2 (en) Back-pressure in virtual machine interface
CN108804109B (en) Industrial deployment and control method based on multi-path functional equivalent module redundancy arbitration
CN104202105A (en) Bluetooth device testing method and system
CN107278294A (en) Input equipment implementation method and its realize device
CN113010470A (en) Edge node remote control system, method, device and storage medium
KR101323937B1 (en) A simulation system of communication between HMI simulator and PLC simulator
US20130030568A1 (en) Robot system control method and a device therefor
CN104391718A (en) EPLC (Embedded Programmable Logic Controller) program remote downloading method
CN104199716A (en) Virtual machine thermal migration method, physical host and system
CN110737582A (en) OTG port-based detection method and device
CN105224453A (en) The automatic test approach of system compatibility and device
KR20130022804A (en) Re-programming control module and re-programming system and method using the re-programming control module
CN107656739A (en) code compiling method and device based on windows systems
CN110737551A (en) method and device for communication between upper computer and lower computer
CN105824682B (en) A kind of monitoring method of virtual machine, device and system
JP2940841B2 (en) Processor module for programmable controller
CN110737583A (en) method and device for testing test code
US20190108110A1 (en) System and method for automated integration and stress testing of hardware and software service in management controller using containerized toolbox
CN107659621B (en) RAID control card configuration method and device
CN110737619A (en) data transmission method and device based on OTG port
CN110737581A (en) testing methods and devices
CN110737561A (en) embedded test systems
CN109885329B (en) Upgrading method and system and electronic equipment
CN109634230B (en) Signal acquisition and control device and service configuration method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200131

RJ01 Rejection of invention patent application after publication