Saturday 12th March 2016 4:22 PM [Tutorial]

A while back, I posted a massive tutorial on how to set up a NAS file server on a Banana Pi, and it was so much fun, I've written another even massiver one on how to set up an internet gateway on a Banana Pi.

A gateway lets you isolate computers in your home network from the internet. To reach the internet, a computer has to through the gateway, which means that if you put a firewall or virus checker or ad-blocker here, all your computers will benefit from them.

As before, this series of tutorials will walk you through the whole process of setting up a gateway, including a lot of not-essential-but-nice-to-have stuff. We start off by setting up a bare-bones gateway:

Once this is up and running, we then take a look at installing some useful extra services:

These days, a firewall is pretty much a necessity, and it's quite eye-opening to watch the logs and see the constant stream of attacks, as people try to break into your computer. And even if you run an ad-blocker like uBlock or AdBlock, a DNS-based ad-blocker can be run along-side it, without affecting browser performance at all[1]Browser plugins tend to slow the browser down noticeably, and can use huge amounts of memory..

   [ + ]

1. Browser plugins tend to slow the browser down noticeably, and can use huge amounts of memory.
Friday 4th March 2016 2:50 PM [Awasu News]

Awasu 3.0.3 has been released here. This is a enhancements and bug fixes releases, and while the change list is relatively short, there's been a great deal of work making Awasu run faster and more smoothly, which should make a noticeable difference.

Have fun, and as always, more Awasu goodness will be forthcoming shortly...

Sunday 6th December 2015 11:11 PM [Awasu News]

Continuing on from the first alpha, this second alpha release adds more optimizations and make-Awasu-run-faster changes.

The change list is relatively short, but the changes involved were extensive and needed a lot of testing. In particular, the way channel summary pages are generated has been completely revamped, and is much smoother and snappier now. Some of you have been sending me crash reports from earlier versions of Awasu, and they've all been the same thing - a problem in how the channel summary pages were generated - so since this code has been replaced, this crash should no longer happen [1]This is, of course, not to say that I haven't introduced another crashing bug, but that's another issue 😐 .

   [ + ]

1. This is, of course, not to say that I haven't introduced another crashing bug, but that's another issue 😐
Sunday 25th October 2015 2:43 AM [Tutorial]

Just a quick follow up on my recent epic tome on setting up a Banana Pi as a file server. I mentioned that I configured my disks to use the ext3 file system, and while it's generally fine, it does have one weakness: it is very slow deleting large files[1]Since I use my NAS for back ups, some of my files are well over 100GB.. Even worse, it locks up the file system, impacting other activity and causing stalls, which kinda sucks if you're watching a movie at the time :(

depesz took a very detailed look at the problem and some possible solutions, the TL;DR being that it's better to progressively shrink the file until it's all gone rather than asking the operating system to delete it as a file.

For the benefit of anyone having problems with this, here's a script that I wrote that implements this idea:


# parse the command-line arguments
if [ $# -lt 1 ] ; then
    echo "$(basename $0) file1 file2 file3 ..."
    echo "  Delete file(s) slowly."
    exit 1

for fname in "$@"; do
    # check if we were given a directory
    if [ -d "$fname" ]; then
        # yup - process each file, then remove the directory
        #echo "Deleting directory: $fname"
        find "$fname" -type f -exec $(readlink -e "$0") \{\} \;
        rm -rf "$fname" 
    # check if we were given a file
    if [ ! -f "$fname" ]; then
        # nope - ignore it
        continue ;
    # yup - delete the file slowly
    #echo "Deleting file: $fname"
    while true; do
        # get the current size of the file
        fsize=$(ls -l "$fname" | cut -d' ' -f 5)    
        if [ $fsize -lt $chunk_size ] ; then
            # the file is small enough to just delete
            #echo "- Deleting file."
            rm -f "$fname"
        # truncate the file, then loop back
        #echo "- Truncating file: $fsize"
        truncate -c -s -$chunk_size "$fname" || exit
        sleep 0.25

Pass in a list of files and/or directories and it will slow-delete them. It will take longer to run, but will have far less impact on the rest of the system.

Nothing to do with Awasu, but hopefully someone out there in Internet-land will find it useful... :)

   [ + ]

1. Since I use my NAS for back ups, some of my files are well over 100GB.
Thursday 8th October 2015 1:56 AM [Awasu News]

Awasu, of course, uses an embedded Internet Explorer browser to show web content, but it's always bugged me that rendering never seemed to be quite the same as a standalone browser.

I've finally figured out what was going on :jig: [1]Although to be honest, it should've twigged a long time ago. I guess sometimes I'm just a bit slow... :roll: - while all the documentation says that installed version of IE will be used, what they invariably forget to tell you is that it's in IE7 compatibility mode :bigshock:

My usual :wall: emoticon is clearly totally inadequate at this point, I need a little yellow man blowing his brains out with a shotgun, or something like that 👿

I'll include a fix for this in the next release, but fortunately, the temporary fix for this is straight-forward: just download and run this file[2]It adds an entry to the Registry saying that awasu.exe should run IE11 for embedded browsers.. If you want test it, open the forums (from within Awasu) and check that the navbar across the top is displayed correctly. Sites using HTML5 and all that other new-fangled frippery should also work a bit better now. Sigh...

/taka toddles off to find a new smilies pack to install... :bah:

   [ + ]

1. Although to be honest, it should've twigged a long time ago. I guess sometimes I'm just a bit slow... :roll:
2. It adds an entry to the Registry saying that awasu.exe should run IE11 for embedded browsers.
Monday 5th October 2015 12:39 AM [Tutorial]

I've been a big fan of NAS's for many years, that is, a small file server that sits on my network and serves up music, movies, provides space for backups, etc. In the past, I've had Synology and QNAP units, and while they were both nice, they were both were relatively expensive, loaded with features I never used. They also both only lasted a few years, and rebuilding a NAS with 5-6 TB of data is a painfully long process :(

So for the next one, the plan was to grab an old laptop, load it up with FreeNAS, and then just hang a few disks off it. If and when the laptop dies, I can just set up a new one and the external disks, with all the data on them, should just plug straight in.

However, this is a bit of clunky solution, so when the Raspberry Pi came out, I got very interested in the idea of using that. Unfortunately, the rPi has one big drawback that makes it unsuitable for use as a file server: it only has 10/100 Mbps ethernet. All the computers on my network have gigabit ethernet, and since I'm moving 100's of GB's of data every night for backups, my file server also needs to have gigabit ethernet.

Enter the Banana Pi. Released in late 2014 by LeMaker in China, it's slightly more expensive but significantly more powerful, notably with gigabit ethernet and a SATA port. Add in a case, and I'll be able to build my own future-proof NAS for well under a hundred bucks, plus the cost of the disks.

There are quite a few tutorials floating around that explain how to set up a Banana Pi as a NAS, but they invariably only talk about how to set up the factory image of Open Media Vault[1]This is the successor to FreeNAS, written by one of the FreeNAS guys, that runs on Linux instead of FreeBSD. (which is relatively easy to do), but this series of tutorials will also talk about the many things you need to do after that to get a usable system.

   [ + ]

1. This is the successor to FreeNAS, written by one of the FreeNAS guys, that runs on Linux instead of FreeBSD.
Thursday 1st October 2015 5:29 PM [Awasu News]

It's been an arduous slog to get this release finished, but Awasu 3.0.3.alpha1 is finally done, and it has probably one of the shortest change lists you're ever likely to see:

  • Made Awasu run faster :)

Core components of Awasu's underlying feed engine are running a whopping 3-5 times faster, so you should see Awasu running noticeably quicker. I've also done a lot of work making sure that things work in non-English environments.

These changes affected nearly every file in Awasu's source code, and I was trawling through some code that hadn't been touched in literally 20 years :bigshock: There was some seriously freaky stuff in there - they don't call it code spelunking for nothing :roll: One consequence of this is that some things may have been broken, so please keep an eye out for any weirdness.

Monday 6th July 2015 9:14 AM [Awasu News,Tutorial]

A while back, I posted a tutorial that showed how easy it is to extend Awasu through the use of plugins and channel hooks, and continuing on from that, here's another series that shows how you can control your Awasu via its API.

Whether you just want to find out what state your channels or reports are in, or if you want to programmatically create, update and delete them, the Python and PHP libraries available make it a breeze.

Have a play with them, hope you find them useful and, as always, feel free to ask questions in the forums.

Wednesday 22nd April 2015 12:49 AM [Awasu News]

Work on the next release of Awasu has been well underway for a while now, as the optimizing juggernaut plows onwards and upwards :) Part of doing this kind of work is to do before-and-after performance tests, to see how much better the new version is running, and I figured that since I was doing it already, I might as well do some tests on Awasu Server as well.

I've always known that Awasu Server runs much faster and more smoothly than the desktop version, but this is the first time I've collected hard data on how it performs, and the results are, well, impressive :jig:

You can check out the full report here, but to the right is the money shot: Awasu Server updates around 67% more channels per hour than Awasu Pro.

If that's not insanely awesome, I don't know what is ::-):

Awasu Server is in private beta, but if you have lots of channels [1]For example, some of our clients are running tens of thousands of channels., if you want to monitor huge amounts of information, then this is definitely the way to go.

And not only can Awasu bring in this amount of information at high-speed, it can also do something with it all, whether it be forward the information onto a database, or send out emails, or generate reports.

Drop us a line if you'd like to know more...

   [ + ]

1. For example, some of our clients are running tens of thousands of channels.
Tuesday 7th April 2015 2:05 AM [Awasu News,Tutorial]

As promised, the tutorial on writing Awasu plugin channels and channel hooks is now up here.

Part 1 talks about how to get set up with the new awasu_tools library, and how to generate a basic feed, then Part 2 shows how to convert a basic script into something that can be called by Awasu.

Part 3 explores some more of the features offered by the awasu_tools library, while Part 4 rounds things off by explaining how to compile your extension, ready for distribution.

Writing Awasu extensions has always been relatively easy, but there was a bit of a learning curve, mostly spent looking at the samples supplied with Awasu. Hopefully, this tutorial will make things a bit easier, and the new awasu_tools library really makes things a breeze ::-):

As an aside, I've been programming computers for around 30 years (professionally for 25), yet publishing my first bit of code on PyPI and GitHub somehow makes me suddenly feel like a Real Programmer :roll:

Still some life left in this old dog, methinks... :jig: