![]() |
| From 2013-03-31 |
My place to post silly pictures and rants, even though I’m no longer a PhD-student.
Sunday, March 31, 2013
Happy Easter
Friday, March 29, 2013
Webmail Notifier - Linux Hidraw
https://www.google.de/search?q=webmail+notifier&tbm=isch
My incarnation of this relatively simple concept identifies itself with a USB VID/PID of 0x1294:0x1320:
# lsusb -s 1:14
Bus 001 Device 014: ID 1294:1320 RISO KAGAKU CORP.
And it shows itself in the kernel log as follows:
[10772.855386] usb 1-1.6: new low-speed USB device number 15 using ehci-pci
[10772.949641] hid-generic 0003:1294:1320.000D: hiddev0,hidraw2: USB HID v1.10 Device [MAIL MAIL ] on usb-0000:00:1a.0-1.6/input0
As it registers itself with the HID subsystem, we can use the resulting hidraw device to talk to it without using any script or tool, just make a convenience symlink with useable permissions using a small udev rule:
$ cat /etc/udev/rules.d/99_webmail_notifier.rules
# USB Webmail Notifier (RGB LED)
SUBSYSTEM=="hidraw" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1294", ATTRS{idProduct}=="1320", GROUP="users", MODE="0660", SYMLINK="webmailnotify"
Then you can make it change its colour with a simple echo-command in any script:
$ echo -en '\001\0\0\0\0' >/dev/webmailnotify
The only ugly thing about it: It seems to send back some HID report which confuses and angers the kernel routines, but this shall be dealt with at some later point.
[11170.163495] hid-generic 0003:1294:1320.000D: extract() called with n (56) > 32! (swapper/0)
Saturday, February 09, 2013
AES/EBU to ‘SPDIF’ - ghetto style
For interfacing AES/EBU to S/PDIF, I've built a simple transformer out of a small ferrite core, I was planning to convert the 110Ω symmetric AES/EBU signal coming out of a surplus ADC/DAC (I love you, eBay ;-) ...) to the S/PDIF of my computer interfaces (and vice-versa).
There's a nice text about all this over at RANE, but normal people just shell out the 100€ for two of Neutrik's transformers in a box.
The screenshots below show the output of the transformer, terminated by 75 Ohm (or by the audio-interface S/PDIF input, looks identical) when driven by the AES output. I wanted to hide everything in the XLR connector shell, and hence the ferrite beads are pretty small. Therefore they saturate visibly at 32kHz fs, but it works fine for this signal direction. At 96kHz everything looks perfect.
![]() |
| From Chris’ Miscellanea |
![]() |
| From Chris’ Miscellanea |
![]() |
| From Chris’ Miscellanea |
Monday, January 14, 2013
M-Audio Fast-Track Pro PCB Pictures
First, I took a few pictures of the two PCBs inside the unit, and traced a few signals. You can see immediately that the electronic layout of the unit is very tidy!
Main integrated components:
- Texas Instruments TUSB 3200 USB Streaming Controller
- Asahi Kasei AK4114 S/PDIF Transceiver
- Asahi Kasei AK5381 24bit 96kHz ADC
- Asahi Kasei AK4381 24bit 192kHz DAC (compatible successor AK4385)
![]() |
| From M-Audio Fast Track Pro |
![]() |
| From M-Audio Fast Track Pro |
![]() |
| From M-Audio Fast Track Pro |
![]() |
| From M-Audio Fast Track Pro |
![]() |
| From M-Audio Fast Track Pro |
Thursday, January 10, 2013
Note: Archlinux and Xorg Keyboard Layout
[root@fbsd ~]# cat /etc/udev/rules.d/99_keyboard_keymap.rules
SUBSYSTEM=="input", ENV{ID_INPUT_KEYBOARD}=="1", ENV{XKBMODEL}="pc105", ENV{XKBLAYOUT}="de", ENV{XKBVARIANT}="nodeadkeys"
So far it's understood by xorg just fine.
[ 2888.705] (II) XINPUT: Adding extended input device "Das Keyboard" (type: KEYBOARD, id 8) [ 2888.705] (**) Option "xkb_rules" "evdev" [ 2888.705] (**) Option "xkb_model" "pc105" [ 2888.705] (**) Option "xkb_layout" "de" [ 2888.705] (**) Option "xkb_variant" "nodeadkeys"
Friday, December 28, 2012
☠⚠⚡☔☣☢☹⛈ Windows 8...

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
![]() |
| From chris' blog |
![]() |
| From chris' blog |
Thursday, December 06, 2012
Note: Archlinux on the Toradex T20
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:
- Run your image.
- If you are satisfied with the result, save this modification with...
Monday, November 26, 2012
MOTU 882 MK2 Mic Preamp Input
| 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
So, without further adue:
- install conky
- in /etc/lightdm/lightdm.conf:
greeter-setup-script=/etc/lightdm/greeter-setup.sh - in /etc/lightdm/greeter-conky.conf
(...)
xftfont Ubuntu Mono:size=18
(...)
TEXT
(...)
eth0: ${addr eth0}, eth1: ${addr eth1}
![]() |
| From chris' blog |
Tuesday, November 13, 2012
RANT: complications of converting a picture to a pdf...
- 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.
- python ./20070124-pics-to-pdf.py -r RESOLUTION -o PDFFILE PNGFILEs...
Wednesday, November 07, 2012
80C51P32
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

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 |
| R-Alt | 0x34 | KEY_KPENTER | KEY_RIGHTALT |
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) {
default:
printk("<unknown>.\n");
@@ -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:
printk("ANSI.\n");
input_dev->id.version = ADB_KEYBOARD_ANSI;
break;
+ 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
- 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...
(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
Xilinx_ISE_DS_14.2_P.28xd.3.0/
Xilinx_ISE_DS_14.2_P.28xd.3.0/idata/
Xilinx_ISE_DS_14.2_P.28xd.3.0/idata/ise_0090.zip.xz
Xilinx_ISE_DS_14.2_P.28xd.3.0/idata/dsp_tools_0006.zip.xz
(...)
Saturday, September 08, 2012
Cobalt RaQ3 Frontpanel
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
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
)
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)
















