Terry Koziniec
Terry Koziniec

Categories

How to Send a Break Signal in a Terminal Session

When working with terminal sessions, there are times when you may need to send a break signal to interrupt a process or perform specific actions. For example, during the boot sequence on a Cisco router, sending a break code on many models places the router into ROM monitor (romon) mode, allowing password recovery.

I rarely use serial communications with a directly attached device, so frequently, I install some random comms package and then have to search for how to send a break character. Sometimes, this can be a key sequence. Still, it gets confusing when a break involves using a function key on a keyboard, and there is uncertainty as to whether the break is signalled correctly or whether the terminal software handles it correctly. At other times, the terminal software may send special signals via a menu option, but this can be tricky when power cycling equipment and getting the timing just right. The fatal blow is when you need to send the break signal over a terminal server, and your communications are tunnelled within an SSH or Telnet session. Now, your break sequence has the potential to signal other applications, and a simple task can be a real headache.

The technique described here has been long known, but it is new to me and deserves more coverage.

Background:
The break signal is not an ASCII character. Instead, it is a signal that holds the RX pin in RS232 low for longer than a standard character signalling period.

Assuming your equipment is using 9600 bps signaling, an 8-bit character with one stop bit takes around a millisecond to transmit.

If you reduce your baud rate to 300 bps and press the space bar, you send a bit stream of 00100000. Those five zeros have a duration of 16 ms, comfortably long enough to signal a break.

Procedure:

Establish session:
Start by establishing a terminal connection with the device or system you’re working with at the required baud rate. Typically, 9600 bps.

Reduce Baud Rate:
Once the terminal session is active, lower the baud rate to 300 bps. This can be done using terminal software settings or commands specific to your system.

Press Space Bar:
With the baud rate set to 300 bps, simply press the space bar on your keyboard and hold it for a few seconds. This action will send a continuous stream of low-level data, effectively simulating a break signal.

Return to the regular baud rate:
You won’t see the output immediately after sending the break signal, but that isn’t usually an issue for typical terminal actions such as password recovery.

This is now my go-to technique. I hope it helps someone else.