1

I've been tasked with writing a script for the minicom connection utility that tests a series of numbers in its dialing directory, I have found the baked in scripting language to be near useless. I've been trying to use the shell launch syntax to specify a number of entries in the dial directory but nothing has worked in the way that the documentation would lead me to believe. Ultimately, I would like to have the process of dialing out to a series of entries to be completed in one fell swoop. However, this process is halted by the need of having to "Hit any key to continue," when it either times out or connects. Is there a way to disable this? It's putting a serious damper on my automation project.

rwaweber
  • 11
  • 1

1 Answers1

2

It's unclear what version of minicom you're working with, but I went and had a look at the source for the current version, 2.7. (I'm kinda sorry I looked-- it's burning my eyes. What an ugly bunch of C code...)

It looks like the prompt you're talking about is invoked from dial.c in two different places-- lines 384 and 598.

The line 384 invocation happens when the retry time becomes less than zero. I don't see any way around this one popping-up, short of recompiling minicom. I suppose you could work out some kind of timeout in your script and, after you form minicom, kill it when that timeout elapses. That's a bit of a hack.

The line 598 invocation appears to be contingent on no script being specified in the dialing directory entry. If you were to specify a script that "did nothing" you could probably avoid this one. Maybe. I'm not actually installing it to see.

I see in the doc/Todo.175 file that suppressing the prompts is on the "roadmap". It looks like it has probably been there for awhile... >smile<

Given these frustratioins I think I'd evaluate if minicom is the right tool for the job. Using plain old expect might just make more sense.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
  • I feel bad that you dove so deep into the minicom source code for this answer, but thanks so much! I think I'm gonna try a workaround using bash, but I think successive dialing is out of the question as well. I'm just going to have the script manually dial each entry with the -d flag. It's just disappointing that I have to do that considering in the minicom man page you should be able to do so by just adding commas in between the entries. *sigh* – rwaweber Jun 24 '14 at 14:31
  • Don't feel to bad about it-- I find that going straight to the source, when it's available (Grrr-- I'm looking at you, Microsoft) is the best way to get authoritative information. It looks like there wasn't much thought put into using minicom as an automated tool, given these prompts to press keys that aren't surrounded by runtime conditionals to disable them. – Evan Anderson Jun 24 '14 at 14:59