NOTE! This site uses cookies and similar technologies.

If you not change browser settings, you agree to it.

I understand

Welcome, Guest
Username: Password: Remember me

TOPIC: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 2 weeks ago #31

  • DmitrySh
  • DmitrySh's Avatar
  • Offline
  • Junior Boarder
  • Posts: 65
  • Thank you received: 2
  • Karma: 0
WOOOHOOO!!! Finaly it's work!!!
Big thanks to you roadkill for your patience! For answering on my stupid questions.
I think the problem was in creating autostart.sh file. I create it from shell with touch and change permission with chmod but edit it with nano. Copy-paste your script from first post and reboot. I saw in processes that scrip is loaded but irw don't recognize commands. After that i kill all lirc from comand line and start exec comand from shell manually and all start working. After that i recreate autostart.sh and open download it on PC and edit it with simple notepad, upload, reboot - ALL WORKS!!!
Last Edit: 5 years 2 weeks ago by DmitrySh.
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 2 weeks ago #32

  • roadkill
  • roadkill's Avatar
  • Offline
  • Senior Boarder
  • Posts: 120
  • Thank you received: 13
  • Karma: 5
DmitrySh wrote:
WOOOHOOO!!! Finaly it's work!!!
Big thanks to you roadkill for your patience! For asking on my stupid questions.
I think the problem was in creating autostart.sh file. I create it from shell with touch and change permission with chmod but edit it with nano. Copy-paste your script from first post and reboot. I saw in processes that scrip is loaded but irw don't recognize commands. After that i kill all lirc from comand line and start exec comand from shell manually and all start working. After that i recreate autostart.sh and open download it on PC and edit it with simple notepad, upload, reboot - ALL WORKS!!!
That's great.. a tiny IR receiver is a nice modification to have B)
Raspberry Pi Rev2 512MB
CuBox-i4Pro
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 2 weeks ago #33

  • DmitrySh
  • DmitrySh's Avatar
  • Offline
  • Junior Boarder
  • Posts: 65
  • Thank you received: 2
  • Karma: 0
Last one dream - implement all this drivers and settings in developers builds :whistle:
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 2 weeks ago #34

  • DmitrySh
  • DmitrySh's Avatar
  • Offline
  • Junior Boarder
  • Posts: 65
  • Thank you received: 2
  • Karma: 0
roadkill wrote:
That's great.. a tiny IR receiver is a nice modification to have B)
And it cost for me (as for most of us) less than 1USD + some hours to digg in linux :woohoo:
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #35

  • roadkill
  • roadkill's Avatar
  • Offline
  • Senior Boarder
  • Posts: 120
  • Thank you received: 13
  • Karma: 5
new build posted today has many upgrades.. it also feels snappier and has many upgrades
I'm running it myself so I can recommend it :P
Raspberry Pi Rev2 512MB
CuBox-i4Pro
Last Edit: 5 years 1 week ago by roadkill.
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #36

  • Katch
  • Katch's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
Can someone help me get this working on my Pi please?

My IR tsop module is installed and functioning correctly in a different distro using the gpio lirc driver.

I've installed the latest binary snapshot (20120511) from the first post.

First boot I kept a mouse plugged in so that I could install Nano (hate vi)

Reboot and then I did the following;
touch /storage/.config/autostart.sh
chmod +x /storage/.config/autostart.sh
nano /storage/.config/autostart.sh

I added this in to autostart.sh using Nano;
#!/bin/sh
(killall lircd; \
/usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd-lirc0.pid /storage/.config/lircd.conf; \
)&

I then did;
nano /storage/.config/lircd.conf

and added the contents of the lircd.conf.mceusb file from the first post.

After another reboot I'm not getting any response from my remote either in the XBMC gui or in IRW over ssh...

dmesg returns;
root ~/.config # dmesg | grep lirc_rpi
[    1.412659] lirc_rpi lirc_rpi.0: lirc_dev: driver lirc_rpi registered at minor = 0
[    1.412683] lirc_rpi: driver registered!
[    2.368342] lirc_rpi: auto-detected active high receiver on GPIO pin 18
root ~/.config #

I've checked the contents of /storage/.config
root ~/.config # ls
aacs                 lircd.conf           samba.conf.sample
autostart.sh         modprobe.d           udev.rules.d.sample
hosts.conf           remote.conf          vlls
root ~/.config #

everything seems to be in place.

If I execute the ./autostart.sh over ssh I get this;
root ~/.config # ./autostart.sh
root ~/.config # ./autostart.sh: line 4: --output=/var/run/lirc/lircd: No such file or directory
./autostart.sh: line 5: /storage/.config/lircd.conf: Permission denied

Not sure if there is something wrong there.

Any idea what I'm missing?
Last Edit: 5 years 1 week ago by Katch.
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #37

  • active89
  • active89's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Hi!

Are the IR-Signals recognized?
Try this code
mode2 -d /dev/lirc0
Then you should get an output like this:
space 379
pulse 472
space 439
...
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #38

  • Katch
  • Katch's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
root ~ # mode2 -d /dev/lirc0
mode2: could not open /dev/lirc0
mode2: default_init(): Device or resource busy
root ~ #


EDIT

ran killall lircd

then mode2

mode 2 picks up my remote key presses. Seems to take a long time though.
Last Edit: 5 years 1 week ago by Katch.
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #39

  • DmitrySh
  • DmitrySh's Avatar
  • Offline
  • Junior Boarder
  • Posts: 65
  • Thank you received: 2
  • Karma: 0
Strange... stop working in my case after reboot... but few advices for newbies...
try killall lircd from command line (ssh)
after ir execute this string
/usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd-lirc0.pid /storage/.config/lircd.conf
and launch
irw

than press some keys on remote and look at the ssh screen, is it some output there?

I have this output but autostart.sh don't start automatically.... maybe some changes in new builds....

have strange output in few seconds after reboot, after colored screen
[0.000000] timer_set_mode: unhandled mode:1
[0.000000] timer_set_mode: unhandled mode:3
[0.755286] bcm2708_gpio: bcm2708_gpio_probe c0a7e7d8
[0.863858] vcos: [1]: vchiq: initialised - version 2 (min 2), device 252.0
[1.387637] mmc0: error -84 whilst initialising SD card
[1.487395] mmc0: error -84 whilst initialising SD card
[1.591667] mmc0: error -84 whilst initialising SD card
[1.719482] mmc0: error -110 whilst initialising SD card
Last Edit: 5 years 1 week ago by DmitrySh.
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #40

  • Katch
  • Katch's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
Ok, just double checked I'm not going crazy - GPIO IR is definitely working on my RaspBMC SD card with just the addition of lirc_rpi to modules and cp the contents of rc6-mce-lircd.conf to lircd.conf.

So hardware is definitely fine.

after killall lircd - i get output from mode 2

After trying your code above and then irw - nothing.

EDIT -

I'm going to try a complete fresh start again...

EDIT -

Still not working...

roadkill - any ideas? Would be nice if we could get a step by step guide to using your pre-built binaries. Following the post as it stands doesn't seem to work.
Last Edit: 5 years 1 week ago by Katch.
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #41

  • roadkill
  • roadkill's Avatar
  • Offline
  • Senior Boarder
  • Posts: 120
  • Thank you received: 13
  • Karma: 5
Katch wrote:
Ok, just double checked I'm not going crazy - GPIO IR is definitely working on my RaspBMC SD card with just the addition of lirc_rpi to modules and cp the contents of rc6-mce-lircd.conf to lircd.conf.

So hardware is definitely fine.

after killall lircd - i get output from mode 2

After trying your code above and then irw - nothing.

EDIT -

I'm going to try a complete fresh start again...

I'm using the exact same build so I know it works fine... my guess is that the autostart.sh file is somehow faulty
I'll have a new build uploaded in a few hours.. there were many updates during the last 24 hours
but your autostart.sh file is the problem
try running the command bit by bit to identify the issue
killall lircd
/usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd-lirc0.pid /storage/.config/lircd.conf

and try running mkdir -p /var/run/lirc/ just in case... ;)
Raspberry Pi Rev2 512MB
CuBox-i4Pro
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #42

  • DmitrySh
  • DmitrySh's Avatar
  • Offline
  • Junior Boarder
  • Posts: 65
  • Thank you received: 2
  • Karma: 0
This stop works for me too... just reboot RPi this evening (from GUI by remote) after that no responce for remote
Go into shell, looks like all necessery processes are started, launch the autostart script by hans, and have irw responce but still no repsponce from remote
root ~ # /storage/.config/autostart.sh 
root ~ # irw
000000037ff07be1 00 Up mceusb
000000037ff07be1 01 Up mceusb
000000037ff07be1 02 Up mceusb
000000037ff07be0 00 Down mceusb
000000037ff07be0 01 Down mceusb
000000037ff07be0 02 Down mceusb
000000037ff07bde 00 Right mceusb
000000037ff07bde 01 Right mceusb
000000037ff07bde 02 Right mceusb
000000037ff07bdf 00 Left mceusb
000000037ff07bdf 01 Left mceusb
000000037ff07bdf 02 Left mceusb
000000037ff07bdd 00 OK mceusb
000000037ff07bdd 01 OK mceusb
000000037ff07bdd 02 OK mceusb
Last time i think problems was in autostart.sh syntax and so on, but seams it's not the case...

Maybe it's good idea to put this autostart.sh file in first post (as file)?
Last Edit: 5 years 1 week ago by DmitrySh.
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #43

  • Katch
  • Katch's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
DmitrySh wrote:
WOOOHOOO!!! Finaly it's work!!!
Big thanks to you roadkill for your patience! For answering on my stupid questions.
I think the problem was in creating autostart.sh file. I create it from shell with touch and change permission with chmod but edit it with nano. Copy-paste your script from first post and reboot. I saw in processes that scrip is loaded but irw don't recognize commands. After that i kill all lirc from comand line and start exec comand from shell manually and all start working. After that i recreate autostart.sh and open download it on PC and edit it with simple notepad, upload, reboot - ALL WORKS!!!

Can you explain in more detail what you did here? I'm in exactly the same place as you were - I get output when running mode2 - and everything seems to be in the right place - but I get no output from IRW and no control of XBMC at present.

What exactly did you change between this post and the last to get it working?
The administrator has disabled public write access.

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #44

  • roadkill
  • roadkill's Avatar
  • Offline
  • Senior Boarder
  • Posts: 120
  • Thank you received: 13
  • Karma: 5
DmitrySh wrote:
This stop works for me too... just reboot RPi this evening (from GUI by remote) after that no responce for remote
Go into shell, looks like all necessery processes are started, launch the autostart script by hans, and have irw responce but still no repsponce from remote
root ~ # /storage/.config/autostart.sh 
root ~ # irw
000000037ff07be1 00 Up mceusb
000000037ff07be1 01 Up mceusb
000000037ff07be1 02 Up mceusb
000000037ff07be0 00 Down mceusb
000000037ff07be0 01 Down mceusb
000000037ff07be0 02 Down mceusb
000000037ff07bde 00 Right mceusb
000000037ff07bde 01 Right mceusb
000000037ff07bde 02 Right mceusb
000000037ff07bdf 00 Left mceusb
000000037ff07bdf 01 Left mceusb
000000037ff07bdf 02 Left mceusb
000000037ff07bdd 00 OK mceusb
000000037ff07bdd 01 OK mceusb
000000037ff07bdd 02 OK mceusb
Last time i think problems was in autostart.sh syntax and so on, but seams it's not the case...

Maybe it's good idea to put this autostart.sh file in first post (as file)?
sometime a previous lirc was running and there are some left over files
killall -9 xbmc.bin should fix it
i'm starting to think seriously about bundling some common remotes and making the autostart.sh
part of the file so no work will be necessary...
Raspberry Pi Rev2 512MB
CuBox-i4Pro
The administrator has disabled public write access.
The following user(s) said Thank You: DmitrySh

Re: Raspberry Pi GPIO IR Receiver with OpenELEC compilation patches and snapshot 5 years 1 week ago #45

  • Katch
  • Katch's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
roadkill wrote:
Katch wrote:
Ok, just double checked I'm not going crazy - GPIO IR is definitely working on my RaspBMC SD card with just the addition of lirc_rpi to modules and cp the contents of rc6-mce-lircd.conf to lircd.conf.

So hardware is definitely fine.

after killall lircd - i get output from mode 2

After trying your code above and then irw - nothing.

EDIT -

I'm going to try a complete fresh start again...

I'm using the exact same build so I know it works fine... my guess is that the autostart.sh file is somehow faulty
I'll have a new build uploaded in a few hours.. there were many updates during the last 24 hours
but your autostart.sh file is the problem
try running the command bit by bit to identify the issue
killall lircd
/usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd-lirc0.pid /storage/.config/lircd.conf

and try running mkdir -p /var/run/lirc/ just in case... ;)

hmmm ran mkdir -p /var/run/lirc/ and now I get...

root ~/.config # ./autostart.sh
root ~/.config # ./autostart.sh: line 4: --pidfile=/var/run/lirc/lircd-lirc0.pid: No such file or directory
The administrator has disabled public write access.