CN110737619A - data transmission method and device based on OTG port - Google Patents

data transmission method and device based on OTG port Download PDF

Info

Publication number
CN110737619A
CN110737619A CN201910228009.0A CN201910228009A CN110737619A CN 110737619 A CN110737619 A CN 110737619A CN 201910228009 A CN201910228009 A CN 201910228009A CN 110737619 A CN110737619 A CN 110737619A
Authority
CN
China
Prior art keywords
test
usb
module
port
upper computer
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
CN201910228009.0A
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 CN110737619A publication Critical patent/CN110737619A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Abstract

The invention provides data transmission methods and devices based on OTG ports, wherein the method comprises the steps that a lower computer runs a downloaded target system, the lower computer uses a built-in OGT port as a USB transfer serial port to communicate with an upper computer, the lower computer runs the target system to complete testing, and after the testing is completed, testing result data are uploaded to the upper computer through the USB transfer serial port.

Description

data transmission method and device based on OTG port
Technical Field
The invention relates to the technical field of equipment detection, in particular to data transmission methods and devices based on an OTG (optical transport gateway).
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 data transmission methods based on an OTG (on-the-go) port to achieve the aim of simply and efficiently completing the test of a lower computer, and the method comprises the following steps:
the lower computer runs the downloaded target system;
the lower computer communicates with the upper computer by taking the built-in OGT port as a USB switching port;
and the lower computer operates the target system to complete the test, and after the test is completed, test result data are uploaded to the upper computer through the USB-to-serial port.
In embodiments, after the test is completed, and after the test result data is uploaded to the upper computer through the USB transfer port, the method further includes:
the upper computer runs a preset tool to open the USB-to-serial port so as to receive the test result data;
and the upper computer displays the test result data.
In embodiments, the predetermined tool is printest.
In embodiments, the running of a preset tool by the upper computer to open the USB to serial port includes:
the upper computer runs the preset tool to automatically acquire the port number of the USB-to-serial port;
and the upper computer runs the preset tool to automatically open the USB-to-serial port according to the port number.
In embodiments, the lower computer running the target system to complete testing, comprising:
the lower computer operates the target system to complete the test of the built-in module, wherein the built-in module at least comprises of an audio module, a wifi module, a Bluetooth module and a key module.
The embodiment of the invention also provides data transmission devices based on the OTG port, which are used for achieving the purpose of simply and efficiently completing the test of the lower computer, and the device comprises the lower computer, wherein the lower computer comprises:
the running module is used for running the downloaded target system;
the generating module is used for communicating the built-in OGT port serving as a USB transfer port with an upper computer;
and the uploading module is used for operating the target system to complete the test, and uploading test result data to the upper computer through the USB-to-serial port after the test is completed.
In embodiments, the apparatus further comprises an upper computer, the upper computer comprising:
the receiving module is used for operating a preset tool to open the USB transfer port after the test result data is uploaded to the upper computer through the USB transfer port after the test is finished so as to receive the test result data;
and the display module is used for displaying the test result data.
In embodiments, the predetermined tool is printest.
In embodiments, the receiving module includes:
the acquisition unit is used for operating the preset tool to automatically acquire the port number of the USB-to-serial port;
and the opening unit is used for operating the preset tool to automatically open the USB-to-serial port according to the port number.
In embodiments, the running of the target system by the lower computer to complete the test includes running the target system by the lower computer to complete the test of a built-in module, wherein the built-in module includes at least of an audio module, a wifi module, a bluetooth module, and a key module.
In the embodiment of the invention, the lower computer uses the built-in OGT port as a USB to serial port to communicate with the upper computer; and the lower computer operates the target system to complete the test, and after the test is completed, test result data are uploaded to the upper computer through the USB transfer serial port. By the above mode, the lower computer can complete communication with the upper computer through the OTG port and test the target module, and the purpose 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 flow chart of a testing method according to an embodiment of the present invention;
fig. 3 is a flowchart of a data transmission method based on an OTG port according to an embodiment of the present invention;
fig. 4 is a block diagram of a data transmission 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, comprising 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 port device but actually communicates with a USB, OTG is USB interfaces, Printest is tool software running in windows, Linux is open source operating system 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 plurality 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 runs the downloaded target system;
step 302: the lower computer communicates with the upper computer by taking the built-in OGT port as a USB switching port;
step 303: and the lower computer operates the target system to complete the test, and after the test is completed, test result data are uploaded to the upper computer through the USB-to-serial port.
In the upper case, the lower computer uses a built-in OGT port as a USB transfer port to communicate with the upper computer; and the lower computer operates the target system to complete the test, and after the test is completed, test result data are uploaded to the upper computer through the USB transfer serial port. By the above mode, the lower computer can complete communication with the upper computer through the OTG port and test the target module, and the purpose of simply and efficiently completing the test is achieved.
For the communication between the upper computer and the lower computer, the transmission of the test result is mainly completed, and therefore, after the test is completed, the test result data is uploaded to the upper computer through the USB transfer serial port, the method can comprise the following steps:
s1: the upper computer runs a preset tool to open the USB transfer port so as to receive the test result data;
s2: and the upper computer displays the test result data.
Namely, the upper computer controls to open the USB serial port so as to complete the receiving of the test result data, and completes the display of the data after the test result data is obtained.
The preset tool may be Printsest.
In the above step S1, the running of the upper computer by the preset tool opens the USB serial port, which may include: the upper computer runs the preset tool to automatically acquire the port number of the USB-to-serial port; and the upper computer runs the preset tool to automatically open the USB-to-serial port according to the port number.
Namely, the upper computer can switch the opening of the serial port through the port number time limit USB, so that the communication between the upper computer and the lower computer is triggered.
The running of the target system by the lower computer to complete the test can include the running of the target system by the lower computer to complete the test of the built-in module, wherein the built-in module can include at least of an audio module, a wifi module, a bluetooth module and a key module.
Based on the same inventive concept, data transmission 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 data transmission device based on the OTG port is similar to the data transmission method based on the OTG port, the implementation of the data transmission device based on the OTG port can refer to the implementation of the data transmission method based on the OTG port, and the repeated parts are not described again.
An operation module 401, configured to operate the downloaded target system;
a generating module 402, configured to communicate with an upper computer by using a built-in OGT port as a USB serial port;
and the uploading module 403 is configured to run the target system to complete the test, and upload test result data to the upper computer through the USB to serial port after the test is completed.
In embodiments, the device further comprises an upper computer, wherein the upper computer comprises a receiving module and a display module, the receiving module is used for running a preset tool to open the USB transfer serial port to receive the test result data after the test is completed and the test result data is uploaded to the upper computer through the USB transfer serial port, and the display module is used for displaying the test result data.
In embodiments, the preset tool may be printest.
In embodiments, the receiving module may include an obtaining unit configured to run the preset tool to automatically obtain a port number of the USB to serial port, and an opening unit configured to run the preset tool to automatically open the USB to serial port according to the port number.
In embodiments, the lower computer running the target system to complete the test may include the lower computer running the target system to complete the test on a built-in module, wherein the built-in module may include, but is not limited to, at least of an audio module, a wifi module, a bluetooth module, and a key module.
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 embodiments of the present invention achieve the following technical effects: the lower computer uses the built-in OGT port as a USB switching port to communicate with the upper computer; and the lower computer operates the target system to complete the test, and after the test is completed, test result data are uploaded to the upper computer through the USB transfer serial port. By the above mode, the lower computer can complete communication with the upper computer through the OTG port and test the target module, and the purpose of simply and efficiently completing the test is achieved.
Where the context permits, reference to element or component or step(s), etc. should not be construed as limited to only of the elements, components, or steps, but may be or more of the elements, components, or steps, etc.
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, A data transmission method based on OTG interface, which is characterized in that it includes:
the lower computer runs the downloaded target system;
the lower computer communicates with the upper computer by taking the built-in OGT port as a USB switching port;
and the lower computer operates the target system to complete the test, and after the test is completed, test result data are uploaded to the upper computer through the USB-to-serial port.
2. The method of claim 1, wherein after the test is completed and the test result data is uploaded to the upper computer through the USB serial port, the method further comprises:
the upper computer runs a preset tool to open the USB-to-serial port so as to receive the test result data;
and the upper computer displays the test result data.
3. The method of claim 2, wherein the predetermined tool is Printsest.
4. The method according to claim 2, wherein the upper computer runs a preset tool to open the USB-to-serial port, and the method comprises the following steps:
the upper computer runs the preset tool to automatically acquire the port number of the USB-to-serial port;
and the upper computer runs the preset tool to automatically open the USB-to-serial port according to the port number.
5. The method of claim 1, wherein the lower computer runs the target system to complete a test, comprising:
the lower computer operates the target system to complete the test of the built-in module, wherein the built-in module at least comprises of an audio module, a wifi module, a Bluetooth module and a key module.
6, kinds of data transmission device based on OTG mouth, including the lower computer, wherein, the lower computer includes:
the running module is used for running the downloaded target system;
the generating module is used for communicating the built-in OGT port serving as a USB transfer port with an upper computer;
and the uploading module is used for operating the target system to complete the test, and uploading test result data to the upper computer through the USB-to-serial port after the test is completed.
7. The apparatus of claim 6, further comprising: the host computer, the host computer includes:
the receiving module is used for operating a preset tool to open the USB transfer port after the test result data is uploaded to the upper computer through the USB transfer port after the test is finished so as to receive the test result data;
and the display module is used for displaying the test result data.
8. The device of claim 7, wherein the predetermined tool is Printsest.
9. The apparatus of claim 7, wherein the receiving module comprises:
the acquisition unit is used for operating the preset tool to automatically acquire the port number of the USB-to-serial port;
and the opening unit is used for operating the preset tool to automatically open the USB-to-serial port according to the port number.
10. The apparatus of claim 6, wherein the lower computer runs the target system to complete the test, comprising the lower computer running the target system to complete the test on built-in modules, wherein the built-in modules comprise at least of an audio module, a wifi module, a Bluetooth module, and a key module.
CN201910228009.0A 2018-07-20 2019-03-25 data transmission method and device based on OTG port Pending CN110737619A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810803170 2018-07-20
CN2018108031701 2018-07-20

Publications (1)

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

Family

ID=69236639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910228009.0A Pending CN110737619A (en) 2018-07-20 2019-03-25 data transmission method and device based on OTG port

Country Status (1)

Country Link
CN (1) CN110737619A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836877A (en) * 2015-02-10 2015-08-12 数据通信科学技术研究所 Method for debugging and detecting mobile phone
CN105635184A (en) * 2016-03-22 2016-06-01 青岛海信宽带多媒体技术有限公司 Communication protocol conversion method, device and system
CN105677560A (en) * 2015-12-31 2016-06-15 北京经纬恒润科技有限公司 Testing method, device and system
CN207099095U (en) * 2017-08-31 2018-03-13 武汉中电物联科技有限公司 Handheld test system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836877A (en) * 2015-02-10 2015-08-12 数据通信科学技术研究所 Method for debugging and detecting mobile phone
CN105677560A (en) * 2015-12-31 2016-06-15 北京经纬恒润科技有限公司 Testing method, device and system
CN105635184A (en) * 2016-03-22 2016-06-01 青岛海信宽带多媒体技术有限公司 Communication protocol conversion method, device and system
CN207099095U (en) * 2017-08-31 2018-03-13 武汉中电物联科技有限公司 Handheld test system

Similar Documents

Publication Publication Date Title
CN108845930B (en) Interface operation test method and device, storage medium and electronic device
CN111045893B (en) Method, device and system for executing monitoring task, storage medium and electronic device
US20220012165A1 (en) Method and apparatus for debugging device
CN107836122A (en) Select subscriber identity module profile main frame
CN106528226B (en) Installation method and device of operating system
CN107894935A (en) OPS computer module detection process method, apparatus and electronic equipment
CN114153782A (en) Data processing system, method and storage medium
KR20130079046A (en) A simulation system of communication between hmi simulator and plc simulator
CN110737551A (en) method and device for communication between upper computer and lower computer
CN106547602A (en) A kind of manufacture method of the operating system mirror image suitable for the loading of iSCSI protocol long distance wireless
CN107364140B (en) Method and system for initial parameter configuration and function detection of multiple 3D printers
CN105224453A (en) The automatic test approach of system compatibility and device
CN110737619A (en) data transmission method and device based on OTG port
CN107656739A (en) code compiling method and device based on windows systems
US20190137567A1 (en) Systems and methods for debugging access
CN111382004B (en) Parameter backup method and device, parameter restoration method and device and backup restoration system
CN107659621B (en) RAID control card configuration method and device
CN110737581A (en) testing methods and devices
CN110737583A (en) method and device for testing test code
CN110737582A (en) OTG port-based detection method and device
CN110737561A (en) embedded test systems
CN101706758B (en) Identification method of multiple sets of PCI equipment with same hardware configuration under Windows system
RU59284U1 (en) MANAGEMENT SYSTEM SIMULATOR
CN115687223A (en) Method and device for serial port communication of embedded equipment, embedded equipment and storage medium
CN114095409A (en) Remote detection method, device, equipment and storage medium for terminal equipment fault

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200131