Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to Send AT Commands to mgetty? Post 302917773 by mrm5102 on Thursday 18th of September 2014 12:55:53 PM
Old 09-18-2014
Hey Perderabo, thanks for the reply, very much appreciated!

I apologize for not responding to your post, but I had gotten pulled off this thing with mgetty that I was working on
and am just coming back around to it now... Again sorry for not getting back to you sooner.

Humm... Oh ok, when I had read the man page I guess I didn't put it together that the -m option for the initialization
string
was where you would enter those commands. Doohh!!

And I guess I didn't see the AT Command example they use right below that -m option's section, which showed:
Code:
       -m 'expect send ...'
              Set the "chat sequence" that is used to initialize the modem. For an empty expect part,  use  empty  double  quotes
              (""). Since the sequence contains spaces, you have to enclose all of it in single quotes(''). Example:

              mgetty -m '"" ATH0 OK'

Basically, I will be connecting to this USB Modem over the phone network from my PC to a computer in a remote
location (*which will contain the USB Modem). In my successful tests, I used Minicom on my PC (*the client) and
dialed the Modems Telephone number (*using ATD55555...), then on the server side (*the computer with the USB
Modem)
would be running mgetty and would answer the incoming call from my PC and I would then be
prompted with a login prompt from the server-side's computer. And after logging in I get that server's Console/CLI.

Modem: Zoom 56k USB Modem (*Model 3095) - which works great BTW...
Computer w/ USB Modem:CuBox-i, running OpenSuSE 13.1 *for ARMv7

The ONLY thing I'm really having trouble with now is trying to get mgetty to start-up at boot time. OpenSuSE 13.1 uses
systemd instead of inittab which is where I am used to starting things during boot. When I test mgetty from the CLI
and I watch it's log file (*/var/log/mgetty.ttyACM0) even though it's working when I run it from the CLI, I can see in
the log that it says:
Quote:
09/18 12:20:14 CM0 WARNING: parent process not init(pid=1), but pid=3353 (-bash)
..................
.......
......other stuff.....
.......
..................
09/18 12:22:51 CM0 cannot set controlling tty (ioctl): Operation not permitted
09/18 12:22:51 CM0 >>> this might be caused because you have run mgetty/vgetty
09/18 12:22:51 CM0 >>> from the command line. Don't do that, use /etc/inittab!
So now I'm trying to figure out how to use systemd since this is my 1st time attempting to use it. So far as I can tell
I need to have some kind of mgetty.service file located in /etc/systemd/system/*.... But it's starting to get a little
confusing with the .conf, .target and .service files...

Do you have any experience creating your own custom systemd files to start a program during boot?

Again, thanks alot for your reply it is much appreciated, and I apologize for taking so long to get back to you...

Thanks Again,
Matt
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

HELP: Need to send commands to Program

Hi, I am an absolute beginner in Unix and I need to send a commands to a program I have created a script that will let me login to the program, however, i cannot get the script to send commands to this program. When the cript logs into the program, the display/ prompt is as follows: 1>... (1 Reply)
Discussion started by: the_m4ch1ne
1 Replies

2. Shell Programming and Scripting

How to send AT commands after getting into Kermit window?

We're using Kermit 8.0.209 in Linux environment. We're trying to invoke kermit from an application, send some AT commands and receive the responses from the End terminals like mobiles/modems. We access these deivces through serial ports. For eg., to send a file we use command-line options like... (4 Replies)
Discussion started by: pratiul
4 Replies

3. Shell Programming and Scripting

Send one email with output result from 2 commands

Hi, i want to create a script which should do the following: 1) ping the remote servers and email the hosts which are down 2) netstat on port x on 2 server and email the result too. I want both results to be sent in the same email. I have few ideas but i can't finish it. Here... (4 Replies)
Discussion started by: varu0612
4 Replies

4. Shell Programming and Scripting

Make ssh and send commands

Hi, I'm trying to make an SSH into a SGSN node and collect some commands printouts.:confused: I really don't know how this can be done. I think it must be like this: #!/bin/bash ssh user@192.168.88.10 Then I must enter the password, but I don't know how to do it, I tried with: echo... (3 Replies)
Discussion started by: nagomes
3 Replies

5. Cybersecurity

Logging shell commands and send it out

Dear friends I'm looking for a solution to log all commands that users do in my RedHat box, and send it out to other remote server, Is there any guide for that Thanks ---------- Post updated at 04:20 AM ---------- Previous update was at 03:47 AM ---------- I can think of something else I... (7 Replies)
Discussion started by: reaky
7 Replies

6. Shell Programming and Scripting

Send Remote Commands via SSH with variables

Hi there I found the Command to send commands to other servers like: sv01> ssh user@sv02 'ps -ef' But I cant use Variables from a script i want to execute on another server like: sv01> ssh user@sv02 'cd $SCRIPTHOME' although the variable is set on sv01. How can I run commands on sv02 with... (2 Replies)
Discussion started by: DarkSwiss
2 Replies

7. Shell Programming and Scripting

can i send shell commands to a open window

i want to write a script that automatically fills in a form and pushes a few buttons. can i do that with bash or something similar? (1 Reply)
Discussion started by: magiling
1 Replies

8. Linux

send remote commands to windows machine?

hey guys, I've done some searching and other than winexe I haven't been able to find a way to send remote commands to a windows machine. The problem I get is with winexe whenever you send the process to the background in a script, I get the following error. :wall: Any help is appreciated! ... (0 Replies)
Discussion started by: terrell
0 Replies

9. SuSE

Starting mgetty with systemd?

Hello All, OS: openSUSE 13.1 (Bottle) (armv7hl) uname -a: Linux linux.site 3.14.14-cubox-i #1 SMP Sat Sep 13 03:48:24 UTC 2014 armv7l armv7l armv7l GNU/Linux So this is my first attempt at starting a service at boot with systemd. I've done this with inittab in the past, but I'm having... (0 Replies)
Discussion started by: mrm5102
0 Replies

10. UNIX for Dummies Questions & Answers

Mgetty Not Answering when Calling from Outside

Hello All, mgetty Version: 1.1.36 OS: OpenSuSE 13.1 (armv7l) Modem: Zoom 56K USB Modem Model 3095 So I've been playing with mgetty for weeks now testing dialing into the USB modem from another PC using the same modem and connecting using minicom (*minicom ---dials to---> mgetty). I had... (3 Replies)
Discussion started by: mrm5102
3 Replies
vgetty(8)							   vgetty manual							 vgetty(8)

NAME
vgetty - voice extension to the mgetty+sendfax program SYNOPSIS
vgetty [options] ttydevice vgetty is not meant to be run from the command line. It should be run from the /etc/inittab file so it can respawn after each call. Here is a typical inittab entry: S0:345:respawn:/usr/sbin/vgetty ttyS0 If you already have a line in your inittab file which invokes mgetty, replace it with vgetty, since it replaces/extends its functionality. DESCRIPTION
vgetty is an extension to the mgetty+sendfax program which provides an interface to voice-capable modems. Use it to operate your modem as a simple answering machine or build your own sophisticated voice messaging system. vgetty handles all the voice-modem specific protocols, giving application programs a uniform, modem-independent voice library. Supported modems include many common serial modems from 3com/USRobotics, Elsa, Multitech, ZyXEL, and others. Caller ID and Distinctive Ring are supported provided you have subscribed to these services from your phone company. Software-based modems (winmodems) are not supported. vgetty comes with tools to convert au/wav/voc sound files to/from the format used by most supported modems. Basic editing and filtering of sound files is included as well. See pvf(1) for more information. OPTIONS
vgetty accepts the same options as mgetty. The one's relevant to voice mode are given here. See mgetty(8) for other options related to data and fax modes. -a Use autobauding (change port speed to modem CONNECT speed). There is no voice modem that needs this, the option is just documented for completeness. -m 'expect send ...' Set the chat sequence that is used to initialize the modem. For an empty expect part, use empty double quotes (""). Since the sequence contains spaces, you will have to enclose all of it in single quotes (''). Example: vgetty -m '"" ATH0 OK' -n <rings> Set the number of rings after which vgetty will answer the phone -s <speed> Set the serial port speed to use, e.g. "-s 38400". This is the speed of communication between the computer and modem in bits/sec (baud). -x <log level> Set the log verbosity level. Zero (0) means no logging, six (6) is really noisy. Use level six (6) when sending problem reports to the maintainer. The log file is /var/log/vgetty.ttyXX. ENVIRONMENT
vgetty sets the following environment variables when calling external programs: CALLER_ID The caller's telephone number. CALLED_ID The number the caller has dialed. Useful for ISDN with multiple incoming phone numbers on the same physical line. CONNECT The connect string as reported by the modem (e.g. "38400/V.32bis/V.42bis ... ", etc.). DEVICE The tty device being used (e.g. "ttyS0"). Useful for handling multiple devices ("messages on this line are for work, messages on the other line are personal"). RESOURCES
vgetty is included in the mgetty+sendfax distribution. For the latest release, go to: ftp://alpha.greenie.net/mgetty/source The vgetty maintainer's home page is at: http://www-internal.alphanet.ch/~schaefer/vgetty.html Send problem reports to: vgetty-maintainer@alphanet.ch For information on mgetty, go to: http://alpha.greenie.net/mgetty The mgetty mailing list is at mgetty@muc.de. The mailing list is mirrored to the de.alt.comm.mgetty newsgroup. FILES
/etc/mgetty+sendfax/voice.conf Main configuration file for vgetty. Many options here override the equivalents found in /etc/mgetty+sendfax/mgetty.config /etc/nologin.ttyXX If this file exists, vgetty will not answer calls on device ttyXX. /var/log/vgetty.ttyXX Debug log file for vgetty. /var/spool/voice/messages/Index List of greeting messages to use. /var/spool/voice/.code Access code for remote playback of messages using the dtmf.sh script /var/spool/voice/.flag vgetty touches this file when a new message is received /var/spool/voice/.timestamp Used by the dtmf.sh script to record last time of message playback DIAGNOSTICS
If vgetty doesn't work they way you think it should, check the log file. By default, it is located in /var/log/vgetty.ttyXX (for the vgetty process handling device ttyXX, e.g. ttyS0). BUGS
vgetty supports most standard voice modems, but many modems are not fully compliant with relevant standards or contain firmware bugs. If you have problems, try upgrading your modem to the latest firmware revision. If you discover a bug with how vgetty reacts to your modem, please email the maintainer (vgetty-maintainer@alphanet.ch) describing your problem. Include relevant excerpts from the log file (set log level to six first), and details about your modem (including firmware revision) and operating system. SEE ALSO
mgetty(8), pvf(1) COPYRIGHT
vgetty is Copyright (c) 1997-2001 Marc Schaefer (schaefer@alphanet.ch) and many others, before and after. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This man page was written by Barry Stewart <bstewart@smyrnacable.net>, and has CVS version: $Id: vgetty.8,v 1.1 2001/12/22 18:43:22 marcs Exp $ version 0.60 $Date: 2001/12/22 18:43:22 $ vgetty(8)
All times are GMT -4. The time now is 04:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy