Sunday, 04 April 2010 13:06
Last Updated on Sunday, 04 April 2010 21:59
Choosing a media player
I've just acquired the ASUS O!Play HDP-R1 media player for about 90 EUROs. Media players have become really cheap and there are a number of popular choices including the Western Digital WD TV Live, the Popcorn hour (C-200 or A-200), and the Xtreamer.
I didn't want an expensive one, just one to play my media files and one that could mount my network shares on my server. Further more, I have my Harmony 885 remote, so the remote should work with infrared so I could replace it (that knocked out the Popcorn C-200 that works on radio/frequency, except that it is too expensive for my need).
Valid options were the WD, the Asus, and the Xtreamer. I really wanted to play DVD media files that are stored as .iso and use the DVD menu functionality. Only the ASUS HDP-R1 supports this functionality which made my choice easy. The ASUS also has an ethernet connector (no wireless, therefore you need the Asus HDP-R3 one) and an e-SATA connector for a fast external hard-drive connection (next to the more commonly found USB connectors).
Connecting the ASUS O!Play HDP-R1 to your local (SAMBA) shares
It's quite simple to adjust the HDP-R1 to your needs because it runs linux. Of course, it's a scaled down version, based upon Venus linux, and you see this when you logon using telnet. Just use root as username name with no password.
The storage devices are mounted under /tmp/ramfs/volumes, and to add your own storage device, just create a mount point there and use mount:
# mkdir -p /tmp/ramfs/volumes/media
# mount -t cifs -o username=my_username,password='my_password' //my_server_ip_address/media /tmp/ramfs/volumes/media/
In this example, you have to replace my_username, my_password, and my_server_ip_address with the settings from your own server and network. And, of course, you have to replace media by the name of the share you use. Additional shares can be added just as easy.
After this effort, you will see your share appear in the list of Storage devices when playing movies or other media.
Keeping your shares active after a power-outage
The HDP-R1 does have a power button (via the remote), but does not have a physical switch. When turning it off, it only goes into a sleep mode, which has the advantage that after turning you device on again, your shares are still mounted. But when you remove the power cord from the wall and put it back in, you will see that your shares (and even your created mount-directory) will be removed.
To get your shares back after a power outage, we have to modify the boot process. The /etc/init.d directory is read-only, but you can add your own script at the end of the /usr/local/etc/rcS script:
echo 2 /tmp/hdd/volumes/HDD1/ > /sys/realtek_boards/misc_operations
# here end the regular rcS script
(. /usr/local/etc/mount_shares.sh ) &
I've created a separate shell-script that contains the above-mentioned mkdir&mount commands and stored it in /usr/local/etc/mount_shares.sh
This files looks as follows:
echo "Start mount_shares.sh" >>/tmp/ramfs/mount_shares.log
mkdir -p /tmp/ramfs/volumes/media
# first make sure Asus has right IP address
ifconfig eth0 10.0.0.81 netmask 255.255.255.0
route add default gw 10.0.0.138
echo "modified IP address" >>/tmp/ramfs/mount_shares.log
# After that make sure CIFS is mounted correctly
mount -t cifs -o username=my_username,password='my_password' my_server_ip_address/media /tmp/ramfs/date >>/tmp/ramfs/mount_shares.log
echo "End mount_shares.sh" >>/tmp/ramfs/mount_shares.log
Note that my ip address for the device is configured for 10.0.0.81. This caused me a bit of a headache, because when you power-up the Asus device, it does not have this address until you first turn it off using the remote and then turn it on again. The strange thing is that after the reboot, the device (on the
television) presents itself on this 10.0.0.81 address but it does not
react to ping commands. I assume this is a bug in the device. To circumvent this, I set the IP address manually.
So after this script, the media player mounts my SAMBA devices quickly and I can use it to watch my video collection, mp3 music and show my photos to friends. And as it is a linux-device, it will have a range of hacking opportunities for the future...