Forum

Full Version: Microsoft MCE (1039) remote configuration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
It looks all good, but hard to debug from a distance. Are you sure your did make any mistake with windows/unicode characters.
No I copy and pasted locally and FTP'd across.
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
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 Sad

My hardware.conf is here if it helps: http://pastebin.com/6ZumzNfr
E.g.
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.
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.
Example (in the original hardware.conf as seen here https://raw.github.com/xbianonpi/xbian/xbian-alpha5/etc/lirc/hardware.conf) at line 43:
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
If you see success, then lirc entered that if loop.
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:
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
Did you used the original files?
(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
Can you remove the whole lirc directory /etc/lirc/ and reinstall it:
Code:
apt-get install --reinstall xbian-package-lirc
and try again.
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.
did you do an apt-get update before hand?
No, sorry. You are dealing with a Linux idiot here Smile

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?
What did the if condition check reveal (adding the echo's?)
Pages: 1 2 3 4
Reference URL's