
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 'killThis seems to be a new bug in minicom 2.4. If minicom is hung, kill it with SIGTERM. Adding an expiclit 'exit 0' command to the script makes no difference. Also, any output from the commands executed by the script are only printed after the user presses CTRL-C. Then the script exits and control is returned to minicom as normal. The output is never incorrect/incomplete/inconsistent when I enter the command directly, only when I script it through chat. Minicom hangs indefinitely, until the user hits CTRL-C. Sometimes it works, often it's just partial. However, when I script that same command as below, the output is very inconsistent.


For example, this is the response I get if I issue the command "at!gstatus?" to the modem using screen or minicom. runscript - script interpreter for minicom SYNOPSIS top runscript scriptname logfile homedir DESCRIPTION top runscript is a simple script interpreter that can be called from within the minicom communications program to automate tasks like logging in to a Unix system or your favorite BBS. Press 'Enter' to save the changes.Per topic, I'm trying to capture the output of AT commands sent to an LTE modem attached to an OpenWrt 18.06.2 router to log signal data that uqmi doesn't provide. By default this will be saved as 'minicom.log', but change it to whatever you like with the 'A' key. Select 'Filenames and paths' and press 'F' (Logging options). To exit Minicom when in terminal mode press 'Ctrl-A' to get a message bar at the bottom of the terminal window and then press 'X'.Īnother useful Option is to log all information to a file which will be saved in your Home directory. I was attempting to do a bash script, but it seems like there is no way to get the script to do eval 'minicom configuration default -S login.txt -C /home/pi/log. Hit enter, and you may be asked for your username, indicating a successful connection. Its been pretty frustrating that the minicom script would do everything i needed it to except what it was for, even with a single command in the loop with a hefty sleep between loops. Once saved, one may choose Exit, and one is at the minicom prompt. Once configured, one may "Save setup as dfl", which will save these as the default configurations for future connections (/etc/minicom/minirc.dfl). Once these have been adjusted, one may want to also go to the Modem and dialing menu and remove all information in setting options A through I.
Minicom script manual#
Next, one will want to consult the hardware vendor's manual for the Bits per second, data bits, Parity, stop bits, and Flow control. MISC If minicom is hung, kill it with SIGTERM.
Minicom script serial#
Then, adjust the Serial Device to the device one has, for example: A - Serial Device : /dev/ttyS0 One will next choose "Serial port setup'. Next, enter in a terminal enter: sudo minicom -s which we will need in order to use Minicom. In the first section above it is ttyS0, the other is ttyUSB0. What we are interested in is the name of the serial port. usb 4-3: pl2303 converter now attached to ttyUSB0 audit(1243322582.732:2): type=1503 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=5705 profile="/usr/sbin/cupsd" namespace="default"įor a USB-to-Serial adapter, one may see: console enabled If it is a direct serial connection, the output will be something like this: console enabled

In order to find the name of your port(s) enter this command in terminal: dmesg | grep tty
Minicom script install#
Install the program with: sudo apt-get install minicomĪlternatively, you can get Minicom via the Synaptic Package Manager. It is used to talk to external RS-232 devices such as mobile phones, routers, and serial console ports. Minicom is a text-based serial port communications program.
