I am new to using minicom. I want how to write a expect script for minicom login? I wrote a code but its not acting what iam expecting. here I have my code:
Response for above code:
but here I want output like:
it should show my login and password message which is sent from my hardware but it is jumping without showing it directly to my command line and existing from that session (login) . I dont want to exit from the login session
Is their any problem in my code: please do suggest me thank you
---------- Post updated at 05:20 AM ---------- Previous update was at 03:10 AM ----------
Actual what iam expecting is:
i am trying to write a script to logon to a system using minicom.
when I do minicom in my shell...
i want screen as below:
=================================
Welcome to minicom 2.4
OPTIONS: I18n
Compiled on Jun 3 2010, 13:46:31.
Port /dev/ttyS0
Press CTRL-A Z for help on special keys
==================
=========== ===========
#!/usr/local/bin/expect —f
log_file -noappend logfile_telnet
set timeout 2
set user "username"
set password "password"
spawn minicom
expect "enter:"
send ""
I will try it but i didnt get the line you said " I suppose you could redirect it into expect too." please can you eleborate more clearly as iam very new to expect and as well to minicom.
Hi All,
I am testing expect script in command prompt without issue, but in crontab it is not working, i check the output error as below:
#cat /var/log/testexp.log
spawn minicom -C /var/log/minicom1.log
No cursor motion capability (cm)
AT+COPS=?
I am new in scripting, together... (1 Reply)
I'm a fairly new user to Linux based systems and am still a little uncomfortable with using the command interface. I'm trying to get my feet wet but have unfortunately hit a wall and am actually not even sure what I am trying to accomplish is at all possible.
Basically, I am trying to use a... (0 Replies)
Hi all,
i must do a little script that send AT command at ttyUSB3..
for example:
Start Minicom:
Set serial port ttyUSB3
AT+CREG?
if response != OK then do something
...other AT command (open a socket tcp/ip with at comman)
Send a file .txt for example.
exit minicom.
I saw on the... (49 Replies)
This is what I've tried:
#!/bin/sh
send sh
send showifs
send exit
! killall minicom
My problem is that for some reason when I do this it doesn't give me the results of the prior commands sent like showifs
So I suspect my syntax is wrong. (1 Reply)
Hi all,
I have some trouble getting stty to talk to some serial/usb converter.
Getting minicom to work was however quite simple after I entered the following settings in addition to its standard-setup:
pu port /dev/ttyUSB0
pu baudrate 19200
pu bits 8
pu... (3 Replies)
Hi,
I am new to use minicom. I want script to run on minicom with username and password as automated.(Expect). please could anyone suggest the sample code for it.
Thanks in advance (2 Replies)
Hello!
I have an ESX Server up and running. Now I want to connect a serial device to the COM Port. For that I need the minicom program.
When I try "configure - make - make all" I get some errors. Can someone please explain to me, what the problems are:
# ./configure
checking for a... (3 Replies)
Does anyone have a working minicom script they would care to post as I can't get the scripting working and the scriptdemo and unixlogin sample scripts are on my system either.
Thanx,
I (2 Replies)
hello. i'm attempting to use minicom in linux, but i'm having some difficulties. When i type in "minicom", the application opens up. It says 'starting minicom/finding modem'(something like that). However, once it actually starts, I can't do anything. No matter what I type in, it doesn't work. ... (2 Replies)