2009-03-08, 00:50
Woot! That did it. Thank you Dave!
18:00:19 T:3053037392 M:3247878144 INFO: LIRC Initialize: connect failed: No such file or directory
sudo stop tty2
sudo start tty2
18:13:44 T:3051796304 M:3098210304 INFO: LIRC Initialize: sucessfully started on: /dev/lircd
mediabox@mediabox:~$ ls -la /dev/l*
crw-rw-rw- 1 root root 180, 144 2009-03-16 18:11 /dev/lcd0
crw-rw-rw- 1 root root 61, 0 2009-03-16 18:11 /dev/lirc0
crw-rw-rw- 1 root root 61, 1 2009-03-16 18:11 /dev/lirc1
srw-rw-rw- 1 root root 0 2009-03-16 18:12 /dev/lircd
...
lens Wrote:Any ideas?
#include <sys/socket.h>
#include <sys/un.h>
#include <stdlib.h>
#include <iostream>
#define LIRC_DEVICE "/dev/lircd"
#define MAX_ATTEMPT 20
using namespace std;
int main( int argc, char *argv[] )
{
int attempts = MAX_ATTEMPT;
int attempt = 0;
struct sockaddr_un addr;
int fd = -1;
int status = -1;
if( argc == 2 )
{
attempts = atoi( argv[1] );
}
addr.sun_family = AF_UNIX;
strcpy( addr.sun_path, LIRC_DEVICE );
while( status!=0 && attempt++<=attempts )
{
cout << "Attempt " << attempt << ": ";
fd = socket( AF_UNIX, SOCK_STREAM, 0 );
if( fd == -1 )
{
cout << "Socket failed" << endl;
status = 2;
close(fd);
sleep(1);
continue;
}
if( connect( fd, (struct sockaddr *)&addr, sizeof(addr) ) == -1 )
{
cout << "Connect failed" << endl;
status = 3;
close(fd);
sleep(1);
continue;
}
cout << "Connected!" << endl;
status = 0;
close(fd);
}
if( status!=0 )
{
cout << "Couldn't connect after max attempts." << endl;
}
return status;
}
g++ waitforlirc.cpp -o waitforlirc
export XBMC_PLATFORM_MODE=1
/home/mediabox/bin/waitforlirc 60 > /var/tmp/waitforlirc.log
/usr/share/xbmc/xbmc.bin -q -p --standalone
case "$?" in
0 ) # Quit
touch /tmp/noRestartXBMC
break ;;
64 ) # Shutdown System
sleep 10 ;;
65 ) # Warm Reboot
echo Restarting XBMC ... ;;
66 ) # Reboot System
sleep 10 ;;
* ) ;;
esac
rickx Wrote:did you try my suggestions?
another one:
once you installed, try "modinfo lirc_imon".
It will show some info. Make sure your model's id 15c2:0036 is there. Otherwise, the module compiled won't work.
Fitho Wrote:I tried that, but it lists only similar model's like "v15C2p0038d", not the "0036". Does that mean that the 0036 is totally unsupported?
Fitho Wrote:rickx,
Now that the driver supports my device I tried:
sudo modprobe lirc_imon
But this results in error:
FATAL: Error inserting lirc_imon (/lib/modules/2.6.24-19-generic/kernel/drivers/input/misc/lirc_imon.ko): Unknown symbol in module, or unknown parameter (see dmesg)
Using dmesg I get the messages:
[ 2846.503961] lirc_imon: Unknown symbol lirc_unregister_driver
[ 2846.504126] lirc_imon: Unknown symbol lirc_register_driver
What could I be doing wrong?
cvs -d:pserver:[email protected]:/cvsroot/lirc login
cvs -z8 -d:pserver:[email protected]:/cvsroot/lirc co lirc
./autogen.sh
./setup.sh
sudo make
sudo make install
# deb cdrom:[Kubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016.1)]/ gutsy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://it.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://it.archive.ubuntu.com/ubuntu/ hardy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://it.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://it.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://it.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://it.archive.ubuntu.com/ubuntu/ hardy universe
deb http://it.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://it.archive.ubuntu.com/ubuntu/ hardy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://it.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://it.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://it.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner
# deb http://ubuntu.fastbull.org/ubuntu/ hardy main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted
deb-src http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted
# deb http://ubuntu.fastbull.org/ubuntu/ hardy-updates universe main multiverse restricted
# deb http://ubuntu.fastbull.org/ubuntu/ hardy-backports universe main multiverse restricted
# deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse
deb http://ppa.launchpad.net/team-xbmc-hardy/ubuntu hardy main
deb http://ppa.launchpad.net/xbmc-addons/ubuntu hardy main