WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: LIRC - Infrared controlling the RaspberryPI - Success in compiling from scratch  (Read 10100 times)

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
 :) Thanx to bmarkus for his excellent support, and the Picore with preinstalled SSH!

I succeded in building the LIRC (Linux Infrared remote control).
Inspired from here http://marks-space.com/2013/10/24/how-to-control-the-gpio-on-a-raspberry-pi-with-an-ir-remote/,
and here http://www.lirc.org/  :)

I can now, control my squeezelite https://code.google.com/p/squeezelite/ volume, with my Apple remote.

If anyone feels the use for it themself, i will try to explain here, what to do, for compiling it.
The LIRC, can be very confusing, as there is a lot of ways to do it - The TinyCore way, could be done like this :

Install Picore just like bmarkus explain here http://forum.tinycorelinux.net/index.php/topic,16439.msg97765.html#msg97765

Find/install the packages (not all is needed) :
compile-essentials.tcz
dialog.tcz
libiconv-dev.tcz
i2c-tools.tcz
git.tcz
openssl-1.0.0-dev.tcz


then download/unpack latest LIRC http://sourceforge.net/projects/lirc/files/LIRC/0.9.0/lirc-0.9.0.tar.bz2/download

I have a lot of head headache figuring out, what kind of driver the lirc must be compiled for.
But finally i ended up with the userspace :

./configure --with-driver=userspace
make


I did not do the sudo make install, as i do not know howto keep that persistance - Neither i don't know howto (yet) build a tcz-package.

I created a folder in /mnt/mmcblk0p2/tce/lirc - where i unpacked the LIRC.

So i now have the LIRC executeable commands in /mnt/mmcblk0p2/tce/lirc/lirc-0.9.0
The daemons is in /mnt/mmcblk0p2/tce/lirc/lirc-0.9.0/daemons, and the tool in /mnt/mmcblk0p2/tce/lirc/lirc-0.9.0/tools.

You really have to study the LIRC, for understanding and making it work, but please feel free to ask.

My /opt/bootlocal file looks like this - This is working very good for my setup

Quote
#!/bin/sh
# put other system startup commands here

modprobe lirc_dev
modprobe lirc_rpi gpio_in_pin=18

rm -r /var/run/lirc
mkdir /var/run/lirc

# mkdir /etc/lirc
# cp /mnt/mmcblk0p2/tce/lirc/lirc-0.9.0/lircd.conf /etc/lirc/lircd.conf

chmod 666 /dev/lirc0

/mnt/mmcblk0p2/tce/lirc/lirc-0.9.0/daemons/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd \
--pidfile=/var/run/lirc/lircd-lirc0.pid /mnt/mmcblk0p2/tce/lirc/lirc-0.9.0/lircd.conf

/mnt/mmcblk0p2/tce/lirc/lirc-0.9.0/tools/irexec -d /mnt/mmcblk0p2/tce/lirc/lirc-0.9.0/lircrc

/usr/local/etc/init.d/openssh start

/mnt/mmcblk0p2/tce/player/squeezelite-armv6hf -n Tiny-squeeze -a 80:4 -o hw:CARD=D20

amixer sset 'DIYINHK Clock Selector' 123 unmute
amixer sset 'DIYINHK Clock Selector' on

All my config files (lircd.conf & lircrc), i keep in /mnt/mmcblk0p2/tce/lirc/lirc-0.9.0 :

Quote
tc@box:/mnt/mmcblk0p2/tce/lirc/lirc-0.9.0$ ls
ANNOUNCE          Makefile.am       aclocal.m4        config.log        configure.sh      drivers/          missing           stamp-h1
AUTHORS           Makefile.in       autom4te.cache/   config.status     contrib/          install-sh        remotes/          tools/
COPYING           NEWS              compile           config.sub        daemons/          libtool           setup-driver.sh
ChangeLog         README            config.guess      configure         data2setup.sh     lircd.conf        setup.data
INSTALL           TODO              config.h          configure.ac      depcomp           lircrc            setup.sh
Makefile          acinclude.m4      config.h.in       configure.lineno  doc/              ltmain.sh   


I REALLY hope, that i can help some, which would like the LIRC on TinyCore RaspberryPI on theyre way.

I had been using A LOT of hours, figuring all this out.

THANX A LOT FOR THIS SUPERb distribution  8)

// Jesper.
















Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Hi Jesper.

Congratulation, you have come a long way.

Steen

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11567
Hi lykkedk
Quote
... i don't know howto (yet) build a tcz-package.
Instructions on how to make extensions can be found here:
http://wiki.tinycorelinux.net/wiki:creating_extensions

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Steen thank you :)

And hey, sry. I forgot answering youre last email!

Rich, i will when time excist :) try to make an lirc.tcz

// Jesper

Offline petrasl

  • Newbie
  • *
  • Posts: 2
Briliant! I almost a week trying to setup lircd on my picore. Thanks a toon!
Regards
PetrasL

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Hi thanks...

Post 1928 and forward in this thread linked, i have another setup of the lirc... With a lirc.tcz file and so on..

Read it if you like... My username there is jesperlykke

http://forums.slimdevices.com/showthread.php?97803-piCoPlayer-Squeezelite-on-Microcore-linux-An-embedded-OS-in-RAM-with-Squeezelite/page193

Regards;
   Jesper.