Angelos Italianknows Blog

Wednesday, 11 April 2012

Getting Optware and Transmission working on the Looqs Meebox


AKA Making the Meebox 1,000,000 times more useful!
Someone asked me the other day how could one get a better BitTorrent client working on the meebox.. I started looking at creating a toolchain to do this, but quickly went to look at the optware set of packages..
What is Optware?  Well basically it was originally developed for the Linksys NSLU2 NAS device but since been ported to many devices and YES it works with our looqs NAS device.. You simply need to know which version of optware you need..

Setup instructions

1. As optware installs all its packages in /opt you need to make sure its got enough disk space.. The Looqs / does not.. First step is to create a directory on your hard disk and link /opt to this
meebox> mkdir /mnt/ide3/opt
meebox> ln -s /mnt/ide3/opt /opt






2. After some digging around it turns out this device is a vt4 device so the following script installs and configures optware






meebox> feed=http://ipkg.nslu2-linux.org/feeds/optware/vt4/cross/unstable
meebox> ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}'`
meebox> wget $feed/$ipk_name
meebox> tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -
meebox> mkdir -p /opt/etc/ipkg
meebox> echo "src cross $feed" > /opt/etc/ipkg/feeds.conf




3. DONE!





Installing Transmission


This was my original objective, so here are the steps to install transmisison, a common/very good Bit Torrent client

1. Use optware to download the transmission software


meebox> export PATH=/opt/bin:$PATH
meebox> ipkg update
meebox> ipkg install transmission


2. One this is downloaded you will need to add your ip address to th whitelist list, or disable it completely. This is done by editing the “settings.json” file on the NAS

Look for the following line in the settings.json file and make sure its set to false


"rpc-whitelist-enabled": false,

3. Create a directory for your downloads


meebox> mkdir /mnt/ide3/transmissionDownloads


4. Transmission by default will store its config files in /.config, we dont want this on the Meebox as the root filesystem is wiped between boots.. I recommend creating a directory to store this and by setting the environment variable TRANSMISSION_HOME it will use that directory

meebox> mkdir /mnt/ide3/transmissionConfig
meebox> export TRANSMISSION_HOME=/mnt/ide3/transmissionConfig

 

5. When transmission is first started it will create a set of config files which we will need to edit. Now its time to start and stop the daemon

 

meebox> transmission-daemon -w /mnt/ide3/transmissionDownloads
meebox> killall transmission-daemon


6. By default Transmission uses whitelists to ensure only recognised clients can access the server. Providing the NAS is behind a firewall you can disable this. Edit the file settings.json using vi

 


meebox> vi /mnt/ide3/transmssionConfig/settings.json

and change this line in settings.json from

"rpc-whitelist-enabled": true,

to


"rpc-whitelist-enabled": false,

 

7. To ensure transmission is started on boot, see this blog entry but ensure the environment variable TRANSMISSION_HOME is set!

 
8. We can start the transmission daemon, by runing



transmission-daemon -w /mnt/ide3/transmissionDownloads

9. Finally to access the UI use a webbrowser and go to http://NAS_IP_adress:9091/transmission/web/


Meanwhilst checkout these links

http://www.nslu2-linux.org/wiki/Optware/Transmission

http://ubuntu-for-humans.blogspot.co.uk/2010/11/how-to-install-torrent-client-on-ubuntu.html

Enjoy

18 comments:

  1. I look forward to trying this as I have failed to get the "native" torrent support to work.

    I'm afraid I am likely to come back with other questions. Like how to get all of the stuff on my network to see the meebox as a media server instead of just the PC attached to it.

    PS Should "Trasmission" be "Transmission"? (I edit for a living.)

    ReplyDelete
  2. Sorry if im thick but iv forund the settings file but how do i edit it?
    i tried finding it useing ftp but cant see it. im a noob at linux
    Regards
    Gary

    ReplyDelete
    Replies
    1. Many of the configuration files you will come across are ASCII files that you can open with a standard text editor. Like Notepad.

      But first you have to get at them.....

      Delete
    2. thanks for the quick reply.
      i managed to edit the file using vi command.
      but now cant get the daemon to start says file not found
      even when im in the correct dir????

      Delete
  3. Hi Bertieuk, I think the executable isnt in path, you need to set the path to include /opt/bin (I think)..

    Sorry Im not at home and unable to access my NAS at the moment.

    ReplyDelete
    Replies
    1. Hi and thanks you for a very usefull blog. I think iv got it all sorted. You are correct about the path. iv not got a batch file to set path and start daemon. now just need to get this to run on a Meebox reboot. Keep up the good work.
      ps Do you know if its possible to install the latest version of Wordpress :)

      Delete
    2. Yeah its probably ok to install the latest version of wordpress..

      Apache2 is in /system/hddapp/apache2 and wordpress is in there somewhere.. to upgrade it I guess you'll need to upgrade the mysqlDB and the php files.. Quite a task to be honest..

      Delete
    3. Indeed you do have to update the PHP.

      I bought a Meebox so I could host my own webpage which was built on Wordpress 3.2.1.

      Unfortunately Wordpress needs at least PHP 5.2.4 to run.

      Any pointers you have on how to update the PHP, I would be greatly appreciative.

      Delete
  4. If anyone tries this stuff only to stumble with getting access to the meebox, remember that by default telnet may not be enabled in some versions of Windows.

    To enable it in Windows 7:

    >> Windows Control Panel
    >> Programs and Features
    >> Turn Windows features on or off

    check Telnet client

    Away you go.

    ReplyDelete
  5. All, I've updated the blog entry to reflect how to edit settings.json and some autostart hints..

    ReplyDelete
  6. Hello, can you please help me I am trying to follow this guide but I am getting stuck at

    2. One this is downloaded you will need to add your ip address to th whitelist list, or disable it completely. This is done by editing the “settings.json” file on the NAS

    Look for the following line in the settings.json file and make sure its set to false

    I have tried using filezilla but I can't find the file I have also tried using nano with this command

    nano /root/.config/transmission-daemon/settings.json

    this does appear to do something but I don't know what

    ReplyDelete
  7. Hi,


    I have been playing with my meebox and have installed ssh and a new other packages onto the meebox. When I come to run transmission I get this error:

    transmission-daemon: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory


    I have check in /opt/lib for librt and it is not there, any suggestions would be welcome. This has been setup this morning :)

    Thanks,

    Tom

    ReplyDelete
    Replies
    1. Problem solved, I needed to add the applications disk onto the meebox to get the rest of the libraries. All working now :)

      Delete
    2. Would you be able to share how you solved this as I have the same problem?

      Delete
  8. Hi, Im getting stuck at step 2

    Heres what i type,

    meebox> feed=http://ipkg.nslu2-linux.org/feeds/optware/vt4/cross/stable
    meebox> ipk_name=`wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $
    2}'`
    wget: ipkg.nslu2-linux.org: Host name lookup failure
    meebox>

    Any i get this lookup failure, i have no experience with this kind of thing so i am just following what you have dont but im pointing to a stable release hopefully.

    Ive tried it typing exactly what you have and that doesnt work either, hopefully you can help me?

    Many thanks !

    Neil

    ReplyDelete
  9. This is fantastic. Well done!

    Im not a great linux user, but this works and you explain it very well. The only trouble I had as finding the location of the settings.json file. Later you give this location furhter down and was able to find it via FTP more easily.

    /mnt/ide3/transmssionConfig/settings.json

    Thanks !!!

    Shame knowone can fix the problem with the original Meebox torrent program though...

    ReplyDelete
  10. I don't know if you're still using this nas. I recieved one from a neighbour, but he lost the install cd. Does anyone have the tine to send me the contents of that cd

    ReplyDelete