CN105183678A - Communication method and apparatus of terminal interface - Google Patents

Communication method and apparatus of terminal interface Download PDF

Info

Publication number
CN105183678A
CN105183678A CN201510526174.6A CN201510526174A CN105183678A CN 105183678 A CN105183678 A CN 105183678A CN 201510526174 A CN201510526174 A CN 201510526174A CN 105183678 A CN105183678 A CN 105183678A
Authority
CN
China
Prior art keywords
data line
usb
configuration parameter
otg
mobile terminal
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
CN201510526174.6A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510526174.6A priority Critical patent/CN105183678A/en
Publication of CN105183678A publication Critical patent/CN105183678A/en
Pending legal-status Critical Current

Links

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

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 a communication method and apparatus of a terminal interface. The method comprises: detecting a data line type inserted in the mobile terminal interface; if the data line type is a USB data line, using a preset USB configuration parameter to interact with an external device; and if the data line type is an OTG data line, using a preset OTG configuration parameter to interact with the external device. By adopting the communication method and apparatus in the embodiments of the invention, the terminal adopt different configuration parameters for communication according to different external devices, and an OTG device and a USB device can be compatible at the same time.

Description

The communication means of terminal interface and device
Technical field
The embodiment of the present invention relates to technical field of mobile terminals, particularly relates to a kind of communication means and device of double terminal interface.
Background technology
Along with the development of science and technology, the dependence of present user to mobile terminal is more and more higher, and in order to meet some demands of user, mobile terminal and some external equipments is usually needed to carry out alternately, such as connect OTG (OnTheGo) equipment or USB (universal serial bus) (UniversalSerialBus, USB) equipment (such as flash disk and USB flash disk) etc.
And current mobile terminal is when connecting external equipment; there are the following problems in frequent meeting: for the Peripheral Interface of same mobile terminal; traffic operation can be carried out with USB device and but can not carry out traffic operation with OTG equipment; or traffic operation can be carried out with OTG equipment and but can not carry out traffic operation with USB device, be difficult to compatible OTG equipment and USB device simultaneously.
Summary 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 to adopt different configuration parameters to communicate according to different external equipments, can compatible OTG equipment and USB device.
First aspect, embodiments provides a kind of communication means of terminal interface, comprising:
Detect the data line type of current insertion mobile terminal interface;
If described data line type is USB data line, then the USB configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation;
If described data line type is OTG data line, then the OTG configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation.
Second aspect, the embodiment of the present invention also provides a kind of communicator of terminal interface, comprising:
Data line type detection module, for detecting the data line type of current insertion mobile terminal interface;
Usb communication module, if detect that data line type is USB data line for described data line type detection module, then adopts the USB configuration parameter that pre-sets and external equipment to carry out interactive operation;
OTG communication module, if be OTG data line for described data line type, then adopts the OTG configuration parameter that pre-sets and external equipment to carry out interactive operation.
The embodiment of the present invention, by detecting the type of data line type be connected with described external equipment, when described data line type is USB data line, then adopts the USB configuration parameter that pre-sets and external equipment to carry out interactive operation; When described data line type is OTG data line, then adopt and pre-set OTG configuration parameter interactive operation is carried out to described external equipment.The embodiment of the present invention can adopt different configuration parameters and external equipment to carry out interactive operation, thus enables terminal compatible OTG equipment and USB device simultaneously.
Accompanying drawing explanation
The schematic flow sheet of the communication means of the terminal interface that Fig. 1 provides for the embodiment of the present invention one;
The structural representation of the communicator of the terminal interface that Fig. 2 provides for the embodiment of the present invention two.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not entire infrastructure.
The executive agent of the communication means of the terminal interface that the embodiment of the present invention provides, can be the communicator of the terminal interface that the embodiment of the present invention provides, or being integrated with the terminal device of communicator of terminal interface, the communicator of this terminal interface can adopt hardware or software simulating.
Embodiment one
The schematic flow sheet of the communication means of the terminal interface that Fig. 1 provides for the embodiment of the present invention one, as shown in Figure 1, specifically comprises:
Step 11, detect the data line type of current insertion mobile terminal interface;
Wherein, mobile terminal interface is USB interface, external equipment is connected by data line by this USB interface, this external equipment comprises USB device and OTG equipment, when the external equipment that it connects is USB device, the connection data line of correspondence is called USB data line, when the external equipment that it connects is OTG identification equipment, the connection data line of correspondence is called OTG data line.
Concrete, the external equipment connected due to mobile terminal interface is different, and the voltage that in its connection data line, specific signal line is corresponding is also not only identical, therefore can determine data line type by detecting the voltage that in connection data line, specific signal line is corresponding.
If the described data line type of step 12 is USB data line, then the USB configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation;
Wherein, USB configuration parameter is the parameter that USB configuration register is corresponding.For improving mobile terminal to the communication efficiency of external equipment, the present embodiment, according to the data line type of access, is respectively USB device and OTG equipment arranges different configuration parameters in advance, and concrete numeral is empirical value, can be passed through experimental test and obtains.Here, configuration parameter corresponding for USB device is called USB configuration parameter, configuration parameter corresponding for OTG equipment is called OTG configuration parameter.
When detecting that described data line type is USB data line, then determine that the external equipment of current connection is USB device, then adopt the USB configuration parameter that pre-sets and external equipment to carry out interactive operation.
If the described data line type of step 13 is OTG data line, then the OTG configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation.
In like manner, when detecting that described data line type is OTG data line, then determine that the external equipment of current connection is OTG equipment, then adopt the OTG configuration parameter that pre-sets and external equipment to carry out interactive operation.
The present embodiment, by detecting the type of data line type be connected with described external equipment, when described data line type is USB data line, then adopts the USB configuration parameter that pre-sets and external equipment to carry out interactive operation; When described data line type is OTG data line, then adopt and pre-set OTG configuration parameter interactive operation is carried out to described external equipment.The present embodiment can adopt different configuration parameters and external equipment to carry out interactive operation, thus enables terminal compatible OTG equipment and USB device simultaneously.
Exemplary, detect the data line type of current insertion mobile terminal interface, comprising:
Detect the current demand signal voltage that when described data line inserts mobile terminal interface, level detection signal line produces;
If described current demand signal voltage is setting high level, then determine that the type of described data line is USB data line;
If described current demand signal voltage is setting low level, then determine that the type of described data line is OTG data line.
Concrete, after described external equipment successfully inserts described mobile terminal interface, level detection signal line in corresponding data line (such as, USB_HS_ID signal wire) can signal voltage be produced, if the signal voltage produced is high level (can be exchanged into digital signal 11), then show that the external equipment that described mobile terminal connects is USB device, if the signal voltage produced is low level (can be exchanged into digital signaling zero), then show that the external equipment that described mobile terminal connects is OTG equipment.
Exemplary, described USB configuration parameter is set to configuration parameter corresponding when USB eye pattern shows optimum, and described OTG configuration parameter is set to configuration parameter corresponding when USB eye pattern shows the poorest.
When the external equipment connected is USB device, because the recognition success rate of mobile terminal to described USB device is higher, therefore, USB configuration parameter can be set to configuration parameter corresponding when USB eye pattern shows optimum, so namely, ensure that communication quality, can ensure again to communicate with described USB device.
And when the external equipment connected is OTG equipment, because mobile terminal comparatively speaking can be lower to the recognition success rate of described OTG equipment, for guarantee with described OTG equipment carry out success communication, described OTG configuration parameter is set to configuration parameter corresponding when USB eye pattern shows the poorest, to sacrifice communication quality to ensure the communication connection be successfully established with described OTG equipment.
Exemplary, before detecting the data line type of current insertion mobile terminal interface, also comprise:
Described USB configuration parameter and at least one OTG configuration parameter described are write in the USB configuration register of described mobile terminal in advance.
Exemplary, described external equipment comprises any one in flash disk, portable hard drive, another mobile terminal, computer, keyboard, mouse and printer.
The various embodiments described above, by detecting the type of data line type be connected with described external equipment, when described data line type is USB data line, then adopt the USB configuration parameter that pre-sets and external equipment to carry out interactive operation; When described data line type is OTG data line, then adopt and pre-set OTG configuration parameter interactive operation is carried out to described external equipment.The various embodiments described above can adopt different configuration parameters and external equipment to carry out interactive operation, thus enable terminal compatible OTG equipment and USB device simultaneously.
Embodiment two
The structural representation of the communicator of the terminal interface that Fig. 2 provides for the embodiment of the present invention two, as shown in Figure 2, specifically comprises: data line type detection module 21, usb communication module 22 and OTG communication module 23;
Described data line type detection module 21 is for detecting the data line type of current insertion mobile terminal interface;
If for described data line type detection module 21, described usb communication module 22 detects that data line type is USB data line, then the USB configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation;
If described OTG communication module 23 is OTG data line for described data line type, then the OTG configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation.
The communicator of the terminal interface described in the present embodiment is for performing the communication means of the terminal interface described in the various embodiments described above, and the technique effect of its know-why and generation is similar, is not repeated here.
Exemplary, described data line type detection module 21 specifically for:
Detect the current demand signal voltage that when described data line inserts mobile terminal interface, level detection signal line produces; If described current demand signal voltage is setting high level, then determine that the type of described data line is USB data line; If described current demand signal voltage is setting low level, then determine that the type of described data line is OTG data line.
Exemplary, described USB configuration parameter is set to configuration parameter corresponding when USB eye pattern shows optimum, and described OTG configuration parameter is set to configuration parameter corresponding when USB eye pattern shows the poorest.
Exemplary, described device also comprises: configuration parameter writing module 24;
Described USB configuration parameter and described OTG configuration parameter, for before detecting the data line type of current insertion mobile terminal interface in described data line type detection module 21, write in the USB configuration register of described mobile terminal by described configuration parameter writing module 24 in advance.
Exemplary, described external equipment comprises any one in flash disk, portable hard drive, another mobile terminal, computer, keyboard, mouse and printer.
The communicator of the terminal interface described in the present embodiment is equally for performing the communication means of the terminal interface described in the various embodiments described above, and the technique effect of its know-why and generation is similar, is not repeated here.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.

Claims (10)

1. a communication means for terminal interface, is characterized in that, comprising:
Detect the data line type of current insertion mobile terminal interface;
If described data line type is general-purpose serial bus USB data line, then the USB configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation;
If described data line type is OTG data line, then the OTG configuration parameter that pre-sets and external equipment is adopted to carry out interactive operation.
2. method according to claim 1, is characterized in that, detects the data line type of current insertion mobile terminal interface, comprising:
Detect the current demand signal voltage that when described data line inserts mobile terminal interface, level detection signal line produces;
If described current demand signal voltage is setting high level, then determine that the type of described data line is USB data line;
If described current demand signal voltage is setting low level, then determine that the type of described data line is OTG data line.
3. method according to claim 1, is characterized in that, described USB configuration parameter is set to configuration parameter corresponding when USB eye pattern shows optimum, and described OTG configuration parameter is set to configuration parameter corresponding when USB eye pattern shows the poorest.
4. the method according to any one of claims 1 to 3, is characterized in that, before detecting the data line type of current insertion mobile terminal interface, also comprises:
Described USB configuration parameter and described OTG configuration parameter are write in the USB configuration register of described mobile terminal in advance.
5. the method according to any one of claims 1 to 3, is characterized in that, described external equipment comprises any one in flash disk, portable hard drive, another mobile terminal, computer, keyboard, mouse and printer.
6. a communicator for terminal interface, is characterized in that, comprising:
Data line type detection module, for detecting the data line type of current insertion mobile terminal interface;
General-purpose serial bus USB communication module, if detect that data line type is USB data line for described data line type detection module, then adopts the USB configuration parameter that pre-sets and external equipment to carry out interactive operation;
OTG communication module, if be OTG data line for described data line type, then adopts the OTG configuration parameter that pre-sets and external equipment to carry out interactive operation.
7. device according to claim 6, is characterized in that, described data line type detection module specifically for:
Detect the current demand signal voltage that when described data line inserts mobile terminal interface, level detection signal line produces; If described current demand signal voltage is setting high level, then determine that the type of described data line is USB data line; If described current demand signal voltage is setting low level, then determine that the type of described data line is OTG data line.
8. device according to claim 6, is characterized in that, described USB configuration parameter is set to configuration parameter corresponding when USB eye pattern shows optimum, and described OTG configuration parameter is set to configuration parameter corresponding when USB eye pattern shows the poorest.
9. the device according to any one of claim 6 ~ 8, is characterized in that, described device also comprises:
Configuration parameter writing module, before detecting the data line type of current insertion mobile terminal interface in described data line type detection module, writes in the USB configuration register of described mobile terminal in advance by described USB configuration parameter and described OTG configuration parameter.
10. the device according to any one of claim 6 ~ 8, is characterized in that, described external equipment comprises any one in flash disk, portable hard drive, another mobile terminal, computer, keyboard, mouse and printer.
CN201510526174.6A 2015-08-25 2015-08-25 Communication method and apparatus of terminal interface Pending CN105183678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510526174.6A CN105183678A (en) 2015-08-25 2015-08-25 Communication method and apparatus of terminal interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510526174.6A CN105183678A (en) 2015-08-25 2015-08-25 Communication method and apparatus of terminal interface

Publications (1)

Publication Number Publication Date
CN105183678A true CN105183678A (en) 2015-12-23

Family

ID=54905768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510526174.6A Pending CN105183678A (en) 2015-08-25 2015-08-25 Communication method and apparatus of terminal interface

Country Status (1)

Country Link
CN (1) CN105183678A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
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
CN106412245A (en) * 2016-09-06 2017-02-15 青岛海信移动通信技术股份有限公司 Waterproof method for USB interface and mobile terminal
CN108196993A (en) * 2017-12-28 2018-06-22 努比亚技术有限公司 USB interface test method, terminal and computer readable storage medium
CN108206444A (en) * 2017-12-26 2018-06-26 努比亚技术有限公司 Data line and data transmission method
CN111858430A (en) * 2020-07-07 2020-10-30 上海龙旗科技股份有限公司 OTG optimization method and system of mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106962A1 (en) * 2004-11-17 2006-05-18 Woodbridge Nancy G USB On-The-Go implementation
CN104750226A (en) * 2013-12-31 2015-07-01 联芯科技有限公司 USB (universal serial bus) OTG (on-the-go) pattern recognition system and USB OTG pattern recognition method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106962A1 (en) * 2004-11-17 2006-05-18 Woodbridge Nancy G USB On-The-Go implementation
CN104750226A (en) * 2013-12-31 2015-07-01 联芯科技有限公司 USB (universal serial bus) OTG (on-the-go) pattern recognition system and USB OTG pattern recognition method

Cited By (5)

* Cited by examiner, † Cited by third party
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
CN106412245A (en) * 2016-09-06 2017-02-15 青岛海信移动通信技术股份有限公司 Waterproof method for USB interface and mobile terminal
CN108206444A (en) * 2017-12-26 2018-06-26 努比亚技术有限公司 Data line and data transmission method
CN108196993A (en) * 2017-12-28 2018-06-22 努比亚技术有限公司 USB interface test method, terminal and computer readable storage medium
CN111858430A (en) * 2020-07-07 2020-10-30 上海龙旗科技股份有限公司 OTG optimization method and system of mobile terminal

Similar Documents

Publication Publication Date Title
CN105183678A (en) Communication method and apparatus of terminal interface
CN205452732U (en) Hub device of universal serial bus for connecting different types of connection ports
EP2860638B1 (en) Serial communication over communication control pin
CN104123207A (en) Device for depth maintenance of bottom-layer interfaces of western digital hard disk and bottom-layer communication method
CN102054370B (en) USB (universal serial bus) cable controller and electronic reading device using same
CN103198033A (en) Apparatus and method of identifying a USB or an MHL device
WO2017032265A1 (en) Application push method and apparatus, and a serving device
CN103279846A (en) Project acceptance method and system based on BIM model
CN104765705A (en) Method and device for reading data stored by turned-off mobile terminal and mobile terminal
CN104777891A (en) OTG (on-the-go) connecting control method applied to intelligent terminal and connecting control device
CN105183679A (en) Electronic device and information processing method
CN105005448A (en) Method and equipment for starting application programs as well as terminal device
CN104615556A (en) EDID burning device and method
CN103164553A (en) Signal line check system and method
CN104021081A (en) Debugging method and device for browser
CN105068954B (en) The communication means and device of terminal interface
CN103366200B (en) IC-card seat, IC-card terminal and the using method of IC-card terminal
CN103400096A (en) Dual-purpose card reader, as well as NFC-SIM (near field communication-subscriber identity module) card reader and testing method thereof
CN103048559B (en) The method of test USB device and automated test device
CN106815410A (en) Cable method for drafting and device
CN105357207A (en) Synchronous writing method, mobile terminal, server and system
CN108153624B (en) Test circuit board suitable for NGFF slot
CN103810068A (en) SD card slot based debugging equipment, system and method
CN107885674B (en) Bluetooth device simulator, working method thereof and Bluetooth device operating system
WO2019109231A1 (en) Processing method for writing stroke and related device

Legal Events

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

Application publication date: 20151223

RJ01 Rejection of invention patent application after publication