CN105068954B - The communication means and device of terminal interface - Google Patents
The communication means and device of terminal interface Download PDFInfo
- Publication number
- CN105068954B CN105068954B CN201510528510.0A CN201510528510A CN105068954B CN 105068954 B CN105068954 B CN 105068954B CN 201510528510 A CN201510528510 A CN 201510528510A CN 105068954 B CN105068954 B CN 105068954B
- Authority
- CN
- China
- Prior art keywords
- otg
- data cable
- usb
- external equipment
- data
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
- Information Transfer Systems (AREA)
Abstract
The invention discloses the communication means and device of a kind of terminal interface, wherein method includes:Detection is currently inserted into the data cable type of mobile terminal interface;If the data cable type is USB data line, operation is interacted with external equipment using pre-set USB configuration parameters;If the data cable type is OTG data cables, the external equipment is identified using pre-set at least one OTG configurations parameter;Operation is interacted with external equipment using the successful OTG configuration parameters of identification.The embodiment of the present invention can make the compatible different external equipment of terminal.
Description
Technical field
The present embodiments relate to technical field of mobile terminals, more particularly to a kind of and terminal interface communication means and dress
Put.
Background technology
With the development of science and technology, present user is higher and higher to the dependence of mobile terminal, and in order to meet user's
Some demands, it is often necessary to mobile terminal and some external equipments are interacted, such as connection OTG (OnTheGo) equipment or
Person's Universal Serial Bus (Universal Serial Bus, USB) equipment (such as flash disk, that is, USB flash disk) etc..
And current mobile terminal, when connecting external equipment, often there are the following problems:For same mobile terminal
Peripheral Interface, recognizable USB device cannot but identify that OTG equipment, or recognizable OTG equipment cannot but identify USB device.
That is, mobile terminal is there are interface identification is unstable, or the problem of be difficult to compatible different external device.
The content of the invention
The embodiment of the present invention provides a kind of communication means and device of terminal interface, and terminal can be made compatible different external
Equipment.
In a first aspect, an embodiment of the present invention provides a kind of communication means of terminal interface, including:
Detection is currently inserted into the data cable type of mobile terminal interface;
If the data cable type is USB data line, carried out using pre-set USB configuration parameters with external equipment
Interactive operation;
If the data cable type is OTG data cables, parameter is configured to described using pre-set at least one OTG
External equipment is identified;
Operation is interacted with external equipment using the successful OTG configuration parameters of identification.
Second aspect, the embodiment of the present invention also provide a kind of communicator of terminal interface, including:
Data cable type detection module, the data cable type of mobile terminal interface is currently inserted into for detecting;
Usb communication module, if detecting that data cable type is USB data line for the data cable type detection module,
Operation is then interacted with external equipment using pre-set USB configuration parameters;
OTG identification modules, if detecting that the data cable type is OTG data for the data cable type detection module
Line, then be identified the external equipment using pre-set at least one OTG configurations parameter;
OTG communication modules, for interacting operation with external equipment using the successful OTG configuration parameters of identification.
The type for the data cable type that the embodiment of the present invention is connected by detection with the external equipment, when the data cable
When type is USB data line, then operation is interacted with external equipment using pre-set USB configuration parameters;When the number
It is OTG data cables according to line type, then the external equipment is carried out using pre-set at least one OTG configuration parameters first
Identification;Operation is interacted with external equipment using the successful OTG configuration parameters of identification.The embodiment of the present invention can use different
Configuration parameter interacts operation with external equipment, so as to enable the terminals to compatible different external equipment.
Brief description of the drawings
Fig. 1 is the flow diagram of the communication means for the terminal interface that the embodiment of the present invention one provides;
Fig. 2 is the structure diagram of the communicator of terminal interface provided by Embodiment 2 of the present invention.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that in order to just
It illustrate only part related to the present invention rather than entire infrastructure in description, attached drawing.
The executive agent of the communication means of terminal interface provided in an embodiment of the present invention, can be provided in an embodiment of the present invention
The communicator of terminal interface, or the terminal device of the communicator of terminal interface is integrated with, the communicator of the terminal interface
Hardware or software can be used to realize.
Embodiment one
Fig. 1 is the flow diagram of the communication means for the terminal interface that the embodiment of the present invention one provides, as shown in Figure 1, tool
Body includes:
Step 11, detection are currently inserted into the data cable type of mobile terminal interface;
Wherein, mobile terminal interface is USB interface, can connect external equipment by data cable by the USB interface, this is outer
It can be USB device to connect equipment, or OTG equipment.When the external equipment of its connection is USB device, by corresponding connection number
It is known as USB data line according to line, when the external equipment of its connection is OTG identification equipments, corresponding connection data cable is known as OTG
Data cable.
Specifically, since the external equipment of mobile terminal interface connection is different, it connects specific signal line pair in data cable
The voltage answered also differs, therefore can determine data cable by the corresponding voltage of specific signal line in detection connection data cable
Type.
If step 12, the data cable type are USB data line, using pre-set USB configuration parameter with it is external
Equipment interacts operation;
Wherein, it is the corresponding parameter of USB configuration registers that USB, which configures parameter,.To improve mobile terminal to external equipment
Recognition efficiency, the present embodiment are respectively that USB device and OTG equipment set different match somebody with somebody in advance according to the data cable type of access
Parameter is put, specific number is empirical value, can be obtained by experimental test.Here, the corresponding configuration parameter of USB device is known as
USB configures parameter, and the corresponding configuration parameter of OTG equipment is known as OTG configuration parameters.
When it is USB data line to detect the data cable type, it is determined that the external equipment currently connected sets for USB
It is standby, then operation is interacted with external equipment using pre-set USB configuration parameters.
If step 13, the data cable type are OTG data cables, using pre-set at least one OTG configurations ginseng
It is several that the external equipment is identified;
Since OTG equipment is varied, its corresponding identification level is also uneven, in order to improve the knowledge to OTG equipment
Other efficiency, sets at least one OTG configurations parameter here, when using one of OTG configuration parameter recognition failures, may be selected
Other OTG configurations parameter is re-recognized.
Step 14, using identifying that successful OTG configuration parameter and external equipment interact operation.
The type for the data cable type that the present embodiment is connected by detection with the external equipment, when the data cable type
For USB data line when, then operation is interacted using pre-set USB configuration parameter and external equipment;When the data cable
Type is OTG data cables, then the external equipment is known using pre-set at least one OTG configurations parameter first
Not;Operation is interacted with external equipment using the successful OTG configuration parameters of identification.The present embodiment can use different configurations to join
Number interacts operation with external equipment, so as to enable the terminals to compatible different external equipment.
Exemplary, on the basis of above-described embodiment, parameter is configured to described using pre-set at least one OTG
External equipment is identified, including:
At least one OTG configurations parameter is ranked up according to pre-defined rule;
The external equipment is identified using OTG configurations parameter successively in order.
Wherein, pre-defined rule can customize setting, such as according to eye diagram quality during communication corresponding using OTG configurations parameter
It is ranked up, it is poor before eye diagram quality preferable OTG configuration parameter comes during communication, or by eye diagram quality during communication
Before OTG configurations parameter comes.
Exemplary, the external equipment is identified using OTG configurations parameter successively in order, including:
Communicated by the OTG data cables with the external equipment;
Whether the signal voltage that signal of communication line produces in OTG data cables described in detection communication process is in predetermined threshold value
In the range of, if so, determining to identify successfully the external equipment, otherwise, it determines to the external equipment recognition failures.
Specifically, after the external equipment accesses the mobile terminal interface, the mobile terminal can be by described
Interface attempts to communicate with the external equipment, and signal of communication line can produce signal voltage in corresponding OTG data cables at this time,
If the signal voltage produced whether in the preset threshold range, show the mobile terminal can be attempted by the interface with
The external equipment communicates successfully, i.e., the external equipment is identified successfully, otherwise shows that the mobile terminal can be by described
Interface attempt with the external equipment communication failure, i.e., to the external equipment recognition failures.
Exemplary, detection is currently inserted into the data cable type of mobile terminal interface, including:
The current demand signal voltage that level detection signal line produces when detecting the data cable insertion mobile terminal interface;
If the current demand signal voltage is setting high level, it is determined that the type of the data cable is USB data line;
If the current demand signal voltage is setting low level, it is determined that the type of the data cable is OTG data cables.
Specifically, after the external equipment is successively inserted into the mobile terminal interface, the electricity in corresponding data cable
Flat signal lines (for example, USB_HS_ID signal wires) can produce signal voltage, if the signal voltage produced (can for high level
Be converted to digital signal 1), then the external equipment for showing the mobile terminal connection is USB device, if the signal voltage produced is
Low level (can be exchanged into digital signaling zero), then the external equipment for showing the mobile terminal connection is OTG equipment.
It is exemplary, the USB configurations parameter be arranged to the performance of USB eye patterns it is optimal when corresponding configuration parameter, it is described extremely
Few OTG configuration parameters are configured according to the empirical value tested in advance OTG identifications situation.
When the external equipment of connection is USB device, due to mobile terminal to the recognition success rate of the USB device compared with
USB, therefore, can be configured parameter and be arranged to corresponding configuration parameter when USB eye patterns show optimal, so ensure that logical by height
Believe quality, and can guarantee that and the USB device is identified successfully.
And when the external equipment of connection is OTG equipment, since mobile terminal is to the recognition success rate phase of the OTG equipment
For can it is lower, for guarantee to the OTG equipment identify successfully, it is necessary to for a variety of different OTG equipment into
Row experiment, a value is included at least by the empirical value that experiment obtains, and parameter is configured as OTG,
Exemplary, detection is currently inserted into before the data cable type of mobile terminal interface, is further included:
The USB that USB configuration parameters and at least one OTG configurations parameter are previously written the mobile terminal is matched somebody with somebody
Put in register.
Exemplary, the external equipment includes flash disk, mobile hard disk, another mobile terminal, computer, keyboard, mouse
Any of with printer.
Embodiment two
Fig. 2 is the structure diagram of the communicator of terminal interface provided by Embodiment 2 of the present invention, as shown in Fig. 2, tool
Body includes:Data cable type detection module 21, usb communication module 22, OTG identification modules 23 and OTG communication modules 24;
The data cable type detection module 21 is used to detect the data cable type for being currently inserted into mobile terminal interface;
If the usb communication module 22 detects that data cable type is USB for the data cable type detection module 21
Data cable, then interact operation using pre-set USB configuration parameters with external equipment;
If the OTG identification modules 23 detect that the data cable type is for the data cable type detection module 21
OTG data cables, then be identified the external equipment using pre-set at least one OTG configurations parameter;
The OTG communication modules 24 are used to interact operation with external equipment using the successful OTG configuration parameters of identification.
The communicator of terminal interface described in the present embodiment is used to perform the terminal interface described in the various embodiments described above
Communication means, its technical principle is similar with the technique effect produced, is described again here.
Exemplary, on the basis of above-described embodiment, the OTG identification modules 23 include:Sequencing unit 231 and identification
Unit 232;
The sequencing unit 231 is used at least one OTG configurations parameter being ranked up according to pre-defined rule;
The recognition unit 232 is used to the external equipment be identified using OTG configurations parameter successively in order.
Exemplary, the recognition unit 232 is specifically used for:
Communicated by the OTG data cables with the external equipment;Detect described in communication process in OTG data cables
Whether the signal voltage that signal of communication line produces is in preset threshold range, if so, determining to be identified as the external equipment
Work(, otherwise, it determines to the external equipment recognition failures.
Exemplary, the data cable type detection module 21 is specifically used for:
The current demand signal voltage that level detection signal line produces when detecting the data cable insertion mobile terminal interface;If institute
Current demand signal voltage is stated as setting high level, it is determined that the type of the data cable is USB data line;If the current demand signal electricity
Press to set low level, it is determined that the type of the data cable is OTG data cables.
It is exemplary, the USB configurations parameter be arranged to the performance of USB eye patterns it is optimal when corresponding configuration parameter, it is described extremely
Few OTG configuration parameters are configured according to the empirical value tested in advance OTG identifications situation.
Exemplary, described device further includes:Configure parameter read-in module 25;
The configuration parameter read-in module 25 is used to be currently inserted into movement in the data cable type detection module 21 detection
Before the data cable type of terminal interface, the USB is configured into parameter and at least one OTG configurations parameter is previously written institute
In the USB configuration registers for stating mobile terminal.
Exemplary, the external equipment includes flash disk, mobile hard disk, another mobile terminal, computer, keyboard, mouse
Any of with printer.
The terminal that the communicator of terminal interface described in the present embodiment is equally used for performing described in the various embodiments described above connects
The communication means of mouth, its technical principle is similar with the technique effect produced, is described again here.
Note that it above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes,
Readjust and substitute without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
It can include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.
Claims (10)
- A kind of 1. communication means of terminal interface, it is characterised in that including:Detection is currently inserted into the data cable type of mobile terminal interface;If the data cable type is general-purpose serial bus USB data cable, using pre-set USB configuration parameter with it is external Equipment interacts operation;If the data cable type is OTG data cables, pre-set at least one OTG is configured into parameter according to using OTG Eye diagram quality is ranked up during configuration parameter corresponding communication, passes through the OTG data using OTG configurations parameter successively in order Line communicates with the external equipment, detects the signal electricity that signal of communication line produces in OTG data cables described in communication process Whether pressure is in preset threshold range, if so, determining to identify successfully the external equipment, otherwise, it determines to described external Equipment recognition failures;Operation is interacted with external equipment using the successful OTG configuration parameters of identification.
- 2. according to the method described in claim 1, it is characterized in that, detection is currently inserted into the data cable class of mobile terminal interface Type, including:The current demand signal voltage that level detection signal line produces when detecting the data cable insertion mobile terminal interface;If the current demand signal voltage is setting high level, it is determined that the type of the data cable is USB data line;If the current demand signal voltage is setting low level, it is determined that the type of the data cable is OTG data cables.
- 3. method according to claim 1 or 2, it is characterised in that the USB configurations parameter is arranged to the performance of USB eye patterns Corresponding configuration parameter when optimal, at least one OTG configuration parameter to the OTG according to identifying that situation is tested in advance Obtained empirical value is configured.
- 4. method according to claim 1 or 2, it is characterised in that detection is currently inserted into the data cable of mobile terminal interface Before type, further include:The USB configurations that USB configuration parameters and at least one OTG configurations parameter are previously written the mobile terminal are posted In storage.
- 5. method according to claim 1 or 2, it is characterised in that the external equipment include flash disk, mobile hard disk, Any of another mobile terminal, computer, keyboard, mouse and printer.
- A kind of 6. communicator of terminal interface, it is characterised in that including:Data cable type detection module, the data cable type of mobile terminal interface is currently inserted into for detecting;General-purpose serial bus USB communication module, if detecting that data cable type is USB for the data cable type detection module Data cable, then interact operation using pre-set USB configuration parameters with external equipment;OTG identification modules, if detecting that the data cable type is OTG data cables for the data cable type detection module, Then at least one OTG configuration parameters are ranked up according to eye diagram quality during communication corresponding using OTG configurations parameter, in order Communicated successively using OTG configurations parameter by the OTG data cables with the external equipment;Detect described in communication process Whether the signal voltage that signal of communication line produces in OTG data cables is in preset threshold range, if so, determining to described external Equipment identifies successfully, otherwise, it determines to the external equipment recognition failures;OTG communication modules, for interacting operation with external equipment using the successful OTG configuration parameters of identification.
- 7. device according to claim 6, it is characterised in that the data cable type detection module is specifically used for:The current demand signal voltage that level detection signal line produces when detecting the data cable insertion mobile terminal interface;If described work as Front signal voltage is setting high level, it is determined that the type of the data cable is USB data line;If the current demand signal voltage is Set low level, it is determined that the type of the data cable is OTG data cables.
- 8. the device according to claim 6 or 7, it is characterised in that the USB configurations parameter is arranged to the performance of USB eye patterns Corresponding configuration parameter when optimal, at least one OTG configuration parameter to the OTG according to identifying that situation is tested in advance Obtained empirical value is configured.
- 9. the device according to claim 6 or 7, it is characterised in that described device further includes:Parameter read-in module is configured, for being currently inserted into the number of mobile terminal interface in data cable type detection module detection Before line type, the USB is configured into parameter and at least one OTG configurations parameter is previously written the mobile terminal In USB configuration registers.
- 10. the device according to claim 6 or 7, it is characterised in that the external equipment include flash disk, mobile hard disk, Any of another mobile terminal, computer, keyboard, mouse and printer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510528510.0A CN105068954B (en) | 2015-08-25 | 2015-08-25 | The communication means and device of terminal interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510528510.0A CN105068954B (en) | 2015-08-25 | 2015-08-25 | The communication means and device of terminal interface |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105068954A CN105068954A (en) | 2015-11-18 |
CN105068954B true CN105068954B (en) | 2018-05-08 |
Family
ID=54498330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510528510.0A Expired - Fee Related CN105068954B (en) | 2015-08-25 | 2015-08-25 | The communication means and device of terminal interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105068954B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105954614A (en) * | 2016-04-28 | 2016-09-21 | 乐视控股(北京)有限公司 | Method and device for prompting data line type, and terminal device |
CN109921959A (en) * | 2019-03-22 | 2019-06-21 | 维沃移动通信有限公司 | A kind of parameter regulation means and communication equipment |
CN111858430A (en) * | 2020-07-07 | 2020-10-30 | 上海龙旗科技股份有限公司 | OTG optimization method and system of mobile terminal |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103186483A (en) * | 2011-12-27 | 2013-07-03 | 比亚迪股份有限公司 | Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same |
CN103530250A (en) * | 2012-07-02 | 2014-01-22 | 宏达国际电子股份有限公司 | Portable electronic device and accessory device thereof, and operating method for the portable electronic device |
CN103744821A (en) * | 2014-01-10 | 2014-04-23 | 广东欧珀移动通信有限公司 | Method and device for realizing USB OTG (Universal Serial Bus On-The-Go) function of mobile terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4659175B2 (en) * | 2000-04-25 | 2011-03-30 | 富士通東芝モバイルコミュニケーションズ株式会社 | Mobile communication terminal |
-
2015
- 2015-08-25 CN CN201510528510.0A patent/CN105068954B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103186483A (en) * | 2011-12-27 | 2013-07-03 | 比亚迪股份有限公司 | Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same |
CN103530250A (en) * | 2012-07-02 | 2014-01-22 | 宏达国际电子股份有限公司 | Portable electronic device and accessory device thereof, and operating method for the portable electronic device |
CN103744821A (en) * | 2014-01-10 | 2014-04-23 | 广东欧珀移动通信有限公司 | Method and device for realizing USB OTG (Universal Serial Bus On-The-Go) function of mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN105068954A (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106104506B (en) | For entering the method, apparatus and computer program product of attachment joint mode in USB c-type interface | |
EP2860638B1 (en) | Serial communication over communication control pin | |
EP2584471A1 (en) | Method and terminal for selecting internal circuit according to USB interface status | |
CN105068954B (en) | The communication means and device of terminal interface | |
CN104216840B (en) | The method and device that a kind of USB sets and operated to external equipment | |
CN105183678A (en) | Communication method and apparatus of terminal interface | |
CN103198033A (en) | Apparatus and method of identifying a USB or an MHL device | |
CN105071484B (en) | A kind of charging method and device of the terminal with data exchanging function | |
CN112087354A (en) | Communication protocol testing method and device, electronic equipment and storage medium | |
CN104765664A (en) | PCI (Peripheral Component Interface) equipment detection system and method | |
CN105048018B (en) | The charging method and device of a kind of terminal with data exchanging function | |
CN108647131A (en) | Output system of running log | |
CN105404600B (en) | Take into account the method and device of USB eye patterns performance and OTG functions | |
CN213399565U (en) | Charging circuit and electronic device | |
CN113535578A (en) | CTS (clear to send) testing method, device and testing equipment | |
CN103048559A (en) | Method for testing USB (universal serial bus) equipment and ATE (automatic test equipment) | |
CN104850203A (en) | Electronic apparatus reset method and electronic apparatus | |
CN103810068A (en) | SD card slot based debugging equipment, system and method | |
CN115442451A (en) | Image signal transmission method and display device test equipment | |
CN113220617B (en) | Detection circuit, detection method and terminal of plug-and-play device | |
CN106095703B (en) | A kind of DRP recognition methods and device | |
CN115333968A (en) | Network card batch test system and method with NCSI function | |
CN104850522B (en) | A kind of signal output method and device | |
CN106292977B (en) | A kind of adapter recognition methods and terminal | |
CN108615543A (en) | Self checking method for discrete magnitude signal processing chip |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CP01 | Change in the name or title of a patent holder | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180508 |
|
CF01 | Termination of patent right due to non-payment of annual fee |