Marc's Public Blog - Linux Hacking


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Diving | Dreamstate | Edc | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Monuments | Museums | Oshkosh | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips



This page has a few of my blog entries about linux, but my main linux page is here
Picture of Linus

Here is a list of older linux event reports I made before my blog was started, then the rest are below
1996/11/18-21:Linux Pavillion Comdex Fall 1996 (photos only). I've been going since then to help at the linux pavillion.
1997/11/18-21: Linux Pavillion Comdex Fall 1997 (photos only)
1998/05/28-30: Linuxexpo 1998 (photos only)
1998/11/16-20: Linux Pavillion Comdex Fall 1998 (full report)
1998/11/11: Silicon Valley Tea Party (report with pictures)
1999/02/15: Windows Refund Day (report with pictures)
1999/03/20: SVLUG KTEH night (photos only)
1999/03/01-04: LinuxWorld Expo Winter 99 (complete report with many pictures)
1999/03/31: Mozilla Party one year anniversary (photos only)
1999/05/18-22: Linuxexpo 1999 (complete report with many pictures)
1999/06/07: June 99 Balug meeting with Linus
1999/08/09-12: LinuxWorld Expo Summer 99 (complete report with many pictures)
1999/11/15-19: Linux Business Show at Comdex Fall 1999 (full report with pictures)
2000/08/14-17: LinuxWorld Expo Summer 2000 (complete report with many pictures)
2001/01/17-20: Linux.conf.au/LCA 2001 (complete report with pictures)
2001/07/25-28: OLS 2001 (photos only)
2001/08/25: Linux 10th Anniversary (report with pictures)
2001/09/27-30: LinuxWorld Expo Summer 2001 report with pictures)
2001/11/05-10: ALS 2001 (photos only)
2002/06/26-29: OLS 2002 (photos only)
2003/01/20-25: LCA 2003 (photos only)
2003/07/23-26: OLS 2003 (photos only)
2004/01/12-17: LCA 2004 (photos only)
2004/07/21-24: OLS 2004 (photos only)
2005/04/18-23: LCA 2005 (photos only)
2006/01/24-28: LCA 2006 (photos only)
2007/01/17-21: LCA 2007 (photos only)

Here is a list of all the talks I've given:

And below are my blog posts:

Table of Content for linux:

More pages: July 2002 February 2004 March 2004 November 2004 April 2005 August 2005 January 2006 July 2006 August 2007 November 2007 January 2008 October 2008 November 2008 December 2008 January 2009 May 2009 July 2009 August 2009 September 2009 November 2009 December 2009 January 2010 March 2010 April 2010 June 2010 August 2010 October 2010 January 2011 July 2011 August 2011 December 2011 January 2012 March 2012 May 2012 August 2012 December 2012 January 2013 March 2013 May 2013 September 2013 November 2013 January 2014 March 2014 April 2014 May 2014 October 2014 January 2015 March 2015 May 2015 January 2016 February 2016 June 2016 July 2016 August 2016 October 2016 January 2017 September 2017 January 2018 March 2018 December 2018 January 2019 January 2020 May 2020 January 2021 September 2021 March 2023 April 2023 December 2023 June 2024



2004/03/25 TV and remotes with linux
π 2004-03-25 00:13 by Merlin in Linux, Linuxha

Current Music: DJ Tiƫsto - Live At Innercity - Norefjell
Current Mood: Yeah another long time project finally completed

So, those who've visited my house know that I have a sick system where I use
X10 wireless remotes, that get picked up by a receiver in the wall, which
transforms the signals from RF to electrical signals, which then get picked up
by a receiver in my linen^H^H^H^H^Hcomputer closet, which transforms this into a command for my serial port, which is read by a linux daemon, which in turn runs commands of my choosing, like changing the music or the volume (it's especially awesome under the shower, because I can use a throwaway wireless remote, and still control the music. I'm sure you'll agree that it is very important to be able to do so ;-)

Anyway, I also have another PC that is my video server, and plays files from another server (my disk server), and sends the video in a S-Video cable that goes under the house and reaches my TV.
So far, so good, except that I had to use my laptop on my couch to control the video and pause it or whatever (this turned out not to be a great problem since my laptop is always on my couch, but I digress).

So, I have some TV capture card with an IR receiver, and an IR remote. With a little work, I found and setup some linux software to receive the IR codes from the remote, and pass them on as commands to mplayer, a video player on linux.
This wasn't bad, except that I have to point the IR remote in my back, towards the PC, which is nowhere near the TV, and it wouldn't even work at all if I can see the TV but I'm a place in the room where my IR remote can't reach the IR receiver.
So, I had that working a couple of years ago, but I never really used it because it was a clearly inferior and imperfect solution that no self respecting geek would bring himself down to using :)

That's where my mouseremote comes in. This handy little sucker looks like a 5 way learning remote, also supports sending X10 events (i.e. to control my lights, and also my music from the closet), and then it also sends two more sets of RF signals that get picked up by another computer. The first set allows me to move the mouse on my TV screen for the PC I use to play videos, and the second set allows me to send random keys from the remote and have them used by the PC.
This is where the interesting part comes in: using those keys to do interesting stuff, like controlling the video so that I can just use my mouseremote like a regular remote, except that I'm talking to a PC that's not even within line of sight.
I wouldn't want to further bore you with technical details, and you can find them here should you really be curious (considering that it took me a little while to get it working, I documented it so that the next guy who tries this doesn't have to spend as much time than me). I'll just leave you with the (admittedly somewhat insane) list of things that happens in real life when you press play:
  1. the mouseremote sends an RF signal with the key I pressed
  2. multimoused on linux reads from the serial port and receives a translation of the RF signal
  3. it generates mouse events into the /dev/mumse fifo
  4. it separates and sends keypresses (like DVD+1) to /dev/x10fifo
  5. MouseRemote reads from the fifo and executes commands as directed in MouseRemote.conf
  6. MouseRemote.conf calls irsend, like so ' irsend SEND_RELAY "0000000000001005 00 5" Hauppauge ', which tricks the patches lircd to think I used my IR remote to send this code
  7. I'm running a patched lircd that understand this special trick, and relays it to its fifo as if it were coming from the infrared remote
  8. mplayer, running in lirc mode, reads from the lircd fifo, parses ~/.lircrc, receives the fake IR code, and pauses or resumes the video

See, it's really simple :)
I only got that working last night once I got the special evil trick to generate fake IR events in lircd, as if I were using my IR remote. We'll put aside the fact that I've owned the remote for mmmh, 4 years now :-)
Eh, at least I get points for documenting all this , so as to make it easier for the next guy...

Anyway, that's when you get to witness someone next to me in my couch, me pressing play or pause on my remote, the video stopping or starting as appropriate, me displaying a huge grin on my face, and the person next to me wondering "what's up with him, he pressed pause, the video paused, what's so special about that?".
If they only knew ;-)))

This is where I also get to say a few words about linux vs windows.
With windows, I would definitely have spent less time on all this: either I would have found some complex software that someone wrote and that happened to do what I needed, or I would have been entirely out of luck.
With linux, it took me a fair number of hours to make this all work (10 or so), but once I found that the main pieces existed (IR and RF readers) I knew that I could write the missing glue to make it all work together. In its own way, if you are into this, it's really rewarding to not only know it all works, but to have been able to make it work and piece it up together...

Eh, everyone needs a hobby, or two, or three, or... Oh, whatever, just let it be :)

Actually, if I get really bored, I'll have to setup freevo and MythTV on one, or several of my PCs, to turn them into more tivos (although that would probably also mean that I'd have to shell out some bucks to buy a small and quiet computer, and I have that stupid bet with myself that I have so much hardware already that I don't need to buy more computers (and I haven't bought a computer in more than 5 years, everything I have is from excess spare parts that I put together).
Anyway, I already have a Tivo and ReplayTV, and I don't *really* need to be watching more TV, and I don't really have the time to get bored, but you never know :)

More pages: July 2002 February 2004 March 2004 November 2004 April 2005 August 2005 January 2006 July 2006 August 2007 November 2007 January 2008 October 2008 November 2008 December 2008 January 2009 May 2009 July 2009 August 2009 September 2009 November 2009 December 2009 January 2010 March 2010 April 2010 June 2010 August 2010 October 2010 January 2011 July 2011 August 2011 December 2011 January 2012 March 2012 May 2012 August 2012 December 2012 January 2013 March 2013 May 2013 September 2013 November 2013 January 2014 March 2014 April 2014 May 2014 October 2014 January 2015 March 2015 May 2015 January 2016 February 2016 June 2016 July 2016 August 2016 October 2016 January 2017 September 2017 January 2018 March 2018 December 2018 January 2019 January 2020 May 2020 January 2021 September 2021 March 2023 April 2023 December 2023 June 2024

Contact Email