Author Options:

how can I use a mobile phone dmtf tones to turn on PC parallel port pins on and off using VB, C or C++ code? Answered

I need to be able to turn on ac powered lights from my pc parallel port using my phone. The set up I have uses two relays to put on the ac lines. Am currently using a web interface to do it. I dont want to rely on SMS. Suggestions that use SMS are welcome though. Any help will be appreciated.


The forums are retiring in 2021 and are now closed for new topics and comments.

9 years ago

If you really want to do it via DTMF a modem is probably the easiest as orksecurity says - most modern modems support it (though check). You could build an answer/DTMF detect thing - they weren't uncommon 20 years ago - but I doubt it would be cheaper and for sure not easier.

If you want to go the SMS route after all and you're in the US (or have free international SMS), set up a google voice number, set it to forward to gmail, set gmail to forward it to your PCs IP. Write something to receive it or use a small mailserver (may take telling your ISP to open port 25) that can execute something upon getting mail. Make said thing flip the pin.

If in the US, double check that you can't SMS to email. Many phones will, in fact, send SMS directly to mail instead of going through the hassle of another layer. Recieve, act on (can even be light1on@, etc). If you can even access a web page, skip to that (listen to port 80, forwarded from your router, do some mild parsing and flip. Bookmark http:///light1on on your phone, access it when you want that to happen).


11 years ago

Get a modem that has telephony functions.

Write software that uses that modem's phone support to answer the phone, listen for the DTMF tones, and do whatever's appropriate.

Hook modem to phone line. Call modem. Play tones on phone.

That's the simplest approach, since it uses hardware and drivers that someone else has already created for you and all you need to write is the top-level application code and talk to the parallel port. If you're working in Windows, I *think* there's a standardized telephone API which can be used for this purpose. Can't recommend a specific modem; I haven't shopped for modems in about a decade, when the MWave was still available. (Nice device, ahead of its time and poorly marketed.)