Workgroup Bridge with older Cisco Accesspoints and new Mobility Express Releases

Since I just spent the better part of a weekend to finally get this working, here’s a nasty little bug that took forever to track down: Starting from 8.10.150.0 if you want some older Cisco accesspoints connect to your network in WGB mode, you need to tweak your security setting a little bit otherwise they just wont connect: “cannot associate: EAP authentication failed” is one of the various not exactly helpful error messages you’re probably very familiar at this point if you found this post…

Cisco actually points to it in their documentation, but of course that was the last place I looked at: config wlan security wpa akm psk pmkid {enable | disable} wlan_id

That is, if you want have a WGB connect to your wlan 3:

config wlan disable 3
config wlan security wpa akm psk enable 3
config wlan security wpa akm psk pmkid enable 3
config wlan enable 3

Once that’s set, just configure your WGB like you usually would – for example:

dot11 ssid yourssid
authentication open
authentication key-management wpa version 2
guest-mode
wpa-psk ascii yourpresharedkey
interface Dot11Radio0
no ip address
no ip route-cache
encryption mode ciphers aes-ccm
ssid yourssid
station-role workgroup-bridge
bridge-group 1
bridge-group 1 subscriber-loop-control
bridge-group 1 spanning-disabled
bridge-group 1 block-unknown-source
no bridge-group 1 source-learning
no bridge-group 1 unicast-flooding

With PMK ID set, a 2600 Series or even something as old as a 1131AG would connect like it’s supposed to.

Intel SSD Update ISO fails to boot

In case you’re trying to update the firmware on your Intel SSDs by using their handy dandy issdfut Version 3.0.7 or 3.0.8 ISO just to be greeted by an ISOLINUX error like

Failed to load ldlinux.c32
Boot failed: press a key to retry…

Chances are it’s because their ISO seems to be broken when booting using legacy BIOS mode. Switch to UEFI and it will most likely work the way it’s supposed to.
When you’re done, don’t forget to switch back to legacy BIOS if you installed your OS that way, otherwise it probably wont be able to boot.

Noisy Focusrite Scarlett and how to fix it

Having noise issues on your external USB audio interface when connected to a desktop PC and powered studio monitors? Chances are you’re having issues with your grounding… Make sure you are using balanced cables, meaning three wires (two phases + ground) to connect your speakers to the output of your interface.

I recently spent quite a few hours chasing down an extremely annoying crackling hum on my audio setup because of that. No ground loop, all devices connected to the same circuit, I even hooked everything up to an online UPS so I get perfect sine voltage but to no avail. When connected to my main workstation there was a noticeable and extremely annoying background noise on my monitors that wasn’t there when I plugged the Focusrite Scarlett 2i2 into my notebook or mobile phone via an USB OTG adapter. Heck, it wasn’t even there when I plugged it into an HP Z600 workstation that is sitting right beside my main computer, all connected to the same UPS, ethernet switches and whatnot…

Turns out I used unbalanced cables from the Scarlett to the monitors and apparently the MSI X99S mainboard (or maybe the power supply?) in my primary desktop computer has for some reason quite a bit of noise on the ground of the USB bus. Or something like that – I didn’t bother to get an oscilloscope to verify.

Swapping the cables from TS to proper TRS (tip-sleeve “mono” to tip-ring-sleeve “stereo” aka balanced) fixed it and everything sounds perfect, no matter what computer the interface is connected to.

phpMyAdmin root login vs. MariaDB

So I just installed a new Ubuntu 16.04 Xenial box with MariaDB 10.0 and phpMyAdmin but for some reason just can’t login as root user via phpMyAdmin, although it works via the shell. Turn’s out MariaDB enabled the unix_socket plugin-in for the root user, preventing phpMyAdmin from working out of the box like it does with native MySQL. So much for drop-in replacement – figuring that one out was quite frustrating…

Here’s how you disable it:

echo "update user set plugin='' where User='root'; flush privileges;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql

Juniper EX2200 vs. USB serial adapter

Recently I had to factory-reset a Juniper EX2200 switch for which the password got lost. No big deal one would assume: Connect the console cable to the switch, plug in a USB-to-serial adapter since neither my notebook nor my desktop come with a serial port anymore, reset the switch and press space when the boot messages scroll by…

… except they don’t. Which is funny, because the serial connection itself worked fine just a minute ago – I just had no way of logging in. Reset the switch again, nothing. Wait a couple minutes… and the switch is completely fired up, except I still don’t get any output on the serial port. Detach the USB adapter, hook it up again, press some keys and there’s the login. Try the Reset again, same thing happens. And so on…

Apparently, the only way I get output is to attach the serial line after the switch powered on. Well, ok then – connect the line the second after the switch got power. Apparently that’s to fast. Plug it in a couple seconds later, apparently that’s to slow since the switch is already booting the kernel and you’ll have to press space at the bootloader before that. Let’s try something in between… doesn’t work either, only gets garbage output and doesn’t accept my input, since apparently that’s not the right time either. Goddamn, WTF? How hard can it be to watch the switch boot? Strange thing is, I haven’t had any problems with that cheap-ass adapter and other devices so far.

An hour (and about a dozen or two resets) later I decided to fuck it and grab an old HP Server I have laying around for testing spare-hardware… it still has a serial port. Hook it up to a screen, keyboard, connect the serial line there and boot an OS from USB. Guess what? The Juniper bootloader shows up just fine, no matter what. It’s just my fucking retarded USB serial adapter thingy which craps out for some reason or another.

# press spacebar when prompted
loader> boot -s
recovery
root@switch01> configure
root@switch01# set system root-authentication plain-text-password
# enter some password like juniper1
root@switch01# commit
root@switch01# exit
root@switch01> exit
Reboot the system [y/n] y

Done. In about two minutes or so, if it wasn’t for my stupid serial adapter, which turned it into an two almost hour ordeal.

Cloudflare Universal SSL and WordPress

Cloudflare just rolled out their Universal SSL enabling pretty much any site to use SSL without any associated costs – which is pretty awesome…

But when using it on one of my test-sites, it turned out the site looks pretty much broken. Apparently WordPress doesn’t yet use protocol relative URLs, so CSS, JS etc. may still have a http:// prefix, causing some browsers not to load that content over an insecure channel. Furthermore, trying to access the WordPress dashboard results in an infinite loop, since the request from Cloudflare to your server is still HTTP and handled accordingly by WordPress.

The quick way to fix this is to simply add a few lines to woud wp-config.php

define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
if(isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https')) $_SERVER['HTTPS']='on';

And maybe install some kind of HTTPS plugin to get rid of the mixed-content warnings due to residual http:// content from other plugins.

KVM too fast for plymouth-upstart-bridge

Kind of a hilarious bug, really… I recently installed another Ubuntu 14.04 server running inside a KVM with a rather fast storage backend, therefore the system apparently boots just a tiny bit faster than my other images have in the past. Problem is, apparently that slows down the boot process as init thinks something must be crashing and decides to respawn it for good measure…

[ 2.311174] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[ 2.811553] init: plymouth-upstart-bridge main process (191) terminated with status 1
[ 2.812789] init: plymouth-upstart-bridge main process ended, respawning
[ 2.874117] init: plymouth-upstart-bridge main process (210) terminated with status 1
[ 2.875167] init: plymouth-upstart-bridge main process ended, respawning
[ 2.904155] init: plymouth-upstart-bridge main process (217) terminated with status 1
[ 2.905289] init: plymouth-upstart-bridge main process ended, respawning
[ 2.928618] init: plymouth-upstart-bridge main process (221) terminated with status 1
[ 2.929713] init: plymouth-upstart-bridge main process ended, respawning
[ 49.975826] Adding 2093052k swap on /dev/mapper/[...]

Yep, that’s right – 47 seconds waiting and idling, doing nothing when the image could have booted in a fraction of that time.

To fix it, simply add a sleep 2 to your /etc/init/plymouth-upstart-bridge.conf

[...]
stop on (stopping plymouth
         or stopping plymouth-shutdown)     

console output

exec plymouth-upstart-bridge
sleep 2

Init won’t freak out anymore and starts the image as it’s supposed to:

[    1.225045] random: lvm urandom read with 16 bits of entropy available
[    1.281118] bio: create slab <bio-1> at 1
[    1.370262] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[    1.684687] tsc: Refined TSC clocksource calibration: 2500.001 MHz
[    2.153550] Adding 2093052k swap on /dev/mapper/[....]-swap_1.  Priority:-1 extents:1 across:2093052k FS
[    2.169332] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro
[    2.190451] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[    2.408937] EXT4-fs (vda1): mounting ext2 file system using the ext4 subsystem
[    2.417990] EXT4-fs (vda1): mounted filesystem without journal. Opts: (null)
[    3.316769] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.316778] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[    3.495345] FS-Cache: Loaded

Way better….