17th Feb, 2013, 01:01 AM
17th Feb, 2013, 01:03 AM
No I copy and pasted locally and FTP'd across.
17th Feb, 2013, 01:05 AM
Can you add a debug "echo" in the if clause that lirc should use in your case, so you know it's using the correct hardware.conf
17th Feb, 2013, 02:22 AM
Hi Mo,
Sorry mate I'm not sure what you mean..I don't know how to debug 'echo' and don't know where it would go
My hardware.conf is here if it helps: http://pastebin.com/6ZumzNfr
Sorry mate I'm not sure what you mean..I don't know how to debug 'echo' and don't know where it would go
My hardware.conf is here if it helps: http://pastebin.com/6ZumzNfr
17th Feb, 2013, 02:29 AM
E.g.
When you add a 'echo' to a condition it just prints "success" of "failed" (or whatever you like), so you know if a condition was met of not.
Code:
if [ 1 -eq 0 ]; then
echo "success"
else
echo "failed"
fi
When you add a 'echo' to a condition it just prints "success" of "failed" (or whatever you like), so you know if a condition was met of not.
17th Feb, 2013, 02:50 AM
Thank Mo,
I have tried for the last 20 mins with your's and google's help to try to insert an echo into my hardware config but whatever I do is wrong - I restart lirc and get a complaint about an unexpected elif.
I don't know what I'm doing.
I have tried for the last 20 mins with your's and google's help to try to insert an echo into my hardware config but whatever I do is wrong - I restart lirc and get a complaint about an unexpected elif.
I don't know what I'm doing.
17th Feb, 2013, 02:55 AM
Example (in the original hardware.conf as seen here https://raw.github.com/xbianonpi/xbian/xbian-alpha5/etc/lirc/hardware.conf) at line 43:
If you see success, then lirc entered that if loop.
Code:
if [ $(cat /proc/bus/input/devices | grep 'Media Center Ed.' | wc -l) -gt 0 ]; then
echo "success"
if [ $(cat /proc/bus/input/devices | grep -m 1 -A 4 'Media Center Ed.' | grep -o event[0-9] | sed -e 's/event//g') -eq 0 ]; then
17th Feb, 2013, 03:34 AM
That's what I thought - it still returns with:
root@xbian:~# sudo /etc/init.d/lirc restart
: not found/lirc: 30: /etc/lirc/hardware.conf:
/etc/init.d/lirc: 42: /etc/lirc/hardware.conf: Syntax error: "elif" unexpected (expecting "then")
I have edited as you suggested:
root@xbian:~# sudo /etc/init.d/lirc restart
: not found/lirc: 30: /etc/lirc/hardware.conf:
/etc/init.d/lirc: 42: /etc/lirc/hardware.conf: Syntax error: "elif" unexpected (expecting "then")
I have edited as you suggested:
Code:
if [ $(dmesg | grep lirc_rpi | wc -l) -gt 0 ]; then
. /etc/lirc/hardware/lirc_rpi.conf
elif [ $(dmesg | grep mceusb | wc -l) -gt 0 ]; then
if [ $(cat /proc/bus/input/devices | grep 'Media Center Ed.' | wc -l) -gt 0 ]; then
echo "success"
if [ $(cat /proc/bus/input/devices | grep -m 1 -A 4 'Media Center Ed.' | grep -o event[0-9] | sed -e 's/event//g') -eq 0 ]; then
17th Feb, 2013, 03:39 AM
Did you used the original files?
17th Feb, 2013, 04:06 AM
(17th Feb, 2013 03:39 AM)CurlyMo Wrote: [ -> ]Did you used the original files?
Yeah, every time I made a change that didn't work I reverted to my .orig backup
17th Feb, 2013, 04:25 AM
Can you remove the whole lirc directory /etc/lirc/ and reinstall it:
and try again.
Code:
apt-get install --reinstall xbian-package-lirc
17th Feb, 2013, 04:28 AM
I did an rm -r on /etc/lirc and tried an apt-get but it doesn't like it:
root@xbian:~# apt-get install --reinstall xbian-package-lirc Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of xbian-package-lirc is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@xbian:~# apt-get install --reinstall xbian-package-lirc Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of xbian-package-lirc is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
17th Feb, 2013, 05:08 AM
did you do an apt-get update before hand?
17th Feb, 2013, 07:09 AM
No, sorry. You are dealing with a Linux idiot here
I've just done an update and it replaced the xbian-package-lirc 1.2. No joy though - has had no effect. There are still no number keys or even the play and pause keys now.
Is there any mileage in looking at the openelec backup I have? Which files would I look at?
I've just done an update and it replaced the xbian-package-lirc 1.2. No joy though - has had no effect. There are still no number keys or even the play and pause keys now.
Is there any mileage in looking at the openelec backup I have? Which files would I look at?
17th Feb, 2013, 07:27 AM
What did the if condition check reveal (adding the echo's?)