Jan 072012
 
CrashPlan - Another attempt to do proper backups

As I wrote here I am using Wuala. I mostly like it. I don’t like not be anymore able to give away some storage space for others and in return be able to use other people’s storage space. It was a neat point of Wuala, but that was “fixed” last year, and then it’s either pay or stop using it (beside the small initial space everyone gets).

Welcome to CrashPlan. It’s quite similar compared to Wuala but with 2 differences which I like a lot:

  1. You can back up to your own disks or friends disks
  2. If you pay, it’s unlimited data and deleted files are kept

That sounds like a good deal, but with prices for 2TB disks (even after the disaster in Thailand) at about US$150, it probably works out fine for them.

I’ll have to test this a bit more, but so far, it looks like a good backup method. Time to upgrade our ADSL line…

PS: Picture taken from the Italian Wikipedia.

 

 Posted by at 21:58  Tagged with:
Nov 052011
 
GLANTANK - Resurrected

I have not used my GLANTANK for quite a while. Now it has a new purpose: I use as a server for lsync. lsyncd is what I was looking for for a while: it synchronizes directories a la rsync (it’s actually using rsync for that), but it is using the inotify feature of the Linux kernel which informs a process that a file has changed. So instead of scanning every (say) 1h thousand of files, it copies the ones which are modified much sooner and does not need a full scan of all files except on startup.

The old Debian installation was outdated, so I wanted to re-install Debian Linux on the GLANTANK first. I used the same instructions in the past and it worked as expected. So I was hopeful this time too. ssh never started up though.

The only way to see something happening then is to use a serial console. See also here for some pictures. Pins are 1:3.3V,  2:RxD, 3:TxD, 4:GND. 115200 bps and 8N1.

And the problem is that the latest kernel 2.6.32-5-iop32x has no driver for the GLANTANK disk interface, and that stops the installation process. The fix is on the Debian bug list and that solves it.

Next problem are the not-so-quiet fans. There’s a program to control them called fanctld. Needs kernel header files and gcc-4.3 to create a working fandrv.ko kernel module.

Update: Plugging in and out of disks with a cable which is soldered to the mainboard is a bad idea: the cable broke and no disk worked afterwards. Well, it was fun while it lasted.  Which was until now.

Nov 032011
 
Want to buy a HDD in Akihabara? Bad Timing.

Getting a new HDD was always easy enough to do. Until recently with the Thailand flooding. Now it’s hard to get a new one, and if you do, the price increase quite a bit. For those who can read Japanese: http://akiba-pc.watch.impress.co.jp/hotline/20111105/etc_hdd.html and for those who don’t here an English translation.

Prices increased to about 15000 Yen/TB, which is about 3 times as much as before the flooding. Seagate works again but Western Digital is in worse shape it seems.

I was lucky: bought a 750GB 2.5″ HDD for (compared to now) cheap just about 2 weeks ago.

 Posted by at 10:45  Tagged with:
May 032011
 
Kubuntu 11.04

I upgraded my notebook from Kubuntu 10.10, which worked well with only few (but annoying) issues. One was that once in a while the internal NIC will behave funny: either it won’t connect at all, or only 100 or 10 MBit/s instead of GBit/s. The fix is to power the notebook off, remove the battery, wait few seconds, then put back battery and power.

The other problem is that if you tax the CPU too much (think: compiling Linux kernel using “make -j” to keep all CPUs busy), it’ll actually shut down as the CPU gets too hot. The price you pay for having a too powerful CPU in a notebook.

So I thought, since 11.04 is out, let me try that.

Well…the good news is that nothing important broke.

The bad news news is that small things broke:

  • Firefox (now 4 instead of 3) knows no Adobe Flash anymore. However Google Chrome does. Odd, but works for me.
  • The CPU fan started and kept on running at full speed.  See bug report here. The highly in-elegant fix is to limit the CPU speed severely.
  • /proc/acpi/thermal_zone no longer exists. That is now using the /sys interface and it’s in /sys/class/thermal/thermal_zone*/. Some tools still use /proc only, which makes them display no temperature anymore, although the kernel knows the temperature.

 

 Posted by at 00:03  Tagged with:
Jan 092011
 
Wuala on a Headless System

From my colleague Soren I heard first about Wuala. Did sound interesting back then. But I never found a use for it. I have a total of about 30G online storage space and hardly know how to use it. Too complex to connect to and too slow to use.

Recently when looking at PogoPlug Pro model, I found it quite intriguing as now I have a mobile Android device which could use it well. However The PogoPlug cannot be bought (via normal channels) in Japan. Or even sent to Japan. Curse you Amazon!  Buffalo to the rescue! Except theirs is not yet available. Looks promising though as it includes 2 disks already. I’ll look into this when it’s available.

If anyone wonders, what PogoPlug and Wuala have in common, then stop wondering. Not much beside the “storage” and “cloud”. They solve different problems.

Anway, that’s why I looked into Wuala again. And hey, it works quite well. Integration with Linux is great Shows up as a mounted filesystem. Speed is slow though. Time to upgrade that old ADSL into something more speedy.

Now the important message of this posting: How to make Wuala run on a headless server. The solution was found here and here. I used the latter. Works as advertised and starts up nicely in the background via screen.

What I am waiting for now is to connect to that Wuala instance from my notebook (see here in the Wuala forum).

Apr 252010
 
Shiny New Notebook

Main old main PC is getting oldish. Time for an update! So I got myself a Dell Vostro 3700. “Business Notebook” it’s called, but I have no idea why.

My requirements were simple:

  1. Non-glaring display
  2. Lots of pixel (specifically more than 768 lines)
  3. Non-japanese keyboard (I hate the small space bar)

Other contestants were Lenovo (flunked the display category as the otherwise attractive SL series would be more than sufficient) and HP (no English keyboard). Smaller companies (like Mouse Computer) were not really competitive.

So far what I know about this notebook:

  • It has a 17″ screen, but the notebook itself is not as big as I feared.
  • The keyboard is not too bad. Not as good as the usual Thinkpad ones, but better than many other notebooks I tested.
  • 4 years on-site support included. No worries about potentially shoddy Dell quality.
  • Pre-installed is Japanese Windows 7. Not possibly to fix that to use English instead. But re-installing works.
  • Windows 7 has the same odd behaviour when the network breaks unexpectedly: it hangs and makes the computer unresponsive for seconds, then responsive for some milliseconds, and repeating this pattern. Note to self: do not meddle with the network settings too much.
  • Installing and updating drivers is unchanged since good old Win2k times. Only later I found out that Windows update would have found most updated automatically. So things do have improved in the last 10 years.
  • My Windows knowledge is still enough to get a Windows machine working well.

And here some noteworthy Linux items:

  • Kubuntu 9.10 (via PXE) is easier to set up than Windows 7 from CD
  • Dell uses 3 primary partitions. That leaves one primary left or only logical partitions. Luckily the BIOS can boot from logical partitions, so putting /boot in a small logical partition (and the rest under LVM control) is working fine.
  • Nearly everything worked out of the box. I only had to install the nVidia driver and the Broadcom driver as both are closed-source.
  • The only things not working is the screen brightness. While the Fn-keys work, the brightness does not change. It’s awfully bright. The current workaround is to change the brightness using the nVidia setting tool. Otherwise I’ll turn blind.

This is a serious upgrade in about every shape: CPU, memory, display pixels and I am quite happy with it. I wish I could turn off the fan though. While it’s not as noisy as my previous desktop machine, it’s much closer to me now and any fan is annoying.

Update:  Kubuntu 10.04 fixes the screen brightness problem mentioned above. Now the only outstanding item is how to disable the touch pad.

Update 2: The touch pad can be disabled (and generally) adjusted using the KDE Control Panel.

 Posted by at 22:07  Tagged with:
Jul 112009
 
FTDI245

While browsing the web page of my favourite electronics shop in Akihabara Akizukidenshi (秋月電子) I saw this small USB module. Originally to connect things like FPGAs, microcontroller etc. which cannot use serial ports, it also has a bit-bang mode where it simply outputs on 8 data ports whatever you like. There’s a simple to use library available libftdi which can make those chip and its port directly accessible in Linux (and more).

The data sheet for that chip is at best spotty, but the chip works as advertised.

Some highlights of the FTDI 245RL and the above module in particular:

  • 8 data ports
  • I/O can be 3.3V or 5V
  • each I/O pin can be set to input or output independantly
  • Has a 3.3V step-down converter already built in
  • Can output 1MByte/second
  • Has an unique ID burnt into the chip
  • Can source and sink 2mA normally, or 3 resp. 8mA when in high-drive mode
  • 1 kb EEPROM is built in too

Quite versatile. Combine with a small Linux host (like this which I happen to have) and for many applications which need network and some I/O, this is an easier way to get things done compared with a stand-along microcontroller. As long as weight/power consumption and lack of low-latency (millisecond range or faster) is no issue, it’s at least easier to get started and you can use all the amenities of Linux (free choice of programming language, Internet connectivity, a clock, daemons for cron and at etc).

Oct 152008
 

Here
is a Flash program to control the security and privacy settings of Flash. A neat way to see how many Flash cookies were set. Quite a lot in my case.

 Posted by at 22:08  Tagged with:
Apr 242008
 
Kurobox/Pro NFS and Console Access

Got myself Kurobox/Pro. Nice, surprisingly quiet (it has a fan though, so not completely silent). No NFS server support though. Why is it not supported by default? Most Windows users won’t care and while I can use Samba on Linux as a mounted filesystem, NFS is just more natural supporting users/groups and permissions.

So first task was getting some more complete Linux on it as the striped down (flash base) Linux just . Getting Debian on it is easy and well described for example, but to get NFS support, that needs a new kernel, which (as of now) means console access is required. And it’s useful in case anything goes wrong and the box does not want to boot any more.

The solution is a level shifter from the on-board 3.3V logic to RS232 logic. That’s what’s displayed in the picture. To the left is the Kurobox console port, to the right is a DB9 serial connector cable, which then connects to a USB-to-serial cable.

Now messing with kernels is no problem: should it not boot, I can always change the boot configuration. Or boot via TFTP. Or reset everything so the Kurobox/Pro boots from NAND flash again.

 Posted by at 19:39  Tagged with:
Jan 212008
 

Some time ago at http://www.akizukidenshi.com/ I bought a IP Power 9200 unit. It allows you to control 4 relays via Ethernet. It was cheap enough to be part of the “buy now, think about how to use it later” stuff. Using the internal web server is nice for testing, but bad for automatization.

http://www.thebmwz3.co.uk/content/view/23/29/ showed how to find out which commands to send to the unit using simple UDP connections. After a little bit of playing with the VB demo supplied with the board and sniffing the network traffic it created, I figured out how to control it with simple UDP packets.

Here the (small) Perl program which expects 1 bitmask (in decimal, using bit 0..3) to set the outputs, and no argument to just read and display the current state:

#!/usr/bin/perl -w

use strict;

## Create a UDP socket to the device
use IO::Socket::INET;
my $MySocket=new IO::Socket::INET->new(PeerPort=>7070,
        Proto=>'udp',
        PeerAddr=>'192.168.11.35',
        TimeOut=>10);

# Read the status of the 4 outputs
# Map the 4 bits to the bit 0-3 instead of bit 0,2,5,7

sub read_ippower {
    my ($current, $text, $return_val, $junk);
    my $socket=shift;
    $socket->send("AVOISYS00");
    $socket->recv($text,128);
    chomp($text);
    if ($text) {
        $current=0;
        ($return_val,$junk)=split(/avoisys/,$text);
        if ($return_val eq "90\0") {
            $current=15;
        } else {
            if (($return_val & 128)==0) {$current|=8;};
            if (($return_val &  32)==0) {$current|=4;};
            if (($return_val &   4)==0) {$current|=2;};
            if (($return_val &   1)==0) {$current|=1;};
        }
    }
    return $current;
}

# Write a new configuration
# Map the 4 bits to the bit 0-3 instead of bit 0,2,5,7

sub write_ippower {
    my $socket=shift;
    my $new=shift;
    my $mask=0;

    if ( $new & 8 ) {$mask|=128;};
    if ( $new & 4 ) {$mask|= 32;};
    if ( $new & 2 ) {$mask|=  4;};
    if ( $new & 1 ) {$mask|=  1;};

    $socket->send("AVOISYS1$mask");
}

if ($#ARGV < 0) {
    my $a=read_ippower($MySocket);
    print "$a\n";
} else {
    my $a=shift;
    if ("$a" eq "-h" || "$a" eq "--help") {
        print "Usage: $0 [bitmask]\n";
        print "If no bitmask is given, then only the old state will be printed.\n";
        print "If bitmask is supplied (in decimal), then the 4 lowest bits need to\n";
        print "correspondent to the 4 outputs of the IP Power module.\n";
        print "bitmask is given in decimal.\n";
        print "Examples:\n";
        print "$0\n";
        print "Print the current state.\n";
        print "$0 7\n";
        print "Set output 0, 1 and 2 to on, output 3 to off\n";
        exit 1;
    } else {
        write_ippower($MySocket, $a);
    }
}