CN103856411B - Switching system connected with UART interface of router - Google Patents

Switching system connected with UART interface of router Download PDF

Info

Publication number
CN103856411B
CN103856411B CN201210510109.0A CN201210510109A CN103856411B CN 103856411 B CN103856411 B CN 103856411B CN 201210510109 A CN201210510109 A CN 201210510109A CN 103856411 B CN103856411 B CN 103856411B
Authority
CN
China
Prior art keywords
row
control circuit
pin
router
uart interface
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.)
Active
Application number
CN201210510109.0A
Other languages
Chinese (zh)
Other versions
CN103856411A (en
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.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201210510109.0A priority Critical patent/CN103856411B/en
Publication of CN103856411A publication Critical patent/CN103856411A/en
Application granted granted Critical
Publication of CN103856411B publication Critical patent/CN103856411B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a switching system connected with a UART interface of a router. The router comprises a pin header with five pins. The switching system comprises a switch control circuit and a female header. The UART interface is connected with the switch control circuit. The switch control circuit comprises a first access and a second access, and is connected with the pin header through the first access. The switch control circuit is used for detecting whether the pin header is in inserted connection with the female header or not, if yes, the switch control circuit is switched to the first access, and the UART interface transmits a start message of the router through the first access by serving as an adjusting port, and if not, the switch control circuit is switched to the second access. The UART interface can be switched between the adjusting port and a data transmission communication port, it is unnecessary to change the design scheme of a main chip of the router, development cost is lowered, development period is shortened, and development risks are reduced.

Description

The switching system of the UART interface connection of router
Technical field
The present invention relates to the switching system that a kind of UART interface of router is connected, more particularly to one kind can be by opening Close the UART interface of the router that control circuit switches over UART interface between debugging port and data transfer port The switching system of connection.
Background technology
UART(Universal Asynchronous Receive/dispensing device)It is a kind of widely used short distance serial transmission interface, generally exists Can be designed to debug port in Design of Home Gateway, home gateway is provided in the terminal in subscriber household, be connection telecommunications The equipment of network and subscriber household network, realizes exchanging for household internal information and family's external information, and undoubtedly family networks Purpose.It is the characteristics of home gateway at present:
Existing market main flow router only supports routing function mostly, and the UART interface of its master chip is generally designed to The debugging port of unitary function, form is single, function is simple, and the demand in market is can not meet gradually.And with network The fast development and fusion of technology, router also needs to be endowed more functions at leisure, except traditional Network Access Point road It is outer, it is necessary to IPTV by function(IPTV), band SIM(Client identification module, also known as subscriber identification card)Note Voice call function of volume etc..Now it is accomplished by switching the function of UART interface, it is necessary to by UART interface from traditional debugging end Mouth switch to data transfer communications mouth go access SIM realize voice register, and this when be in the prior art cannot Same UART interface is shared, can there is a problem of serial ports contention, if the use of same UART interface being as debugging end Mouthful mouthful can cause that device program collapses as data transfer communications again because interface can not process simultaneously two kinds it is different Communication pattern.
And be required for reselecting high-end chip in the prior art and be designed come the master chip again to router, this meeting Huge software development and hardware development work and R&D risk is brought, certainly, cost also can be very huge.
The content of the invention
The technical problem to be solved in the present invention be realized in the prior art to overcome UART interface function switching, it is necessary to It is designed come the master chip again to router by reselecting high-end chip, causes to bring huge work and research and development wind The defect of danger, there is provided one kind can be being debugged between port and data transfer port UART interface by ON-OFF control circuit The switching system of the UART interface connection of the router of switching.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The invention provides the switching system that a kind of UART interface of router is connected, the router includes that one has five to draw Row's pin of pin, its feature is that the switching system also includes an ON-OFF control circuit and a row mother matched with row's pin, The UART interface is connected with the ON-OFF control circuit, and the ON-OFF control circuit includes one first path and an alternate path, And be connected with the data transmit-receive pin of row's pin by first path, the ON-OFF control circuit is used to detect row's pin and be somebody's turn to do Whether mother row plugs, if so, then the ON-OFF control circuit switches to first path, and the UART interface as debugging port By the startup information of first tunnel router, if it is not, then the ON-OFF control circuit switches to the alternate path.
Existing router all includes the row's pin with five pins, by the data transmit-receive pin and UART interface phase of arranging pin Connection realizes UART interface, as debugging port, the startup information record of the router to be got off first, is produced in router After product start completion, user can recall the startup information and enter by UART interface at any time when needing using software instruction Row is checked, and user can also be debugged by UART interface to router product, and these belong to well known in the art Technology, just repeats no more herein.
And the switching system also includes that the ON-OFF control circuit and the row are female, the ON-OFF control circuit can detect the row Whether pin plugs with row mother, if so, then the ON-OFF control circuit switches to first path, the UART interface can just be made It is debugging port by the startup information of first tunnel router, if it is not, then the ON-OFF control circuit is just switched to The alternate path, then by the alternate path connect a communication module, such as display screen, printer and other can be operated in The application of function of UART serial communication modes, the UART interface can serve as data transfer communications mouthful and control electricity by the switch Road carries out data interaction with the communication module.
Therefore, by the switching system, it becomes possible to realize by UART interface debugging port and data transfer port it Between switch over, and the design of router master chip need not be changed, reduce development cost and construction cycle, reduce The risk of exploitation.
It is preferred that the router also includes a FLASH(Flash memory), when the ON-OFF control circuit is detected as no, should also Start information Store in the FLASH.
When the ON-OFF control circuit is detected as no, the ON-OFF control circuit switches to the alternate path, the UART interface Communicated with communication module by the ON-OFF control circuit as data transfer communications mouth or initialized communication module, this When UART interface cannot just be re-used as debugging port record the startup information.And a LOG is at this moment then marked off in the FLASH (Daily record)Subregion deposits all of startup information, and when the female grafting non-with row's pin of the row, the ON-OFF control circuit meeting First path is switched back to, the UART interface also can again as debugging port, if now research staff needs to check startup Information, it is possible to the startup information is recalled by the debugging port and is checked.
It is preferred that the router also includes a GPIO(Universal input/output)Interface, the GPIO interface is high level, and The GPIO interface is connected by a first resistor with a power supply, and is connected with the ON-OFF control circuit by a first port Connect;
The female vacant pin of the row is connected with grounding pin by a second resistance, when row's pin and row's parent phase grafting When, the vacant pin is also connected by the first port with the ON-OFF control circuit;
The ON-OFF control circuit is used to detect whether the first port is low level, if so, then row's pin and row's parent phase Grafting, if it is not, then row's pin and the female non-grafting of the row.
Five female pins of existing row be all mutually be not connected to, with respective function, and in the present invention will mother row Vacant pin be connected by the second resistance with grounding pin, and when row's pin and when row's parent phase grafting, should Vacant pin is also connected by the first port with the ON-OFF control circuit, and so the level of the first port is just changed into low electricity It is flat.
Therefore, when row's pin and row's parent phase grafting, the first port is low level, and it is female with the row not to work as row's pin During grafting, the level of the first port is identical with the GPIO interface, is high level, thus the ON-OFF control circuit by this The height of the level of Single port just can interpolate that out whether row's pin plugs with row mother.
It is preferred that when the ON-OFF control circuit switches to the alternate path, the UART interface is used as data transfer communications Mouth carries out data interaction with a communication module.
Positive effect of the invention is:The present invention can be realized UART interface in debugging port and data transfer Switched between port, and the design of router master chip need not be changed, reduce development cost and exploitation In the cycle, reduce the risk of exploitation.
Brief description of the drawings
Fig. 1 is the structural representation of the switching system of the UART interface connection of the router of a preferred embodiment of the invention Figure.
Fig. 2 is the structural representation of mother row of a preferred embodiment of the invention.
Flow when Fig. 3 is the switching system work of the UART interface connection of the router of a preferred embodiment of the invention Figure.
Specific embodiment
Present pre-ferred embodiments are given below in conjunction with the accompanying drawings, to describe technical scheme in detail.
It is as shown in Figure 1 the switching system that the UART interface 11 of router of the invention 1 is connected, the router 1 includes one Row's pin 12, a FLASH13 and a GPIO interface 14 with five pins, the switching system also include an ON-OFF control circuit 2 And mother row 3 matched with row's pin.
The UART interface 11 is connected with the ON-OFF control circuit 2, the ON-OFF control circuit 2 include one first path 21 with And an alternate path 22, and be connected with the data transmit-receive pin of row's pin 12 by first path 21.
The GPIO interface 14 is high level, and the GPIO interface 14 is by a 10K ohm of first resistor R1With a 3.3V Power supply be connected, and be connected with the ON-OFF control circuit 2 by a first port.
The vacant pin of mother row 3 passes through a 1K ohm of second resistance R with grounding pin2It is connected, when row's pin 12 When being plugged with mother row 3, the vacant pin is also connected by the first port with the ON-OFF control circuit 2.
Five pins of existing mother row 3 be all mutually be not connected to, with respective function, and as shown in Fig. 2 in this hair In bright, the vacant pin and grounding pin that will arrange female 3 pass through second resistance R2It is connected, and when row's pin 12 and the row are female 3 when plugged, and the vacant pin is also connected by the first port with the ON-OFF control circuit 2, so due to ground connection, The level of the first port is just changed into low level.
Therefore, when row's pin 12 and mother row 3 plug, the first port is low level, and works as row's pin 12 and be somebody's turn to do During 3 non-grafting of mother row, the level of the first port is identical with the GPIO interface 14, is high level, so that switch control electricity The height of the level that road 2 passes through the first port just can interpolate that out whether row's pin 12 plugs with mother row 3.
The ON-OFF control circuit 2 is by detecting whether the first port is low level, if so, then row's pin 12 is female with the row 3 plug, and now the ON-OFF control circuit 2 just switches to first path 21, and the UART interface 11 just can be used as debugging end Mouth transmits the startup information of the router 1 by first path 21, if it is not, then row's pin 12 and mother row 3 just non-grafting, this When the ON-OFF control circuit 2 switch to the alternate path 22, then a communication module is connected by the alternate path 22, such as show Screen, printer and other can be operated in the application of function of UART serial communication modes, the UART interface 11 can serve as Data transfer communications mouthful carry out data interaction by the ON-OFF control circuit 2 and the communication module.
And when the ON-OFF control circuit 2 is detected as no, the ON-OFF control circuit 2 switches to the alternate path 22, should UART interface 11 is communicated or is initialized with communication module as data transfer communications mouthful by the ON-OFF control circuit 2 Communication module, now UATR interfaces 11 cannot just be re-used as debugging port record the startup information.And at this moment then in the FLASH13 In mark off a LOG subregion and deposit all of startup information, and when the row female 12 is with row's 3 non-grafting of pin, this is opened Closing control circuit 2 can switch back to first path 21, and the UART interface 11 also can again as debugging port, if now researched and developed Personnel need to check startup information, it is possible to recall the startup information by the debugging port and checked.
And user recalls the startup information and is looked into by UART interface 11 at any time when needing using software instruction See, and user can also be debugged by UART interface 11 to the product of router 1, and these belong to skill well known in the art Art, just repeats no more herein.
As shown in figure 3, when the connection using the switching system to the UART interface 11 of router 1 is switched over, specifically Workflow is as follows:
Electricity on step 100, the product of router 1, the ON-OFF control circuit 2 detects whether the first port is low level, If so, step 101 is then performed, if it is not, then performing step 102.
Step 101, the ON-OFF control circuit 2 switch to first path 21, and the UART interface 11 is led to as debugging port The startup information that first path 21 transmits the router 1 is crossed, then terminates flow.
Step 102, the ON-OFF control circuit 2 switch to the alternate path 22, then are led to by the alternate path 22 connection one Letter module, the UART interface 11 carries out data as data transfer communications mouthful by the ON-OFF control circuit 2 and the communication module Interaction, then terminates flow.
Although the foregoing describing specific embodiment of the invention, it will be appreciated by those of skill in the art that these It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back On the premise of principle of the invention and essence, various changes or modifications can be made to these implementation methods, but these are changed Protection scope of the present invention is each fallen within modification.

Claims (3)

1. the switching system that a kind of UART interface of router is connected, the router includes row's pin with five pins, and it is special Levy and be, the switching system also includes that an ON-OFF control circuit and a row matched with row's pin are female, the UART interface with The ON-OFF control circuit is connected, the ON-OFF control circuit include one first path and an alternate path, and by this first Path is connected with the data transmit-receive pin of row's pin, and the ON-OFF control circuit is used to detect whether row's pin is mutually inserted with row mother Connect, if so, then the ON-OFF control circuit switches to first path, and the UART interface first is led to as debugging port by this The startup information of the router is transmitted on road, if it is not, then the ON-OFF control circuit switches to the alternate path, when the switch controls electricity When road switches to the alternate path, the UART interface carries out data interaction as data transfer communications mouthful and a communication module.
2. switching system as claimed in claim 1, it is characterised in that the router also includes a FLASH, when switch control When electric circuit inspection is no, also by the startup information Store to the FLASH.
3. switching system as claimed in claim 2, it is characterised in that the router also includes a GPIO interface, the GPIO connects Mouthful it is high level, and the GPIO interface is connected by a first resistor with a power supply, and by a first port and the switch Control circuit is connected;
The female vacant pin of the row is connected with grounding pin by a second resistance, when row's pin and row's parent phase grafting, The vacant pin is also connected by the first port with the ON-OFF control circuit;
The ON-OFF control circuit is used to detect whether the first port is low level, if so, then row's pin and row's parent phase grafting, If it is not, then row's pin and the female non-grafting of the row.
CN201210510109.0A 2012-12-03 2012-12-03 Switching system connected with UART interface of router Active CN103856411B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210510109.0A CN103856411B (en) 2012-12-03 2012-12-03 Switching system connected with UART interface of router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210510109.0A CN103856411B (en) 2012-12-03 2012-12-03 Switching system connected with UART interface of router

Publications (2)

Publication Number Publication Date
CN103856411A CN103856411A (en) 2014-06-11
CN103856411B true CN103856411B (en) 2017-05-24

Family

ID=50863642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210510109.0A Active CN103856411B (en) 2012-12-03 2012-12-03 Switching system connected with UART interface of router

Country Status (1)

Country Link
CN (1) CN103856411B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893301A (en) * 2015-04-17 2016-08-24 乐视致新电子科技(天津)有限公司 Control circuit of external functional module, external functional module and terminal device
CN105868140A (en) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 A mobile apparatus
CN106161146A (en) * 2016-08-24 2016-11-23 上海斐讯数据通信技术有限公司 A kind of route system antitheft startup method and device, router
CN106708731A (en) * 2016-11-29 2017-05-24 郑州云海信息技术有限公司 Equipment debugging switching method and CPLD (Complex Programmable Logic Device)
CN108429693A (en) * 2018-02-09 2018-08-21 上海康斐信息技术有限公司 A kind of router and its control method of debugging mouth and network interface multiplexing
CN109862583A (en) * 2019-01-04 2019-06-07 新华三技术有限公司 A kind of method and device reporting exception information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100622246B1 (en) * 2005-06-07 2006-09-18 엘지전자 주식회사 Mobile phone having uart line switch
KR20060133399A (en) * 2005-06-20 2006-12-26 엘지전자 주식회사 Apparatus for debugging of embedded system
CN102323902A (en) * 2011-07-25 2012-01-18 中国华录集团有限公司 Debugging system with analog audio output device
CN102421010A (en) * 2011-12-31 2012-04-18 四川长虹电器股份有限公司 Software debugging system and method compatible to video graphics array (VGA) port input
CN102750252A (en) * 2012-05-29 2012-10-24 惠州Tcl移动通信有限公司 Circuit capable of reusing universal serial bus (USB)/ universal asynchronous receiver/ transmitter (UART) interfaces and electronic device using same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100622246B1 (en) * 2005-06-07 2006-09-18 엘지전자 주식회사 Mobile phone having uart line switch
KR20060133399A (en) * 2005-06-20 2006-12-26 엘지전자 주식회사 Apparatus for debugging of embedded system
CN102323902A (en) * 2011-07-25 2012-01-18 中国华录集团有限公司 Debugging system with analog audio output device
CN102421010A (en) * 2011-12-31 2012-04-18 四川长虹电器股份有限公司 Software debugging system and method compatible to video graphics array (VGA) port input
CN102750252A (en) * 2012-05-29 2012-10-24 惠州Tcl移动通信有限公司 Circuit capable of reusing universal serial bus (USB)/ universal asynchronous receiver/ transmitter (UART) interfaces and electronic device using same

Also Published As

Publication number Publication date
CN103856411A (en) 2014-06-11

Similar Documents

Publication Publication Date Title
CN103856411B (en) Switching system connected with UART interface of router
CN104881387B (en) A kind of USB connection methods and usb hub
CN204946001U (en) USB Type-C modular converter
CN106844277A (en) A kind of server and its information transferring method
CN109561032A (en) A kind of switch module and the interchanger including it
CN106200829A (en) RJ45 type double-serial port server
CN108337095A (en) G.fast SFP modules
CN202551086U (en) Ethernet switch
CN206363306U (en) A kind of terminal and its serial communication circuit
CN205139898U (en) Thing networking hardware development board
CN208337596U (en) G.fast SFP module
CN103825747B (en) Splitter system compatible with 100M Ethernet and 1000M Ethernet
CN1889401B (en) Method for on-line identifying small packaged hot connecting and disconnecting module
CN106528476A (en) Circuit capable of automatically realizing cross and direct connection serial port switching
CN203522744U (en) Multi-service optical access apparatus
CN208369602U (en) A kind of combination function network interface card
CN207663327U (en) Realize the circuit of DC charging and USB port communication function
CN206364817U (en) Network information module for comprehensive wiring
CN105955908A (en) Method for realizing multi-serial port device connection and monitoring
CN207266056U (en) Ethernet switch
CN206348806U (en) A kind of identity information acquisition and checking device
CN205490621U (en) Network communication system
CN206378159U (en) A kind of humiture collection device and humiture acquisition system
CN208461818U (en) Ethernet TAP equipment based on FPGA
CN205105238U (en) Terminal of intelligence handling end mouth data

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
PP01 Preservation of patent right

Effective date of registration: 20180313

Granted publication date: 20170524

PP01 Preservation of patent right
PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20210313

Granted publication date: 20170524

PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20210313

Granted publication date: 20170524

PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20240313

Granted publication date: 20170524