From 40e66958d618853cf169f741c6e590f9f2b6f900 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Fri, 7 Feb 2025 14:26:13 -0500 Subject: [PATCH] Add files via upload Quick and dirty way to have my Pi that's attached to the serial port of my Cisco C3850 switch connect to it for a cheap 'kvm' like solution. --- ciscoconnector.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ciscoconnector.sh diff --git a/ciscoconnector.sh b/ciscoconnector.sh new file mode 100644 index 0000000..4355aa0 --- /dev/null +++ b/ciscoconnector.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Identify the serial device +PORT=$(ls /dev/ttyACM* /dev/ttyUSB* 2>/dev/null | head -n 1) + +# Check if a port was found +if [ -z "$PORT" ]; then + echo "No serial console device found. Please check the connection." + exit 1 +fi + +# Display the identified port +echo "Serial device found at: $PORT" + +# Start a screen session +echo "Starting screen on $PORT at 9600 baud..." +sudo screen "$PORT" 9600 \ No newline at end of file