EMTEC N200 Web remote control

Remote Web InterfaceVai alla versione in italiano
This piece of software is a web interface to remotely control EMTEC N200 mediaplayer as easy as you would use a standard IR remote.

You can directly control DvdPlayer, the app behind most of the mediaplaier based on Realtek media-processors like the RTD1073DA on wich the EMTEC is built.

The Web interface is built with AJAX tecnology, so you can send multiple commands without have to wait the execution of the single one and without have continuous page refreshes, as you would with a remote IR!



To make things work, you have to follow these simple steps:

  1. make possible to pipe commands in DvdPlayer application
  2. upload web interface

1. This is the only manual operation. As described in many forums, DvdPlayer is launched on startup from a script, so we have to modify it in a way we can interact with the application. Follow these simple steps:

telnet into your mediaplayer (user root, no password)

telnet IP.OF.YOUR.N200

edit rcS file

vi /usr/local/etc/rcS

you have to add the bold red strings

if [ -f $DEFAULT_AP_DIR/DvdPlayer ] && [ -x $DEFAULT_AP_DIR/DvdPlayer ]; then
cd $DEFAULT_AP_DIR
touch /tmp/command_sender.txt
if [ -f $DEFAULT_AP_DIR/RootApp ] && [ -x $DEFAULT_AP_DIR/RootApp ]; then
	echo Running dvdplayer with RootApp
	tail -f /tmp/command_sender.txt | ./RootApp DvdPlayer&
else
	echo Running dvdplayer
	tail -f /tmp/command_sender.txt | ./DvdPlayer&
fi
else
	/usr/local/etc/dvdplayer/script/run_tail
fi

That’s it!

2. Now, to install the web interface do the following:

cd /tmp
wget http://adicon.lahost.org/software/EMTEC/Remote/install.sh
chmod a+x install.sh
./install.sh

ATTENTION! This script will reboot your mediacenter to complete the installation. If you don’t wont to restart it, you have to execute the single steps by hand, here they are:

mount -o remount,rw /
cd /tmp_orig/
wget http://adicon.lahost.org/software/EMTEC/Remote/Emtec_WebRemote-1.0.tar
cd www
tar -xf ../Emtec_WebRemote-1.0.tar
sync
mount -o remount,ro /

Once restarted, you can connect to your mediaplayer through your phone, PDA, iPhone or whatever browser you want at its address:
http://IP.OF.YOUR.N200/

Resources:
Consumer Electronics Hacker
MHDWorld for Emtec Forum
MHDWorld for Emtec Forum
Thoughts and Challenges
Icons used

Articoli (forse) correlati

41 Commenti to 'EMTEC N200 Web remote control'

Subscribe to comments with RSS

  1. Psychodad said,

    Hi

    Verry nice! I can control my N200 with my Cellphone (Nokia E51) via my WLAN – that’s cool. Thank you alot for your work.
    My only wish… can you add Buttons for:
    -change language (during playing a movie)
    -skip forward/backward 30s (as seen on that site with iphone control, but files are missing there)

  2. adicon said,

    Thank you! Yes, so do I can control my E200 with my N81 :)
    You can change language with the button labeled “audio sys” accessible clicking on the small orange button top-right.
    For skipping, the buttons are those erroneously labeled prev/next chapter. Next goes ahead 40s, prev goes back 10s.

    In an upcoming version I’ll correct these labeling errors.

  3. jro said,

    good Job! works fine with MEMUP NRX mediadisc and wifi phone.
    I had to modify the install method since the system is on read-only memory.
    a bit slow. do you have any idea to make it faster?

  4. jro said,

    usage of mkfifo (= mknod … p) explained here by ralexs
    http://emtec.mhdworld.com/modules/newbb/viewtopic.php?topic_id=4030&start=0
    My rcS allows : http access to the list of recorded movies,
    start of SAMBA server
    remote control
    my mediadisc is MEMUM NRX (realtek RTD1262)
    my rcs :
    #!/bin/sh

    #ifconfig eth0 192.168.0.2 netmask 255.255.0.0
    #route add default gw 192.168.0.1
    #mount -t nfs -o nolock 192.168.0.1:/nfs/rootfs /mnt

    #/sbin/modprobe ide-cd
    dd if=/Test.fat of=/dev/rd/0
    mount -t vfat /dev/rd/0 /mnt/rd
    swapon /mnt/rd/swap.img

    #rm -f /usr/local/etc/dvdplayer/VenusSetup.dat

    #ln -s /dev/cdroms/cdrom0 /dev/cdrom0
    #ln -s /dev/cdrom0 /dev/dvd
    ln -s /mnt/dvdvr /dev/dvdvr

    DEFAULT_AP_DIR=/usr/local/bin

    if [ -f $DEFAULT_AP_DIR/DvdPlayer ] && [ -x $DEFAULT_AP_DIR/DvdPlayer ]; then
    cd $DEFAULT_AP_DIR
    # touch /tmp/command_sender.txt
    mknod /tmp/command_sender.txt p
    if [ -f $DEFAULT_AP_DIR/RootApp ] && [ -x $DEFAULT_AP_DIR/RootApp ]; then
    echo Running dvdplayer with RootApp
    ## tail -f /tmp/command_sender.txt | ./RootApp DvdPlayer&
    while true; do dd if=/tmp/command_sender.txt bs=1 conv=notrunc 2>/dev/null;
    done | ./RootApp DvdPlayer > /tmp/appout&
    sleep 10
    echo “{” >> /tmp/command_sender.txt
    # echo -e ‘Cnetperf offncopyfree 1nquitn’ >> $DVDCMDFIFO
    # ./RootApp DvdPlayer&
    else
    echo Running dvdplayer
    ## tail -f /tmp/command_sender.txt | ./DvdPlayer&
    ./DvdPlayer/dev/null;
    done | DvdPlayer > /tmp/appout&
    sleep 10
    echo “{“>/tmp/command_sender.txt
    # ./DvdPlayer&
    fi
    else
    /usr/local/etc/dvdplayer/script/run_tail
    fi

    let size=”0x”`grep mtd4 /proc/mtd | cut -d ” ” -f2`
    let size=size-0×120000
    let size=size+130816
    let size=size/4
    MAGIC=`dd if=/dev/mtdblock/4 bs=4 skip=$size count=1`
    if [ "$MAGIC" = "babe" ]; then
    echo This is not the first time booting up. No need to write the magic into flash
    else
    dd if=/usr/local/etc/magic of=/dev/mtdblock/4 bs=4 seek=$size count=1
    echo This is the first time booting up. Write the magic into flash
    fi

    ln -s /tmp/hdd/volumes/HDD1 /tmp/www/HDD1
    ln -s /tmp/hddmedia/lrec.cgi /tmp/www/cgi-bin/lrec.cgi
    ln -s /tmp/hddmedia/cmd.cgi /tmp/www/cgi-bin/cmd.cgi
    ln -s /tmp/hddmedia/images /tmp/www
    ln -s /tmp/hddmedia/startsmb.cgi /tmp/www/cgi-bin/startsmb.cgi
    ln -s /tmp/hdd/volumes/HDD1/debian/samba/smbd /tmp/samba
    mkdir -p /tmp/private
    SMBDDIR=/tmp/hdd/volumes/HDD1/debian/samba/smbd
    cd $SMBDDIR
    echo ./smbd -D -s $SMBDDIR/smb.conf –lockdir=$SMBDDIR/locks –piddir=$SMBDDIR/locks>/tmp/msg.txt
    ./smbd -D -s $SMBDDIR/smb.conf –lockdir=$SMBDDIR/locks –piddir=$SMBDDIR/locks >/tmp/msg2.txt 2>&1
    #
    ———————end—————-
    many thanks to ralexs and german guy who explains how to install samba.
    see : http://www.mpcclub.com/forum/showthread.php?t=15110&highlight=ellion
    see (in french!) http://www.commentcamarche.net/forum/affich-16220917-memup-nrx-acces-a-my-recordings-sur-pc

  5. adicon said,

    @jro post 1
    Thank you!
    Also “/usr/local/etc/rcS” is read only?
    No I don’t know how to speed up it :( My be it is a web server problem, but my phone usually cache the page so it haven’t to reload each time and the page load is almost fast. However the rendering of all the PNG may be slow, you could try to convert in JPG or GIF and change consequently the index.html

  6. adicon said,

    @jro post 2
    It look very interesting, especially the technic regarding the FIFO. May be it could be used also to bounce some streams hard to recovery trought a normal RSS feed.
    However as soon as I can, I’ll try this and change my script accordingly. Thank you again ;-)

  7. Yahoouj said,

    Really good work about this website was done. Keep trying more – thanks!

  8. Colin said,

    Hello
    i followed exactly what you wrote in your manual but it doesnt work for me :( everything seemed to work fine but when i type in the ip of my n200 in the browser it shows me a page called “a simple html+cgi exampe” where i can add 2 numbers…
    where is the problem can anyone help me?

    Greetings

  9. adicon said,

    @Colin
    It seems that the files for the web remote command interface doesn’t get in the proper location or that, after the reboot, for some reason, they had been overwritten with the default one.
    Did you already tried to re-make steep by steep the procedure again?
    Can you log what you do and the output from EMTEC and post it here?

  10. Machura said,

    Hi, i am using Web RC , as is wroted top of thids pages. But i cannot find buttons “OPTIONS”, “TV SYS”, “SEARCH”. How I can add it ? Where i can to find “code” of buttons ?

  11. adicon said,

    @Machura
    You have to click on the orange button with a spanner top right to show other buttons that will appear on bottom.

  12. Machura said,

    ok, but if i would made own button as it is on orig. RC ? Or it is seq. of several codes ?

  13. adicon said,

    @Machura
    Yuo have to modify the source code of the HTML page. It is simple HTML with a call to an AJAX JS function that actually call a shell script with the appropriate command-character to pass to DvdPlayer.
    It is quite simple to add new buttons and it should be possible, with a little hack, to create a sort of macro system in the shell script.

  14. Machura said,

    ok, but i dont know to find code (character) for “Option”

  15. adicon said,

    If you just take a look at the “Resources”, you will find what you ask for.

  16. sean said,

    I plan to give this a try once my Asus O!Play arrives – thanks for sharing your work. Ideally, I would like to be able to use the device to play music without having to switch on the television. Is there a way to get status information back from DvdPlayer that could then be used to provide a GUI via HTTP?

  17. Machura said,

    can you tell me, where I can see “Resources” ?

  18. adicon said,

    @Machura
    Search in this page for Resources! Or go up of 6 pages, or 82 cm, or…

  19. adicon said,

    @sean
    Thank you.
    I too would have liked the idea to “grab” information from DVDPlayer in some way to report them on my remote control, for examples, but unfortunately it doesn’t seem to output anything on standard out regarding what it is playing.

  20. Machura said,

    I have a little problem. I trying fw from S120H and I add web remote too. After Stanby-Wakeup the N200 web-remote doesnt work more (menu is displayed, but nothing happends there on N200). I must reboot or unplug/plug power. Where can be problem ?

  21. adicon said,

    @Machura
    May be when you resume from stand-by, the pipe for sending commands to DVDPlayer is no more available.
    Probably the start script (/usr/local/etc/rcS) isn’t called when resuming from stand-by. You should verify this telnetting in after resume and search (with the ps command) if DVDPlayer is piped with the command file. Otherwise you should try to understand if the startup daemon call some other start script file.

  22. Machura said,

    I am not expert in this, but could be added into web-remote some for “reboot -f” ?

  23. adicon said,

    It could, but I don’t remember the user the http daemon run under, may be the script wouldn’t have enough permissions to reboot!
    Add a new button/command in the orange zone isn’t so difficult, so you could try.

  24. Machura said,

    done :-)

  25. Machura said,

    I have one question: Is possible somewhere find conversion between text code and internal code ?

    Example: “OK” = ” ” from WEB RC, but sended with true RC is for same button code 0x27H
    etc …

  26. adicon said,

    @Machura
    Do you mean something like this?
    http://www.acryan.com/downloads/ACR-PV73100_RC_Codes.jpg

  27. Machura said,

    this is codes for button only, but there in DvdPlayer are for each button attached own code. F.eg: TV Sys (On/OFF) button has 0×57 and when is this button pressed, is used 0×01 => if is pressed button with 0x57h, then is sended internal 0×01. When same is made with WEB RC, is send “O”. Where i can known what made codes (0×01 … ) ?

  28. BatCav3 said,

    Thanks!!
    I’ve been busy with the apacer al-460 media player
    without harddisk, and i’ve got it to work with the files in the
    right places and mod of rcS.
    Really cool! now i’m working on putting all the files needed on
    the writable part /usr/local/etc/ and cp them to /tmp after boot-up.
    Apacer’s al-460 has allot of refferences to ryan playonhd so called ‘pohd’ and while searching the web I stumbled on the venus login here.. Thanks allot, i hope to automate some controls the hard way with the help of your IR commands.
    Gr from the Netherlands

  29. BTF said,

    I can not install, gives access denied:

    / # mount -o remount,rw /
    / # cd /tmp_orig/
    /tmp_orig # wget http://adicon.lahost.org/software/EMTEC/Remote/Emtec_WebRemote-1.0.tar
    wget: Emtec_WebRemote-1.0.tar: Permission denied

  30. adicon said,

    @BTF
    It isn’t a problem of my site, I can download it without problem. Are you sure you have write permission in /tmp_orig/ and the remount command have had success?
    Try to verify giving ‘mount’ command without parameters and look if the partition had been mounted with write permission.

  31. Ricz said,

    Hello,
    I updated the installation script for compatibility with Ellion – HMR351H and added a few keys, and a quick test function to test new codes: http://tmg.it/articoli-tecnici/54-comandare-dvdplayer-della-ellion-350h

  32. I tested in egreat R1B+ and work perfect!!! thanks a lot!!!

    you know some way to get actual running video in this dvdplayer app?

  33. adicon said,

    Sorry, stopped TalkBack due to SPAM problems :-(

  34. adicon said,

    @Ezequiel Bertti

    Sorry, what do you mean for “running video”? Streaming?

  35. Автобусные и микроавтобусные пассажирские перевозки по Украине

  36. turtel said,

    @adicon
    I´ve got the same problem: remounted seccessfully but no writing permission.
    I checked via mount and everything is mounted with rw.

    Could you give me please any hint?

    Thanks a lot :)
    turtel

  37. Nice article!! You have provide lot of information in this wonderful post. Thanks for this…Keep updating your post and keep sharing your wonderful post with us.

  38. enzign said,

    Hi,
    Great job on the remote software. I also however have the same problem with write permissions. Even if it’s remounted rw i still can’t write to it for some reason. :/
    Any ideas would be very welcome.
    Thnx

  39. Greenie said,

    Unfortunately the links to the web remote do not work any more. Can you please provide updated links? Thanks!

  40. AdiCon said,

    Now it is Ok. Sorry!

:: Trackbacks/Pingbacks ::

  1. Pingback by Social skill strategy - Social work - Skill social - on September 8th, 2010 at 04:00

Lascia un commento