Mounting an NFS share on a USB device to bypass DLNA
By marcelr, major input from arris69 and a bunch of others from the avsforum.
What you need
- A working NFS server on your network
- telnet access to your TV
- Possibly a USB pendrive (if you're lucky, you don't need this)
TODO : Virtual USB
Needed to load some kernel objects if there is no USB flash at USB port
What you do
- set up your NFS server to export at least one directory to your TV. Since your TV will probably only play music, movies etc. exporting read-only will do. A typical line in your exports file (/etc/exports on most unices) will look like this:
/full-path-to-directory-to-export aaa.bbb.ccc.ddd/32(ro) # tv will mount read-only
with aaa.bbb.ccc.ddd your TV's IP-address.
- If you haven't done so already, set up telnet access to your TV, see How to enable Telnet on samsung TV's.
- create and edit /mtd_rwarea/SamyGO.sh to startup the telnet daemon, mine looks like this:
#!/bin/sh # do not EVER remove the next two lines: They are your only access to your TV! mount -t devpts devpts /dev/pts telnetd
- make sure SamyGO.sh is executable:
chmod 755 /mtd_rwarea/SamyGO.sh
- patch your exe.img file to execute /mtd_rwarea/SamyGO.sh (choose "a" when asked in patcher for telnet option) and install, see Open backdoor for fixing bootloop situations for details.
- reboot, telnet to your TV and open /mtd_rwarea/SamyGO.sh
Depending on your the combination of hardware/software, two major possibilities exist for mounting NFS shares:
- first possibility, via usb pendrive, works always: Insert a USB pendrive with at least one empty subdirectory in the root directory, e.g., /media
- add the following lines to rc.local, or put them in a separate script which in turn is called from rc.local:
# wait for the rest of the TV boot sequence to complete, the USB stick with the # mount point for the NFS share is mounted downstream from this script .... sleep 30 # YMMV # mount NFS share mount -o nolock ppp.qqq.rrr.sss:/full-path-to-directory-to-export /dtv/usb/sda1/media -t nfs
with ppp.qqq.rrr.sss the nfs server's IP address, /dtv/usb/sda1 is the place where USB drives are mounted (at least on my TV)
- make sure this script is executed in the background. Otherwise you may get bootloop situations.
- second possibility, without USB pendrive, may work if you're lucky: Add the following lines to rc.local:
sleep 30 # YMMV mkdir -p /dtv/usb/sda4 # mount NFS share: mount -o nolock ppp.qqq.rrr.sss:/full-path-to-directory-to-export /dtv/usb/sda4 -t nfs # append sda4 notification to log file: echo "[sdd] Vendor : Linux Product : Ext disk Serial : Q80VQLFL Devpath : 4 Lun : 0 MountDir : /dtv/usb/sda4 FileSystem : vfat " >> /dtv/usb/log
The mounted share will show up when you hit the media.p button on the remote. The second method does NOT work on uexxB70xx (and probably others, please notify me in the forum).
Benefits of NFS vs DLNA ( below others )
- Via this method you can use features like FWD, RWD, PAUSE etc. ( which for some wired reasons are lacking with DLNA )
- Some Container Formats & Codecs appear as not supported via DLNA but work fine when opened via NFS
- If you use 'Allegro' as a NFS server on Windows XP the subtitles won#t work on your TV. ( You can use other alternatives like Cygwin with NFS server )
- Some users reported that 'ls' command hangs TV. User 'ee41rr' finds solution that it was caused by having Jumbo Frames (9000 MTU) enabled on NAS. Jumbo Frames isn't compatible with NFS. Switching Jumbo Frames off or switching file mount to Samba worked a treat.