CN109901980A - Serial ports log grabs circuit, method, terminal and computer readable storage medium - Google Patents
Serial ports log grabs circuit, method, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN109901980A CN109901980A CN201910093408.0A CN201910093408A CN109901980A CN 109901980 A CN109901980 A CN 109901980A CN 201910093408 A CN201910093408 A CN 201910093408A CN 109901980 A CN109901980 A CN 109901980A
- Authority
- CN
- China
- Prior art keywords
- serial ports
- usb
- cpu
- connect
- log
- 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.)
- Granted
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Debugging And Monitoring (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a kind of serial ports logs to grab circuit, method, terminal and computer readable storage medium, being related to can field of communication technology, the serial ports log crawl circuit includes: processor CPU, switching module, identification module and serial ports socket, the CPU is connect with the switching module, the switching module is connect with the serial ports socket, the USB_ID interface of the CPU is connect with the end USB_ID of the identification module, the end USB_ID_CONNECT of the identification module is connect with the serial ports socket, the identification module is inserted into the level signal of USB_ID in the serial port circuit of the serial ports socket for identification, the CPU is used to control the switching module at the end D+ of the CPU according to the level signal of the USB_ID, the end D- and TX End, GND switch between end.TX and GND can be connected on Serial Port Line in the case where not dismantling machine and print serial ports log by user through the invention, and the effect that machine grabs serial ports log is not torn in realization open, tear machine number open to reduce, extend the terminal service life, improve log analysis efficiency.
Description
Technical field
The present invention relates to audible wearing electronic equipment technical fields more particularly to a kind of serial ports log to grab circuit, method, end
End and computer readable storage medium.
Background technique
With the continuous development of mobile communication technology, on mobile phone using more and more, function also becomes increasingly complex, in order to
The interface supporting these applications and being arranged on mobile phone is also more and more.In handset single-plate design, hair has usually been reserved
Penetrate machine TX, receiver RX and ground connection GND test point.It is analyzing the machine not being switched on and general log log can not be grabbed
Machine is generally taken for TX and GND to be connected on Serial Port Line and prints serial ports log, to analyze mechanical disorder.
If TX and GND are exposed to except complete machine after being assembled into complete machine, it is easier to introduce electrostatic and hold by machine breakdown, also
The problems such as easily meeting water short circuit, but also will cause unsightly;Therefore TX and GND cannot be exposed to except complete machine.So, such as
Fruit will grab serial ports log and just have to dismantle machine, due to tear open machine process complexity may result in that bad phenomenon is destroyed can not be after
Continuous problem analysis, or other devices may be damaged and cause unnecessary loss.
Summary of the invention
It is a primary object of the present invention to propose a kind of serial ports log crawl circuit, method, terminal and computer-readable deposit
Storage media, it is intended to the technical issues of solution can not grab serial ports log when not tearing machine open.
To achieve the above object, first aspect present invention provides a kind of serial ports log crawl circuit, including processor CPU,
Switching module, identification module and serial ports socket, the CPU are connect with the switching module, the switching module and the serial ports
Socket connection, the USB_ID interface of the CPU are connect with the end USB_ID of the identification module, the USB_ of the identification module
The end ID_CONNECT is connect with the serial ports socket, and the identification module is inserted into the serial port circuit of the serial ports socket for identification
The level signal of middle USB_ID, the CPU are used to control the switching module described according to the level signal of the USB_ID
The end D+, the end D- and the end TX of CPU, GND switch between end.
Further, the switching module is double-point double-throw switch DPDT, and the CPU is made by the IGPO and DPDT's
Can end connection, the first non-moving end of the DPDT connect with the end D+ of the serial ports socket, the second non-moving end of the DTDP and
The end D- of the serial ports socket connects, when the level signal of the USB_ID is low level, the first moved end of the DTDP with
The end D+ of the CPU connects, and the second moved end of the DTDP is connect with the end D- of the CPU, when the level of the USB_ID is believed
Number be high level when, the first moved end of the DTDP is connect with the end GDN of the CPU, the second moved end of the DTDP with it is described
The end TX of CPU connects.
Further, the end USB_ID of the identification module passes through diode in parallel, first resistor and the USB_ID_
The connection of the end CONNECT, the end USB_ID are grounded by second resistance, and the end USB_ID_CONNECT passes through capacity earth.
Further, the first resistor is 2M Ω, and the second resistance is 1M Ω.
Another aspect of the present invention also provides a kind of serial port circuit, including USB_ID interface, and the serial port circuit is wanted with right
Ask any serial ports log crawl circuit of 1-3 mating, the USB_ID interface is connected with VBUS, the serial port circuit insertion
When the serial ports socket, Xiang Suoshu serial ports log grabs circuit and provides high level.
Also very a kind of serial ports log grasping means of another aspect of the present invention, the serial ports log grasping means include:
Detect the level signal of USB_ID;
The switching between the end D+, the end D- and the end TX, the end GND of CPU is controlled according to the level signal of the USB_ID.
Further, when the level signal of the USB_ID be high level when, by the end D+ of the CPU be switched to the end GND,
The end D- is switched to the end TX.
Another aspect of the present invention also provides a kind of serial ports log crawl terminal, grabs including any of the above-described serial ports log
Take terminal.
Another aspect of the present invention also provides a kind of USB data line, including above-mentioned serial port circuit.
Another aspect of the present invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage
There is one or more program, one or more of programs can be executed by one or more processor, above-mentioned to realize
Each step of any serial ports log grasping means.
Serial ports log crawl circuit, method, terminal and computer readable storage medium provided by the invention, on the one hand, logical
Cross the level signal that USB_ID in the serial port circuit of the serial ports socket is inserted into identification module identification, CPU is according to the electricity of USB_ID
Ordinary mail number control switching module switches between end in the end D+ of the CPU, the end D- and the end TX, GND.On the other hand, by serial port power
USB_ID interface is directly connect with VBUS high level in road.After serial port circuit is inserted into serial ports socket, identification module recognizes height
Level, CPU control switching module and the end D+ of CPU are switched to the end GND, and the end D- is switched to the end TX, thus, user can not tear open
In the case where booting, TX and GND being connected on Serial Port Line and print serial ports log, the effect that machine grabs serial ports log is not torn in realization open,
Machine number is torn open to reduce, extends the terminal service life, improves log analysis efficiency.
Detailed description of the invention
The hardware structural diagram of Fig. 1 mobile terminal of each embodiment to realize the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the circuit diagram that a kind of serial ports log provided in an embodiment of the present invention grabs circuit;
Fig. 4 is the circuit diagram that another serial ports log provided in an embodiment of the present invention grabs circuit;
Fig. 5 is the circuit diagram of identification module provided in an embodiment of the present invention;
Fig. 6 is a kind of flow chart of serial ports log grasping means provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram that a kind of serial ports log provided in an embodiment of the present invention grabs terminal;
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element
Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate
Computer, laptop, palm PC, personal digital assistant (PersonalDigital Assistant, PDA), portable matchmaker
Body player (Portable Media Player, PMP), navigation terminal, wearable device, automatic bracelet, pedometer etc. are mobile
The fixed terminals such as terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special
Except element for moving purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware structural diagram of its mobile terminal of each embodiment to realize the present invention, the shifting
Dynamic terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit
103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit
108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1
Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram,
Perhaps certain components or different component layouts are combined.
It is specifically introduced below with reference to all parts of the Fig. 1 to mobile terminal:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station
Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating
Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication
Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications
System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code
Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division
Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code
Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division
Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division
Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need
It to omit within the scope of not changing the essence of the invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100
When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is received or
The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103
Audio output relevant to the specific function that mobile terminal 100 executes can also be provided (for example, call signal receives sound, disappears
Breath receives sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the image data of the static images or video obtained in image capture mode by image capture terminal (such as camera) carries out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can
To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model.
Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition)
The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies
Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear
Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general
For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture
(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;
The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer,
The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used
Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal
Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with
And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby
(for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071
Neighbouring operation), and corresponding connection terminal is driven according to preset formula.Touch panel 1071 may include touch detection
Two parts of terminal and touch controller.Wherein, the touch orientation of touch detection terminal detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detection terminal, and by it
It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can
To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc.
It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel
1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can
The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically
It limits.
Interface unit 108 be used as at least one exterior terminal connect with mobile terminal 100 can by interface.For example,
Exterior terminal may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing
Line data port, memory card port, the port for connecting the terminal with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from exterior terminal (for example, number
It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with
For transmitting data between mobile terminal 100 and exterior terminal.
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area
The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function
Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection
A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage
Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place
Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main
Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111
Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put
The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, the communications network system that mobile terminal of the invention is based below into
Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system
System is the LTE system of universal mobile communications technology, which includes UE (User Equipment, the use of successively communication connection
Family equipment) (the land Evolved UMTS Terrestrial Radio Access Network, evolved UMTS 201, E-UTRAN
Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation
204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning
Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203,
ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS
(Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way,
Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and
Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and
The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers
Such as the function of home location register (not shown) etc, and preserves some related service features, data rates etc. and use
The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201
Address distribution and other functions, PCRF2036 are strategy and the charging control strategic decision-making of business data flow and IP bearing resource
Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia
System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only
Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with
And the following new network system etc., herein without limitation.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the present invention is proposed.
Fig. 3 is that a kind of serial ports log that the first embodiment of the invention provides grabs circuit, the serial ports log crawl electricity
Road includes processor CPU_31, switching module 32, identification module 33 and serial ports socket 34, wherein the CPU_31 is cut with described
32 pieces of block connections of mold changing, the switching module 32 are connect with the serial ports socket 34, the USB_ID interface of the CPU_31 and institute
The end the USB_ID connection of identification module 33 is stated, the end USB_ID_CONNECT of the identification module 33 and the serial ports socket 34 connect
It connects, the identification module 33 is inserted into the level signal of USB_ID in the serial port circuit of the serial ports socket 34 for identification, described
CPU_31 be used for according to the level signal of the USB_ID control the switching module 32 the end D+ of the CPU_31, the end D- and
The end TX, GND switch between end.
The present invention is inserted into the level letter of USB_ID in the serial port circuit of the serial ports socket 34 by the identification of identification module 33
Number, CPU_31 controls switching module 32 at the end D+, the end D- and the end TX, GND of the CPU_31 according to the level signal of USB_ID
Switch between end.In addition, USB_ID interface in serial port circuit is directly connect with VBUS high level by the present invention.When serial port circuit is inserted
After entering serial ports socket 34, identification module 33 recognizes high level, and CPU_31 controls switching module 32 and switches the end D+ of CPU_31
For the end GND, the end D- is switched to the end TX, thus, TX and GND can be connected to Serial Port Line in the case where not dismantling machine by user
On print serial ports log, the effect that machine grabs serial ports log is not torn in realization open, is torn machine number open to reduce, is extended the terminal service life, improves
Log analysis efficiency.
Another embodiment of the present invention also provides a kind of serial ports log crawl circuit, as shown in figure 4, the serial ports log grabs
Circuit includes processor CPU_31, switching module 32, identification module 33 and serial ports socket 34.
Wherein, the switching module 32 is double-point double-throw switch DPDT, and the CPU_31 passes through the IGPO and DPDT_32
Enable end connection, the first non-moving end of the DPDT_32 connect with the end D+ of the serial ports socket 34, the DTDP_32's
Second non-moving end is connect with the end D- of the serial ports socket 34, described when the level signal of the USB_ID is low level
The first moved end of DTDP_32 is connect with the end D+ of the CPU_31, the second moved end of the DTDP_32 and the D- of the CPU_31
End connection, when the level signal of the USB_ID is high level, the first moved end of the DTDP_32 is with the CPU_31's
The connection of the end GDN, the second moved end of the DTDP_32 is connect with the end TX of the CPU_31.In the present embodiment, DTDP_32 can be with
It is arranged on mainboard.
The USB_ID interface of the CPU_31 is connect with the end USB_ID of the identification module 33, the identification module 33
The end USB_ID_CONNECT is connect with the serial ports socket 34.As shown in figure 5, the end USB_ID of the identification module 33 is by simultaneously
Diode D, the first resistor R1 of connection are connect with the end USB_ID_CONNECT, and the end USB_ID is connect by second resistance R2
Ground, the end USB_ID_CONNECT are grounded by capacitor C.Preferably, the first resistor is 2M Ω, and the second resistance is
1M Ω, the capacitor are 100P.
In the present embodiment, identification module 33 specifically be can be set on pcb board, to realize identification low level, hanging and height
The level signal of three kinds of states of level;Specifically, electric current is from two when the end USB_ID_CONNECT is low level and vacant state
Pole pipe D, which flows through, normally to be identified, pass through first resistor R1 and the 1M Ω of 2M Ω when the end USB_ID_CONNECT is high level
Second resistance R2 divide to obtain 1.8V level and USB_ID can be allowed to be identified as high level.
After serial port circuit is inserted into serial ports socket 34, identification module 33 recognizes the non-high level of level signal of USB_ID,
First moved end is connect the end GDN being switched to the CPU_31 by CPU_31 control DTDP_32 from the end D+ with the CPU_31
Connection, the second moved end connect to be switched to from the end D- with the CPU_31 and connect with the end TX of the CPU_31.To Yong Huke
By serial port circuit, TX and GND to be connected on Serial Port Line and print serial ports log in the case where not dismantling machine, realize not
The machine of tearing open grabs the effect of serial ports log, tears machine number open to reduce, extends the terminal service life, improves log analysis efficiency.
Another embodiment of the present invention also provides a kind of serial port circuit, including USB_ID interface, the serial port circuit and Fig. 3 or
Any serial ports log crawl circuit of Fig. 4 is mating, and the USB_ID interface is connected with VBUS, and the serial port circuit is inserted into institute
When stating serial ports socket, Xiang Suoshu serial ports log grabs circuit and provides high level.
Another embodiment of the present invention also provides a kind of USB data line, including above-mentioned serial port circuit.
Circuit embodiments are grabbed based on above-mentioned each serial ports log, the present invention provides following methods embodiment.
Fig. 6 is a kind of serial ports log grasping means that an embodiment of the present invention provides, this method comprises:
S601, the level signal for detecting USB_ID;
In this step, the level signal of USB_ID can be specifically detected by Fig. 3 or identification module shown in Fig. 4 33.
For example, when the end USB_ID_CONNECT is low level and vacant state, electric current is flowed through from diode D can positive common sense in Fig. 4
Not, it divides to obtain by the second resistance R2 of first resistor R1 and the 1M Ω of 2M Ω when the end USB_ID_CONNECT is high level
1.8V level can allow USB_ID to be identified as high level.
S602, cutting between the end D+, the end D- and the end TX, the end GND of CPU is controlled according to the level signal of the USB_ID
It changes.
Under normal circumstances, the level signal of USB_ID is low level, when the USB data line in the insertion present invention, institute
The level signal for stating USB_ID is high level, then the end D+ of the CPU is switched to the end GND, the end D- and is switched to the end TX.Specifically
, CPU_31 controls DTDP_32 and the first moved end is connect the GDN being switched to the CPU_31 from the end D+ with the CPU_31
End connection, the second moved end connect to be switched to from the end D- with the CPU_31 and connect with the end TX of the CPU_31.To user
In the case where not dismantling machine, by serial port circuit, TX and GND can be connected on Serial Port Line and print serial ports log, realized
The effect that machine grabs serial ports log is not torn open.
Based on the various embodiments described above, the present invention also provides a kind of serial ports logs to grab terminal, and the serial ports log crawl is eventually
End grabs circuit comprising any serial ports log of Fig. 3 or Fig. 4.Wherein, serial ports log crawl terminal specifically can be including
Such as mobile phone, tablet computer, laptop, palm PC, personal digital assistant (PersonalDigital Assistant,
PDA), portable media player (Portable Media Player, PMP), navigation terminal, wearable device, start certainly
The fixed terminals such as the mobile terminal of ring, pedometer etc., and number TV, desktop computer.
An embodiment of the present invention also provides a kind of serial ports log crawl terminal, as shown in fig. 7, serial ports log crawl is eventually
End 6 includes: memory 61, processor 62 and is stored in the serial ports log that can be run on the memory and on the processor
Capture program, the serial ports log capture program perform the steps of when being executed by the processor
Detect the level signal of USB_ID;
The switching between the end D+, the end D- and the end TX, the end GND of CPU is controlled according to the level signal of the USB_ID.
In a specific embodiment, it is described according to the level signal of the USB_ID control the end D+ of CPU, the end D- and
In switch step between the end TX, the end GND, the processor is also used to execute the serial ports log capture program, with realize with
Lower step:
When the level signal of the USB_ID is high level, the end D+ of the CPU is switched to the end GND, the end D- and is switched
For the end TX.
Another aspect of the present invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage
There is one or more program, one or more of programs can be executed by one or more processor, following to realize
Step:
Detect the level signal of USB_ID;
The switching between the end D+, the end D- and the end TX, the end GND of CPU is controlled according to the level signal of the USB_ID.
In a specific embodiment, it is described according to the level signal of the USB_ID control the end D+ of CPU, the end D- and
In switch step between the end TX, the end GND, one or more of programs can be executed by one or more processor, with
It performs the steps of
When the level signal of the USB_ID is high level, the end D+ of the CPU is switched to the end GND, the end D- and is switched
For the end TX.
Serial ports log crawl circuit, method, terminal and computer readable storage medium provided by the invention, on the one hand, logical
Cross the level signal that USB_ID in the serial port circuit of the serial ports socket is inserted into identification module identification, CPU is according to the electricity of USB_ID
Ordinary mail number control switching module switches between end in the end D+ of the CPU, the end D- and the end TX, GND.On the other hand, by serial port power
USB_ID interface is directly connect with VBUS high level in road.After serial port circuit is inserted into serial ports socket, identification module recognizes height
Level, CPU control switching module and the end D+ of CPU are switched to the end GND, and the end D- is switched to the end TX, thus, user can not tear open
In the case where booting, TX and GND being connected on Serial Port Line and print serial ports log, the effect that machine grabs serial ports log is not torn in realization open,
Machine number is torn open to reduce, extends the terminal service life, improves log analysis efficiency.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the terminal that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or terminal institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or terminal.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service
Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form, all of these belong to the protection of the present invention.
Claims (10)
1. a kind of serial ports log grabs circuit, which is characterized in that inserted including processor CPU, switching module, identification module and serial ports
Seat, the CPU are connect with the switching module, and the switching module is connect with the serial ports socket, and the USB_ID of the CPU connects
Mouth is connect with the end USB_ID of the identification module, and the end USB_ID_CONNECT of the identification module and the serial ports socket connect
It connects, the identification module is inserted into the level signal of USB_ID in the serial port circuit of the serial ports socket for identification, and the CPU is used
According to the level signal of the USB_ID control the switching module the end D+ of the CPU, the end D- and the end TX, the end GND it
Between switch.
2. serial ports log according to claim 1 grabs circuit, which is characterized in that the switching module is opened for double-pole double throw
DPDT is closed, the CPU is connect by IGPO with the enable end of the DPDT, and the first non-moving end of the DPDT and the serial ports are inserted
The end the D+ connection of seat, the second non-moving end of the DTDP is connect with the end D- of the serial ports socket, when the level of the USB_ID
Signal be low level when, the first moved end of the DTDP is connect with the end D+ of the CPU, the second moved end of the DTDP with it is described
The end D- of CPU connects, and when the level signal of the USB_ID is high level, the first moved end of the DTDP is with the CPU's
The connection of the end GDN, the second moved end of the DTDP is connect with the end TX of the CPU.
3. serial ports log according to claim 1 grabs circuit, which is characterized in that the end USB_ID of the identification module is logical
Cross diode in parallel, first resistor is connect with the end USB_ID_CONNECT, the end USB_ID is connect by second resistance
Ground, the end USB_ID_CONNECT pass through capacity earth.
4. serial ports log according to claim 3 grabs circuit, which is characterized in that the first resistor is 2M Ω, described
Second resistance is 1M Ω.
5. a kind of serial port circuit, including USB_ID interface, which is characterized in that the serial port circuit and any institute of claim 1-3
The serial ports log crawl circuit stated is mating, and the USB_ID interface is connected with VBUS, and the serial port circuit is inserted into the serial ports and inserts
When seat, Xiang Suoshu serial ports log grabs circuit and provides high level.
6. a kind of serial ports log grasping means, which is characterized in that the serial ports log grasping means includes:
Detect the level signal of USB_ID;
The switching between the end D+, the end D- and the end TX, the end GND of CPU is controlled according to the level signal of the USB_ID.
7. serial ports log grasping means according to claim 5, which is characterized in that
When the level signal of the USB_ID is high level, the end D+ of the CPU is switched to the end GND, the end D- and is switched to TX
End.
8. a kind of serial ports log grabs terminal, which is characterized in that grabbed eventually including any serial ports log of claim 1-4
End.
9. a kind of USB data line, which is characterized in that including serial port circuit as claimed in claim 5.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage have one or
Multiple programs, one or more of programs can be executed by one or more processor, to realize that claim 1-4 such as appoints
Each step of serial ports log grasping means described in one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910093408.0A CN109901980B (en) | 2019-01-30 | 2019-01-30 | Serial port log capturing circuit, method, terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910093408.0A CN109901980B (en) | 2019-01-30 | 2019-01-30 | Serial port log capturing circuit, method, terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109901980A true CN109901980A (en) | 2019-06-18 |
CN109901980B CN109901980B (en) | 2022-08-23 |
Family
ID=66944483
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910093408.0A Active CN109901980B (en) | 2019-01-30 | 2019-01-30 | Serial port log capturing circuit, method, terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109901980B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110555090A (en) * | 2019-07-19 | 2019-12-10 | 苏州浪潮智能科技有限公司 | method, system, terminal and storage medium for automatically acquiring CPUBUSNumber |
CN111045883A (en) * | 2019-12-11 | 2020-04-21 | 紫光展讯通信(惠州)有限公司 | Debugging circuit, method and terminal |
CN111400226A (en) * | 2020-03-02 | 2020-07-10 | 上海闻泰信息技术有限公司 | Mobile terminal device and log acquisition system |
CN111897755A (en) * | 2020-06-15 | 2020-11-06 | 深圳市广和通无线股份有限公司 | Log capture method and device and switching module |
CN116719712A (en) * | 2023-08-09 | 2023-09-08 | 金舟远航(北京)信息产业有限公司 | Processor serial port log output method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009086753A (en) * | 2007-09-27 | 2009-04-23 | Toshiba Corp | Information processor and connection control method |
CN101945155A (en) * | 2010-09-03 | 2011-01-12 | 展讯通信(上海)有限公司 | Method and terminal device for capturing terminal debugging information in real-time manner |
CN206363306U (en) * | 2016-08-30 | 2017-07-28 | 深圳市金立通信设备有限公司 | A kind of terminal and its serial communication circuit |
CN107798099A (en) * | 2017-10-27 | 2018-03-13 | 努比亚技术有限公司 | A kind of log information grasping means, terminal and computer-readable recording medium |
CN108363667A (en) * | 2018-02-27 | 2018-08-03 | 广州视源电子科技股份有限公司 | Log information snatchs equipment |
CN108509317A (en) * | 2018-03-29 | 2018-09-07 | 广州视源电子科技股份有限公司 | Log file saving method and device, electronic device and storage medium |
CN208283492U (en) * | 2018-07-05 | 2018-12-25 | 深圳市泰比特科技有限公司 | Have convenient for quick-downloading and AccessPort test smelting |
-
2019
- 2019-01-30 CN CN201910093408.0A patent/CN109901980B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009086753A (en) * | 2007-09-27 | 2009-04-23 | Toshiba Corp | Information processor and connection control method |
CN101945155A (en) * | 2010-09-03 | 2011-01-12 | 展讯通信(上海)有限公司 | Method and terminal device for capturing terminal debugging information in real-time manner |
CN206363306U (en) * | 2016-08-30 | 2017-07-28 | 深圳市金立通信设备有限公司 | A kind of terminal and its serial communication circuit |
CN107798099A (en) * | 2017-10-27 | 2018-03-13 | 努比亚技术有限公司 | A kind of log information grasping means, terminal and computer-readable recording medium |
CN108363667A (en) * | 2018-02-27 | 2018-08-03 | 广州视源电子科技股份有限公司 | Log information snatchs equipment |
CN108509317A (en) * | 2018-03-29 | 2018-09-07 | 广州视源电子科技股份有限公司 | Log file saving method and device, electronic device and storage medium |
CN208283492U (en) * | 2018-07-05 | 2018-12-25 | 深圳市泰比特科技有限公司 | Have convenient for quick-downloading and AccessPort test smelting |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110555090A (en) * | 2019-07-19 | 2019-12-10 | 苏州浪潮智能科技有限公司 | method, system, terminal and storage medium for automatically acquiring CPUBUSNumber |
CN110555090B (en) * | 2019-07-19 | 2022-10-18 | 苏州浪潮智能科技有限公司 | Method, system, terminal and storage medium for automatically acquiring CPU BUS Number |
CN111045883A (en) * | 2019-12-11 | 2020-04-21 | 紫光展讯通信(惠州)有限公司 | Debugging circuit, method and terminal |
CN111045883B (en) * | 2019-12-11 | 2022-07-08 | 紫光展讯通信(惠州)有限公司 | Debugging circuit, method and terminal |
CN111400226A (en) * | 2020-03-02 | 2020-07-10 | 上海闻泰信息技术有限公司 | Mobile terminal device and log acquisition system |
CN111897755A (en) * | 2020-06-15 | 2020-11-06 | 深圳市广和通无线股份有限公司 | Log capture method and device and switching module |
CN116719712A (en) * | 2023-08-09 | 2023-09-08 | 金舟远航(北京)信息产业有限公司 | Processor serial port log output method and device, electronic equipment and storage medium |
CN116719712B (en) * | 2023-08-09 | 2024-01-19 | 金舟远航(北京)信息产业有限公司 | Processor serial port log output method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109901980B (en) | 2022-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108536481A (en) | A kind of application program launching method, mobile terminal and computer storage media | |
CN106961706A (en) | Method, mobile terminal and the computer-readable recording medium of communication pattern switching | |
CN109901980A (en) | Serial ports log grabs circuit, method, terminal and computer readable storage medium | |
CN108762876A (en) | A kind of input method switching method, mobile terminal and computer storage media | |
CN109634542A (en) | A kind of switching display control method, terminal and computer readable storage medium | |
CN109947248A (en) | Vibration control method, mobile terminal and computer readable storage medium | |
CN108391190B (en) | A kind of noise-reduction method, earphone and computer readable storage medium | |
CN109005574A (en) | Cell selecting method, mobile terminal and computer readable storage medium | |
CN110187808A (en) | Dynamic wallpaper setting method, device and computer readable storage medium | |
CN108833665A (en) | Communication means, wearable device and computer readable storage medium | |
CN109584897A (en) | Vedio noise reduction method, mobile terminal and computer readable storage medium | |
CN108829302A (en) | A kind of interaction regulation method, equipment and computer readable storage medium | |
CN110347306A (en) | A kind of multi-screen display method, terminal and computer readable storage medium | |
CN109522276A (en) | Application icon management method, terminal and computer readable storage medium | |
CN110086925A (en) | A kind of application processing method and mobile terminal | |
CN108540697A (en) | It is double before and after one kind to take the photograph circuit structure and its mobile terminal | |
CN108881542A (en) | Mobile terminal call method, mobile terminal and computer readable storage medium | |
CN109684020A (en) | A kind of method for switching theme, equipment and computer readable storage medium | |
CN110174934A (en) | A kind of power button device and mobile terminal | |
CN110167004A (en) | A kind of network registering method, mobile terminal and computer readable storage medium | |
CN109683796A (en) | A kind of interaction control method, equipment and computer readable storage medium | |
CN110007817A (en) | A kind of message treatment method and mobile terminal, computer readable storage medium | |
CN109151201A (en) | A kind of Anti-addiction method, mobile terminal and computer storage medium | |
CN108650404A (en) | Port start-up circuit, device and mobile terminal | |
CN109062966A (en) | A kind of method for processing multimedia information, equipment and computer readable storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |