1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Foxsat-HDR FTP and telnet working

Discussion in 'Freesat' started by mogie, Jan 9, 2011.

  1. raydon

    raydon Active Member

    Joined:
    Apr 9, 2010
    Messages:
    1,034
    Trophy Points:
    116
    Ratings:
    +1,009
    The addition of extra services is limited by the physical flash ROM size. Only 1024Kb is allocated to the Linux busybox OS. Of this, 940Kb is currently used. I doubt if you can squeeze Samba binaries into 84Kb.
  2. Quaddy

    Quaddy Member

    Joined:
    Mar 29, 2008
    Messages:
    1,810
    Trophy Points:
    66
    Ratings:
    +243
    bloated samba, NFS please ;)
  3. tgabber

    tgabber Member

    Joined:
    Jan 17, 2011
    Messages:
    4
    Trophy Points:
    3
    Ratings:
    +1
    Actually the flash rom size isn't a problem. There's no reason why any extra binaries can't be stored on the HDD only a link from the startup stuff needs to be in rom, and you don't even need that if you are happy to start extra services manually.

    The limiting factors on the box are its RAM memory, CPU load and (depending on what you want to do) disk I/O activity

    CPU load doesn't seem to be too much of an issue in normal use, even with 2 recordings going and watching a 3rd, /proc/loadavg still reports less than 0.5 (with 1 being fully loaded)

    The RAM memory situation as reported by the command 'free' on my machine shows (in kilobytes)

    total mem: 125536, used: 122956, free: 2580, buffers: 57808

    at first sight that looks like very little free memory, however the 'buffers' figure can be thought of as free in that Linux flexibly uses most of whatever free memory there as buffer space.

    However, if you left no free memory at all then Linux would have no buffer space... not good for performance.

    The Humax does not make use of swap space, so the physical RAM is a hard limit.

    I haven't done any assessment of disk i/o activity yet as the Humax lacks the tools that a full Linux install normally has. It does provide the raw data via /proc/diskstats but that file gives a snapshot figure of disk reads and writes, so to get a picture of i/o activity you need to collect that data at timed intervals. Something Linux admin tools normally take care of for you.
    Last edited: Jan 18, 2011
  4. jlearmonth

    jlearmonth Member

    Joined:
    May 5, 2008
    Messages:
    584
    Trophy Points:
    18
    Ratings:
    +20
    Does deleting, via FTP, the three files for a recording cause any problems ?
    Ta
    JL
  5. avie9

    avie9 Member

    Joined:
    Feb 3, 2008
    Messages:
    53
    Trophy Points:
    6
    Ratings:
    +0
    I tried this and it did not cause any problems.
  6. ian_m42

    ian_m42 Member

    Joined:
    Jul 25, 2008
    Messages:
    153
    Trophy Points:
    18
    Ratings:
    +10
    OK then, how about a web server running like TiVo's have had for years. I set all my TiVo recordings via a web browser (usually from work :rolleyes:) and don't give me all the CPU resource issue the TiVo series 1 in UK is a 54MHz CPU with 16MB of RAM....

    Here is a demo page of what the browser sees.
    http://sites.google.com/site/thomsontivo/main.htm?attredirects=0

    Wikipedia entry.
    Tivoweb - Wikipedia, the free encyclopedia
  7. meercat

    meercat Member

    Joined:
    Jan 18, 2011
    Messages:
    4
    Trophy Points:
    1
    Ratings:
    +0
    Been lurking on this thread (as I suspect many more people are - nice work Mogie) but yeah, a web interface would make a lot of sense. In particular, I'd love to be able to review and revise schedules via a web interface.

    TiVo have a lot of people available to write this stuff: I expect running something like perl or python would be a lot of development work and a drain on CPU and RAM resources, so I thought I'd float the idea of putting a much simpler web server on there and put all the smarts in javascript on the client (eg webserver can send a page that contains the schedule file, javascript on the client does all the data manipulation and sends back an entire new schedule file). It wouldn't be perfect, or robust for multiple simultaneous users, but it might be easier to implement in the first place compared to putting a full copy of Apache and a scripting language onto the Humax and maintaining scripts etc - this way most "new features" would be provided by writing more javascript pages that the webserver serves as static content...

    Is there documentation anywhere about the HDF file format and how you pack and unpack it ? Are the tools available from the HUMAX open source page or somewhere else ?
  8. davestubbs

    davestubbs New Member

    Joined:
    Jan 11, 2011
    Messages:
    19
    Trophy Points:
    3
    Ratings:
    +1
    That's what I'm hoping for!

    Dave.
  9. jlearmonth

    jlearmonth Member

    Joined:
    May 5, 2008
    Messages:
    584
    Trophy Points:
    18
    Ratings:
    +20
    Yes it would be nice.
    However reviewing and revising the schedules is a far more complex process than just ftping files to/from the box.
    You would need full knowledge of how the schedules work.
    As far as I know Humax don't release this info so people would be guessing.
    And guessing is dodgy !
    I may be wrong ( often am ).
    JL
  10. meercat

    meercat Member

    Joined:
    Jan 18, 2011
    Messages:
    4
    Trophy Points:
    1
    Ratings:
    +0
    True, but it depends how much of a hacker you are :)

    I've reverse engineered a few things over the years (and I have a friend who sort of specialises in it) but yes, it's usually a case of trial and error, and sometimes it turns out to be simple, other times not so.

    If I get some spare cycles (I haven't even tried this FTP/telnet access yet) then I'll poke around a few files and see if I can spot what might be where, but I expect there are other forums for such discussions.
  11. ian_m42

    ian_m42 Member

    Joined:
    Jul 25, 2008
    Messages:
    153
    Trophy Points:
    18
    Ratings:
    +10
    TiVo web is nothing to do with TiVo Corporation, once network access to TiVo was made possible (serial line in about 2000, ethernet 2002) someone wrote a web server in TCL.

    Go look here for archive of the now defunct lightn.org, which was the main TiVoWeb delevelopment site. Started in Dec 2000, which is only a month after I got my TiVo.
    Internet Archive Wayback Machine

    I didn't get TiVoWeb until 2005 and my TiVo is still running today. Wonder if the Humax will be running in 10 years time :thumbsup:.
  12. caldirun

    caldirun Member

    Joined:
    Mar 18, 2007
    Messages:
    347
    Trophy Points:
    21
    Ratings:
    +16
    Raydon, is it possible to adapt the Edit HMT option on AV2HDR so thick users can enter the path to the particular folder in the Video folder where they are about to send the 3 files via FTP when converted? I have seen the fix and it means nothing to me, I only use Linux to get me out of the mess Windows lands me in! or to clone my HDD.
  13. jlearmonth

    jlearmonth Member

    Joined:
    May 5, 2008
    Messages:
    584
    Trophy Points:
    18
    Ratings:
    +20
    Anyone know if it's possible to get the FOXSAT out of standby from the network ?
    I have tried sending it WOL (Wake On Land) magic packets but no success.
    Perhaps the network hardware needs special config to recognise the WOL.
    I guess the hardware is some standard interface chip.

    And how to send it to standby from a telnet session ?

    JL
  14. REPASSAC

    REPASSAC Active Member

    Joined:
    Jan 11, 2011
    Messages:
    2,572
    Trophy Points:
    106
    Ratings:
    +393
    Yes - It's not. The HDR power saving mode removes power from the Ethernet port in standby (possibly in order to comply with the EEC < 1 watt directive)
  15. meercat

    meercat Member

    Joined:
    Jan 18, 2011
    Messages:
    4
    Trophy Points:
    1
    Ratings:
    +0
    Ah, ok.. I didn't realise the history behind it, sorry, but it still implies a significant body of work done over some time (cf mythtv), whereas I was wondering if a quick web server of the existing files could be knocked up while we wait for the hordes of software developers to descent on the Humax :)
  16. GaseousClay

    GaseousClay Active Member

    Joined:
    Jan 11, 2011
    Messages:
    2,871
    Trophy Points:
    136
    Ratings:
    +1,076
    Would it work if Power saving was disabled?
  17. REPASSAC

    REPASSAC Active Member

    Joined:
    Jan 11, 2011
    Messages:
    2,572
    Trophy Points:
    106
    Ratings:
    +393
    I would not think so - the manual only mentions the LNB and scart loop-through and the time display. It's easy to try, you can see if the green light next to the HDR's port is lit or not.
    However I don't think Humax has included the WOL function - in a DS thread on making remote recordings Bob_Cat implied there were two ways of doing this :
    1. WOL and the problem was here was the port was not powered in standby or
    2. Via the box waking up at intervals and checking the web. This has the advantage that you don't need port forwarding to be set-up on the clients router.
  18. raydon

    raydon Active Member

    Joined:
    Apr 9, 2010
    Messages:
    1,034
    Trophy Points:
    116
    Ratings:
    +1,009
    Seekers of the knowledge might want to start HERE ;)
  19. raydon

    raydon Active Member

    Joined:
    Apr 9, 2010
    Messages:
    1,034
    Trophy Points:
    116
    Ratings:
    +1,009
    I intend to release an update to AV2HDR to address this issue. Watch this space. :D
    • Thanks Thanks x 1
  20. davestubbs

    davestubbs New Member

    Joined:
    Jan 11, 2011
    Messages:
    19
    Trophy Points:
    3
    Ratings:
    +1
    From that page:

    ---
    hdpvr.hmx consists of 3 parts. The interesting one is the Flash_70000.bin (contains root_fs – root file system /). Once extracted from hdpvr.hmx, you’re able to copy the Flash_700000.bin to elsewhere for further work.
    ---

    Which doesn't tell me how to extract the 3 parts of the .hmx file.

    Dave.
  21. raydon

    raydon Active Member

    Joined:
    Apr 9, 2010
    Messages:
    1,034
    Trophy Points:
    116
    Ratings:
    +1,009
    From the same page:
    ---
    One word on the legal aspect: Decrypting and providing a modified version of a vendor’s software isn’t allowed by law. So you will not find a link to the decryption tool or to the patched firmware at all. I’ll explain the how-to, and provide some basic stuff, and finally the root file system with some add-ons. If you’re looking for decrypting / encrypting iCord’s firmware you may find something in Google by searching for “colibri” in relation to iCord.
    ---
  22. caldirun

    caldirun Member

    Joined:
    Mar 18, 2007
    Messages:
    347
    Trophy Points:
    21
    Ratings:
    +16
    Many thanks from all, in anticipation.
    • Thanks Thanks x 1
  23. jlearmonth

    jlearmonth Member

    Joined:
    May 5, 2008
    Messages:
    584
    Trophy Points:
    18
    Ratings:
    +20
    I deleted two large movies (6 files) using ftp.
    Unfortunately I didn't check the percent usage reported by the FOXSAT media list before doing this.
    However I got the "impression" that the media list had not picked up the release space.
    I should have checked first !
    Does it pick up the released space ??
    JL
  24. ian_m42

    ian_m42 Member

    Joined:
    Jul 25, 2008
    Messages:
    153
    Trophy Points:
    18
    Ratings:
    +10
    TiVoWeb is written in TCL see
    Tcl - Wikipedia, the free encyclopedia
    and is as such not really a webserver as TCL generates the HTML on the fly. You add futher modules (in TCL) to the modules directory and they then appear as a menu option on the start page.

    Looking at the TCL scripts they are along the lines of
    Code:
    ForeachMfsFileTrans fsid name type $nowshowingdir "" 15 {
    [LEFT]set rec [db $db openid $fsid][/LEFT]
    if {$nstype == 6} {
    print_nowshowingrow $chan $rec $nstype $rcount
    [LEFT]incr rcount[/LEFT]
    } else {
    print_nowshowingrow $chan $rec $nstype
    }
    This prints out to a network port the contents of the "Now Showing" (ie recordings) list. TiVo stores everything, video data, epg data, etc in a giant database called MFS (media file system).
  25. RobinE

    RobinE Member

    Joined:
    Jun 15, 2006
    Messages:
    37
    Trophy Points:
    8
    Ratings:
    +2
    Nice (V. NICE) piece of work. You beat me to it!! I had lined this up to be a "little" project to keep away the winter blues, and had started on it last week and had found the iCord forum and "Cats" blog. I've picked out the "raw" squashfs files you've changed by comparing the Humax 10013 firmware with your release, using tools found via the iCord forum (there seem to be an awful lot of versions of unsquashfs) and see that you've added tinyftp and utelnetd into the bin directory, and corresponding entries into the etc/init.d directory. Plus a number of other files such as fstab. passwd, shadow and others are showing build dates of 28Nov09, rather than more recent dates. I'm wondering why that should be? A project started and then set aside maybe? My hope had been smb or nfs connectivity, I suppose to avoid having to ftp in. With the fuller connectivity I might have automated some type of backup of the foxsat recordings onto my NAS drives. Plus there was always the hope of being able to use the foxsat as a media player for files already on the NAS, as I do now with a popcorn-hour and an ASUS O!play. Far too many boxes for my family to cope with. I suppose the main driving force tho was curiosity and the challenge ;-). Can you shed some more light on your work and where it's going. Maybe off-forum where appropriate.
    Last edited: Jan 20, 2011
  26. caldirun

    caldirun Member

    Joined:
    Mar 18, 2007
    Messages:
    347
    Trophy Points:
    21
    Ratings:
    +16
    Good news, the HDR will accept .jpg, .mp3, and folders containing such files via FTP with no problems, just have to hope Raydon gets us the Video folder address bug sorted and it will save a lot of USB plugging and unplugging.
  27. barlborough

    barlborough Member

    Joined:
    Sep 26, 2007
    Messages:
    28
    Trophy Points:
    3
    Ratings:
    +1
    I have an external hard drive plugged into the rear USB.
    FTP AV2HDR files to the hard dive works without problem, the media list shows the program, and it plays OK
  28. lrmulli

    lrmulli Member

    Joined:
    Oct 8, 2010
    Messages:
    15
    Trophy Points:
    3
    Ratings:
    +4
    Morning Guys

    Good News - I successfully installed a UPNP server onto the HDR yesterday - I then was able to stream directly to a UPNP client over the network - I used XBMC as my client.

    The operation could be smoothed out a lot and currently it requires you to manually start the upnp server, the downside is the media server seems to be a 30 day trial.

    Here is what I did:-

    Download Twonkymedia server from here



    Your now ready to connect up using your fav UPNP client - I tested it with XBMC

    My directions maybe a little patchy as I planned to leave logmein running on my PC at home today so I can reference the actually setup while writing this post - unfortunately it has stopped running so I have had to do it from memory.

    Hope you all manage to get it working and Good Luck.

    Kudos and thanks go to Mogie - without his work i would not have been able to get this done. Well done buddy and I look forward to seeing more hacks for the HDR.

    Lrmulli


    Link edited - thanks to @twosheds
    • Thanks Thanks x 4
    Last edited: Jan 21, 2011
  29. snelly

    snelly Member

    Joined:
    May 24, 2002
    Messages:
    227
    Trophy Points:
    18
    Ratings:
    +3
    This is great news!!!

    Well done guys you have taken this to the next level.

    Is it just me or does it feel like the flood gates are about to open for new ventures with these boxes!

    I have an old NAS that runs busybox linux on a very small arm cpu and that is capable of running all sorts (lighttpd, transmission, php) so I think the opportunity is there to have relatively sophisiticated interfaces.

    It will however all be limited to just messing with the files unless someone is able to reverse engineer the freesat bits and pieces.

    It might be a good idea if someone can setup a project wiki for this so that people can work independently without too much duplication of effort and benefit from each other. Also a sensible wish list of add ons.

    Personally I would like to see superior management of recording scheduling in non freesat mode.

    I think I am going to see if I can get lighttpd running as this would enable many other things.

    Tim
  30. twosheds

    twosheds Member

    Joined:
    May 15, 2008
    Messages:
    39
    Trophy Points:
    8
    Ratings:
    +4
    Irmulli
    I've installed Twonkymedia (using Filezilla) following your instructions but when I run './twonkymedia' I receive the following message

    ./twonkymedia: ./twonkymedia: 1: Syntax error: word unexpected (expecting ")")

    I tried the command '/mnt/hd4/Music/twonky/twonkymedia.sh' and received the following messages

    /mnt/hd4/Music/twonky/twonkymedia.sh: /mnt/hd4/Music/twonky/twonkymedia.sh: 29: dirname: not found

    Twonky server
    -------------
    Syntax:
    /mnt/hd4/Music/twonky/twonkymedia.sh {start|stop|restart|reload|status}



    I then tried '/mnt/hd4/Music/twonky/twonkymedia.sh start' and received the following messages

    /mnt/hd4/Music/twonky/twonkymedia.sh: /mnt/hd4/Music/twonky/twonkymedia.sh: 29: dirname: not found
    Twonky servers not found.



    Is there something else I need to do in addition to your instructions to get the server to run ?

    Thanks

Share This Page