Angelos Italianknows Blog

Wednesday, 1 August 2012

Saturday, 14 April 2012

Getting Apps to autostart on the Looqs Meebox

 

The Looqs Meebox is a typical NAS and one of the things NAS’s do is they refresh their root (/) filesystem on boot, Its a kinda failsafe mechanism I guess… 

Anyway this means if you want too add any startup scripts/edit files etc on boot its a little hard.. However where there’s a will there is a way!

I noticed that although root (/) is in ram /system is mapped to the harddisk, I also noticed there are a number of files which are executed at boot.. One of these is /system/hddapp/etc/rc

Bingo, if you want something to start at boot time, or you need a filesystem modification done at boot (e.g. /opt linked to /mnt/ide/opt) then simply put it at the end of this file.

e.g. The end of my rc file looks like this

#Added stuff by Angelo
#re create /opt link
ln -s /mnt/ide3/opt /opt
# Start TwonkyServer
/mnt/ide3/apps/twonky7.0.5/twonkystarter -appdata /mnt/ide3/apps/twonky7.0.5/two


Enjoy.

Getting optware Looqs Meebox (easy method)

Ok a lot of people have tried to follow my recent notes on how to get optware working on the Looqs Meebox with a varying amount of success..  OK you need to have Linux/Unix skills.. Anyway to make things easier I've created a script which when copied onto the Meebox, and made executable, will do the biz..
1. Download this script
2. Upload it to your meebox
3. make it executable by issuing the following command
meebox> chmod +x setup_optware_looqs.sh

A list of apps can be found at http://www.nslu2-linux.org/wiki/Optware/Packages and to install an app

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

Done!


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

Running Twonky Server on the Looqs Meebox


Given that the Meebox wont stream to my XBox 360 I did some digging around and have been able to get TwonkyServer working.. It turns out that the nice chaps at Twonky distribute NAS versions of their TwonkyServer, all you need to do is work out what hardware you have..
Firstly, to find out the processor. Easiest way is to do a uname –a
meebox> uname -a
Linux meebox 2.6.15 #224 Tue Nov 3 21:07:04 KST 2009 armv4l unknown
meebox>


The arm41 kinda gives it away….Also the marketing fluff says its an Arm9 32bit, not sure why thee looqs thinks its an Arm41…

Next step, Little-Endian or Big-Endian, most ARM systems are Little Endian, and Sparcs are big endian…

meebox> echo -n I | od -to2 | head -n1 | cut -f2 -d" " | cut -c6
1
meebox>

This script returns 1 for little endian and 0 for big endian
Finally which version of libc

meebox> ldd --version
ldd (GNU libc) 2.3.5
$Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$Written by Roland McGrath and Ulrich Drepper.
meebox>

So there we have it, little-endian, libc2.3.5 and ARM Processor.
Going to the twonky website you need to download this file http://www.twonkyforum.com/downloads/7.0.5-Special/twonky-armel-glibc-2.2.5-special-7.0.5.zip




Installation steps


Download twonky for ARM-Little endian http://www.twonkyforum.com/downloads/...

Unzip it on your PC

1. On the NAS telnet in and create 3 directories on the harddisk. One is to store the twonkyServer executables, one to store the app Data and one to store them all

e.g. for me

meebox> mkdir /mnt/ide3/twonky
meebox> mkdir /mnt/ide3/twonky/twonkyServer
meebox> mkdir /mnt/ide3/twonky/twonkyAppData

2.Copy all the files on the PC to the twonkyServer directory

3. You now need to change the permissions of the twonkyserver executables
meebox> cd /mnt/ide3/twonky/twonkyServer
meebox> chmod 700 twonkys* twonkyproxy twonkywebdav cgi-bin/* plugins/*


4. You can now run the twonkyServer using the FULL PATH and also by adding the –appdata flag tells twonkyServer to store its app data in the directory given (twonkyAppData) and not its default directory of $HOME/.twonky


meebox> /mnt/ide3/twonky/twonkyServer/twonkystarter 
-appdata /mnt/ide3/twonky/twonkyAppData


5.Finally to access the web interface use http://NAS_ADDRESS:9000/webconfig

Unfortunately everytime the NAS is rebooted step 4 needs to be re-executed. I need to work out how to edit the startup scripts to get this running on boot.. I think i simply need to edit the startup scripts but Ive heard many NAS’s wipe their root (/) filesystem on boot…

A todo…

Oh also worth knowing that TwonkyServer is not free, costs €14.95 (link), but when you consider that it works with most devices and many TVs actually quote TwonkyServer as a recommended DNLA server.
[edit] Whooo looks like twonky are offering a 50% discount!

Enjoy!

Looqs Meebox initial thoughts

 

Just over a week ago I managed to bag myself a Looqs Meebox from Amazon recently for a princely sum of £25 +p&p..

Product Description from Amazon

“Use MeeBox Router as your central data storage device within your home network. So all your multimedia files are accessible through your PC or laptop and network media players via Internet. In addition, the MeeBox Router has a 4-port Gigabit switch/router and an integrated WiFi 802.11b/g access point
Features - UPnP MediaServer - iTunes server - Bittorrent client - APM web server - Web file browser - Web photo gallery - Blog - Web forumSpecifications1x500GB HDD - 2x 3.5" drive bays - Capacity: Up to 2 x 2TB Hard Drives (4TB Max) - RAID0 & RAID1 support - FAT32, NTFS, XFS, ext2, ext3 Network - 4-ports Gigabit Ethernet switch - Gigabit Ethernet WAN port - 802.11 b/g Wi-Fi access point - Services: SMB, FTP, SFTP, SSH, Telnet, VPN, HTTP, MySQL, printer sharing 2x USB ports for expansion Processor - ARM9 32-bit CPU w/ 16KB L1 cache - 128 MB DDR SDRAM - 16 MB Flash ROM Power supply - Power input: 90~220V AC, 50/60 Hz - Power output: 12V DC, 4A - Max. usage: 23W Dimensions 433mm x 209mm x 50mm cm Warranty Information Warranty Period (yrs) 1”

IMG_20120411_094006

Feature wise its AMAZING, supports everything, NAS, SSH,OpenVPN, Media server (see amazon link), however the truth is that

- NAS Functions are slow when you consider it has a Gigabit switch embedded. 6MBs read/write vs 20MBs for a DLink 320.
- The media server (mediatomb) is ok, but its not fab as a DNLA Server, it is also not compatible with the XBox 360 Sad smile
- The inbuilt applications are all really really slow… Gallery/Wiki etc.
- The manual is good, but missing quite a few important points..

Most of these issues are mainly due to the fact that the processor is only running at 300Mhz, not lightning fast one would say..

However on the positive side

- Price! , amazing value for money..
- It does have a LAMP stack (Linux Apache MySql PHP) preinstalled
- SSH,OpenVPN Stack works well
- Busybox root access is out of the box, route to hacking?
- Printer server works fine
- Very low power

 

Was it worth the €200 Looqs wanted when it was on sale? NO
Worth £25? Absolutely!!!

Although I bought mine from ADMI@Amazon, http://aria.co.uk have also been selling them and they have a forum with a meebox owners club thread in their forum (link)