You might want to experiment with the timeout setting, like setting it to 1 (it defaults to 30 seconds ). There is a way to do what you want, you may have to resort to manually accessing the modem thru directly opening it and writing AT commands to it. If you read the Modem.pm file, it shows exactly what it sends. Also try $modem->reset() instead of $modem->$hangup().
People are starting to forget how to use the old phone-line modems. :-)
Instead of using Device::Modem, you can use Device::SerialPort directly. There are some example in the eg directory of Device::SerialPort, and you should be able to do what you want. As a matter of fact the demo7.plx is a Tk script to dial out on a modem
If my memory servers me correctly, I recall that you can send modem dialing commands with shell commands, like
echo 'ATH0' > /dev/ttyS0 #go offhook
echo 'ATDT123456789' > /dev/ttyS0 # dial
There is a hangup command too, but I can't recall it offhand.
So you could rewrite your script to use a more manual method of dialing.
I'm not really a human, but I play one on earth.
flash japh
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.