Reverse Engineering A Telephonic Relay Device

The Plain Old Telephone Service, or POTS, doesn’t get a lot of love from the average person anymore. Perhaps once in a while a payphone will be of use when a phone battery has died, but by and large many people simply don’t have hardwired phones anymore. However, that doesn’t mean that the old landline can’t be put to good use. As [Felix Vollmer] shows us, it’s still possible to get useful hardware running over the phone line.

The YC-KZ02DN is a simple device which hooks up to a standard phone line. It’s capable of answering calls and responding to commands by switching its various relays on or off. [Felix] wasn’t quite happy with the stock functionality, however. Investigation showed the onboard STC15W202S microcontroller can be repogrammed over serial via an unpopulated header. Thus opened the door to hacking the device.

[Felix]’s alternative firmware has a couple of key features that make it valuable. Longer PINs are supported, decreasing the likelihood that malicious actors can gain access to the system. Additionally, the device is set to restore the last relay state after a power loss event. This makes the device far more useful for situations where it’s important to ensure consistent operation. It’s no use if an intermittent power loss stops your livestock’s water trough from filling, for example.

In this day and age of the Internet of Things, an old school telephony hack warms the cockles of our hearts. We’re suckers for anything that recalls the days of rotary dialing and speaking with the operator, after all.

20 thoughts on “Reverse Engineering A Telephonic Relay Device

    1. This. I was going to sarcastically respond with “What’s a payphone?” Every once in a while you’ll see a remnant somewhere, like those wall mounted booths sans phone. I would have nowhere to put it but I kinda want one of the phone booths of olde. Just as a nostalgic memory of a bygone era.

    2. All true.. Several years ago, I took a picture of payphones stacked up on pallets behind the AT&T central office.
      That picture was good enough to get me a year subscription to 2600 magazine.

  1. They could have stayed around, but one of the main dynamics that drove them out was this: with cheap, or free government-subsidized cell phones being so prevalent, the vast majority of the people using the payphones were criminals (illicit drug users and dealers).

      1. I’ve been all over the world, and yes, payphones are simply a cell phone with a coin and credit card slot.
        In Japan, it’s also a free WiFi hot spot. (That was cool free WiFi)

  2. Can anyone recommend an ethernet and/cellular connected relay board? Aiming for min 2 relays (signal only, not high current), connects to my website api for instructions, and will ideally run a python application I have but not essential.
    I’ve looked at raspberry pis with pi face shields, but now looking to move to a commercial product and avoiding making my own circuit board or using hobby boards.

    1. I’m won’t claim deep expertise on these things…my experience in the Telecom industry is from 20 years back. Unless the reverse engineered circuit is missing a bunch of stuff, the line side interface to the POTS line is not up to spec. It’s missing all sorts of protection, there is nothing preventing a voltage transient from getting all the way to the DTMF decoder chip while the line is seized for example… From the picture, the spacing on the traces between the line side and the rest also look pretty close, you’d have to measure to make sure the distance was large enough to prevent line side faults from getting to the electronics. So this thing might work well today, someday it will probably suffer damage, and leave you without being able to operate the relay to activate whatever you have this connected to.

  3. I still have Grandfather’s candlestick phone from 1913. :)
    I’ve seen a phone booth in Aberdeen WA, but I don’t know if it has a phone in it or not.
    I’ll have to stop and look one of these days. Gone are the payphones of old, but also gone is the Red Box.
    I remember when a phone call was a dime in New Jersey, then it went up to 20 cents, then a quarter.
    That was over 30 years ago. Man, now I feel old. :(

  4. I’ve come across a few of these things as a low voltage installer, usually we rip them out and throw them away.
    As an aside, there are two red box phone booths sitting in the middle of Sandy Springs, Georgia. Alas they are empty and locked, but a sight to see.

  5. I kept my POTS line, with zero features–no caller ID, no call waiting, nothing–but the price got to over $35 a month, $10 more than adding a line to my mobile plan–with unlimited talk and text, and a GB of data.
    The POTS advantages–better chance of working in an emergency, useful to send the occasional fax–just no longer seemed worth it.
    For me, the solution would be a cheap Android phone, USB GPIO, relays, and a custom app. If the initial hardware outlay was higher, I’d soon make it up on the monthly charges.

  6. While I still have a land line, I can’t remember the last time I have seen a functioning pay phone. I maitain the line because it’s likely to remain serviceable inmost disasters, I really doubt there are enough COWs in existence to meet demand. Where they deployed government, and public safety will be the primary users, and the general public users will only get limited time slots. Problem is the public isn’t being told that, so people can plan ahead, to agree on a designated contact to relay information to, so family members can stay in touch, also how to format messages to convey as much info as possible in as little of time possible. Because of services bundling, my landline cost is minimized, but it still has cost. Then again preparedness isn’t free.

    1. If your bundling … Then is it really a POTS line ?

      We live in an area where you can’t get POTS anymore just fiber and if the power is out for any period of time that service fails as well even when I have a generator.

  7. If your bundling … Then is it really a POTS line ?

    We live in an area where you can’t get POTS anymore just fiber and if the power is out for any period of time that service fails as well even when I have a generator.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.