Sponsored Content
Full Discussion: Little script with minicom
Top Forums Shell Programming and Scripting Little script with minicom Post 302626595 by enaud on Thursday 19th of April 2012 01:09:33 PM
Old 04-19-2012
Quote:
Originally Posted by methyl
(The error messages seem to be in Italian).
yes SmilieSmilie

---------- Post updated at 12:09 PM ---------- Previous update was at 11:46 AM ----------

Quote:
Originally Posted by neutronscott
I don't have a modem now (left it in Antarctica believe it or not), so it is hard to test/script this for you, but Corona is certainly right that you would not use minicom.

PPPD comes with 'chat' which is a good way to do the initial parts of opening connection. I would use that. Again, untested:

Code:
exec 3<&1 >"$modem" <"$modem"
stty 115200 clocal ...etc...
if chat -v -s 'AT+CREG OK ATopencmd CONNECT'; then
   echo "error setup modem" >&2
   exit 1
fi
cat file
echo "done" >&3

I have doing a script :
Code:
#! /bin/sh

cat /dev/ttyUSB3 /home/giuseppe/Scrivania/imsi.txt &
sleep 1
# stty ispeed 115200 ospeed 115200 -echo not work!
# echo AT > /dev/ttyUSB3 not work!
chat -V -s '' 'AT+creg?' '' > /dev/ttyUSB3 < /dev/ttyUSB3
sleep 2
chat -V -s '' 'AT' '' > /dev/ttyUSB3 < /dev/ttyUSB3
sleep 2
chat -V -s '' 'AT!PADSETUP=1,2,82.91.28.127,0,9940,0,1' '' > /dev/ttyUSB3 < /dev/ttyUSB3
sleep 2
chat -V -s '' 'AT+CGDCONT=1,"IP","web.omnitel.it"' '' > /dev/ttyUSB3 < /dev/ttyUSB3
sleep 2
chat -V -s '' 'AT!PADCONN=1' '' > /dev/ttyUSB3 < /dev/ttyUSB3
sleep 10
killall cat
exit 0

but i not have a control! you can help for merge your script with mine?
Sorry but i not undstand this string:
exec 3<&1 >"$modem" <"$modem"

you can explain me, thank!
thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

linux - minicom

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)
Discussion started by: kickboxer
2 Replies

2. UNIX for Dummies Questions & Answers

Minicom Scripting

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)
Discussion started by: ianf
2 Replies

3. Shell Programming and Scripting

running scripts in minicom

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)
Discussion started by: vanid
2 Replies

4. Shell Programming and Scripting

expect minicom

Hi, 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: #!/usr/bin/expect set fd fconfigure $fd spawn -open $fd spawn minicom expect “enter:” send "\n" send "\n" ... (3 Replies)
Discussion started by: vanid
3 Replies

5. Shell Programming and Scripting

minicom works, but stty does not

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)
Discussion started by: pa-trick
3 Replies

6. Shell Programming and Scripting

Exiting from Minicom on a shell script

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)
Discussion started by: uradunce
1 Replies

7. Shell Programming and Scripting

Help with minicom script

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)
Discussion started by: nrdk00
0 Replies

8. Shell Programming and Scripting

Expect script not working in crontab with 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)
Discussion started by: elingtey
1 Replies

9. SCO

Minicom

hello is there a copy of minicom or equivalent for unixware 7? thanks (3 Replies)
Discussion started by: deus-programmer
3 Replies

10. UNIX for Dummies Questions & Answers

Alternatives to minicom During Remote Access?

Hey All, I am trying to find something similar to minicom, but it needs the ability to be ran during a remote dialup session on the remote device's side. If I dial into the remote server (*using minicom) and then try to run minicom on the remote server I get the following: # minicom... (20 Replies)
Discussion started by: mrm5102
20 Replies
FDFORMAT(8)						     Linux Programmer's Manual						       FDFORMAT(8)

NAME
fdformat - Low-level formats a floppy disk SYNOPSIS
fdformat [-n] device DESCRIPTION
fdformat does a low level format on a floppy disk. device is usually one of the following (for floppy devices, the major = 2, and the minor is shown for informational purposes only): /dev/fd0d360 (minor = 4) /dev/fd0h1200 (minor = 8) /dev/fd0D360 (minor = 12) /dev/fd0H360 (minor = 12) /dev/fd0D720 (minor = 16) /dev/fd0H720 (minor = 16) /dev/fd0h360 (minor = 20) /dev/fd0h720 (minor = 24) /dev/fd0H1440 (minor = 28) /dev/fd1d360 (minor = 5) /dev/fd1h1200 (minor = 9) /dev/fd1D360 (minor = 13) /dev/fd1H360 (minor = 13) /dev/fd1D720 (minor = 17) /dev/fd1H720 (minor = 17) /dev/fd1h360 (minor = 21) /dev/fd1h720 (minor = 25) /dev/fd1H1440 (minor = 29) The generic floppy devices, /dev/fd0 and /dev/fd1, will fail to work with fdformat when a non-standard format is being used, or if the for- mat has not been autodetected earlier. In this case, use setfdprm(8) to load the disk parameters. OPTIONS
-n No verify. This option will disable the verification that is performed after the format. SEE ALSO
fd(4), setfdprm(8), mkfs(8), emkfs(8) AUTHOR
Werner Almesberger (almesber@nessie.cs.id.ethz.ch) AVAILABILITY
The fdformat command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. Linux 0.99 1 February 1993 FDFORMAT(8)
All times are GMT -4. The time now is 09:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy