Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Send msg to pager through modem

by rhymejerky (Beadle)
on May 04, 2005 at 18:50 UTC ( [id://454106]=perlquestion: print w/replies, xml ) Need Help??

rhymejerky has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to send msg to an alphanumeric pager through a modem. I know I can do this easily with Net::SNPP. However, I am assuming the network is down and my only way out is through an analog modem. I have looked at the Device::Modem module, but doesn't tell me how to send msg out once a connection is made. Can some one shed some light on how to approach this? Thanks in advance

Replies are listed 'Best First'.
Re: Send msg to pager through modem
by ikegami (Patriarch) on May 04, 2005 at 20:26 UTC
    When sending a message to a pager via a modem, a connection is never actually established since it's not a modem on the other side (assuming you're dialing a number which is meant to be called by people, not modems). Call the number using a normal phone, and see what key presses it's expecting and the timing between then. Then dial the number with these keypresses. Commas (,) are used to insert pauses. For example, if the paging service expect the user to press "1", and then dial the message, then you'd tell the modem to dial as follows:
    $number_to_dial = '555-1111'; $number_to_dial .= ',,,,'; # Let the service answer. $number_to_dial .= '1'; # Dial "1" to send a message. $number_to_dial .= ','; # Small pause. $number_to_dial .= '911'; # The number to display on the pager. # Taken from link in Joost's post: print TTY "atm0dt$number_to_dial\r"; sleep 10; print TTY "\r"; print TTY "atz\r";

    It's usually good to err on the safe side and add more pauses than needed. Sometimes, the system takes longer to answer or to process keypresses. So when you get it working, add a few more pauses for good measure.

      If the modem supports @, it might be easier to deal with waiting for an answer. (and I don't like m0 for automated processes, as I want to know that the modem's making a call.)

      my $phone_number = '555-1111'; my $message = '911'; # assuming TTY like above print TTY 'atdt',$phone_number,'@1,',$message,"@;\rath\r";

      (and my mom thought BBSing was useless)

Re: Send msg to pager through modem
by Fletch (Bishop) on May 04, 2005 at 21:22 UTC

    If you're talking about sending a page through the pager provider's modem you want to google for "TAP IXO protocol". It's not that hard to get working; I did it in Tcl / expect aeons ago and I don't think it took more than half a day to get working (and I was going over telnet to some sort of network modem pool box, I think).

Re: Send msg to pager through modem
by Joost (Canon) on May 04, 2005 at 19:22 UTC
      The protocol you may be looking for is TAP. This is a modem-to-modem protocol for sending pager messages, rather than dialing acoustical DTMF tones using a modem. Check out sendpage at http://sendpage.cpoint.net/. The software is entirely written in Perl and may include what you're looking for.
Re: Send msg to pager through modem
by jasonk (Parson) on May 04, 2005 at 20:56 UTC

    Your other option is to run your own SNPP server locally, and let it deal with the modem instead of talking to the modem with perl. Hylafax includes an open-source implementation of an SNPP-compatible server. You can then just switch Net::SNPP between talking to a remote server and talking to the local one.


    We're not surrounded, we're in a target-rich environment!
Re: Send msg to pager through modem
by davido (Cardinal) on May 04, 2005 at 21:30 UTC

    I also remember text pagers from the 90's. They usually came with paging software that dialed a phone bank's modem and transmitted the message along with the pager's serial id. There was no universality; in other words, an AT&T pager could not receive messages by someone dialing into Southwest Bell's paging network.

    Anyway, here's what you need to do: First, determine the protocol being used. You'll need to know stop bits, parity, data bits, as well as what the modem at the other end of the line is expecting with respect to pager ID's, message packets, etc. This info used to be available by googling (I think back then I used Lycos or Yahoo actually). I seem to remember something about TAP protocol. Maybe you can even search CPAN for a TAP module.

    Once you know this info, open a serial connection to your modem. Talk to the modem just like we did in the old days with a terminal screen; ATDTxxxxxxxxxxxx for dialing the number, ATH to hang up, etc. Once connected, you'll have to talk to the serial connection with the system-specific information to send the page.

    Opening the serial connection to your modem shouldn't be that difficult; there are plenty of modules that deal with serial devices, though some of them are OS dependant.

    The hard part will just be deciphering what protocol the paging service expects. That will take some homework.

    You may find it easier to just send the message as email through the pager's email gateway. Even back in the 90's, most alpha pagers had email addresses too.


    Dave

Re: Send msg to pager through modem
by 5mi11er (Deacon) on May 04, 2005 at 21:01 UTC
    Having actually done this way back in the mid 90's, I think the OP wants to send text messages. So, I remember next to nothing other than it was possible, and it worked, and <rant> pagers back then were a whole lot more reliable than the damned SMS message delivery for cell phones. (It once, fairly recently, took 3 hours for a message to arrive on my phone after it was delivered. I was on call, so that message that could have been delivered around 10:30pm, instead arrived sortly before 2 am. My boss had been called because I was "unresponsive".)</rant>

    Ok, so, I remember that there was a name for the protocol to send text to pagers, but don't remember the name. And I seem to remember you called a generic service that given the message and the pager's phone number would forward that message to your pager's service. That about covers what I remember.

    So, some obvious questions, what are you calling when you dial via the modem? Are you attaching to some other ISP? Then you should be able to just use the networking stuff you've found...

    -Scott

      The protocol you mentioned could be SNPP. Like you said, the best way is to come up with an to come up with an ISP number to call and send a text page that way. However, we don't have that number. All we could do is use a script to call individual's pager or cellphone and leave 911. So, the OPs can come in and take a look

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://454106]
Approved by sweetblood
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-26 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found