Documentation from wdtvforum Code: echo % > /tmp/ir_injection where % is char assigned to button u want to send, here's table Code: POWER - w HOME - o UP - u LEFT - l ENTER - n RIGHT - r DOWN - d BACK - T STOP - t OPTION - G REWIND - H PLAY/PAUSE - p FORWARD - I PREVIOUS - [ NEXT - ] SEARCH - E EJECT - X for example Code: echo X > /tmp/ir_injection do the same as EJECT button. it should be quite easy to modify redindian's web-based remote control page to make it work on live. « Last Edit: December 31, 2009, 08:26:51 AM by rezmus » Logged [24]avdija Newbie * Posts: 22 [25]Re: remote control of wdtv live « Reply #1 on: December 31, 2009, 10:12:01 AM » _______________________________________________________________________ wow, TNX man. just what i was looking for. Logged [26]rezmus Sr. Member * * * * Posts: 415 [27]Re: remote control of wdtv live « Reply #2 on: December 31, 2009, 02:02:23 PM » _______________________________________________________________________ i have modified redindian's web-based remote control to work with live, u can get it here [28]http://wdtv.org/web_remote_wdtv_live.zip i tested it on apache, but should work with lighttpd (included it wdlxtv) as well. Logged [29]migube Full Member * * * Posts: 239 [30]Re: remote control of wdtv live « Reply #3 on: January 01, 2010, 05:39:49 AM » _______________________________________________________________________ Great ! That's what I was looking for ! I copied the directory in lightthttpd /var/www It shows as actiavted plugin, I can click on the remote buttons, but it does not seem to do the job. Lighhttpd logs shows: 2010-01-01 13:39:14: (mod_fastcgi.c.2569) unexpected end-of-file (perhaps the fastcgi process died): pid: 1349 socket: unix:/var/log/lighttpd/php.socket-0 2010-01-01 13:39:14: (mod_fastcgi.c.3354) response not received, request sent: 954 on socket: unix:/var/log/lighttpd/php.socket-0 for /remote/index.php?, closing connection Logged _______________________________________________________________________ ----- WdTvLive - LG BD390 - Philips 47PFL8404h - Logitech Z5400 - DM7000 - Synology 107+ If you developed some application or know about some new WDTVLive app.bin or binary files, please update the Wiki on [31]http://wiki.wdlxtv.com/Appz [32]wookienz Newbie * Posts: 37 [33]Re: remote control of wdtv live « Reply #4 on: January 01, 2010, 06:51:19 AM » _______________________________________________________________________ nice work, any problems if we wind this into Mr_Miyagis back end web portal? community coding is getting somewhere! Logged [34]migube Full Member * * * Posts: 239 [35]Re: remote control of wdtv live « Reply #5 on: January 01, 2010, 07:09:57 AM » _______________________________________________________________________ good idea wookienz, does it work in that lighthttpd version/config? tx Logged _______________________________________________________________________ ----- WdTvLive - LG BD390 - Philips 47PFL8404h - Logitech Z5400 - DM7000 - Synology 107+ If you developed some application or know about some new WDTVLive app.bin or binary files, please update the Wiki on [36]http://wiki.wdlxtv.com/Appz [37]rezmus Sr. Member * * * * Posts: 415 [38]Re: remote control of wdtv live « Reply #6 on: January 01, 2010, 08:03:23 AM » _______________________________________________________________________ @migube: check your php config, seems some probs with php, i will check it with brads lighttpd / php at the weekend @wookienz: i don;t mind at all, but you should ask redindian (u will find him on this board) - it's his code for old wdtv, i just made it work on live Logged [39]KostyaY0 Newbie * Posts: 9 [40]Re: remote control of wdtv live « Reply #7 on: January 14, 2010, 02:56:16 PM » _______________________________________________________________________ [41]Quote from: migube on January 01, 2010, 05:39:49 AM Lighhttpd logs shows: 2010-01-01 13:39:14: (mod_fastcgi.c.2569) unexpected end-of-file (perhaps the fastcgi process died): pid: 1349 socket: unix:/var/log/lighttpd/php.socket-0 2010-01-01 13:39:14: (mod_fastcgi.c.3354) response not received, request sent: 954 on socket: unix:/var/log/lighttpd/php.socket-0 for /remote/index.php?, closing connection I have same problems... Sad Does anybody resolve it? Logged [42]linuxjunkie Newbie * Posts: 8 [43]Re: remote control of wdtv live « Reply #8 on: January 14, 2010, 04:31:35 PM » _______________________________________________________________________ to make this work on WDXLTV (lighttpd) you need to follow the two command below 1) modify the index.php remove the '&' symbol from below (i doubt this needs to be backgrounded so & is not really needed anyways) exec( "reboot > /dev/null &" ); else exec( "echo $button > /tmp/ir_injection &" ); --- should be (will work this way) exec( "reboot > /dev/null " ); else exec( "echo $button > /tmp/ir_injection " ); 2) ssh or telnet to your WDTVlive and run the command below * this allows the web to send commands to the ir_injection as it's only writable by root (non web user) chmod a+w /tmp/ir_injection ** You will have to run the second comment any time you ever power (unplug the power), but then again you will probably have to copy over the web portion again too. I am not sure if there is a better way as I just found all these goodies the other day, but I noticed the 'net.mounts' file just gets run on boot, so I have added these lines to it to keep these settings across rebooting. #FILE: net.mounts chmod a+w /tmp/ir_injection ln -s /tmp/media/usb/USB1/60BE-C38E/web.remote/ /var/www/ ## /tmp/media/usb/USB1/60BE-C38E/ -- is the location of my USB stick. web.remote is the root of the web folder « Last Edit: January 14, 2010, 04:46:12 PM by linuxjunkie » Logged [44]deevus Newbie * Posts: 13 [45]Re: remote control of wdtv live « Reply #9 on: January 14, 2010, 04:39:48 PM » _______________________________________________________________________ Thanks. Worked a charm. Logged [46]KostyaY0 Newbie * Posts: 9 [47]Re: remote control of wdtv live « Reply #10 on: January 15, 2010, 03:14:32 AM » _______________________________________________________________________ linuxjunkie Thank You! Logged [48]slowpoke Newbie * Posts: 26 [49]Re: remote control of wdtv live « Reply #11 on: January 15, 2010, 07:20:11 PM » _______________________________________________________________________ well i have a little time and i create this Code: #!/bin/bash while true do read -sn1 a case "$a" in A) echo "up" ;echo u > /tmp/ir_injection;; B) echo "down";echo d > /tmp/ir_injection;; C) echo "right";echo r > /tmp/ir_injection;; D) echo "left";echo l > /tmp/ir_injection;; p) echo "power";echo w > /tmp/ir_injection;; h) echo "home";echo o > /tmp/ir_injection;; e) echo "enter";echo n > /tmp/ir_injection;; b) echo "back";echo T > /tmp/ir_injection;; s) echo "stop";echo t > /tmp/ir_injection;; o) echo "option";echo G > /tmp/ir_injection;; H) echo "rewind";echo H > /tmp/ir_injection;; g) echo "play/pause";echo p > /tmp/ir_injection;; q) echo "forward";echo I > /tmp/ir_injection;; w) echo "previous";echo [ > /tmp/ir_injection;; n) echo "next";echo ] > /tmp/ir_injection;; v) echo "search";echo E > /tmp/ir_injection;; x) echo "eject";echo x > /tmp/ir_injection;; 1) exit;; esac done is a bash script anyone can change the letters in the script exept A),B),C) and D),this letters detected the arrow keys automatically work simple save like Code: #nano /tmp/PICK_A_NAME #sh /tmp/PICK_A_NAME and show what u choose, to exit press 1 in this case(u can change that) « Last Edit: January 15, 2010, 07:30:25 PM by slowpoke » Logged [50]choekstr Sr. Member * * * * Posts: 268 [51]Re: remote control of wdtv live « Reply #12 on: January 18, 2010, 09:00:11 AM » _______________________________________________________________________ Nice script slowpoke! Technically the arrow keys return ^[[A and ^[[B and ^[[C and ^[[D with the first ^[ being an ESC character. However the first two chars, ESC and [ are ignored and the last char, A/B/C/D are picked up and so it works. In the end the result is what you expect but the reason is just slightly different. No biggie, just pointing it out. I modified it a bit further to add a little bit of usability and to add onto your work. Code: #!/bin/bash D=/tmp/ir_injection banner() { clear echo "UP: A DOWN: B LEFT: D RIGHT: C" echo "POWER: p HOME: h ENTER: e BACK: b" echo "STOP: s OPTION: o REW: H PLAY/PAUSE: g" echo "FWD: q PREV: w NEXT: n SEARCH: v" echo "EJECT: x EXIT: 1" echo echo "Key sent: $SENT" echo } while true do banner read -sn1 -p"Key to send: $REPLY" case "$REPLY" in A) SENT=up;echo u >$D;; B) SENT=down;echo d >$D;; C) SENT=right;echo r >$D;; D) SENT=left;echo l >$D;; p) SENT=power;echo w >$D;; h) SENT=home;echo o >$D;; e) SENT=enter;echo n >$D;; b) SENT=back;echo T >$D;; s) SENT=stop;echo t >$D;; o) SENT=option;echo G >$D;; H) SENT=rewind;echo H >$D;; g) SENT=play/pause;echo p >$D;; q) SENT=forward;echo I >$D;; w) SENT=previous;echo [ >$D;; n) SENT=next;echo ] >$D;; v) SENT=search;echo E >$D;; x) SENT=eject;echo x >$D;; 1) exit;; *) SENT="NOT IMPLEMENTED";; esac done As previously mentioned, just cut and paste this into a file and run with 'sh filename': Code: #nano /tmp/PICK_A_NAME #sh /tmp/PICK_A_NAME Enjoy! Logged _______________________________________________________________________ -- Chris [52]cgmark Full Member * * * Posts: 107 [53]Re: remote control of wdtv live « Reply #13 on: January 18, 2010, 10:20:58 AM » _______________________________________________________________________ From some of the reverse engineering stuff I have been doing, here is how to read directly the code of the IR sensor. #devmem 0x001051c 0x001051c holds the data of the last IR signal decoded for any NEC protocol remote. So if you want to use a remote you already own to control the box , take a remote you already own, set it for a device like a DVD player that is NEC protocol , hitachi uses that a lot. Next point the remote at the WDTV box, and press the same button a couple times. type : devmem 0x001051c You should see something like: 0xD12EAF50 If you get 0x00000000 it means no code received that was NEC type. Use the WDTV box remote to get test its working. When you use the original remote to see codes you have to issue the devmem command VERY quickly after pressing the remote button as the cpu clears the bit when an official command is received so it will read 0x00000000 a split second after the button on the original remote. Then you just need to use a script like the ones posted above to take that value and map it to the letter/remote function on the WDTV box you want it to be. Not the script because I don't have time to do it right now but basically something like if 0xD12EAF50 then echo A > /temp/ir_injection « Last Edit: January 18, 2010, 10:28:35 AM by cgmark » Logged [54]choekstr Sr. Member * * * * Posts: 268 [55]Re: remote control of wdtv live « Reply #14 on: January 18, 2010, 11:10:20 AM » _______________________________________________________________________ is it => 1s (your comment on split second) that the 0x001051c memory location is cleared? If so, then just a delay of 1s and a read would suffice. We could just do something like this: Code: while true; do if [ $(devmem 0x001051c) != "0x00000000" ]; then act_on_remote_code() sleep 1 fi done #Obviously a bit more needed but this gets the point across. This would be very trivial to write if one wanted to use a remote control that wasn't a programmable universal remote. I just use a learning remote and this isn't needed I send actual WD TV remote codes instead. We just need you to expose the extra remote options (Vol UP/DOWN, one key subtitles, one key chapters, etc) and then this would be a perfect daemon to stay running and act on all the extra remote codes. Great info BTW! Logged _______________________________________________________________________ -- Chris Pages: [1] [56]2 [57]3 [58]Print [59]« previous [60]next »