Adding an infrared remote: lirc + mic input
Posted: Wed Jul 13, 2011 1:13 pm
First of all I'm using a bcm63xx board (livebox dv4210). The Openwrt version I'm using is one of latest trunks: bleeding edge, r27198
The board has not many differences with the wl-520gu, small ram (16 MiB), small processor (mips 256 MHz), one usb 1.1, and a b43 minipci wifi with opensource drivers ( it works quite fine in latest trunks).
For getting it work i used this schematic for the IR receiver:
http://files.myopera.com/danitool/liveb ... rcalsa.jpg
Probably you don't need to solder the mic input ground, because the usb is already grounded to it and shares the ground with the board, I didn't and it works. Consequently you only need to solder one wire to the usb card. Or if you prefer make an external receiver to plug it with a stereo jack, I did it the first time for testing, but I don like stuff hanging on the board, so finally i fitted it inside my router.
The second thing is to prepare the lirc package. Unfortunatelly the receiver type is hardcoded into the makefile package, and in the trunk I'm using there are some lost utilities, I fixed it, this is the makefile and my files for the lirc package (located under trunk/feeds/packages/utils/lirc/) , it includes my remote keys, and irexec commands for the remote.
http://files.myopera.com/danitool/liveb ... ackage.zip
Because the new mpd is fat as a cow, and my board has little resources, I ported and striped mpd 0.13.2 to this trunk I'm using. (trunk/feeds/packages/sound/mpd/)
http://files.myopera.com/danitool/liveb ... ackage.zip
Finally I compiled unselecting stuff I don't need (ie: I dont need ssh or iptables..). You know mpd is a RAM eater, little kernels, and elimiating daemons will give you more available ram.
Ok for making the receiver work first lets launch the lircd:
You need to calibrate the reception, it can be done adjusting the Mic input in alsamixer (capture devices pressing F4). For me putting Mic to 62 does the job. You can set it with the command:
launch the irexec daemon for executing the stuff you want on receiving IR signals:
I used spare parts for the Ir circuit, also the remote is an unused one I had (almost every remote can work with alsa), Then the cost was 0 € for me, except some hours of fun . Ok, all working fine, I can select internet radios with the remote and I love it, isn't it cool?. Also as an extra and because I didnt build the lcd panel I added the package ssmtp, associated with a button at the remote. When I listen a cool song i like i press that button and automagically my wifiradio sends an email to my account with the title of the song, artist, etc. Also I soldered a buzzer to a gpio, for beeping on some events (just fun).
and this is the result
I can provide more details if someone interested
The board has not many differences with the wl-520gu, small ram (16 MiB), small processor (mips 256 MHz), one usb 1.1, and a b43 minipci wifi with opensource drivers ( it works quite fine in latest trunks).
For getting it work i used this schematic for the IR receiver:
http://files.myopera.com/danitool/liveb ... rcalsa.jpg
Probably you don't need to solder the mic input ground, because the usb is already grounded to it and shares the ground with the board, I didn't and it works. Consequently you only need to solder one wire to the usb card. Or if you prefer make an external receiver to plug it with a stereo jack, I did it the first time for testing, but I don like stuff hanging on the board, so finally i fitted it inside my router.
The second thing is to prepare the lirc package. Unfortunatelly the receiver type is hardcoded into the makefile package, and in the trunk I'm using there are some lost utilities, I fixed it, this is the makefile and my files for the lirc package (located under trunk/feeds/packages/utils/lirc/) , it includes my remote keys, and irexec commands for the remote.
http://files.myopera.com/danitool/liveb ... ackage.zip
Because the new mpd is fat as a cow, and my board has little resources, I ported and striped mpd 0.13.2 to this trunk I'm using. (trunk/feeds/packages/sound/mpd/)
http://files.myopera.com/danitool/liveb ... ackage.zip
Finally I compiled unselecting stuff I don't need (ie: I dont need ssh or iptables..). You know mpd is a RAM eater, little kernels, and elimiating daemons will give you more available ram.
Ok for making the receiver work first lets launch the lircd:
Code: Select all
lircd --driver=audio_alsa -d plughw@12000
Code: Select all
amixer set Mic capture 62%
Code: Select all
irexec --daemon /etc/wifiradio/lircrc
and this is the result
I can provide more details if someone interested