|
|
Subject: Prob using LIRC and X10 Remote - msg#00154
List: hardware.lirc
Hi all. I'm trying to get LIRC to work with Freevo, and I've
hit an impass. I'm trying to use the X10 MP3 Anywhere remote, which I
noticed has support in the CVS repository. So, I downloaded the
snapshot lirc-0.7.0pre3.tar.bz2, told it to use the MP3 Anywhere
drivers, and off it went. It compiled fine, yet when I try to use
irrecord, sometimes I get: "irrecord: bad envelope" as soon as I start
the process, then once I start sending it buttons, I get the error
"Something went wrong". After the retries expire, it suggests using the
-f option. I tried that, same thing.
Can anyone offer some suggestions?
Thanks,
--Brian
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration. http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: sending fake IR events to lircd from command line
Hi Marc,
Heres a patch of some code to do this, it is a year old and I haven't
tried it since, so your milage may vary.
I recall using it with quotes to trick irsend into being happy about
the number of parameters, like:$irsend SEND_RELAY "message to relay".
Karl.
diff -urN lirc-4-01-03/daemons/lircd.c lirc-4-01-03-relay/daemons/lircd.c
--- lirc-4-01-03/daemons/lircd.c Sun Mar 30 06:22:11 2003
+++ lirc-4-01-03-relay/daemons/lircd.c Tue Apr 1 23:56:15 2003
@@ -103,6 +103,7 @@
{"SEND_START",send_start},
{"SEND_STOP",send_stop},
{"VERSION",version},
+ {"SEND_RELAY",send_relay},
{NULL,NULL}
/*
{"DEBUG",debug},
@@ -1216,6 +1217,38 @@
return(send_core(fd,message,arguments,0));
}
+int send_relay(int fd,char *message,char *arguments)
+{
+ int length;
+ int i;
+
+ /* pass up "SEND_RELAY ", send rest of string */
+ while ((*message != 0) && (*message != ' '))
+ ++message;
+ if (*message == ' ')
+ ++message;
+ length = strlen(message);
+
+ if(length)
+ {
+ LOGPRINTF(1,"relaying message: \"%s\"",message);
+ for(i=0;i<clin;i++)
+ {
+ /* don't relay messages to remote clients */
+ if(cli_type[i]==CT_REMOTE)
+ continue;
+ LOGPRINTF(1,"writing to client %d",i);
+ if(write_socket(clis[i],message,length)<length)
+ {
+ remove_client(clis[i]);
+ i--;
+ }
+ }
+ }
+ /* return close client(to close rc/irsend without timeout/pause */
+ return(0);
+}
+
int send_core(int fd,char *message,char *arguments,int once)
{
struct ir_remote *remote;
diff -urN lirc-4-01-03/daemons/lircd.h lirc-4-01-03-relay/daemons/lircd.h
--- lirc-4-01-03/daemons/lircd.h Sat Feb 15 03:00:58 2003
+++ lirc-4-01-03-relay/daemons/lircd.h Tue Apr 1 23:33:44 2003
@@ -76,6 +76,7 @@
int send_once(int fd,char *message,char *arguments);
int send_start(int fd,char *message,char *arguments);
int send_stop(int fd,char *message,char *arguments);
+int send_relay(int fd,char *message,char *arguments);
int send_core(int fd,char *message,char *arguments,int once);
int version(int fd,char *message,char *arguments);
int get_pid(int fd,char *message,char *arguments);
On Sun, Mar 21, 2004 at 11:35:00PM -0800, Marc MERLIN wrote:
> So, before you ask why, let me explain.
> I have an X10 mouseremote, which is already configured on my machine, and
> that i can use to run any unix command (I also use X10 remotes, which
> generate, seperately X10 events that I can use to trigger unix commands
> too).
>
> I use mplayer, which does not (AFAIK) accept random commands from a named
> pipe like xmms does, but it does have an lirc interface
>
> I also have a TV card, with a remote (haupage), which I have working with
> lirc and mplayer.
>
> Now, I'd like to use my X10 remotes to run unix commands so that can feed a
> fake IR remote command to lircd, and also control mplayer that way
>
> How do I do that?
>
> Thanks
> Marc
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
Next Message by Date:
click to view message preview
Re: Patching kernel 2.6.4 for LIRC
On Monday 22 March 2004 23:58, Pearless wrote:
> Any ideas?
You can't compile directly lirc with make && make install in the main src
tree.
You must use this pseudo-script
cd daemons
make && make install
cd ../tools
make && make install
In this way you can ignore the drivers directory.
--
Flameeyes <dgp85-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx>
You can find LIRC for 2.6 kernels at
http://flameeyes.web.ctonet.it/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
Previous Message by Thread:
click to view message preview
FW: Patching the kernel 2.6.4 for LIRC
Hi,
I have just learnt to compile my kernel (2.6.4), and I have download the
2.6.4 kernel patch for LIRC.
I have also download LIRD-0.6.6 and expanded it into /usr/src
I have applied the patch to the kernel in /usr/src/linux-2.6.4 but when I
tried to make it, it fell over.
I noticed that some of the directories it was looking for are in
/usr/erc/lirc-0.6.6, but it seemed to be trying /usr/src/linux-2.6.4 for
these.
As a newbie trying to teach himself by reading the HOW-TO?s, I have reached
an impasse, and help would be greatly appreciated!
Firstly, here is what happened when I patched the kernel, then when I tried
to make the new 2.6.4:
Cheers Douglas
[root-mK7rAUsKRwo@xxxxxxxxxxxxxxxx linux]# bzip2 -dc
../lirc-2.6.4-20040318.bz2|patch -p1
patching file Documentation/lirc/lirc_it87
patching file drivers/char/Kconfig
patching file drivers/char/Kconfig.orig
patching file drivers/char/Makefile
patching file drivers/char/lirc/Kconfig
patching file drivers/char/lirc/Makefile
patching file drivers/char/lirc/lirc_atiusb.c
patching file drivers/char/lirc/lirc_bt829.c
patching file drivers/char/lirc/lirc_dev.c
patching file drivers/char/lirc/lirc_dev.h
patching file drivers/char/lirc/lirc_gpio.c
patching file drivers/char/lirc/lirc_i2c.c
patching file drivers/char/lirc/lirc_it87.c
patching file drivers/char/lirc/lirc_it87.h
patching file drivers/char/lirc/lirc_mceusb.c
patching file drivers/char/lirc/lirc_parallel.c
patching file drivers/char/lirc/lirc_parallel.h
patching file drivers/char/lirc/lirc_serial.c
patching file drivers/char/lirc/lirc_sir.c
patching file include/linux/lirc.h
[root-mK7rAUsKRwo@xxxxxxxxxxxxxxxx linux]# make
make[2]: `scripts/fixdep' is up to date.
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/i386/Kconfig
optimize && ?
optimize && ?
optimize && ?
optimize && ?
#
# using defaults found in .config
#
*
* Restart config...
*
*
* Linux InfraRed Controller
*
Linux InfraRed Controller (LIRC_SUPPORT) [N/m/y] (NEW) y
Maximum LIRC devices (LIRC_MAX_DEV) [2] (NEW) 2
I2C Driver (LIRC_I2C) [N/m/?] (NEW) m
GPIO Driver (LIRC_GPIO) [N/m] (NEW) m
BT829 Driver (LIRC_BT829) [N/m/y] (NEW) m
IT87 Driver (LIRC_IT87) [N/m/y] (NEW) m
ATI USB Driver (LIRC_ATIUSB) [N/m/y] (NEW) m
MCE USB Driver (LIRC_MCEUSB) [N/m/y] (NEW) m
Serial Driver (LIRC_SERIAL) [N/m/y] (NEW) m
Serial Receiver Type
> 1. Homebrew (LIRC_HOMEBREW) (NEW)
2. Animax (LIRC_SERIAL_ANIMAX) (NEW)
3. IRdeo (LIRC_SERIAL_IRDEO) (NEW)
4. IRdeo Remote (LIRC_SERIAL_IRDEO_REMOTE) (NEW)
choice[1-4]: 1
With transmitter diode (LIRC_SERIAL_TRANSMITTER) [N/y] (NEW) y
With software carrier (LIRC_SERIAL_SOFTCARRIER) [N/y] (NEW) y
Igor Ceska's variation (LIRC_SERIAL_IGOR) [N/y] (NEW) N
Serial Port
> 1. COM1 (0x3f8, 4) (LIRC_SERIAL_COM1) (NEW)
2. COM2 (0x2f8, 3) (LIRC_SERIAL_COM2) (NEW)
3. COM3 (0x3e8, 4) (LIRC_SERIAL_COM3) (NEW)
4. COM4 (0x2e8, 3) (LIRC_SERIAL_COM4) (NEW)
5. Other (custom values) (LIRC_SERIAL_OTHER) (NEW)
choice[1-5]: 1
I/O Port (LIRC_PORT_SERIAL) [0x3f8] (NEW)
IRQ (LIRC_IRQ_SERIAL) [4] (NEW)
SIR Driver (LIRC_SIR) [N/m/y] (NEW)
SPLIT include/linux/autoconf.h -> include/config/*
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
CC drivers/char/lirc/lirc_dev.o
LD drivers/char/lirc/built-in.o
CC [M] drivers/char/lirc/lirc_gpio.o
CC [M] drivers/char/lirc/lirc_bt829.o
CC [M] drivers/char/lirc/lirc_it87.o
drivers/char/lirc/lirc_it87.c: In function `init_port':
drivers/char/lirc/lirc_it87.c:832: warning: assignment makes integer from
pointer without a cast
CC [M] drivers/char/lirc/lirc_serial.o
drivers/char/lirc/lirc_serial.c:93:2: warning: #warning "Note: using rdtsc
instruction"
CC [M] drivers/char/lirc/lirc_atiusb.o
CC [M] drivers/char/lirc/lirc_mceusb.o
drivers/char/lirc/lirc_mceusb.c:111:39: drivers/lirc_dev/lirc_dev.h: No such
file or directory
drivers/char/lirc/lirc_mceusb.c:286: warning: initialization from
incompatible pointer type
drivers/char/lirc/lirc_mceusb.c:287: warning: initialization from
incompatible pointer type
drivers/char/lirc/lirc_mceusb.c:288: error: unknown field `fops' specified
in initializer
drivers/char/lirc/lirc_mceusb.c:288: warning: initialization from
incompatible pointer type
drivers/char/lirc/lirc_mceusb.c:289: error: unknown field `minor' specified
in initializer
drivers/char/lirc/lirc_mceusb.c:289: warning: initialization makes pointer
from integer without a cast
drivers/char/lirc/lirc_mceusb.c: In function `set_use_dec':
drivers/char/lirc/lirc_mceusb.c:567: warning: implicit declaration of
function `lirc_unregister_plugin'
drivers/char/lirc/lirc_mceusb.c:568: warning: implicit declaration of
function `lirc_buffer_free'
drivers/char/lirc/lirc_mceusb.c:568: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:569: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c: In function `msir_fetch_more_data':
drivers/char/lirc/lirc_mceusb.c:709: error: syntax error before string
constant
drivers/char/lirc/lirc_mceusb.c:739: error: syntax error before string
constant
drivers/char/lirc/lirc_mceusb.c:753: error: syntax error before string
constant
drivers/char/lirc/lirc_mceusb.c:786: error: syntax error before string
constant
drivers/char/lirc/lirc_mceusb.c:788: error: `USB_ST_DATAOVERRUN' undeclared
(first use in this function)
drivers/char/lirc/lirc_mceusb.c:788: error: (Each undeclared identifier is
reported only once
drivers/char/lirc/lirc_mceusb.c:788: error: for each function it appears
in.)
drivers/char/lirc/lirc_mceusb.c: In function `mceusb_write':
drivers/char/lirc/lirc_mceusb.c:1258: warning: implicit declaration of
function `FILL_BULK_URB'
drivers/char/lirc/lirc_mceusb.c:1264: error: too few arguments to function
`usb_submit_urb'
drivers/char/lirc/lirc_mceusb.c:1266: error: called object is not a function
drivers/char/lirc/lirc_mceusb.c:1266: error: syntax error before string
constantdrivers/char/lirc/lirc_mceusb.c: In function
`mceusb_write_bulk_callback':
drivers/char/lirc/lirc_mceusb.c:1285: warning: unused variable `dev'
drivers/char/lirc/lirc_mceusb.c: In function `mceusb_probe':
drivers/char/lirc/lirc_mceusb.c:1346: warning: assignment from incompatible
pointer type
drivers/char/lirc/lirc_mceusb.c:1355: warning: assignment from incompatible
pointer type
drivers/char/lirc/lirc_mceusb.c:1357: error: structure has no member named
`endpoint'
drivers/char/lirc/lirc_mceusb.c:1375: error: too few arguments to function
`usb_alloc_urb'
drivers/char/lirc/lirc_mceusb.c:1404: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1408: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1408: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1408: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1408: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1408: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1408: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1410: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1416: warning: implicit declaration of
function `lirc_buffer_init'
drivers/char/lirc/lirc_mceusb.c:1417: error: invalid application of `sizeof'
to an incomplete type
drivers/char/lirc/lirc_mceusb.c:1423: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1424: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1425: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1426: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1427: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1428: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1429: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1430: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1431: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1432: error: dereferencing pointer to
incomplete type
drivers/char/lirc/lirc_mceusb.c:1433: warning: implicit declaration of
function `lirc_register_plugin'
drivers/char/lirc/lirc_mceusb.c:1318: warning: unused variable `name'
drivers/char/lirc/lirc_mceusb.c: At top level:
drivers/char/lirc/lirc_mceusb.c:1464: error: conflicting types for
`mceusb_disconnect'
drivers/char/lirc/lirc_mceusb.c:216: error: previous declaration of
`mceusb_disconnect'
drivers/char/lirc/lirc_mceusb.c: In function `mceusb_disconnect':
drivers/char/lirc/lirc_mceusb.c:1468: error: `dev' undeclared (first use in
this function)
drivers/char/lirc/lirc_mceusb.c:1489: warning: `return' with a value, in
function returning void
make[3]: *** [drivers/char/lirc/lirc_mceusb.o] Error 1
make[2]: *** [drivers/char/lirc] Error 2
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2
[root-mK7rAUsKRwo@xxxxxxxxxxxxxxxx linux]#
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.631 / Virus Database: 404 - Release Date: 17/03/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.631 / Virus Database: 404 - Release Date: 17/03/2004
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
Next Message by Thread:
click to view message preview
Desperate to get libirman working on 2.6.4
I've been trying for several days now to get lirc 0.6.6
using libirman 0.4.2 on Mandrake 10 with 2.6.4. The exact
same machine and Mandrake10 booted with the 2.4.25 kernel
will work fine every time. Im using the
HomElectronic IRA (ver 1 I think) and the irman driver.
At a high level, the lirc daemon spits out a
Connection Timeout Error when trying to connect to
/dev/lirc -> /dev/ttyS0.
Using the libirman/test_io program with some more debugging
I've put in, I've been able to trace it as:
[root-O4yixywcq0w@xxxxxxxxxxxxxxxx libirman-0.4.2]# ./test_io /dev/lirc
IR
error reading handshake (Connection timed out)
Basically, its sending the IR command and not receiving
the OK back.
setserial is showing:
[root-O4yixywcq0w@xxxxxxxxxxxxxxxx libirman-0.4.2]# setserial -a /dev/lirc
/dev/lirc, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50000, divisor: 0
closing_wait: 50880
Flags: spd_normal skip_test
The wierd thing is about 1 in 5 attempts will work,
but no pattern is evident.
I have full strace's available, from both 2.4.25 and 2.6.4
both in working and failing states if they will help.
I've gone so far as to modify the libirman driver to dump
all the members of the termios and serial_stuct members
for both OS versions to compare, I haven't seen any significant
difference.
I'm using the std linux serial driver, the lirc config
said not to use a module. Again, this is the same
config I've used for over 12 months on 2.4.
Anyone who can please help me? Is there another
way to configure this that may work?
Thanks,
Brian
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
|
|