Kolbu

Computers, Gadgets and Beyond!
Subscribe


Transferring files over FTP/HTTP

Once you have enabled telnet access on your media player, there are a few neat things you can do. One is transferring files from remote computers without going through the whole "disconnect Mvix from TV, connect to PC using USB, copy files, disconnect from PC, connect to TV" thing. As part of the firmware package, you have a command called wget. This is a poor mans copy of the "real" wget command found on many unix systems. Basically it's for Web GETting files, although it can be used for both HTTP and FTP.

 

For this to work, you need a local storage on the Mvix, either an internal hard drive or something writeable connected to the USB port. This is where we will copy our files so that the GUI will be able to show them to us later on. In this example I've used an internal hard drive. The drive has to have ext3 as the file system, not NTFS. The firmware only has read-only support for NTFS, but from 1.1.25 it has full read/write support for ext3.

Then simply use the built-in command wget to fetch files from a web or ftp server. E.g.

way:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 6986      6986         0 100% /
/dev/ide/host0/bus0/target0/lun0/part 1283855840    215820 268988340   0% /tmp/ide/part1

Our internal drive is here /tmp/ide/part1, so we'll store our files there. 

way:~# cd /tmp/ide/part1/

way:/tmp/ide/part1# wget http://www.mvixusa.com/images/logo.jpg

Connecting to www.mvixusa.com[72.29.86.148]:80

logo.jpg             100% |*****************************|  6806       00:00 ETA

 

way:/tmp/ide/part1#  wget ftp://ftp:ftp@ftp.uio.no/pub/ls-lR.gz

Connecting to ftp.uio.no[158.36.2.10]:21

ls-lR.gz             100% |*****************************|  4487 KB    00:00 ETA

Very handy.

Note however, that there are file size limitations here. The built-in wget command will not fetch files of more than 2^32 (4294967296) bytes over ftp. Trying to get larger files will result in the error message wget: SIZE value is garbage.

The same thing is most likely the case for http as well. And in addition to this, your web server may or may not handle files of more than either 2Gb or 4Gb depending on compilation options. Stock Apache 2.0.55 on 64-bit Ubuntu  Edgy will happily serve you larger files though.

Once you've mastered this however, you may want to NFS mount external shares onto your media player as well.


2 Comments to “Transferring files over FTP/HTTP”


  1. Hi Olav,

    is there any way to contact you by an email? I have some questions according your modified firmware and it seems that there’s no other place on the internet, where you can be helped, as even mvix does no fix&updates to their 760, 780 products. Thank you.

    1
  2. Hi Olav.
    Your help is much appreciated, as there’s no other place on the net, where all questions, common and advanced, are answered. Even, there’s no other site as wiki or community, not anymore. Please let this message be here, as it will provide some help to other users, if you answer it. Regarding wget command, it is very interesting, but stops downloading content as soon as telnet connection is dropped. Till now I found one simple way to wget without a pc. It is using a smartphone as a remote but it has to be on to hold a telnet connection. It doesn’t consume your battery too much, but as it can’t go to sleep, it is noticeable. Is there any way to add nohup or screen command to the existing firmware, without the need to brew it? Or any workaround to forbid the unit to stop if a connection is lost? Script execution at startup even would be an idea, but it didn’t work for me. It executes all commands as remount rw but doesn’t do wget. I’m not a linux user, so all the refinements are unknown to me. Hoping and waiting for your answer.

    2


Leave a Reply