CN105205022B - A kind of more Console port collocation methods and system - Google Patents

A kind of more Console port collocation methods and system Download PDF

Info

Publication number
CN105205022B
CN105205022B CN201510622761.5A CN201510622761A CN105205022B CN 105205022 B CN105205022 B CN 105205022B CN 201510622761 A CN201510622761 A CN 201510622761A CN 105205022 B CN105205022 B CN 105205022B
Authority
CN
China
Prior art keywords
console port
uart
sources
console
port
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
CN201510622761.5A
Other languages
Chinese (zh)
Other versions
CN105205022A (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.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom 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 Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201510622761.5A priority Critical patent/CN105205022B/en
Publication of CN105205022A publication Critical patent/CN105205022A/en
Application granted granted Critical
Publication of CN105205022B publication Critical patent/CN105205022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link

Abstract

The present invention discloses a kind of more Console port collocation methods and system, including:Recording Console port and the configuration information in UART sources, the configuration information in control terminal includes:The current state of each Console port, the current state in each UART sources, and each Console port and the current pairing state in UART sources;And monitor the input instruction of each Console port.When the current state of a Console port is state of a control, when to monitor the input instruction that Console port receives be matched order, it is that Console port and the UART source corresponding with the Console port are matched according to matched order, and it is to have matched to update the Console port in configuration information, the current state in UART sources and Console port with the current state in corresponding UART sources.By the solution of the present invention, the automatic of external diversified forms Console port can be supported to select source in complex device, meet a variety of demands of user.

Description

A kind of more Console port collocation methods and system
Technical field
The present invention relates to Computer Interface Technology, more particularly to a kind of more Console port collocation methods and system.
Background technology
Console port is the common interfaces that the network equipment is used for being attached with computer or terminal device.In general net Network equipment has a Console port, and it is used exclusively for the network equipment is configured and managed.Pass through Console Mouthful connect and simultaneously to configure, be configuration and the indispensable mode of the management network equipment, although in addition also have other several configurations and The mode (such as Web modes, Telnet modes) of the network equipment is managed, but these modes generally require and pass through Console port It could be carried out after carrying out basic configuration, because generally require just can be with by means of IP address, domain name or device name for these modes Realize.
Console port routinely uses UART asynchronous bus, including two data-signals of RXD and TXD in device interior. Console port external form is generally DB9 forms or RJ45 forms, turns serial port-shaped as USB occurs in the popularization of USB port again The Console port of formula.In addition, in some special applications, the Console port of other forms also be present.Fig. 1 gives three kinds often The Console port form seen.
Because Console port form is more, user just has more flexible demand in use, on the same device It is not content with the Console port of single form.In addition, in some complex devices, it may be necessary to two or more Console port, for multiple components in management equipment.Thus there is external support diversified forms Console port form, it is right Design requirement interior and that multiple components can be connected.
The content of the invention
In order to solve the above problems, the present invention proposes a kind of more Console port collocation methods and system, can be in complexity Support the automatic of external diversified forms Console port to select source in equipment, meet a variety of demands of user.
In order to achieve the above object, the present invention proposes a kind of more Console port collocation methods, and this method is applied to more Console port system, more Console port systems include:Multiple Console port, multiple inside that can be matched with Console port UART sources, to each Console port and internal each UART sources match the control terminal of control;This method includes:
Recording Console port and the configuration information in UART sources, the configuration information in control terminal includes:Each Console port Current state, the current state in each UART sources, and the current pairing state in each Console port and UART sources;And Monitor the input instruction of each Console port.
When the current state of a Console port is state of a control, the input instruction that Console port receives is monitored For matched order when, be that Console port and the UART source corresponding with the Console port are matched according to matched order, and And update the current shape of the Console port in configuration information, the current state in UART sources and Console port with corresponding UART sources State is to have matched.
Preferably, this method also includes:When monitoring that Console port that current state is state of a control receives Input instruction instructs for pattern switching, and obtains pairing state of the Console port with corresponding UART sources according to configuration information During to have matched, Console port is connected with corresponding UART sources, and updates in configuration information Console port and corresponding The current state in UART sources is communications status.
Preferably, this method also includes:When monitoring that Console port that current state is communications status receives When input instruction is that pattern switching instructs, connection of the Console port with corresponding UART sources is disconnected, and update and match somebody with somebody confidence The current state of Console port and corresponding UART sources in breath is state of a control.
Preferably, it is that Console port and the UART source corresponding with the Console port carry out pairing bag according to matched order Include:
According to the default unpaired message included in matched order, by control terminal from all Console port and UART sources Middle selection needs the Console port matched and corresponding UART sources;And the Console port to selecting and corresponding UART sources are carried out Pairing.
Preferably, unpaired message includes:The Console port for needing to match identifies and UART sources mark.
Preferably, it is that Console port and the UART source corresponding with the Console port carry out pairing bag according to matched order Include:
After the input of matched order is monitored, the mark in all Console port and UART sources is shown.
Selected from the mark in the marks of shown all Console port and UART sources with needing what is matched Console port identifies and UART sources mark.
The corresponding Console port of the Console port selected mark and UART sources mark and UART sources are defined as needing The Console port of pairing and UART sources.
Preferably, this method also includes:When monitoring that Console port that current state is state of a control receives When input instruction is query statement, Console port, the current state in UART sources included in query configuration information, and/or The pairing state in Console port and corresponding UART sources, and by current state and/or match the information of state according to predetermined format from Console port exports.
Preferably, input instruction by it is being received from Console port, be continuously temporarily stored in one or more data cells Valid data collectively constitute.
In order to achieve the above object, the invention also provides a kind of more Console port configuration systems, more Console port System includes:Multiple Console port, multiple inside UART sources that can be matched with Console port, to each Console port and inside Each UART sources match the control terminal of control;The control terminal includes:Logging modle and matching module.
Logging modle, for recording the configuration information of Console port and UART sources, configuration information includes:It is each to state The current state of Console port, the current state in each UART sources, and each Console port and the current pairing in UART sources State;And monitor the input instruction of each Console port.
Matching module, for when the current state of a Console port is state of a control, monitoring that Console port connects When the input instruction received is matched order, the matched order that is received according to Console port for Console port and with this The corresponding UART sources of Console port are matched, and update the Console port of the successful matching in configuration information, UART The current pairing state in the current state in source and the Console port and corresponding UART sources is has matched.
Preferably, the control terminal also includes:Communication module.
Communication module, monitor that the input that the Console port that current state is state of a control receives refers to for working as Make and being instructed for pattern switching, and it is to have matched somebody with somebody to obtain Console port with the pairing state in corresponding UART sources according to configuration information Pair when, Console port is connected with corresponding UART sources, and update Console port and corresponding UART sources in configuration information Current state is communications status.
Preferably, the control terminal also includes:Control module.
Control module, monitor that the input that the Console port that current state is communications status receives refers to for working as Make when being instructed for pattern switching, disconnect connection of the Console port with corresponding UART sources, and update in configuration information The current state in Console port and corresponding UART sources is state of a control.
Preferably, matching module is that Console port and the UART source corresponding with the Console port are entered according to matched order Row pairing includes:
According to the default unpaired message included in matched order, by control terminal from all Console port and UART sources Middle selection needs the Console port matched and corresponding UART sources;And the Console port to selecting and corresponding UART sources are carried out Pairing.
Preferably, unpaired message includes:The Console port for needing to match identifies and UART sources mark.
Preferably, matching module is that Console port and the UART source corresponding with the Console port are entered according to matched order Row pairing includes:
After the input of matched order is monitored, the mark in all Console port and UART sources is shown.
Selected from the mark in the marks of shown all Console port and UART sources with needing what is matched Console port identifies and UART sources mark.
The corresponding Console port of the Console port selected mark and UART sources mark and UART sources are defined as needing The Console port of pairing and UART sources.
Preferably, the control terminal also includes:Enquiry module.
Enquiry module, monitor that the input that the Console port that current state is state of a control receives refers to for working as Make for query statement when, the current state and pairing state of Console port and UART sources included in query configuration information, and The information of current state and pairing state is exported according to predetermined format from Console port.
Preferably, input instruction by it is being received from Console port, be continuously temporarily stored in one or more data cells Valid data collectively constitute.
Compared with prior art, the present invention includes:Console port and the configuration information in UART sources are recorded in control terminal, should Configuration information includes:The current state of each Console port, the current state in each UART sources, and each Console port with The current pairing state in UART sources;And monitor the input instruction of each Console port.When the current state of a Console port For state of a control when, when to monitor the input instruction that Console port receives be matched order, be according to matched order Console port and the UART source corresponding with the Console port are matched, and update the Console port in configuration information, The current state and Console port in UART sources are to have matched with the current state in corresponding UART sources.By the solution of the present invention, The automatic of external diversified forms Console port can be supported to select source in complex device, meet a variety of demands of user.
Brief description of the drawings
The accompanying drawing in the embodiment of the present invention is illustrated below, the accompanying drawing in embodiment is for entering one to the present invention Step understands, is used to explain the present invention together with specification, does not form limiting the scope of the invention.
Fig. 1 is three kinds of conventional Console port form schematic diagrames;
Fig. 2 is more Console port collocation method flow charts of the present invention;
The effective instruction that Fig. 3 is the present invention matches flow chart;
Fig. 4 is conventional Console port data format schematic diagram;
Fig. 5 is the schematic diagram that director data is obtained from data buffer storage unit of the present invention;
The effective instruction that Fig. 6 is the present invention matches schematic diagram;
The step-by-step movement that Fig. 7 is the present invention configures matching operation flow chart;
Fig. 8 is the one-stop configuration matching operation schematic diagram of the present invention;
Fig. 9 is that the data path between the outside Console port of the present invention and internal UART sources matches schematic diagram;
Figure 10 is the flow path switch figure between the communication pattern and control model for current Console port of the present invention;
Figure 11 is the inquiry operation flow chart of the present invention;
More Console port that Figure 12 is the present invention configure the block diagram of system.
Embodiment
For the ease of the understanding of those skilled in the art, the invention will be further described below in conjunction with the accompanying drawings, not It can be used for limiting the scope of the invention.
To solve the above problems, we have proposed the more Console port of multiselect of a kind of simple possible and a small amount of resource of consuming Inside select source implementation.Controlled by the external command inputted by Console port, each Console port can be flexible Ground and any one internal UART source carry out paired communication, and the form of Console port can be DB9, RJ45, USB or other Form, do not limit herein.
Before being described in detail to more Console port collocation methods of the present invention, following concept is entered first Row explanation:
Valid data:Starting bit identifier, stopping bit identifier all determining, and data bit length is the number of preset length According to.
Effective instruction:Data composition is extracted from one or in continuous multiple valid data units, with pre-setting finger The instruction that order mark is consistent.
Control model:Outside Console port does not complete pairing with internal UART sources, and data path between the two is disconnection State, only received without the transmission of communication data, outside Console port between outside Console port and internal UART sources The query statement and require that port working pattern turns that matched order, requirement into data path pairing are inquired about data path The pattern switching instruction changed.
Communication pattern:Outside Console port is completed to match with internal UART sources, and data path between the two is connected state State, the transmission of communication data is carried out between outside Console port and internal UART sources, and outside Console port is only received and wanted The pattern switching of port working patten transformation is asked to instruct.
Setting based on more than, as shown in Fig. 2 a kind of more Console port collocation methods proposed by the present invention, this method should For more Console port systems, more Console port systems include:Multiple Console port, it is multiple to be matched with Console port Inside UART sources, to each Console port and internal each UART sources match the control terminal of control;This method includes:
S101, record the configuration information of Console port and UART sources in control terminal and monitor the input of each Console port Instruction, the configuration information include:The current state of each Console port, the current state in each UART sources, and it is each Console port and the current pairing state in UART sources.
S102, when the input instruction for monitoring that a Console port in state of a control receives is matched order, It is that Console port and the UART source corresponding with the Console port are matched according to matched order, and updates configuration information In Console port, the current state in UART sources and the current state in Console port and corresponding UART sources to have matched.
Preferably, it is that Console port and the UART source corresponding with the Console port carry out pairing bag according to matched order Include:
According to the default unpaired message included in matched order, by control terminal from all Console port and UART sources Middle selection needs the Console port matched and corresponding UART sources;And the Console port to selecting and corresponding UART sources are carried out Pairing.
Wherein, unpaired message includes:The Console port for needing to match identifies and UART sources mark.
Preferably, it is that Console port and the UART source corresponding with the Console port carry out pairing bag according to matched order Include:
After the input of matched order is monitored, the mark in all Console port and UART sources is shown;
Being selected from the mark in the marks of shown all Console port and UART sources needs what is matched The mark of Console port and the mark in corresponding UART sources.
The corresponding Console port of the Console port selected mark and UART sources mark and UART sources are defined as needing The Console port of pairing and corresponding UART sources;And the Console port to selecting and corresponding UART sources are matched.
Above content is the generalised scheme that Console port configures in the present invention program, will be discussed in detail first below The acquisition flow of instruction is imitated, as shown in Figure 3:
S201, monitor whether each outside Console port has data input respectively.
S202, when monitoring that outside Console port has data input, judge whether data are valid data and to effective Data are kept in.
In this step, whether the input data that can judge to receive by the following method is valid data:
The valid data of reception include correctly starting bit identifier and stop bit identifier, and whole long data packet Degree is equal to preset length, and typically, preset length may be selected to be 10, thus has well with Console port data format Compatibility.Conventional Console port data format includes 1 start bit, 8 data bit, 1 stop position.Fig. 4 institutes specific as follows Show.
Start bit:The signal of a logical zero is first sent, represents the beginning of transmission character.
Data bit:And then after start bit.The data bit number of outside Console port is routinely 8, forms a word Symbol, generally use ASCII character, is transmitted since lowest order, is positioned by clock.
Stop position:It is the end mark of a character data, and Console routinely uses 1 high level.
Kept in a data cell for each valid data received, and according to during system design Maximum command length sets temporary depth (that is, the maximum number of data cell), it is possible thereby to utilize one according to actual conditions Data cell is realized or multiple data cells realize the acquisition for director data jointly.It is specific as shown in Figure 5.This hair It is bright directly to utilize Console characteristics, it is not necessary to especially to set other rules to carry out data storage, realize simply, according to not With the characteristics of command length difference an effective instruction can be stored jointly using multiple data cells.
S203, after temporary valid data are read out according to the order for receiving the time, judge the data by being extracted Or whether the input instruction that multiple continuous datas are formed is preset instructions.Illustrate a bit, input instruction herein can be The various known instructions set in advance of matched order, pattern switching instruction, query statement, etc. system, are not limited herein.
In this step, when carrying out instructions match, the significant figure that is always extracted from the first data cell of unfinished matching According to starting to compare, after having effective instruction to complete matching, corresponding valid data extraction is i.e. since next data cell.Tool Body is as shown in Figure 6.
S204, handled according to the rule of correspondence of preset instructions.
In addition, in embodiments of the present invention, because all instructions data are inputted from outside Console port, these Data are probably system valid data set in advance, it is also possible to are due to that other situations such as external disturbance, maloperation are drawn The invalid data risen, therefore in order to improve the identifiability of system data, number that can first to being inputted from outside Console port According to being matched, whether confirm outside Console port input is all valid data, when it is determined that being valid data further Confirm to whether there is effective instruction in these valid data.Phase is just performed according to input instruction only after effective instruction is defined as Close operation.
Based on this, if the input instruction that some Console port receives is " matched order ", because the instruction is only at this Console port, which is under control model, can just come into force, therefore the pairing received under control model according to the Console port Instruct and matched for the Console port and the UART source corresponding with the Console port, and update configuration information In the Console port and the corresponding UART sources current pairing state to have matched.Typical pairing process can be with It is divided into step-by-step movement configuration or one-stop configuration, selects a selection, it is specific as follows:
(i) step-by-step movement configures:
After the input of matched order is monitored, the mark in all Console port and UART sources is shown.
Being selected from the mark in the marks of shown all Console port and UART sources needs what is matched Console port identifies and UART sources mark.
The corresponding Console port of the Console port selected mark and UART sources mark and UART sources are defined as needing The Console port of pairing and UART sources.
Specifically, above-mentioned step-type collocation method can be by illustrating, as shown in Figure 7 the step of the example below:
S301, monitor to input matched order, now, described " matched order " can be by the effective of continuous three units Data form, such as " UCC " (0x55+0x43+0x43).
S302:Control terminal exports internal all UART sources list according to the configuration information of record and directly passes through outside input The UART sources to be matched are selected, exemplary, display " please select inside:U1|U2…|Un””;Pass through this areas such as input through keyboard The selecting object acquisition modes that those of ordinary skill can be directly realized by input predetermined matched data, so that it is determined that selecting to match somebody with somebody To UART sources.
In this step, and citing selection " U1 | U2 ";The inside UART of selection is determined by matching the valid data of input Source, " 0x55+0x31 " are U1, and " 0x7c " is separator " | ", and " 0x55+0x32 " is U2, and " 0x0d " is input validation.
S303:Control terminal exports outside all Console port lists according to the configuration information of record and directly passes through outside The input selection Console port currently to be matched, exemplary, showing " please select outside Console port:C1|C2…| Cm”;The selecting object acquisition modes that can be directly realized by by those of ordinary skill in the art such as input through keyboard input predetermined With data, so that it is determined that selecting the Console port to be matched.
In this step, citing selection " C3 ", the outside Console of selection is determined by matching the valid data of input Mouthful, " 0x43+0x33 " is C3, and " 0x0d " is input validation.
S304:Control terminal according to outside input after confirming that pairing is correct, and the Console port works as in renewal configuration information The current pairing state in preceding state, the current state in the UART sources and the Console port and corresponding UART sources is to have matched.
(ii) one-stop configuration:
When a Console port for monitoring that current state is state of a control has matched order input, referred to according to pairing The default unpaired message included in order, select what needs matched from all Console port and UART sources by control terminal Console port and corresponding UART sources;And the Console port to selecting and corresponding UART sources are matched.
In the method, the matched order of outside input specific format, internal UART sources selection, outside are done directly Console port selects and configure-ack.The matched order is mainly made up of four partial datas, including matched order mark, inside The selection of UART sources, the selection of outside Console port, complete mark.Command identification citing " UCS:", match " 0x55+0x43+0x53+ 0x3a”;Internal UART sources selection citing " U1 ", matches " 0x55+0x31 ";Outside Console port selection citing " C3 ", matching “0x43+0x33”;Mark " Enter " is completed, is matched " 0x0d ".It is specific as shown in Figure 8.
Final control terminal according to outside input after confirming that pairing is correct, and the Console port works as in renewal configuration information The current pairing state in preceding state, the current state in the UART sources and the Console port and corresponding UART sources is to have matched.
Thus, by the above method, Console can be completed with the pairing in the more Console port of simple realization and more UART sources The reliable of mouth selects source, and above-mentioned matching method is unrestricted for the quantity in Console port and UART sources, simply normal conditions Under, an internal UART source can correspond to outside multiple Console port, and outside Console port can only with one in Portion UART sources connect.As shown in Figure 9.
Because Console port is likely to be at communications status and may also be in state of a control in real system, and for difference Port status could carry out different operations, it is therefore desirable to the pattern switching according to receiving by outside input, which instructs, to be carried out State model is changed, and therefore, this method also includes:When the Console port reception for monitoring that current state is state of a control When the input instruction arrived is that pattern switching instructs, and matching somebody with somebody for Console port and corresponding UART sources is obtained according to configuration information To state for when having matched, Console port is connected with corresponding UART sources, and update in configuration information Console port and right The current state in the UART sources answered is communications status;And
This method also includes:When monitoring that the input that receives of a Console port that current state is communications status refers to Make when being instructed for pattern switching, disconnect connection of the Console port with corresponding UART sources, and update in configuration information The current state in Console port and corresponding UART sources is state of a control.
Thus, if the effective instruction received is " pattern switching instruction ", communication mould is performed for the Console port Flow path switch between formula and control model, typically, just for the current external Console for receiving pattern switching instruction Mouth carries out port mode conversion, specific as shown in Figure 10.
S401:Console port receives " pattern switching instruction ";
In this step, described " pattern switching instruction " can match to obtain by step S203 in above example, It exemplarily can be made up of the valid data of continuous two data cells, such as 0x03+0xd, typically, described two numbers It can then be generated corresponding A SCII codes by keyboard serial input " Ctrl+C " and " enter key " and obtain according to the valid data of unit Arrive, and be converted into Console port data format and received from selected Console port;Certain instruction can also be only with one Data composition in data or more data unit in individual data cell, it is only necessary to set in advance i.e. in system design Can.
S402:Control terminal monitors to input described " pattern switching instruction ", and output mode switching confirms to remind, exemplary Ground, control terminal output " pairing check, y or n" wherein, " y " to confirm, " n " enters step S403 to cancel.
S403:Control terminal monitoring outside input be " y ", or " n ", and exemplarily, console matching inputs " 0x79+ For 0x0d " to confirm, " 0x6e+0x0d " when matching confirms, that is, inputs " y ", then into step S 404, conversely, defeated to cancel Enter " n ", return to step S 401.
S404:Judge which kind of pattern current Console port is in, if communication pattern, then instruction is efficiently entering control Pattern, wait next input effective instruction operation;If control model, then into step S405.
In this step, judge that current Console port is in which kind of pattern can match somebody with somebody confidence by what is recorded in control terminal Cease to determine.
S405:Judge whether current Console port with internal UART sources has pairing, if so, then entering communication pattern, instead Instruction it is illegal, operation is invalid, into step S406.
S406:The switching of control terminal indicating mode is invalid, and current Console port needs to carry out effectively with internal UART sources again Pairing.
Thus, the mode state residing for the Console port can be changed by the input of Console port, to meet difference The adjustment of Console port state when operation needs.
In embodiments of the present invention, the inquiry operation of system can also be further realized using the input of Console port, Typically, the Console port now as input inquiry command port is in control model.Inquiry operation, it is mainly used in inquiring about Internal UART sources and the unpaired message and the current state in each Console port and UART sources of outside Console port.Specifically Ground, when control terminal monitors that the input instruction that the Console port that current state is state of a control receives is query statement When, the current state and pairing state of Console port and UART sources included in query configuration information, and by current state and The information of pairing state exports according to predetermined format from Console port.
The object of inquiry operation is mainly outside Console port and internal UART sources.Exemplarily inquiry operation step has Body is as shown in figure 11:
S501:Console port receives query statement, performs step S502.
In this step, described " query statement " can match to obtain by step S203 in above example, and it can To be exemplarily made up of the valid data of continuous four units, such as " show " (0x73+0x68+0x6F+0x77), certainly should Instruct data composition that can also be only with the data in a data cell or in more data unit, it is only necessary in system Set in advance during design.
S502:Judge the object of inquiry operation, be internal UART sources or outside Console port, if internal UART Source then performs step S503, if outside Console port then performs step S504, then feedback command is illegal for other, returns to step Rapid S501.
In this step, internal UART sources example can use " Un " to refer to, such as " U1 " (0x55+0x31) i.e. internal UART Source 1;Outside Console port example can use " Cm " to refer to, such as " C2 " (0x43+0x32) i.e. outside Console2.
S503:The Console port and the configuration information in UART sources recorded according to control terminal, determines respective inner UART sources Unpaired message, and example " UART1 --- Console1 | Console2 ".
S504:The Console port and the configuration information in UART sources recorded according to control terminal, it is determined that outside Console port Relevant information, example " Console2 --- UART1, Link Mode ".
S505:Relevant information determined by above-mentioned steps S503 and S504 is pressed from the Console port for receiving query statement Exported according to predetermined format.
Thus, by the way that matching somebody with somebody for internal UART sources and outside Console port can be inquired about from the instruction of Console port input inquiry To information, and/or the current state in each Console port and UART sources, it can conveniently realize and inquire about on demand, visual feedback knot Fruit.
In a communication mode, normal data communication can be carried out between outside Console port and the inside UART sources of pairing.
Further, for mentioned in above-described embodiment control terminal record configuration information can with periodic maintenance, The configuration information can be safeguarded by Console input modes, can also be by directly for the form of data file modifications Safeguarded to realize.
In order to achieve the above object, the invention also provides a kind of more Console port configuration systems 01, as shown in figure 12, More Console port systems 01 include:Multiple Console port 02, multiple inside UART sources 03 that can be matched with Console port, To each Console port and internal each UART sources match the control terminal 04 of control;The control terminal includes:The He of logging modle 041 Matching module 042.
Logging modle 041, for recording the configuration information of Console port and UART sources, configuration information includes:It is each to state The current state of Console port, the current state in each UART sources, and each Console port and the current pairing in UART sources State;And monitor the input instruction of each Console port.
Matching module 042, for when the current state of a Console port is state of a control, monitoring Console port When the input instruction received is matched order, the matched order that is received according to Console port for Console port and with this The corresponding UART sources of Console port are matched, and update the Console port of the successful matching in configuration information, UART The current pairing state in the current state in source and the Console port and corresponding UART sources is has matched.
Preferably, the control terminal also includes:Communication module 043.
Communication module 043, for working as the input for monitoring that the Console port that current state is state of a control receives Instruct and instructed for pattern switching, and Console port is obtained with the pairing state in corresponding UART sources as according to configuration information During pairing, Console port is connected with corresponding UART sources, and updates Console port and corresponding UART sources in configuration information Current state be communications status.
Preferably, the control terminal also includes:Control module 044.
Control module 044, for working as the input for monitoring that the Console port that current state is communications status receives Instruct when being instructed for pattern switching, disconnect connection of the Console port with corresponding UART sources, and update in configuration information Console port and the current state in corresponding UART sources be state of a control.
Preferably, matching module 042 is Console port and the UART corresponding with the Console port according to matched order Source, which carries out pairing, to be included:
According to the default unpaired message included in matched order, by control terminal from all Console port and UART sources Middle selection needs the Console port matched and corresponding UART sources;And the Console port to selecting and corresponding UART sources are carried out Pairing.
Preferably, unpaired message includes:The Console port for needing to match identifies and UART sources mark.
Preferably, matching module 042 is Console port and the UART corresponding with the Console port according to matched order Source, which carries out pairing, to be included:
After the input of matched order is monitored, the mark in all Console port and UART sources is shown.
Selected from the mark in the marks of shown all Console port and UART sources with needing what is matched Console port identifies and UART sources mark.
The corresponding Console port of the Console port selected mark and UART sources mark and UART sources are defined as needing The Console port of pairing and UART sources.
According to Console port and the corresponding relation in UART sources determine to need the Console port that matches and with the Console port Corresponding UART sources.
Preferably, the control terminal also includes:Enquiry module 045.
Enquiry module 045, for working as the input for monitoring that the Console port that current state is state of a control receives Instruct for query statement when, the current state and pairing state of Console port and UART sources included in query configuration information, And the information of current state and pairing state is exported according to predetermined format from Console port.
Preferably, input instruction by it is being received from Console port, be continuously temporarily stored in one or more data cells Valid data collectively constitute.
Compared with prior art, the present invention includes:Console port and the configuration information in UART sources are recorded in control terminal, should Configuration information includes:The current state of each Console port, the current state in each UART sources, and each Console port with The current pairing state in UART sources;And monitor the input instruction of each Console port.When the current state of a Console port For state of a control when, when to monitor the input instruction that Console port receives be matched order, be according to matched order Console port and the UART source corresponding with the Console port are matched, and update the Console port in configuration information, The current state and Console port in UART sources are to have matched with the current state in corresponding UART sources.By the solution of the present invention, It can realize and a variety of Console port are externally supported in complex device, internally can connect multiple components again, meet that user's is more Kind demand.
In addition, the present invention program has advantages below:
1st, multiple Console port can flexibly correspond to multiple internal control mouths.
2nd, Console port formal character is flexible.
3rd, circuit is simple, it is easy to accomplish, stability is strong, reliability is high, cost is low.
It should be noted that embodiment described above be for only for ease of it will be understood by those skilled in the art that, and It is not used in and limits the scope of the invention, on the premise of the inventive concept of the present invention is not departed from, those skilled in the art couple Any obvious replacement and improvement that the present invention is made etc. is within protection scope of the present invention.

Claims (16)

1. a kind of more Console port collocation methods, it is characterised in that methods described is applied to more Console port systems, described more Console port system includes:Multiple Console port, multiple inside UART sources that can be matched with Console port, to each Console Mouth and internal each UART sources match the control terminal of control;Methods described includes:
Recording the Console port and the configuration information in the UART sources, the configuration information in the control terminal includes:It is each The current state of the Console port, the current state in each UART sources, and each Console port with it is described The current pairing state in UART sources;And monitor the input instruction of each Console port;
When the current state of a Console port is state of a control, monitor what the Console port received It is the Console port and the institute corresponding with the Console port according to the matched order when input instruction is matched order State UART sources to be matched, and update the Console port in configuration information, the current state in UART sources and described Console port is to have matched with the current pairing state in the corresponding UART sources.
2. the method as described in claim 1, it is characterised in that methods described also includes:When monitoring that the current state is The input instruction that one Console port of state of a control receives instructs for pattern switching, and is obtained according to the configuration information The pairing state in the Console port and the corresponding UART sources is when having matched, by the Console port with it is right The UART sources connection answered, and update the current state in Console port described in configuration information and the corresponding UART sources It is communications status.
3. method as claimed in claim 1 or 2, it is characterised in that methods described also includes:When monitoring the current state The input instruction received for a Console port of communications status be pattern switching instruction when, disconnect the Console port with The connection in the corresponding UART sources, and update the Console port in configuration information and the corresponding UART The current state in source is the state of a control.
4. the method as described in claim 1, it is characterised in that it is described according to the matched order be the Console port and The UART source corresponding with the Console port, which carries out pairing, to be included:
According to the default unpaired message included in the matched order, by the control terminal from all Console port With the Console port and the corresponding UART sources that selection needs match in the UART sources;And to described in selecting Console port and the corresponding UART sources are matched.
5. method as claimed in claim 4, it is characterised in that the unpaired message includes:Need the Console port mark matched Know and UART sources identify.
6. the method as described in claim 1, it is characterised in that it is described according to the matched order be the Console port and The UART source corresponding with the Console port, which carries out pairing, to be included:
After the input of the matched order is monitored, the mark in all Console port and the UART sources is shown;
Being selected from the mark in the marks of shown all Console port and the UART sources needs what is matched Console port identifies and UART sources mark;
The corresponding Console port of the Console port mark selected and UART sources mark and UART sources are defined as needing The Console port of pairing and the UART sources.
7. the method as described in claim 1, it is characterised in that methods described also includes:When monitoring that the current state is When the input instruction that one Console port of the state of a control receives is query statement, the configuration information is inquired about Included in Console port, the current state in UART sources, and/or the pairing state in Console port and corresponding UART sources, and The information of the current state and/or the pairing state is exported according to predetermined format from the Console port.
8. the method as described in claim 1, it is characterised in that the input instruction is by being received from Console port, continuous The valid data being temporarily stored in one or more data cells collectively constitute.
9. a kind of more Console port configuration systems, it is characterised in that more Console port systems include:Multiple Console Mouthful, multiple inside UART sources that can be matched with Console port, pairing control is carried out to each Console port and internal each UART sources Control terminal;The control terminal includes:Logging modle and matching module;
The logging modle, for recording the configuration information of Console port and UART sources, the configuration information includes:Each institute State current state, the current state in each UART sources of Console port, and each Console port with it is described The current pairing state in UART sources;And monitor the input instruction of each Console port;
The matching module, it is described for when the current state of a Console port is state of a control, monitoring When the input instruction that Console port receives is matched order, according to the matched order be the Console port and with this The corresponding UART sources of Console port are matched, and update the Console port in configuration information, UART sources Current state and the Console port and the corresponding UART sources current pairing state to have matched.
10. system as claimed in claim 9, it is characterised in that the control terminal also includes:Communication module;
The communication module, for when monitor the current state be state of a control a Console port receive it is defeated Enter instruction to instruct for pattern switching, and the Console port and the corresponding UART sources are obtained according to the configuration information The pairing state when having matched, by the Console port and corresponding UART sources connection, and to update configuration information Described in the current state in Console port and the corresponding UART sources be communications status.
11. the system as described in claim 9 or 10, it is characterised in that the control terminal also includes:Control module;
The control module, for when monitor the current state be communications status a Console port receive it is defeated Enter instruction for pattern switching instruction when, disconnect connection of the Console port with the corresponding UART sources, and update The current state of the Console port and the corresponding UART sources in configuration information is the state of a control.
12. system as claimed in claim 11, it is characterised in that the matching module is described according to the matched order Console port and the UART source corresponding with the Console port carry out pairing and included:
According to the default unpaired message included in the matched order, by the control terminal from all Console port With the Console port and the corresponding UART sources that selection needs match in the UART sources;And to described in selecting Console port and the corresponding UART sources are matched.
13. system as claimed in claim 12, it is characterised in that the unpaired message includes:Need the Console port matched Mark and UART sources mark.
14. system as claimed in claim 9, it is characterised in that the matching module is described according to the matched order Console port and the UART source corresponding with the Console port carry out pairing and included:
After the input of the matched order is monitored, the mark in all Console port and the UART sources is shown;
Being selected from the mark in the marks of shown all Console port and the UART sources needs what is matched Console port identifies and UART sources mark;
The corresponding Console port of the Console port mark selected and UART sources mark and UART sources are defined as needing The Console port of pairing and the UART sources.
15. system as claimed in claim 9, it is characterised in that the control terminal also includes:Enquiry module;
The enquiry module, for when a Console port reception for monitoring that the current state is the state of a control When the input instruction arrived is query statement, the Console port and the current state in UART sources inquired about included in the configuration information With pairing state, and the information of the current state and the pairing state is exported according to predetermined format from the Console port.
16. system as claimed in claim 9, it is characterised in that the input instruction is by received from Console port, company The continuous valid data being temporarily stored in one or more data cells collectively constitute.
CN201510622761.5A 2015-09-25 2015-09-25 A kind of more Console port collocation methods and system Active CN105205022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510622761.5A CN105205022B (en) 2015-09-25 2015-09-25 A kind of more Console port collocation methods and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510622761.5A CN105205022B (en) 2015-09-25 2015-09-25 A kind of more Console port collocation methods and system

Publications (2)

Publication Number Publication Date
CN105205022A CN105205022A (en) 2015-12-30
CN105205022B true CN105205022B (en) 2018-02-13

Family

ID=54952715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510622761.5A Active CN105205022B (en) 2015-09-25 2015-09-25 A kind of more Console port collocation methods and system

Country Status (1)

Country Link
CN (1) CN105205022B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344107A (en) * 2018-08-21 2019-02-15 深圳市科陆电子科技股份有限公司 A kind of method and apparatus of linux system console setting

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6356852B1 (en) * 1999-08-03 2002-03-12 Lucent Technologies, Inc. Multi-port programmable tester
CN1713599A (en) * 2004-06-22 2005-12-28 中兴通讯股份有限公司 Multi-mouth switching device and testing method for network exchanger
CN101262371A (en) * 2008-04-24 2008-09-10 杭州华三通信技术有限公司 Configuration method and device of network devices
CN101697531A (en) * 2009-10-30 2010-04-21 北京星网锐捷网络技术有限公司 Method, device and equipment for multiplexing port
CN102932193A (en) * 2012-11-28 2013-02-13 迈普通信技术股份有限公司 Network device, management terminal and configuration management system
CN103248527A (en) * 2012-02-10 2013-08-14 迈普通信技术股份有限公司 Testing tool device, testing system and testing method for Ethernet consistency
CN104821925A (en) * 2015-04-28 2015-08-05 福建星网锐捷网络有限公司 Data interaction method, system and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6356852B1 (en) * 1999-08-03 2002-03-12 Lucent Technologies, Inc. Multi-port programmable tester
CN1713599A (en) * 2004-06-22 2005-12-28 中兴通讯股份有限公司 Multi-mouth switching device and testing method for network exchanger
CN101262371A (en) * 2008-04-24 2008-09-10 杭州华三通信技术有限公司 Configuration method and device of network devices
CN101697531A (en) * 2009-10-30 2010-04-21 北京星网锐捷网络技术有限公司 Method, device and equipment for multiplexing port
CN103248527A (en) * 2012-02-10 2013-08-14 迈普通信技术股份有限公司 Testing tool device, testing system and testing method for Ethernet consistency
CN102932193A (en) * 2012-11-28 2013-02-13 迈普通信技术股份有限公司 Network device, management terminal and configuration management system
CN104821925A (en) * 2015-04-28 2015-08-05 福建星网锐捷网络有限公司 Data interaction method, system and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
千兆光纤以太网交换机中CONSOLE管理的设计和实现;李锐清 等;《光通信技术》;20120715(第7期);32-35 *

Also Published As

Publication number Publication date
CN105205022A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
CN105847456B (en) A kind of RS485 distributes address methods, devices and systems automatically
US10154324B2 (en) Method and system for updating optical distribution network (ODN) device by using intelligent management terminal
CN108234220A (en) The distribution method, apparatus and system of smart machine
CN101197875A (en) Partial data checking method and device
US20160099836A1 (en) Device Commissioning
CN104753697A (en) Method, equipment and system for controlling provisioning of network equipment
CN104426927B (en) A kind of intercommunication terminal parameter setting method and system
CN107959620B (en) Fully mechanized mining equipment identification method, device, system, gateway and storage medium
CN108199931A (en) A kind of household electric appliance control method and system
CN113872835B (en) Method and device for equipment network distribution, server, intelligent household appliance and terminal equipment
CN105357664A (en) Wireless control system and data communication method thereof
CN110035113A (en) A kind of remote-control system and method in multichannel isomery radio station
CN101765072A (en) Network device control port remote configuring method and system based on mobile network
CN105205022B (en) A kind of more Console port collocation methods and system
CN101330508A (en) Connector and communication method thereof
CN105429798A (en) Network configuration system for the internet of things
CN207677744U (en) A kind of data transmission device based on NBIoT networks
CN111107507A (en) LoRa equipment networking method suitable for geological disaster monitoring application
CN115022116A (en) Radio remote communication system and control method thereof
CN106506504A (en) A kind of intelligent protocol conversion method and device
CN105162636B (en) A kind of more Console port configuration methods and system
CN103391556A (en) WLAN (wireless local area network) access system, power supply injector device and antenna device
CN113794751A (en) Data interaction method, system, equipment and storage medium of Internet of things system
CN106792800A (en) A kind of multi-protocols control method and the AP devices for multi-protocols control
CN106535290A (en) Equipment networking method and equipment networking 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
GR01 Patent grant
GR01 Patent grant