Results 1 to 5 of 5
Hi all. I'm attempting to communicate with a remote modem using a serial modem on a local Linux machine. I'm ultimately aiming to integrate functionality with some basic PHP for ...
- 07-20-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 3
Modem to modem communications from terminal
Hi all. I'm attempting to communicate with a remote modem using a serial modem on a local Linux machine. I'm ultimately aiming to integrate functionality with some basic PHP for a web interface, but first need to identify a solution for controlling my serial modem and successfully dialing out & interfacing.
So far I've tried wvdial, but have run into the simple problem that it's a PPP dialer - and from my understanding I don't require a PPP connection. All I want from the remote machine is a command line - which wvdial actually provides, before filling the output with failed attempts to start pppd.
I've seen mentioned the other method of echoing arguments directly to the tty (echo "ATZ" > /dev/ttyS0). This does work (my modem makes all the right noises
), but I don't know of a way to listen for responses from the remote modem (such as the CONNECT signal).
It'd be nice if I could handle a basic connection using a bash script with no additional binaries such as wvdial, but am open to any suggestions or corrections. The aim of the entire operation is to download a text file from a remote server that can be only accessed through phoneline + modem.
- 07-20-2010 #2
You probably want a program like minicom It is
the usual way to talk to your modem, issue AT
commands and so forth.
minicom(1) - Linux man page
- 07-20-2010 #3Just Joined!
- Join Date
- Jul 2010
- Posts
- 3
- 07-21-2010 #4Just Joined!
- Join Date
- Jul 2010
- Posts
- 6
Back in da days.
ATDT ########(phone number) - was the function to dial
ATA - Was used to answer on the receiver end
ATZ - Terminate connection
- 08-01-2010 #5Just Joined!
- Join Date
- Jul 2010
- Posts
- 3
Somewhat related further problem. I'm now using minicom & runscript to run the necessary commands on the remote server. Part of my runscript is this:
This should work, since manually connecting to the server and entering the sz command results in "**B00* being printed to the output, then a box appearing with a progress bar for the download, finally ending in the text starting 'READY:' as shown above.Code:send "sz /path/to/file" expect { "READY: press any key to continue..." } send "\r"
However, running this via the script results in "**B000000000000" being sent to the output, and the progress bar dialogue never appears, and my script never gets the opportunity to continue after the 'READY:' text.
Can anyone explain the difference in the behaviours here? I was under the impression runscript emulated input, but this looks like it's doing something else.
Edit: Further analysis shows more data being passed to the line that contains the **B000000000000 string. Pressing the right-arrow on the keyboard reveals the following, all confined to one line, repeating approx 11 times:
��07-10.pay5346 11425117522 100660 0 1 5346*�o�07-10.pay5346 11425117522 100660 0 1 5346*�o
'07-10.pay' is the name of the file I'm trying to download.


Reply With Quote
