Sziasztok!
Vettem egy WR1043ND routert, azzal a megfontolással hogy tesztelem, próbálgatom, mit lehet most kihozni egy ilyen USB portos gépből.
Eddig sokminden sikerült, de van egy dolog amit nem értek.
Raktam fel USB-audio támogatást és madplayt így már szól rajta netrádió és zenefáljok lejátszására is képes. Elkezdtem írni rá egy programot amivel külső billentyűzettel szépen lehet kezelni. A program működik is, de a cmdpad nevü programmal nem tudom összehangolni.
A dolog egyszerű?
./netradio volup
./netradio voldown
./netradio mute
./netradio ch 0-9
etc...
A cmdpad-al elkezdtem ellenőrizni a billentyűzet kódjait :
root@OpenWrt:~# cmdpad
cmdpad - version 0.0.3 - Copyright (C) 2002-2003 Alessandro Fausto
Build with code optimization at Jul 10 2010 15:00:58
This is free software, comes with ABSOLUTELY NO WARRANTY, and
and you are welcome to redistribute it under certain conditions.
To view the licence use cmdpad --copying|more
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x147a product 0xe02d version 0x110
Input device name: USB IR Receiver USB IR Receiver
no command found for key 2, event PRESS
no command found for key 2, event RELEASE
no command found for key 3, event PRESS
no command found for key 3, event RELEASE
no command found for key 4, event PRESS
no command found for key 4, event RELEASE
no command found for key 5, event PRESS
no command found for key 5, event RELEASE
no command found for key 6, event PRESS
no command found for key 6, event RELEASE
no command found for key 7, event PRESS
no command found for key 7, event RELEASE
no command found for key 8, event PRESS
no command found for key 8, event RELEASE
no command found for key 9, event PRESS
no command found for key 9, event RELEASE
no command found for key 10, event PRESS
no command found for key 10, event RELEASE
no command found for key 11, event PRESS
no command found for key 11, event RELEASE
^CReceived 20 events.
root@OpenWrt:~#
Majd ebből 1-2-őt beletettem a conf fájlába:
/etc/cmdpad.conf
device=/dev/input/event1
command=2, R ,/bin/netradio volup
command=3, R ,/bin/netradio voldown
command=4, R ,/bin/netradio mute
command=012, R ,/sbin/modprobe -r ppa
command=013,P ,/sbin/modprobe ppa
command=067,P ,/etc/init.d/nfs stop
command=068,P ,/etc/init.d/nfs start
command=087,P ,/etc/init.d/iptables stop
command=088,P ,/etc/init.d/iptables start
command=066, R ,/sbin/telinit 3
command=65,PR ,logger volup
command=063, R ,/usr/bin/killall -3 xinit
command=071,P H,/usr/bin/aumix -d /dev/mixer -v -5
command=075,P H,/usr/bin/aumix -d /dev/mixer -v +5
command=072,P H,/usr/bin/aumix -d /dev/mixer1 -v -5
command=076,P H,/usr/bin/aumix -d /dev/mixer1 -v +5
command=073,P H,/usr/bin/aumix -d /dev/mixer2 -v -5
command=077,P H,/usr/bin/aumix -d /dev/mixer2 -v +5
A gyári dolgokkal nem fogkalkoztam, nem sok vizet zavarnak gondolom.
De ha elindítom a programot, az eredmény ugyanaz. Nem talál utasítást a billentyűhöz.
Leírást alapján válogattam össze a programokat. A billentyűzet eventjeit elkapja, de nem kezeli le.
Valakinek van valami ötlete?
Üdv
balazsasd