Click to See Complete Forum and Search --> : Echoing commands to modem
fred f
04-01-2002, 12:47 AM
I am attempting to echo commands to a modem on /dev/ttyS4. for some reason I cant seem to get a responce. Modem is on 4, and is functional. If I use minicom, it works fine.
according ot linux for dummies, the technique works for discovering modem ports, but examples only were 0-3, but it did indicate that modems could be on 4-9 also
perhaps ports above 3 need someting special done first???
fwiw, I am trying to have cron call my cellphone as a reminder.
thanx
fred
Whipping Boy
04-01-2002, 01:58 PM
cat > /dev/ttyS4
You'll get a blank line; just type in what you want to send to the modem and hit enter and it'll get sent; then you'll get another blank line and type in the next command, etc., etc. Just do Ctrl-C or Ctrl-Z when done
Strike
04-01-2002, 03:56 PM
You could have problems with your flow settings. I don't know how you'd set it on the terminal, just that you'd use the stuff in termios.h in a C program to set it.
fred f
04-02-2002, 12:08 AM
cat > /dev/ttyS4 You'll get a blank line; just type in what you want to send to the modem
Whipping Boy -- tried that, also cp "file" /dev/ttyS4, and a bunch of other stuff.
=================
You could have problems with your flow settings. I don't know how you'd set it on the terminal, just that you'd use the stuff in termios.h in a C program to set it.
Strike -- I assume that sets speed, parity, bits stop bits, etc??? Kind of what I have been wondering
thanx guys
fred
Strike
04-02-2002, 01:57 AM
Originally posted by fred f:
<STRONG>Strike -- I assume that sets speed, parity, bits stop bits, etc??? Kind of what I have been wondering</STRONG>
Yeah, I just don't know of a command that does this stuff - just how to do it in C.
Stuka
04-02-2002, 03:42 PM
Ironically enough, Strike, the command is stty - just looked through Google and found it. Seems like the options even look a lot like the termios constants!
fred f - try man stty. You should get something that looks like this (http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?stty).
fred f
04-03-2002, 02:45 AM
Stuka
You got it! thanks a bunch.
the bug was -clocal says that you have a modem that uses modem controls, and apparently anything that looks like a modem control string gets stripped. clocal says the modem DOESN'T use modem controls. go figure
if anybody cares:
register S7 Sets the number of seconds the modem waits for a carrier. 25 seconds seems to be enought time to dial, ring and by then the voicemail is ready to pick up
stty --file=/dev/ttyS4 sane clocal
echo ATS7=25DT5551234 > /dev/ttyS4
>> the command is stty - just looked >> through Google and found it.