in reply to Re: perl tk and Device::Modem
in thread perl tk and Device::Modem

Thanks for the reply.
Really, I would like the option to hangup after dialing (when ringing/answer phone). It seems that the gui is locked until the modem has finished dialing and an answer is returned.

Replies are listed 'Best First'.
Re^3: perl tk and Device::Modem
by zentara (Cardinal) on Apr 25, 2006 at 22:43 UTC
    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