!!Document is under construction.!!
LControl
About
LControl is programmable remote controller. It uses UDP-protocol to send commands to LIRC daemon.
LIRC needs to be patched with
sudp.patch. Both LControl and sudp are under development. License of the LControl is
GPL Version 2.
You should have:
- GTK+2.0
- firewalled intranet
- Linux computer where to run LIRC
- Another device with LAN/WLAN to run LControl
Nokia Internet Tablet works. N800 and desktop are only tested ones. To other devices there might need some work. At least rows and cols should be configurable. see:
TODO.
Screenshots
Click for larger image.
Installation
Desktop
--prefix should work
$./autogen.sh
$./configure
$make
$sudo make install
Nokia internet tablet
$ln -s debian-ntablet debian
$./autogen.sh
$dpkg-buildpackage -rfakeroot
Copy created deb to device and install as any other application.
Setting up
Quick setup
- LControl
- I recommend desktop installation even it is not going to be used as remote controller.
Config is easier to edit and test on desktop.
- Copy $prefix/share/lcontrol to ~/.lcontrol and edit that wotch your favorite text editor.
- Check examples. LControl installs this default config.
- Generate lircd.conf with lircd-conf-generator. It is builded with lcontrol.
- If you don't edit later [buttons] section, you do not have to generate lircd.conf again.
- When you are ready copy config to pda. (/usr/share/lcontrol/config) or use LControl from the desktop.
- LIRC
- Configure with sudp; ./setup.sh udp->sudp or ./configure --with-driver=sudp.
- If you have other remotes check howto compile both. Remember to set remotename to .lircrc.
- Use irw to testing. Other test tools does not work.
- Start lircd with option -d port_from_lcontrols_config.
Copy system width config to your home directory.
see about config:
TODO
$cp -r $prefix/share/lcontrol ~/.lcontrol
- prefix is your install directory
$your_favorite_editor ~/.lcontrol/config
At least you have to modify config change your IP of the lirc server and if you want port.
part of config:
[configure]
host=192.168.1.2
port=12345
At this point you don't have to have LIRC installed. Just don't care about it for now. Ofcource it would be nice to test how it works or does it work at all. Easiest way to test LIRC is using default configs for everything.
There is two sections what we must have. [buttons] where is every button listed and named. Another one is [programs] what is starting point to create menus. One menu can handle four rows and eight lines of buttons for now. It takes 32 user defined buttons/menu.
Each button in section [buttons] got name and label. Number what is sended is generated by program automically. There can be about 65535 different buttons.
On Nokia internet tablet you can leave the program pressing fullscreen button.
LIRC
Patched files
- daemons/hw_sudp.c
- daemons/hw-types.c
- daemons/Makefile.am
- configure.in
- setup.data
Compiling
With configure
$./autogen.sh
$./configure --with-driver=sudp
$make
$sudo make install
With setup
$./autogen.sh
$./setup.sh
udp->sudp
save & configure
$make
$sudo make install
Testing
$lircd --driver=
Driver `' not supported.
Supported drivers:
sudp
$sudo lircd --driver=sudp
lircd: could not open config file '/etc/lircd.conf'
lircd: No such file or directory
Now you have to generate lircd.conf fron LControl:s config with lircd-conf-generator
Setting up part 2
lircd-conf-generator
lircd-conf-generator is used to generate lircd.conf file from lcontrols config.
$lircd-conf-generator -h
Usage: lircd-conf-generator -c <configfile> -l <lircdfile>
Example: lircd-conf-generator -c /home/user/.lcontrol/config -l lircd.conf
Converts buttons from lircd-conf-generator:s config file to lircd.conf file.
Options:
-c, --configfile lcontrol configfile
-l, --lircfile lircd.conf outputfile
-f, --force force to overwrite lircd configure
-v, --verbose verbose output
-h, --help prints this help
....
Create lircd.conf
Create from own config
$sudo lircd-conf-generator -c ~/.lcontrol/config -l /etc/lircd.conf
System width config ($prefix=installation directory)
$sudo lircd-conf-generator -c $prefix/share/lcontrol/config -l /etc/lircd.conf
Start lirc daemon
Start lircd with sudp driver to listen port 12345. Port 12345 is LControls default.
$sudo killall lircd
$sudo lircd --driver=sudp -d 12345
Change permissions
I used audio group because I had that and video ready.
$sudo chown root:audio /dev/lircd
or
$sudo chown root:video /dev/lircd
or
$sudo chown root:lirc /dev/lircd
$sudo chmod 666 /dev/lircd
udev
If you have other devices than sudp configured with lirc you have to add lirc.rules to udev.
$sudo cp lirc/contrib/lircd.rules /etc/udev/rules.d/
Restart udev.
Start on the startup
Ubuntu - propably debian
$sudo cp lircd.ubuntu /etc/init.d/lircd
$sudo chmod +x /etc/init.d/lircd
$sudo update-rc.d lircd start 99 2 3 4 5 . stop 01 1 .
Other distribution
Please help.
Testing LIRC
When lircd is running. Normal lirc test tools are not valid with this so irw is used.
$irw
When pushing buttons irw prints something like this.
...
000000000000001e 00 AUDIOMINUS SUDP-CONTROL
000000000000001e 00 AUDIOMINUS SUDP-CONTROL
000000000000001d 00 AUDIOPLUS SUDP-CONTROL
0000000000000013 00 DOWN SUDP-CONTROL
0000000000000009 00 TITLEMENU SUDP-CONTROL
0000000000000008 00 ROOTMENU SUDP-CONTROL
0000000000000008 00 ROOTMENU SUDP-CONTROL
0000000000000017 00 FULLSCREEN SUDP-CONTROL
0000000000000018 00 DEINTERLACE SUDP-CONTROL
000000000000000a 00 SUBMENU SUDP-CONTROL
000000000000000a 00 SUBMENU SUDP-CONTROL
000000000000001c 00 SUBTITLEMINUS SUDP-CONTROL
000000000000001b 00 SUBTITLEPLUS SUDP-CONTROL
000000000000000b 00 AUDIOMENU SUDP-CONTROL
0000000000000003 00 SHUTDOWN SUDP-CONTROL
...
Generate ~/.lircrc
File ~/.lircrc is used by to launch and controll supported applications. If you
$your_favorite_editor ~/.lircrc
For now in the example file has only xine.
Using Lirc
When lircd is running
$irexec
Download
Example files:
Help needed
Help needed for updating examples. Send your superconfig for application-X for me so I add it to default config. For example for the mplayer, xmms , mythtv or anything. Just little updates are also more than welcome.
Any ideas how to change between menus are welcome too.
TODO
- Default config to right place. I think path $prefix/share/lcontrol is not very good
- Decrease memory consumption
- Add more default buttons to [buttons] section
- Make several buttons to be standard so default lircd.conf could be used in most cases
- Loading pictures to buttons from theme. Based on button name.
- New icons
- About
- Prefs
- Frequency of the button. How often is send UDP-message when button is down.
- IP
- Port
- Theme
- Rows
- Cols
- Changing menu effect
- Replace menu scrolling with better implementation
- More menu changing effects. There are different devices with different features where to use LControl.
- Set config tell how many cols and rows there are.
- Make better style to create this HTML documentation
- Make GUI to create and convert configuration.
Links