Title of Invention | "A METHOD FOR AUTO-DETERMINATION OF DTE/DCE CONNECTION AND SYSTEM THEREOF" |
---|---|
Abstract | A method and system for auto-determination which detects whether a DTE or DCE is connected to an RS232 port (12). The port is then automatically configured to interface with the connected equipment. Reference FIG. 1 |
Full Text | BACKGROUND OF THE INVENTION Many devices utilize a serial RS232 port as a serial interface. RS232 describes the standard for serial data communication between PCs and peripheral devices, such as modems, mice etc. and between PCs. There are two kinds of devices (from the viewpoint of RS232 communication): DTE and DCE. DTE stands for Data Terminal Equipment and means the "terminal devices", i.e. the PC or a simple terminal and DCE stands for Data Communication Equipment, i.e. modems, mobile phones etc. For example, network devices, such as routing platforms, often utilize a serial RS232 port to interface with the console, which is a DTE. To be able to support a backup WAN link usually requires the use of an auxiliary port to connect with an external modem which is a DCE. A set of signals are defined for the serial RS232 port. The important signals in the present context are DTR (Date Terminal Ready) asserted by the console; DSR (Data Set Ready) asserted by the modem in answer to DTR; RTS (Request to Send) asserted by the sender; and, CTS (Clear to Send) asserted by receiver in answer to RTS. To establish a DTE to DTE connection a special cable is used where RTS and CTS are electrically connected. At the initialization of a connection the DTR and DSR lines are utilized as follows: DTR/DSR: These control lines assure that there are really two devices present which want to communicate with each other: First, the DTE asserts DTR, then the DCE answers asserting DSR. During a data transfer the RTS and CTS lines are used as follows: RTS/CTS: These are the actual flow control lines: The sender asserts RTS (ready to send), the receiver answers asserting CTS (clear to send). If the receiver needs a pause (buffer overflow, for example), it de-asserts CTS, so the sender knows it has to wait with further transmission until the receiver has asserted CTS. This way it is assured that no data is lost. In some systems, an alternate way of accessing the routing platform command line interface is through telnet. If for whatever reason, if the telnet option fails, the user is required to perform recovery techniques to access the router configuration. Because port space on a device is usually a scarce resource, there is a need to use a single RS232 port for console and auxiliary port functions. In current devices, a user needs to manually configure the RS232 port to function as either the console or the auxiliary mode. Once the RS232 port has been configured to the auxiliary mode, a user is locked out of the router CLI command line interface. Thus, if the single serial RS232 port has been configured to support a modem and both the modem and telnet links are nonfunctional the user can be prevented from reconfiguring the routing platform. Accordingly, an improved serial interface for network devices and other devices is required. BRIEF SUMMARY OF THE INVENTION In a first embodiment of the invention, a routing platform implements an automatic modem/console detection algorithm so that it can utilize a single serial port to communicate to a serial modem as well as a console terminal without user intervention and to inform the hardware/software of the routing platform about the device that is newly connected. In another embodiment of invention, the automatic modem/console discovery algorithm is used to prevent the router being locked up from the user when the RS232 console port has been enabled for backup dialup use. With auto-detection of whether a modem or a computer terminal is connected to the routing platform, the console session can be resumed once a computer terminal is auto-detected and vice versa. In another embodiment, a state machine is implemented that responds to the connection or disconnection of a device to the serial RS232 port to change states. When no device is connected the state machine is in a first state. If a DCE is connected the state machine transitions from the first state to a second state. When the DCE is disconnected the state machine transitions from the second state back to the first state. If a DTE is connected the state machine transitions from the first state to a third state. When the DTE is disconnected the state machine transitions from the third state back to the first state. In another embodiment of the invention, the state machine monitors the DSR and CTS RS232 signals and transitions based on whether these signals are asserted or de-asserted when a device is connected or disconnected. In another embodiment of the invention, based on whether the DCE or DTE is auto-detected, the correct software is executed to support an interface with the connected device. Other features and advantages will now be apparent in view of the following detailed description and appended claims. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a device implementing an embodiment of the invention; Fig. 2 is a state diagram of an embodiment of the invention; and Fig. 3 is a flow chart depicting steps of launching the correct interface software. DETAILED DESCRIPTION OF THE INVENTION Reference will now be made in detail to various embodiments of the invention. Examples of the these embodiments are illustrated in the accompanying drawings. While the invention will be described in conjunction with these embodiments, it will be understood that it is not intended to limit the invention to any embodiment. On the contrary, it is intended to cover alternatives, modifications, and equivalents as may be included within the spirit and scope of the invention as defined by the appended claims. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the various embodiments. However, the present invention may be practiced without some or all of these specific details. In other instances, well known process operations have not been described in detail in order not to unnecessarily obscure the present invention. The invention will now be described with reference to various embodiments implemented in a routing platform. In the following, the term routing platform is utilized broadly to include any component such a router, bridge, switch, layer 2 or layer 3 switch, gateway, etc., that refers to components utilized to implement connectivity within a network or between networks. In a first embodiment of the present invention, as depicted in Fig. 1, a device is configured with a single serial RS232 port and logic for automatically detecting whether a DTE or DCE is connected. In addition, when utilized in a routing platform the logic automatically launches the correct software required to support either a console (DTE) or modem (DCE) connection. Referring to Fig. I, a network device 10 includes a serial RS232 port 12 coupled to a transceiver 14. The transceiver 14 is coupled to a controller 16 which is coupled to a memory device 18. The memory device 18 is schematically depicted as holding software routines for performing auto-detection procedures, supporting a console interface, and supporting a modem interface 20, 22, 24 respectively. The auto-detection procedures will now be described with reference to the state diagram of Fig. 2. The state machine is implemented by the controller executing software stored in the memory and indicated above as the auto-detection procedures 20. The controller interacts with the transceiver which transmits and receives signals from the serial RS232 port. Referring now to Fig. 2, when no cable is connected to the serial RS232 port, neither of the DSR and CTS signals are asserted. This is state 1 of the state machine. If a cable connects a DCE, such as a modem, to the serial RS232 port then, as described above, DSR and CTS are asserted by the modem and an interrupt is generated. The auto-detection procedure 20 responds to the interrupt by checking the signals on DSR and CTS. In this case, both signals are asserted and the state machine transitions to State 2. When the cable is disconnected from the modem the DSR and CTS signals are de-asserted and an interrupt is generated. The auto-detection procedure 20 responds to the interrupt by checking the signals on DSR and CTS. In this case, both signals are not asserted and the state machine transitions to State 1. If a cable connects a DTE, such as a console, to the serial RS232 port then, as described above, DSR is not asserted and CTS is asserted and an interrupt is generated. An auto-detection procedure 20 responds to the interrupt by checking the signals on DSR and CTS. In this case, the signal DSR is not asserted and CTS is asserted and the state machine transitions to State 3. When the cable from the DTE is disconnected the DSR and CTS signals are de-asserted and an interrupt is generated. An auto-detection procedure 20 responds to the interrupt by checking the signals on DSR and CTS. In this case, both signals are not asserted and the state machine transitions to State 1. In summary: State l=cable unplugged; State 2=modem attached; and State 3=console attached. An important aspect of the present embodiment is the DSR and CTS are only sampled initially when a device is connected to or disconnected from the RS232 port. If these signals change between the time a device is connected and disconnected no transition in state will occur. Another feature of this embodiment is that subsequent to auto-detection the correct routines are launched to service the device connected. As set forth in the flow chart of Fig. 3, if a DTE is detected as connected through the serial RS232 port then the routines for interfacing with the console 22 are executed by the controller. On the other hand, if a DCE is detected as connected through the serial RS232 port then the routines for interfacing with modem 24 are executed by the controller. Accordingly, the lockout problem of the existing systems described above is avoided. If a modem connected to the serial RS232 port ceases to function the modem needs only to be disconnected and the console connected to the serial RS232 port. The auto-detect routine will detect that the console is connected and will cause the controller to executed the routines for interfacing with the console. The invention has now been described with reference to the preferred embodiments. Alternatives and substitutions will now be apparent to persons of ordinary skill in the art. In particular, although the state machine has been described as being implemented in software various combinations of hardware and software may be utilized as is well known in the art. Thus parts of the invention may be implemented as program code, stored on a computer readable medium, that is executed by a digital computer. The computer readable medium may include, among other things, magnetic media, optical media, electro-magnetic fields encoding digital information, and so on. Further, the utility of the invention is not limited to routing platforms but can be used in any device requiring a single RS232 port connect to either a DTE or a DCE. Accordingly, it is not intended to limit the invention except as provided by the appended claims. WE CLAIM: 1. A system for determining whether a DTE (Data Terminal Equipment) or DCE (Data Communication Equipment) is being connected with an RS232 serial port (12), wherein the RS232 serial port (12) comprises an interface includes DSR (Data Set Ready) and CTS (Clear to Send) signals, said system comprising: means for implementing a state machine having first, second, and third states; means for sampling the DSR and CTS signals in response to a device being connected to or disconnected from the RS232 serial port (12); means for transitioning from the second state or the third state to the first state that indicates no device is connected to the RS232 serial port (12) if the DSR and CTS signals are both non-asserted; means for transitioning from the first state to a second state indicating that a DCE is connected to the RS232 serial port (12) if the DSR and CTS signals are both asserted; and means for transitioning from the first state to a third state indicating that a DTE is connected to the RS232 serial port (12) if the DSR signal is non-asserted and the CTS signal is asserted. 2. The system as claimed in claim 1 comprising: means for interfacing with a DCE if the state machine transitions to the second state; and means for interfacing with a DTE if the state machine transitions to the third state. 3. The system as claimed in claim 1, wherein the RS232 serial port (12) is an interface to a routing platform and the system further comprises: means for interfacing with a console (22) when the state machine transitions to the third state if a DTE in the form of the console (22) is connected to the RS232 serial port (12); and means for interfacing with a modem when the state machine transitions to the second state if a DCE in the form of the modem is connected to the RS232 serial port (12). 4. The system as claimed in claim 1 further comprising: a controller (16) coupled to monitor DSR and CTS pins of the RS232 serial port (12); and a memory holding auto-detection code, wherein, when executing the auto-detection code, the controller (16) implements a state machine that samples the DSR and CTS signals in response to a device being connected to or disconnected from the RS232 signal port (12), and if the DSR and CTS signals are both non-asserted then transitions to the state machine first state that indicates no device is connected to the RS232 serial port (12), or if the DSR and CTS signals are both asserted then transitions the state machine from the first state to a second state indicating that a DCE is connected to the RS232 serial port (12)A or if the DSR signal is non-asserted and the CTS signal is asserted then transitioning from the first state to a third state indicating that a DTE is connected to the RS232 serial port (12). |
---|
4312-delnp-2005-Abstract-(12-03-2010).pdf
4312-DELNP-2005-Claims-(11-06-2010).pdf
4312-delnp-2005-Claims-(12-03-2010).pdf
4312-delnp-2005-Correspondence Others-(13-04-2011).pdf
4312-DELNP-2005-Correspondence-Others-(11-06-2010).pdf
4312-delnp-2005-Correspondence-Others-(12-03-2010).pdf
4312-DELNP-2005-Correspondence-Others-(17-03-2010).pdf
4312-DELNP-2005-Correspondence-Others-(29-04-2009).pdf
4312-delnp-2005-correspondence-others.pdf
4312-delnp-2005-correspondence-po-(16-04-2009).pdf
4312-delnp-2005-description (complete).pdf
4312-delnp-2005-Drawings-(12-03-2010).pdf
4312-delnp-2005-Form-1-(12-03-2010).pdf
4312-delnp-2005-form-13-(29-04-2009).pdf
4312-delnp-2005-Form-2-(12-03-2010).pdf
4312-delnp-2005-Form-26-(12-03-2010).pdf
4312-delnp-2005-Form-3-(12-03-2010).pdf
4312-delnp-2005-GPA-(13-04-2011).pdf
4312-DELNP-2005-Petition 137-(17-03-2010).pdf
Patent Number | 260278 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Indian Patent Application Number | 4312/DELNP/2005 | ||||||||||||
PG Journal Number | 17/2014 | ||||||||||||
Publication Date | 25-Apr-2014 | ||||||||||||
Grant Date | 17-Apr-2014 | ||||||||||||
Date of Filing | 23-Sep-2005 | ||||||||||||
Name of Patentee | CISCO TECHNOLOGY, INC. | ||||||||||||
Applicant Address | 170 TASMAN DRIVE, SAN JOSE, CA 95134-1706, U.S.A. | ||||||||||||
Inventors:
|
|||||||||||||
PCT International Classification Number | G06F 13/38 | ||||||||||||
PCT International Application Number | PCT/US2004/008245 | ||||||||||||
PCT International Filing date | 2004-03-17 | ||||||||||||
PCT Conventions:
|