Friday, December 28, 2012

☠⚠⚡☔☣☢☹⛈ Windows 8...

Got myself Win8 for €30 (upgrade from a old Student-for-Free Vista license I never used, instead of €150 it looked like a bargain). My normal computer went bad, and I'm playing with a replacement device while waiting for replacement parts to arrive.

This Metro-bathroom-tiles stuff is so incredibly distracting when you want to do real work. Click on a mp3 file, ... *BAM!* fullsceen mp3 player (how could I ever live without such a thing. I mean, music players are meant to get your full attention while reproducing the music). Add a printer? *BAM!* Fullscreen "Add a device" app.

The builtin graphics drivers of the rather old Nvidia Quadro always crash when trying to accellerate video decode. There's a third party tool to turn it off, recommended frequently because it seems to be pretty normal that video accelleration crashes, with a lot of different graphics cards. One of my soundcards is no longer supported, the other one (M-Audio Delta 44) has the usual fucked-up drivers all "Pro Audio" gear has, because all these companies universally employ morons to do the programming who eventually just pick lame excuses out of their ... Oh my, I'm angry..

Apparently "Skype" is now built in. But: It refuses to let you use it without converting your "old" skype account into a "Windows live ID". And I learned that the new bathroom-tile-version doesn't do file-transfer. WTF?!

Sorry, Microsoft, I really wanted to try out this new thing and tried to be open about it, but you made usability for non "grandma got a tablet PC for Christmas" users really abysmally bad, I'm quite frustrated after only a few hours of light use.

And I cannot understand how this usage paradigm of full-screen apps should map to people doing actual work, instead of browsing the web and playing with facebook. And I cannot understand why it cannot be disabled completely (with tile-apps running in a window, for example).

When the parts for my other PC (the motherboard apparently went bad the last few weeks, with LAN and SATA controller deteriorating) arrive tomorrow or on monday, I'm pretty sure what OS I'll NOT install.

Sunday, December 16, 2012

Betty Remote

A friendly colleague gave me a Betty Remote. It's a marvelous device as a dirt-cheap ARM7 (LPC2200) eval board and flashing worked so far, JTAG not. I have the wrong toolchain to compile the firmware, and the keyboard matrix seems to be broken (registers random wrong key presses). :-(

From chris' blog

From chris' blog

Thursday, December 06, 2012

Note: Archlinux on the Toradex T20

Update (November 2016): Archlinux on the Toradex T20 (with Archlinux' kernel)

A lot of people got hold of a Toradex T20 board which was given away in exchange to a €20 donation to the red cross (if I remember correctly).

To get Archlinux running quickly on the T20 running the rootfs from a micro-sd card (kernel stays on internal NAND flash, so does the toradex firmware):

  • Get the ARMv7 Tegra2 TrimSlice root filesystem and put it on a micro-sd card (first partition, create a ext4 filesystem for it).
  • Getl the T20_LinuxImageV2.0Alpha2_20121019.tar.bz2 from Toradex, put the T20 module into recovery mode and install the linux-image as prescribed on Toradex' website.
  • Boot the T20 board, interrupt the boot sequence. Add the following two environment variables to the u-boot bootloader:
setenv myargs ip=off root=/dev/mmcblk0p1 rootfstype=ext4 rootflags=data=writeback,commit=15
    setenv myboot run setup\; setenv bootargs \${defargs} \${myargs} \${mtdparts} \${setupargs}\; echo Booting from NAND...\; nboot ${loadaddr} 0 ${lnxoffset} \&\& bootm
    • Run your image.
    run myboot
    • If you are satisfied with the result, save this modification with...
    setenv bootcmd run myboot

    Monday, November 26, 2012

    MOTU 882 MK2 Mic Preamp Input

    Today I disassembled a MOTU 882 MK2 Audio Interface that exhibited significantly increased noise on one of the microphone preamplifier inputs. While I had the unit open, I made this quick sketch of the input circuitry:

    From chris' blog

    From chris' blog

    Interestingly the MOTU does not use a specialized microphone amplifier (such as the SSM2019 for example) but the standard instrumentation amplifier layout known since the dark ages, built from a NJM2068 dual opamp.

    The next funny thing to notice: MOTU put a bridge rectifier on top of the SMD opamp (which has been removed in the photograph, it's normally sitting in the four holes on the corner of the small IC). It's protecting the amplifier from voltage swings out of the V- to V+ range. It's also missing from the hand-drawn schematic, it's on the positive inputs to the left opamp. In the end it turned out that this bridge rectifier was the cause of the increased noise. I replaced it with Z-diodes altogether, and now both channels (the unmodified one, and this one) show exactly the same (good) noise-spectra.

    Monday, November 19, 2012

    ligthdm: custom app on login screen

    It's not rocket science, but it took me a while to collect all the pieces, so here's a short summary, mainly to serve as a reminder to myself: I need the IP address of a computer displayed on the login-screen (using lightdm), because every day it gets a different dynamic IP address and I want to login over the network, and logging in on the console just to type ifconfig (or ip addr) is cumbersome. No, it's not in DNS. No, using mdns/avahi doesn't work either in this particular instance. It's a laptop sitting just next to me on my desk.

    So, without further adue:

    • install conky
    • in /etc/lightdm/lightdm.conf:
    • in /etc/lightdm/greeter-conky.conf
      xftfont Ubuntu Mono:size=18
      eth0: ${addr eth0}, eth1: ${addr eth1}

    From chris' blog

    Tuesday, November 13, 2012

    RANT: complications of converting a picture to a pdf...

    I just spent about one hour looking for a small tool (i.e. NOT starting libreoffice and putting a picture on a empty page, export as pdf) that will preserve resolution and geometrical size of a scanned-in bitmap and put it centered on a blank (A4-paper) page.

    I assume that for every permutations of {'png','jpg','tiff','bmp','xpm',...},{'to','2'},'ps' there will be some tool in Ubuntu's repository, but they all seem to...
    • mess with the aspect ratio
    • either assume some fixed input resolution (ImageMagick's convert, for example) which gives you tiny, tiny, tiny output pdf-files (I could not reproduce the calculations it does) or correctly sized pages with the image enlarged until it fits border-to-border
    • re-sample the image so that the output file is huge, and image quality sucks.
    But today, I finally found the small python script again I've written back in 2007, used through most of my university time (for scanning in travel invoices, notes, ...) and which still works \o/ . It's not a very pretty tool, but hey, at least it does what's advertized!
    Have fun with it, in case you have to send in your Arbeitsunfähigkeitsbescheinigung like myself, being sick and getting MENTAL BECAUSE OF ALL THESE USELESS TOOLS one has to keep up with.

    Wednesday, November 07, 2012


    Found this ancient (well... almost, it's from about 1982) chip at work. It's a development version for applications where a mask-programmed 80C51 will ultimately be used, and you therefore don't have means to plug in separate ROM chips onto your circuit board:

    As long as you are working on the software, you can burn it into (erasable, changeable) PROMs that get plugged into the piggyback-socket on top of the 80C51Px. Once you've finalized your code, you'll use OTP (one-time-programmable) or mask- (factory-)programmed chips that are, of course, much cheaper. The chip has pins in standard DIL-40 layout on the bottom, the piggyback sockets on top are also standard DIL-28 spacing.

    From chris' blog

    Interestingly, while this chip family is as old as rocks, software-compatible parts with much higher performance are still being produced, e.g. by Silabs.

    Sunday, October 07, 2012

    Legacy X background

    I know that you missed it since the day Xorg switched to an all-black default background.

     $ xsetroot -fg black -bg white \
       -bitmap /usr/include/X11/bitmaps/root_weave

    Saturday, October 06, 2012

    German iBook G4 Keyboard

    I currently have a iBook-G4 on my desk, running Linux. Everything is dandy, only a few things with the keyboard are odd. Two keys are swapped: “°^” (to the left of the number 1-key on a German keyboard) and “<>” (to the left of “Y” on a German keyboard)". And the right ALT key seems to be mapped to the “Enter” function. I got it running after messing around with the Xorg xkb settings (which is a nightmare, btw.) but it is clear that the problem is somewhere deeper.

    There’s some serious mapping error for this keyboard in the kernel’s table stored in adbhid.c.

    Key ADB Code Key is… Key should…
    <> 0x32 KEY_GRAVE KEY_102ND
    °^ 0x0a KEY_102ND KEY_GRAVE

    Here’s a patch that makes this keyboard behave:

    $ cat ~/adbhid_c.patch
    --- ./drivers/macintosh/adbhid.c.orig   2012-10-06 15:52:16.032673677 +0200
    +++ ./drivers/macintosh/adbhid.c        2012-10-06 16:23:23.708911092 +0200
    @@ -798,7 +798,7 @@

                    memcpy(hid->keycode, adb_to_linux_keycodes, sizeof(adb_to_linux_keycodes));

    -               printk(KERN_INFO "Detected ADB keyboard, type ");
    +               printk(KERN_INFO "Detected ADB keyboard, type (%x) ",original_handler_id);
                    switch (original_handler_id) {
    @@ -807,11 +807,19 @@

                    case 0x01: case 0x02: case 0x03: case 0x06: case 0x08:
                    case 0x0C: case 0x10: case 0x18: case 0x1B: case 0x1C:
    -               case 0xC0: case 0xC3: case 0xC6:
    +               case 0xC0: case 0xC6:
                            input_dev->id.version = ADB_KEYBOARD_ANSI;

    +               case 0xC3:
    +                       printk("ANSI (iBook G4 German).\n");
    +                       input_dev->id.version = ADB_KEYBOARD_ANSI;
    +                       hid->keycode[0x32] = KEY_102ND; /* German: left of Y, less/greater */
    +                       hid->keycode[0x0a] = KEY_GRAVE; /* German: left of 1 */
    +                       hid->keycode[0x34] = KEY_RIGHTALT;
    +                       break;
                    case 0x04: case 0x05: case 0x07: case 0x09: case 0x0D:
                    case 0x11: case 0x14: case 0x19: case 0x1D: case 0xC1:
                    case 0xC4: case 0xC7:

    Thursday, October 04, 2012

    Facts about my Dishwasher

    Things I learnt about my dishwasher today:

    • It has a Mitsubishi M38503M4-722FP micro controller with 512 byte RAM and 16kByte of mask-programmable ROM, which, frankly, is quite a lot for doing the dishes.
    • There is a debug-connector with serial port Tx/Rx, GND and Vcc on the side of the controller PCB, but there's no signal on the pins it because apparently the controller is broken.
    • It has probably be killed by overvoltage, more precisely by the kind overvoltage that also made the (I assume) 7805 on the other PCB explode violently.
    • 7805 tend to explode violently if a power-relay next to it shorts, and burns through half of the PCB, and I assume it did so with a ball of conducting gas or plasma generated under the relay, feeding 230V AC to what previously was a +5V Vcc line.
    • PCBs that short and burn through half of the material make the whole kitchen stink like burnt electronics.
    • I think need a new controller for my dishwasher.

    Sunday, September 16, 2012

    Just download 8 GB and you are set...

    Hey, Xilinx. Thanks for giving out your FPGA development environment for free (as in beer) and all... but seriously WTF: Since I downloaded it the last time (about a year ago), the size of the download increased from 4GB to 8GB?! Moores law in full effect?

    (note: I still have only 2MBit DSL around here)

    Furthermore: They send you a (uncompressed) .tar, which includes xz-compressed .zip archives.

    $ tar tf Xilinx_ISE_DS_14.2_P.28xd.3.0.tar

    Saturday, September 08, 2012

    Cobalt RaQ3 Frontpanel

    To replace my current network router, I'm planning to maybe put a Raspberry Pi in the case of a Cobalt RaQ I have standing around since half a eternity.

    Don't ask me why, but I spent way too much time (~8 hours) chasing the pinout of the RaQ and putting the awful lot of pins to a Arduino I often use for prototyping. Now I can write to the LCD, monitor button presses and let the LED blink. Because that's the most important thing for a router to do, in a closed network-rack, in the cellar, where the central heating is sitting. And none ever goes to look. Enough for today, I'll most likely put it back in the box I got it from, so that the project can be continued 2014 :-(.

    Code is at github.

    From chris' blog

    From chris' blog

    Friday, August 17, 2012


    Hey, Markus, I can foodblog, too.

    Wednesday, June 13, 2012

    LInux Kernel grieving...

    Sometimes kernel-development happens at the pace of glacial advance... Here's an example:

    This kernel patch, which makes a FastTrack Pro audio interface work in 24bit/96khz mode was already floating around in different forms about the time I bought this device in 2007, the existence of this patch  made me think that it will be well-supported soon, and it was one of the main reasons why I had chosen this hardware in the first place.

    But as it never found its way into the regular ALSA, despite being put into bug-/feature-reports, a few wikis about audio under Linux and mailed to the alsa-maintainers, I had given up on ever seeing it merged into the mainline kernel.

    But the unbelievable thing has happened: I just noticed that it has indeed found its way into the Linux kernel about 11 months ago.

    Note to self: Put this in /etc/modprobe.d/my-alsa-config.conf:

    options snd_usb_audio index=1 vid=0x0763 pid=0x2012 device_setup=0x09

    Friday, June 08, 2012

    The loundspeaker, it hums!

    I’m currently on a shopping-spree on eBay. There are certain categories of slightly outdated equipment that frequently contain amazing things almost for free… The latest evidence for this is presented below.

    When sitting in my bureau/lab/workshop in the basement, I usually listen to music on small passive loudspeakers fed by a tiny 2x 22W amplifier, and I was always annoyed that sound had almost no bass… Those times are over now, or so it seems.

    I recently acquired a 12” Subwoofer basically for free on the ‘bay and now finally had the time to close the big hole left from the missing active amplifier and crossover module with a piece of MDF. The good thing is that mechanically the subwoofer is absolutely pristine, short of a very small bent on the metal front grill.


    (the cover will be painted black and supplied with a proper Speakon connector soon, maybe in 2015 Winking smile)

    Fed from a Delta44 Soundcard (ebay, 1€) through a dual LM3886 amplifier module (bought, again, for almost no money from ‘bay in 2009…) and crossover functionality supplied by Francois Bourdon’s excellent crossover plugin (when listening to music on Windows) everything sounds absolutely stunning. I’ll try the corresponding recipe for pulseaudio soon.


    (LM3886 “Gainclone” Amplifier)

    Saturday, June 02, 2012

    Holidays (again)

    Holidays, and unfortunately picasaweb does not allow me to upload these panoramic pictures :-(, so off to ipernity it goes...

    Friday, June 01, 2012



    (artefact on the upper left is due to me adding a “filler” photo shot from a slightly different position…)

    Saturday, February 18, 2012

    New Webcam

    Just don’t ask why. I got myself a new video camera! (Previously)