/usr/bin/irman2lirc is in lirc 0.9.0-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | #! /bin/sh
progname=irman2lirc
if [ "$1" = "--help" ]; then
echo "${progname}: converts irman.conf to lirc config file"
echo
echo "usage: ${progname} [file]"
echo " where \`file' is the full file name of your irman.conf"
echo " (default /usr/local/etc/irman.conf)"
exit 0
fi
irmanconf=${1:-/usr/local/etc/irman.conf}
if [ ! -f ${irmanconf} ]; then
echo "cannot find ${irmanconf}. try ${progname} --help"
exit 1;
fi
echo "# lircd.conf automatically generated by ${progname}"
cat <<EOF
#
# brand: Irman
# model: All models
EOF
echo "# devices: remotes from ${irmanconf}"
grep bind ${irmanconf} | sed 's/^[ \t]*bind[ \t]\+\([^- \t]\+-[^-]\+\)-.*$/\1/' |
sort | uniq | sed 's/^/# /'
cat <<EOF
#
begin remote
name irman
bits 48
flags SPACE_ENC
eps 30
aeps 100
one 1024 3072
zero 1024 2048
ptrail 1024
pre_data_bits 16
pre_data 0xffff
post_data_bits 0
post_data 0x0
gap 65536
repeat_bit 0
begin codes
EOF
IFS=" "
grep '^[ ]*bind' ${irmanconf} |
while
read bind name code
do
if [ "x$bind" = "xbind" -a -n "$code" -a -n "$name" ]; then
code=`echo "${code}000000000000" | cut -c1-12`
echo " ${name} 0x0000${code}"
fi
done
cat <<EOF
end codes
end remote
EOF
|