
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:
- make possible to pipe commands in DvdPlayer application
- 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
Hi
RispondiEliminaVerry 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)
Thank you! Yes, so do I can control my E200 with my N81 :)
RispondiEliminaYou 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.
good Job! works fine with MEMUP NRX mediadisc and wifi phone.
RispondiEliminaI 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?
usage of mkfifo (= mknod ... p) explained here by ralexs
RispondiEliminahttp://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-0x120000
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
@jro post 1
RispondiEliminaThank 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
@jro post 2
RispondiEliminaIt 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 ;-)
Really good work about this website was done. Keep trying more - thanks!
RispondiEliminaHello
RispondiEliminai 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
@Colin
RispondiEliminaIt 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?
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 ?
RispondiElimina@Machura
RispondiEliminaYou have to click on the orange button with a spanner top right to show other buttons that will appear on bottom.
ok, but if i would made own button as it is on orig. RC ? Or it is seq. of several codes ?
RispondiElimina@Machura
RispondiEliminaYuo 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.
ok, but i dont know to find code (character) for "Option"
RispondiEliminaIf you just take a look at the "Resources", you will find what you ask for.
RispondiEliminaI 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?
RispondiEliminacan you tell me, where I can see "Resources" ?
RispondiElimina@Machura
RispondiEliminaSearch in this page for Resources! Or go up of 6 pages, or 82 cm, or...
@sean
RispondiEliminaThank 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.
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 ?
RispondiElimina@Machura
RispondiEliminaMay 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.
I am not expert in this, but could be added into web-remote some for "reboot -f" ?
RispondiEliminaIt could, but I don't remember the user the http daemon run under, may be the script wouldn't have enough permissions to reboot!
RispondiEliminaAdd a new button/command in the orange zone isn't so difficult, so you could try.
done :-)
RispondiEliminaI have one question: Is possible somewhere find conversion between text code and internal code ?
RispondiEliminaExample: "OK" = " " from WEB RC, but sended with true RC is for same button code 0x27H
etc ...
@Machura
RispondiEliminaDo you mean something like this?
http://www.acryan.com/downloads/ACR-PV73100_RC_Codes.jpg
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 0x57 and when is this button pressed, is used 0x01 => if is pressed button with 0x57h, then is sended internal 0x01. When same is made with WEB RC, is send "O". Where i can known what made codes (0x01 ... ) ?
RispondiEliminaThanks!!
RispondiEliminaI'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
[...] AdiCon » EMTEC N200 Web remote control 7 Jan 2010. Now, to install the web interface do the following: cd /tmp wget. You can change language with the button labeled “audio sys” accessible. see (in french!. Trackbacks/Pingbacks :: Nessun Trackbacks/Pingbacks.adicon.lahost.org/2010/01/07/emtec-n200-web-remote-command/ - AdiCon » EMTEC N200 Web remote control [...]
RispondiEliminaI can not install, gives access denied:
RispondiElimina/ # 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
@BTF
RispondiEliminaIt 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.
Hello,
RispondiEliminaI 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
I tested in egreat R1B+ and work perfect!!! thanks a lot!!!
RispondiEliminayou know some way to get actual running video in this dvdplayer app?
Sorry, stopped TalkBack due to SPAM problems :-(
RispondiElimina@Ezequiel Bertti
RispondiEliminaSorry, what do you mean for "running video"? Streaming?
Автобусные и микроавтобусные пассажирские перевозки по Украине
RispondiElimina@adicon
RispondiEliminaI´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
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.
RispondiEliminaHi,
RispondiEliminaGreat 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
Unfortunately the links to the web remote do not work any more. Can you please provide updated links? Thanks!
RispondiEliminaNow it is Ok. Sorry!
RispondiEliminaGreat hack!
RispondiEliminaIt works with N200 updated to latest fw published by EMTEC at October, 2012.
Only to mention several 2 points i missed from the 'official' install procedure:
1. I can't achieve for / (root) filesystem to be writeble, as many more users... As a workaround, i downloaded Emtec_WebRemote-1.0.tar in /usr/local/etc, and untar it in a new www folder. Then, include a cp command in rcS to copy all untared files in /tmp/www on every startup.
2. httpd start should be included in rcS file, in order N200 box can listen for web pages. An very obvious step, but not mentioned anywhere in this forum :-o
After several probes, i added these 2 lines at the end of rcS file, and they worked for me:
cd /tmp/www
/httpd
nighto
Oooops, please modify last line on previous comment ( /httpd ) with correct one:
RispondiElimina/usr/bin/httpd # or whatever folder ur httpd bin resides....
nighto
Thank you very much for your update!
RispondiEliminaHi, Does this work for R700 model? I did all steps and, got the web interface but it does not work.. any ideas?
RispondiEliminaHi, does this work for R700 models? I tried all the commands above, I got the web interface but nothing happens when i click on any button,any explanation?
RispondiElimina