Tuesday, October 6, 2009

Iphone RemoteControl for Emtec N200

How-To use any web-capable PDA as a RC for your N200
(Edit: Description adapted to newer, faster version)
(Edit2: Installation hints added, 'roadmap' extended)

NOTE: The information below is outdated, the pastebin-links have expired, and a fellow Reader has posted an alternate, better, and prettier version here:
Blog of Adicon

There are several reasons why you could want this:
  • Your table already hosts a zoo of remotes.
  • Your PDA doesn't feel flimsy like the default remote.
  • Your PDA uses a rechargeable battery. (priceless in the right moment)
  • Your device has more functions than buttons on the remote.
  • You get RSI from the awkward button placing or the funny shape of your hand.
  • Works through cabinet doors and even with poor aiming.
  • You can call your PDA-Phone if you lose it in the house.
  • You already use your PDA to control other AV-devices.
Some of these may not apply to you, but at least some should speak to you too. For me, 1, 4, 8 and sometimes 7 carried the most weight.

Screenshot of it in action (http://n200/cgi-bin/pda.cgi):

Mute Power
Media
Info
SubsBack ^Vol
+
Audio< Enter
/Go
>
PrevNext v Vol
-
FR FF StopPlay /
Pause
Chap
<
Chap
>
10sec
<
30sec
>
Zoom
-
Zoom
+
RepSlow
01 2
34
56 7
89


As you can see, I believe simplicity is one expression of elegance.
(Plus, it loads fast too and has nearly no dead space)

So, what do you need?
  • Emtec N200 or compatible device (feedback please!)
  • An IPhone or other web-enabled PDA (feedback please!)
  • telnet access to the device.
  • 2 scripts, 1 and 2, which are downloaded/used during the below installation steps.

Device preparation:
Some startscripts and the system area of the device will need to be modified, this is a one-time action, and has proven useful in other ways too. The device needs Internet Access during the installation to download the above scripts, or the 2 'wget'-commands will need to be adapted/replaced.
Now you need the telnet access to execute the following commands:

1. Make Root-Filesystem writeable:

/ # mount -o remount,rw /

2. Installing busybox1.9.1 with mkfifo support:

/ # mkdir -p /opt/bin
/ # cd /opt/bin
/ # wget http://moviecube.free.fr/Binaries/busybox1.9.1/busybox1.9.1
/ # chmod +x busybox1.9.1
/ # for i in top netcat strings mkfifo ether-wake nc; do ln -s busybox1.9.1 $i; done

3. Installing the WebUI

/ # cd /tmp_orig/www/cgi-bin
/ # wget -O - http://ralexs.pastebin.com/pastebin.php?dl=m2ccfab9b |sed "s/.$//" >pda.cgi
/ # chmod +x pda.cgi

4. Installing input redirection for DvdPlayer binary

/ # vi /usr/local/etc/rcS

Then go to this page, select all the text from the bottom textbox, and copy-paste it into the second line of the file currently open in the editor, /usr/local/etc/rcS

5. Setting launch trigger, committing changes and reboot

/ # touch /tmp_orig/loadExtScript
/ # sync
/ # mount -o remount,ro /
/ # reboot -f


Done!

Now just navigate -on whatever device- to:
http://IP.OF.UR.N200/cgi-bin/pda.cgi

On the Iphone you have to scale the page to the right size at first use. Can somebody test with a WinMobile device?

Note for developers concerning the major changes from V1:
The old version of this script used an input redirection based on "tail -f". That proved to be ineffective and slower. The new script uses "dd bs=1" and "mkfifo", which is why the installation requires the download/install of the enhanced busybox.

My current 'development version' of the script has more buttons. I've added "GoTo/Search" and "Root". "Eject", "TV Sys", and "Option" are still missing, because I did not (yet)find/integrate their codes. "Option" is not really needed though, because all its functions are available with direct keys.
The keycode behind the "Root"-Button is '/'. This *may* provide a way to build an http-file-browser, but i still need to do some testing.
StandBy-Mode, something missing from the default N200 may also be added to the next version (Also pending further testing/cleaning).
Step Nr.4 from the above steps will be replaced by a simpler wget command (I dont have the original rcS anymore, and have not yet looked for the 'unyaffs' incantation to extract a virgin copy).
I will post a new version soon, check back in 2,3 days.

The work described here was inspired by these two forum posts.

thanks to commenter l.lenzen for pointing out 2 problems with the above description, and thanks to 'triw' on the Emtect Moviecube forum for pointing towards 2 fixes, which I integrated in the above description.

have fun, ralexs

10 comments:

  1. Great Job !
    What I would like to do is not to use the dvdplayer prog, and just "play" a given file (command sent through http).
    Do you think there is hope ? (maybe the dvdplayer has a hidden file-to-play command line option ?

    Cheers,

    yaayaa

    ReplyDelete
  2. Hi ralexs,

    wow, great job!

    I can't get it run. I got always the 404 file not found message
    I followed the above instruction step by step
    Something is missing
    firmware 1193

    thank you for any hint
    l.lenzen@gmx.de

    ReplyDelete
  3. Hello, Thanks to both of you for commenting.

    yaayaa: I haven't found evidence of such an option or sequence of keys to "Jump to specific file".

    I am hoping for support for this in a future version.
    It is needed for some of my plans too.

    l.lenzen: Thanks to you and "triw" for pointing out 2 problems and fixes for the download version of the script in the MovieCube forum. I have integrated both into the above post.

    ReplyDelete
  4. Hallo ralexs, when i type (Step 3) wget -0 ......
    then server returned error 404. Please help me

    Thanx
    namniarb

    ReplyDelete
  5. Hi ralexs, I think your two scripts in pastebin are expired, can you re-post them here or in some other places, please? Or can someone that already have them to post a link? Also a PM to me is Ok, so I can make them available again (adicon74 on Big "G"). Thanks.

    ReplyDelete
  6. Please update the links...
    It's a very interesting project!!

    Thanx
    CacioCavallo

    ReplyDelete
  7. Meanwhile waiting Relexs, I realized a new web interface: http://www.lahost.org/go/Remote

    ReplyDelete
  8. UPDATE LINKS!!!!

    PDA.CGI is MISSING

    ReplyDelete
  9. links are dead, can you update them please ?

    ReplyDelete
  10. Can update at these app :
    http://www.groovypost.com/howto/ios-media-remote-app-sony-streaming-player/

    ReplyDelete