Archive for the ·


· Category...

DealExtreme orders

Comments Off

Products ordered from DealExtreme over the years.

Comments Off

QNAP compatible encrypted disks

Comments Off

I’ve previously written about encryption on the QNAP TS-431P NAS and basic cryptsetup usage. Since then, encryption standards and defaults have changed, and it is now easy to create an external encrypted disk which cannot be mounted by a QNAP NAS. The following shows how to work around the issues with cipher and ext4 journaling settings.

The first issue has to do with the default cipher algorithms on Ubuntu and QNAP. As of Ubuntu 16.10, the default cipher is Advanced Encryption Standard (AES) in xts-plain64 mode with a SHA256 hash. The default and supported encryption on the QNAP NAS is also AES, using “128-bit block size, with key sizes of 128, 192 or 256 bits”. However, the supported mode is cbc-essiv:sha256 with hash spec SHA1, as with older Ubuntu and Debian distributions. When trying to decrypt the drive on the NAS, you might see errors like “Failed to setup dm-crypt key mapping for device /dev/sdc1. Check that kernel supports aes-xts-plain64 cipher (check syslog for more info)” and in /var/log/storage_lib.log an error like “crypt: IV mechanism required”.

It should be noted that this is most likely not an issue with volumes created by the NAS itself on its internal drives, unless you start moving drives from one NAS box to another, which is probably not recommended in the first place.

To see the supported ciphers, both on a normal GNU/Linux distribution and the QNAP, use the following commands:

cat /proc/crypto
cryptsetup --help

Also, to see the currently used cipher and LUKS formatted volume, use the luksDump command:

cryptsetup luksDump /dev/sdX1


If you start from scratch, it’s easy to work around the incompatibility. Follow the instructions in the cryptsetup basics article, but add the following options for cipher and hash function to the luksFormat command. Note that this will format and erase all data on the partition.

cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 --hash sha1 /dev/sdX1

You might also consider ext3 over ext4, since the former seems better supported by the QNAP NAS at the time of writing. See below for further details.

Changing the cipher

If on the other hand, you discover the incompatibility a bit too late, and have already filled up the external disk with a lot of content, you’re not all out of luck. You’ll just have to decide which way you’d like to waste your time: You can transfer it all over to another disk, reformat, and then transfer back. It will take a few hours, and a bit of work. Or, you can change the encryption cipher on the existing volume, using the cryptsetup-reencrypt tool. However, you’ll probably have to wait multiple days while the whole disk is re-encrypted. On a 2 TB external disk over USB 2.0, it took about 35 hours to complete.

cryptsetup-reencrypt --cipher aes-cbc-essiv:sha256 --hash sha1 --key-file /tmp/keyfile --key-slot 0 /dev/sdX1

Notice that the command uses the same cipher and hash arguments above. However, it adds arguments for the key file to unlock the volume, and which key slot that file is linked to. This is necessary to avoid being asked about each and every password for each of the key slots. Of course, if you have only added a single password based key slot, these arguments can be skipped, and you’ll have to type the password once.

ext4 journaling compatibility

Once the encrypted volume can be opened, there might still be hurdles. The default settings for the ext4 journaling might also not be compatible with the QNAP NAS. At this point, I have to admit I lost interest in researching exactly what the cause was, and fired off multiple changes at once. The error when using the mount command was “mount: wrong fs type, bad option, bad superblock on /dev/mapper/sdc1, missing codepage or other error”.

The default features set from the Ubuntu 16.10 created ext4 formatted partition was:

dumpe2fs /dev/mapper/sdc1
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum

The following commands removed a few of them, changed to 32 bits, finished with a check:

tune2fs -O ^huge_file /dev/mapper/sdc1
tune2fs -O ^dir_nlink /dev/mapper/sdc1
tune2fs -O ^extra_isize /dev/mapper/sdc1
tune2fs -O ^metadata_csum /dev/mapper/sdc1
e2fsck -f /dev/mapper/sdc1
tune2fs -O ^64bit /dev/mapper/sdc1
resize2fs -s /dev/mapper/sdc1

In the end, the following features remained, and the volume mounted.

Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file uninit_bg

Comments Off

DealExtreme orders

Comments Off

Comments Off

DealExtreme orders

Comments Off

Comments Off

Lego Panorama

Comments Off

I’ve discussed panorama robots in the past, and here is a new creation. James Catan has created several Lego robots to do timelapse and and pan/tilt pictures. One of them were recently presented in Gadget Review, and shows holding a Canon Rebel XT with a kit lens. So not quite 5D, 200mm f2.8 as with Jeffrey Martin’s rig. Yet still a good and simple setup.

Another interesting pan & tilt product comes from Sparkfun. It is a robot arm, consisting of servos and and a claw. It will definitely not hold a SLR, but possibly some smaller pocket cameras or phones. As far as I understand, the complete robot arm comes in several parts which you’ll have to add to your order separately.

Comments Off

Monome as Tone Matrix

1 comment

The Tone Matrix by Andre Michelle is making its rounds. It seems this shouldn’t be too difficult to implement in hardware, using the 4×4 button pad. Or in other words, a 16×16 Monome.

Jesus was not a pirate

Comments Off

Best take on the pirate analogy so far. From md65536 on Slashdot:

We obviously need new terminology. By labeling people who let’s say “back up” data as “pirates”, the word “pirate” has come to mean something harmless, even cool. Yet the word is still used in the traditional sense to describe people who attack at sea, and destroy rather than create, and kill viciously, and actually take something away from people.

The pirate analogy is a bad one for copying data. The jesus analogy works better I think… he made some copies of fish and bread and distributed it free of charge.

People who copy data should henceforth be referred to as “miracle workers.” Now try to paint them in the same exaggeratedly bad light with that name.

Comments Off

More Small Fonts

Comments Off

As an update to the MiniFonts post, here is an even smaller one from Adam Borowski. At 4 pixels wide and 6 high, it probably does not get much smaller.

Comments Off

WordPress for Android – Privacy Edition

Comments Off

I like WordPress, and I like Android. However, I do not like the attitudes some of their developers have towards privacy. It seems to be “everything goes, as long as it benefits us”. In particular, the phone-home, and remote kill features, which many developers feel entitled to include, rub me the wrong way. Sorry, but it doesn’t fly on my device. I like your application, and want it to do its job well. Nothing more, nothing less.

Luckily, the WordPress for Android app is open sourced under GPL. It means I have right to access the source code, modify it, and distribute the modified version as long as I also reveal my code changes. So I did just that, fixing a few issues in the latest version (1.3.8) of WordPress for Android. The changes include:

  • Removing the location based permissions (fine and course grained).
  • Removing phone-home features to by which they collect a lot of identifying information, including the unique device ID.
  • Removing the EULA. The GPL is not an EULA! (More on that in a later post).

The patch is available here, and the APK installer binary built to the Android 2.2 platform (API level 8). However, I would encourage you to download and build the source code yourself. To do that, follow these steps:

  1. Download the source code for WordPress for Android:
    svn checkout
  2. Download and apply the patch:
    cd trunk
    patch -p0 -i wordpress_android_1_3_8_p_1_privacy.patch
  3. Build the application in Eclipse. If you have not installed the Android SDK for Eclipse, here is the starting point of the download and install instructions.
  4. Search through the code and look for further privacy violations.
Comments Off

Small Fonts

1 comment

With small electronics and a LED matrix, you never know when a small font can come in handy. Here are some small pixel fonts and icons.

From Best Flash 2.2, there’s several freeware fonts. And over at Brainstorm and Raves, they spotted the Itsibitsi icons from MiniFonts. They also have several other tiny fonts, including Atom, with a cap height of only 6 pixels.

Gardena products

Comments Off

I got some questions about how to put together the automatic watering system I posted about yesterday. Here are the links to similar products on Amazon. I could not find the exact same product, however they should do the job just fine.

It turns out there are very many different “water computers”. The simplest I could find is the “Gardena 1860 Classic 3-Cycle Water Timer T 1030 Plus – $83“.

Gardena 1860 Classic 3-Cycle Water Timer T 1030 Plus

Then there is the drip systems. These includes a thin supply pipe of 5 meters (which you will cut to fit your needs), the drip heads (usually 15-20 pieces) , and small plastic pegs to stick into the soil in the flower pots. There are very many boxes for this as well, and some of them even claim to include the watering computer. On Amazon, the product description says all of them do, however, I suspect that is a copy/paste mistake, and that only the most expensive of them (USD ~100) includes a computer as mentioned above. At least that would match the pictures on the boxes.

Gardena 1399 Micro-Drip Multiple Application Drip Irrigation Starter Set – $40
Gardena 1399 Micro-Drip Multiple Application Drip Irrigation Starter Set

Gardena 1402 Micro-Drip Starter Set For Flower Boxes – $40
(I think this might be the one I got).

Gardena 1402 Micro-Drip Starter Set For Flower Boxes

Gardena 1398 Micro-Drip Watering Starter Kit With Timer – $100

Looking at the picture and the price, this is mostly likely the only kit which actually includes the watering timer / computer as well.

Gardena 1398 Micro-Drip Watering Starter Kit With Timer

Gardena 1403 Micro-Drip Starter Set For Greenhouses – $90
Gardena 1403 Micro-Drip Starter Set For Greenhouses

If your system is outside, there should be no problem plugging this into your garden water supply, and you’re done. However, if you set it up inside, you want to limit the amount potential water spill. So you’ll need a water container of some sort. 10 liters should be fine, and make sure it has a tap as shown in the picture below. Also, make sure the nozzle on the tap is long enough, so that you can attach it to a hose or quick connector.
containercontainer nozzle

Finally, to connect it all together, I used a garden hose between the water container and the computer, as seen in this picture. I needed three of the orange hose quick connectors: One for each end of the hose, and one (in my case the larger version) for the water container nozzle.
Gardena 36917 Garden Hose Quick Connector

And very finally, to connect the hose to the water container, which now had two orange “female” quick connectors, I needed a male-male piece. I cannot find the exact product right now, but it was something similar to the picture below, but in grey.
quick connector

Comments Off

Automatic Watering System for Our Plants

1 comment

For our last two weeks holiday, we wondered how to save the plants while we were gone. Asking somebody to look after them was an option then, however might not be in the future. Thus started a quest for watering system. The Gardena T1030 fit the bill perfectly. It runs on four AA batteries, and can be programmed to water on specific intervals, duration, and time of day. Perhaps the best feature, is how the programming is implemented. You slide some small plastic levers, which covers holes in a hard plastic card. Once done, the card is inserted into the watering unit, read and programmed. In effect, it is old punch-card technology making a robust, waterproof and easy to use solution.

And here, some pictures of our set up. Oh, and the Heineken keg? Turn out it had a useful form which fit the watering unit nicely. Also worth noting is the attachment to the water tank. It was not purpose made, and was leaking on the first try. Some Sugru took care of that.

First post!


This is my first WordPress blog post.

Windows infected in five minutes

Comments Off

Slashdot is reporting on a study from SANS Institute’s Internet Storm Center which shows that an unpatched Windows XP box will be infected after about five minutes on the Internet. German researchers found that it took slightly longer, however the conclusion still holds:

“While the survival time varies quite a bit across methods used, pretty much all agree that placing an unpatched Windows computer directly onto the Internet in the hope that it downloads the patches faster than it gets exploited are odds that you wouldn’t bet on in Vegas.”

Comments Off

BPM beat counter

Comments Off

Simple is beautiful! Who needs fragile BPM software when you can do the counting yourself!? Here’s two online BPM (beats per minute) counters where you hit a key for each beat. The form will give you the average BPM.

For the mouse:

For the space bar:
This also comes with a “tempo calculator” if you hit Submit.

Comments Off