|
From: Bengt M. <bu...@be...> - 2009-08-22 10:39:38
|
Vijay Kailas wrote: > I am trying to convert a bunch of lirc config files to hex format ... I have just completed a small program, called lirc2xml, which does that. It generates the CCF representation of the raw signal, embedded in an XML file. Optionally, the DecodeIR-library is invoked to attempt to decode the signals. Converting LIRC configuration files to a raw representation is no easy task. The meaning of the different parameters are to some extent documented through comments in the code, but are not at all straightforward. I have therefore written lirc2xml as an extension to LIRC itself. It uses internal LIRC functions from transmit.c to "render" the signals. The program is available as a patch to the LIRC sources, as http://www.bengt-martensson.de/harc/lirc2xml.patch . To apply, change to the top of the source tree and apply patch -p1 < lirc2xml.patch "make" will now in addition create the lirc2xml program, located in the tools subdirectory. "make install" will "install" it. Usage: lirc2xml [options] [config-file] -h --help display this message -v --version display version -o --output=filename XML output filename -r --remote=remotename Include only this remote in the export -d[debug_level] --debug[=debug_level] Optionally, John Fine's library DecodeIR can be invoked for each signal. It will try to identify the signal as one of a number of known IR signal types. DecodeIR can be downloaded here: http://www.hifi-remote.com/forums/dload.php?action=file&file_id=5210 and should be compiled and put in a directory like /usr/local/lib. To enable, use the configure-option --enable-decodeir when configuring. The present version does not render toggle signals (more precisely: it renders them only once). Also, the treatment of repeats may be incorrect. Ideally, I would like to see the program in the future LIRC distribution. If that is not deemed suitable (I have a strong suspicion that some would rather see foobar2lirc than lirc2foobar...) I have no problem maintaining it myself. Let me know what you think. Bengt |