In our college our department has an expo based on LINUX .In that our team had selected to do LIRC.
You may ask what is LIRC?
To know in detail about lirc refer the site “www.lirc.org”
I searched how to do this project in linux.In that i had seen a website “lnx manoweb.com”.
In that they given how to do an lirc receiver.The components neede are
-
TSOP 1738 Irreceiver
- C1 – 4.7µF capacitor
- D1 – 1N4148 diode
- R1 – 4k7 resistor (4.7 kOhm)
- IC2 – 78L05, 100mA, voltage regulator (TO-92 casing)
- 9-pin or 25-pin SUB-D socket
The circuit is connected as in “manoweb.com” and we get the LIRC Receiver.
Connect to the serial port of the system and do the following
- Download pacakage of lirc(lirc-0.8.5.tar.bz2)
extract it as “tar jxvf lirc-0.8.5.tar.bz2”
After this all the command are done in terminal of linux. We had downloaded lirc package in desktop.
In terminal we do the following
-
cd Desktop
2. cd lirc-0.8.5
3. ./setup.sh
setup.sh written by Karsten Scheibler, 1999-JUN-28
If you have problems or questions please consult the mailing list
<http://lists.sourceforge.net/mailman/listinfo/lirc-list>
Configuration: .setup.config, executable shell script: configure.sh
Starting the generated shell script which will call configure with the right
parameters…
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… no
checking for mawk… mawk
checking whether make sets $(MAKE)… yes
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for style of include used by make… GNU
checking dependency style of gcc… gcc3
checking whether gcc and cc understand -c and -o together… yes
checking for a BSD-compatible install… /usr/bin/install -c
checking whether make sets $(MAKE)… (cached) yes
checking for mknod… /bin/mknod
checking for mkfifo… /usr/bin/mkfifo
checking for depmod… /sbin/depmod
checking for libusb-config… no
checking whether ln -s works… yes
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for a sed that does not truncate output… /bin/sed
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for ld used by gcc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for /usr/bin/ld option to reload object files… -r
checking for BSD-compatible nm… /usr/bin/nm -B
checking how to recognise dependent libraries… pass_all
.
.
.
.
.
Now enter ‘make’ and ‘make install’ to compile and install the package.
kamban@kamban-desktop:~/Desktop/lirc-0.8.5$
4.sudo make
5.sudo make install
Afer this it is necessary to connect lirc receiver in the system
6.sudo setserial /dev/ttyS0 uart none
7.sudo depmod -a
8.sudo modprobe lirc_serial
9.sudo lircd
After this some time we get the error
lircd: there seems to already be a lircd process with pid 12653
lircd: otherwise delete stale lockfile /var/run/lircd.pid
10.sudo rm/var/run/lircd.pid
then give
sudo lircd
12.sudo mode2
mode2:could not open /dev/lirc
mode2: default_init(): Device or resource busy
to remove this we give this command
13.sudo rm/dev/lirc
then give the command
sudo mode2
after this we get the pulse
pulse 100
space 123
.
.
.
.
.
.
.
.
to quit from this ctrl c
then record it using
14. sudo irrecord /etc/lircd.conf
if any error appears then record it by
15.sudo irrecord -f /etc/lircd.conf
we can record it with our own name to the button by disabling the default button.
16. sudo irrecord /etc/lircd.conf –disable namespace
now record the signal for each button by holding the button.
After this we give restart the lircd then
17.sudo irw
it will test our remote
The connection of our system with remote had been done succesfully if upto this step is done .
If you have doubt inthe above description please refer “lnx.manoweb.com”
In our project we did how to connect an mplayer with the remote and we done it by downloading
Mplayer-mingw.zip
installing it by refer the procedure
In terminal we give
cd which come out from desktop
1. $ mplayer
2.$ mplayer -lircconf saranya.conf
3.$ sudo mplayer -lircconf saranya.conf *.mp3