│ lineWrap on/off.W local Echo on/off.E | Help screen. I try this script (file script.txt): start: send AT+CSQ sleep 2 goto start and run it via minicom -S script.txt but got nothing: empty minicom screen opened. You may kill minicom from a script with the command ' killall -9 minicom' without hanging up the line. This will cause a graceful exit of minicom, doing resets and everything.
(This means kill -15, or since sigterm is default, just plain 'kill│ Terminal settings.T run Kermit.K | Cursor key mode.I │ I need send AT commands to my modem (Huawei e171) in a loop. If minicom is hung, kill it with SIGTERM. │ send break.F initialize Modem.M | Quit with no reset.Q │ │ Capture on/off.L Hangup.H | eXit and reset.X │ │ comm Parameters.P Add linefeed.A | Suspend minicom.J │ │ Send files.S Receive files.R | cOnfigure Minicom.O │ │ Dialing directory.D run script (Go).G |Clear Screen.C │ OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n From that point you may choose a Function to modify minicom settings. minicom options configuration a communication program include script language, capture to file, multiple users with individual configurations, A with all the documention found here, this is tersified and arranged in what I feel is a sensible order. Once minicom begins you can use CTRL+A Z to view the main menu.
#Minicom script serial
Select A and change: Serial Device /dev/ttyS0 Start minicom As root start mnicom to setup a serial port. Agree that expect is a workaround, not perfect though because it can only print the serial port output after it sees its expectation, if it does not see. Now you are ready to configure com ports. │ C - Script directory : /home/mike/minicom/script │ │ B - Upload directory : /home/mike/minicom/up │
#Minicom script download
Here is an example: │ A - Download directory : /home/mike/minicom/down │ x A - Download directory :Ĭreate the directories that are needed by typing the appropriate letter and entering the information. You will see this information that will need to be completed. Start minicom as root to setup the global configuration. Minicom: there is no global configuration file /etc/minirc.dflĪsk your sysadm to create one (with minicom -s). Now the serial connection should open up and it will be connected with the cisco device.The first thing you will need to do is setup a global configuration file for minicom. To configure a modem use the command minicom -o console to start Minicom without sending an initialization. It emulates ANSI and VT102 terminals, has a dialing directory and auto zmodem download. To use this configuration use the following command. Minicom is a clone of the MS-DOS 'Telix' communication program. Now choose save setup as… and change the name to whatever you like, for example cisco, now save and exit from minicom. Next configure minicom to use that serial port and connect to the cisco device.Ĭhoose serial port setup, change the serial device to /dev/tty0, change the Bps/Par/Bits to 9600 8N1. The seial port in this example is at /dev/tty0 But if you want to write a script for automatically doing file transfers, etc. In my opinion its easier to set up Minicom, there is less to learn, and you can still use kermit from within Minicom. 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A Although all Minicom documentation is free, its not as extensive as Kermits. Once installed you need to find out what your serial port connection is.
#Minicom script install
This guide is for Debian/Ubuntu but will work with any linux distribution.įirst you need to install minicom this is easy using apt-get or yum, just do the following command. If you need to connect your linux server to a cisco device through the serial port this is the best way to do it.