Turning A Phone Into A Media Center Remote


[Kees] wanted a remote for an XBMC audio system. He had a classic T65 Dutch telephone in one of his project boxes and thought this phone with the addition of a Raspberry Pi he could have a functional media remote with classic lines and 70s styling.

Each of the digits on the phone were wired up to a small solderless breadboard. With a handful of resistors, [Kees] set up a simple pull up/pull down circuit feeding in to his Raspi’s GPIO input.

With a short Python script, [Kees] managed to map the buttons to XMBC’s play/pause, volume up/down, next, and previous commands. There were a few buttons left over, so those were mapped to online radio stations, playlists, and a strange setting known only as ‘moo’. We’re not sure what that button does, but you can see the other functions of this XMBC phone remote in action in the video below.


32 thoughts on “Turning A Phone Into A Media Center Remote

  1. glad to see someone decided to do the same.

    i went a slightly(EDIT COMPLETELY)
    different route but got somewhat same results :)

    PS: im a fan of telephony equipment…
    (RX,TX,and PWR all in two conductors)

    PPS: DTMF is complicated to *DECODE*
    but pulse-dialing doesnt need decoding…
    can be counted by logic chips;
    ex: 4017, 4029, 4094, 74595,ect,ect

  2. Interesting. While I understand it’s supposed to be a part of the interior decor, for me it would be taking up space. Space where I could set my beer and sandwich plate

    1. You could use an ATM-keypad, some of them are countersunk and can support some weight. You can sometimes find them at metal-yards whenever old ATMs are being tossed.

    1. Had one of those a few years ago. From a car boot sale, a fiver. Meanwhile in some terrible hipster shop in Brighton (literally the pretensious hipster capital of Europe, no, I mean it) the same thing costs 70 quid.

      They did have those nice old Trimphones from the 70s though. They have a certain style of their own, and were very popular a few years back. I think they still fetch good money now. The main reason is, up until the 1980s you weren’t allowed to plug your own equipment into the phone line. The GPO (General Post Office) ran the UK’s network, and would only lease the actual telephones, not sell them. So few people actually owned one to start with, they mostly went back in exchange for whatever other phone people wanted.

      A proper ringing phone with a bell is good if you use your phone network to make alarm calls. You’ll DEFINITELY wake up!

  3. I’m also a little disappointed there’s no audio piped through the handset – If you go the pulse-dial route, you could add a really annoying ‘automated dial-in’ style audio menu. No need for a visual interface. ;)

  4. Looks like Moo makes xbmc play an audio sample of a cow mooing. [Kees], if you see this, I’d love to hear the reasoning behind that. Sounds like a good story.

  5. Even cooler would be to have it play a dial tone through the handset speaker and make DTMF tones through it too. Then when someone tries to make a call they’ll be wondering WTH is going on with the entertainment system.

    1. Now that seems more worthwhile! Or, you could have it run the home-automation system… “Why do my lights keep going on and off? Is that my garage door opening and closing? WTF??? Just what number did you dial anyway?”

  6. There is a simpler way to use GPIO on an RPi from the circuit shown in Kees’ site. An external pullup (R1 in his schematic) connected to VCC is not needed as the RPi input ports can be configured with a pullup resistor. A resistor connected to a GPIO input is not needed as long as you can be assured the GPIO won’t be configured as an output, i.e. you are willing to have the chip fried as punishment for a software configuration error.

    One could also use a matrix instead of 1 GPIO per key as long as you don’t need to read simultaneous press events, and you have access to both pins of each switch. Connect one end of each button to a vertical wire, 3 columns to a GPIO output, the other into horizontal rows, 4 rows to 4 inputs. Then only 7 inputs and (optional) resistors are needed instead of 12.

    A matrix detects no-press and single press states. Double press events can be detected, but gets more complex, and can’t be distinguished from certain combinations of 3 or more presses. (Connect one column to output 1 (high), the others and row inputs to pulldown. The state of the 4 keys in the column appear in the inputs, and some key press in other columns is detected on those inputs.)

  7. Holy orange phone, Batman.

    Mapping media functions to a strictly numeric keypad isn’t something you should do unless you *have* to.

    I just used one of the X10 RF media remotes (UR47A) and an RF-to-serial converter. Inexpensive. I chose to write my own program for it, which reads incoming serial data. Some buttons are converted to simulated key presses and/or API calls, using a translation table based on which media program is detected to be running (XBMC, MPC, VLC, Winamp, etc.), A few others kill any currently running media programs, and launch a specific program; optionally with an existing or dynamically created playlist.

    It may not be hip, retro, chic, or orange; but I can live with that.

      1. Afraid not. I’m bad about that, very few of my projects are publicly documented. I can provide a bit more detail for you though. (Apologies to others for what turned out to be a long post).

        I already mentioned the UR47A RF remote. Now out of production, but it’s my preferred one, and they can occasionally be found on Ebay. I tried a couple of others with poor results. The newer UR74A doesn’t auto-repeat when you hold down something like fast forward, which limits its usefulness. Another by IBM sent the same code for Play, Pause, and Stop (wth?); and no codes at all for many buttons. There may be others that work well.

        The RF receiver is the MR26A, also out of production. Preferred because it plugs into a serial port (or serial-to-USB adapter), so it’s universal and easy to use; there’s a newer version that connects directly via USB, but that requires using X10’s API, which I’d rather avoid. Does require some RS-232 status lines to be high (I forget which) as it takes power from them but otherwise ignores their state; set them all high and you’re covered. Then fire up a terminal program that displays input in hex, and mash buttons on the remote to learn the codes for each button. If the remote supports several RF protocols, try each, some may work better than others in terms of buttons supported, code uniqueness, etc. You’ll notice that codes are sent repetitively. IIRC, for example the UR47A repeats 5x for the initial button press, and 2x for subsequent auto-repeats when the button is held down. Two reasons for this. First, the receiver often fails to receive the first repetition or two as its AGC adjusts to the new signal. Second, ignoring any code that is only received once helps reduce false detections.

        The software is written in VB.NET because I’m a career Windows dev, and it’s the language I code fastest in so preferred for personal projects; but it could be written for or in anything. It decodes the signal based on the button codes manually determined; also taking time and number of repetitions to account to filter out both false detections and needless repetitions (but still allowing auto-repeat when a button is held down). Then it scans the open window list for known media players. If only one is found, it makes it the active window (if it’s not already), then sends the appropriate simulated keystroke. If more than one is found, it sends to whichever is active; if none are, it uses a speech synth to say it can’t determine which is correct. In that case, I can press one of the buttons which closes all media players, and launches/activates/maximizes a specific one.

        If you can replicate my project up to this point, any other features don’t need description, as it’ll be cake for you to add them. It could probably be replicated in a few days, as none of it was particularly difficult; except discovering what I’ve described above.

        Sorry I can’t share my code, as separating it from the larger project it’s in then cleaning and documenting it would take longer than writing it did. And right now I’m working on something quite time consuming (which I am planning to share). But happy to provide this at least. And will try to answer any specific questions you might have.

    1. Can’t disagree with that. But in this case, the whole point was “hip, retro, chic, and orange” I’m fairly certain it is more for the “cause I can” factor. Why else would you add a button that makes your TV moo? That I can understand. I do it all the time. Still, your right. This is not an example of how to sensibly control media, and as such, a numeric keypad would not be a good idea.

  8. Reblogged this on Polytech's WordPress Place and commented:
    Now, here is a strange but interesting in a true hacking (phracking even) way remote control device. I was totally expecting there to be the need to pick up the receiver first in order to dial the commands (and hear DTMFs as you do) but that functionality was left out.

    It’s surprising that an entire Raspberry Pi had to be used only for servicing a 12 button keyboard but I think the author was not satisfied with XBMC performance on Raspberry Pi and so the board was available for other uses.

    It would be cool, however, to have the Raspverry Pi inside the phone set’s body with an HDMI on the back, hooked up to a TV. Would make for a pretty funky retro-looking multimedia player!

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.