Memory upgrade of my HP 4250 Laserjet printer

February 24th, 2015

For merely $20 i ugpraded my Laserjet HP 4250 printer from 64MB to 320MB memory. It means that I can just send it a .pdf and it will print it. Cool actually. Works well in these mobilephone times where not all phones have drivers for printers.

 

Screenshot from 2015-02-24 18:11:26-edit

Upgrading HP LaserJet 4250 fw

February 13th, 2015

To my joy I noticed that my HP LaserJet 4250 had an ancient FW. Not that the newer firmwares provided anything useful in my case. Neither bugfixes for bugs that I was hit by, or features that I longed for. The process of FW upgradinga HP LaserJet 4250 to a newer FW is actually quite simple. Here goes

zensonic@x230:~/Downloads$ wget ftp://ftp.hp.com/pub/networking/software/pfirmware/lj4240_4250_4350fw_08_250_2.rfu

zensonic@x230:~/Downloads$ ncftp 192.168.1.242
NcFTP 3.2.5 (Feb 02, 2011) by Mike Gleason (http://www.NcFTP.com/contact/).

Copyright (c) 1992-2011 by Mike Gleason.
All rights reserved.

Connecting to 192.168.1.242…
FTP Server Ready
Logging in…
Hewlett-Packard FTP Print Server Version 3.0.
Directory:    Description:
————————–
PORT          hp LaserJet 4250

To print a file use the command put <filename> [portx]
or ‘cd’ to a desired port and use put <filename>.

User logged in.
Logged in to 192.168.1.242.
ncftp / > bin
ncftp / > mput lj4240_4250_4350fw_08_250_2.rfu

lj4240_4250_4350fw_08_250_2.rfu:  ETA:   0:00   16.68/ 16.68 MB  277.63 B/s

And then the printer rebooted yielding.

hp4250

All done.

Migration to a new lowpower server (Thinkpad T420)

November 24th, 2014

I recently bought myself a spar’o’meter, (kill’a’watt like device) which is able to measure the power usage of electrical equipment. To my horror I found that my “lowpower” AMD fusion based server consumed around 50 watt! Clearely something had to be done.

Luckily I had the right piece of equipment at hand. A lenovo thinkpad T420 with a broken/shattered LCD. Any decent laptop is built to minimize power consumption, so using an T420 alone would save on the electrical bill, but I went a bit further. More precisely:

  • Took off the (broken) TFT and disconnected it from the mainboar
  • Took out the bluetooth module
  • Took out the wireless module
  • Disabled all unneeded peripherals, serial ports, usb ports,
  • Bouht myself a 1TB WD red 2.5″, which consumes around 1 watt.
  • Removed the DVD drive.
  • Enabled maximum power settings in the bios.

I then put in 2 x 4GB of memory and together with the core i5 cpu, this would be a nice server with a built-in “ups”. On the software part, I migrated away from one big server years ago. I run esxi on my servers now. There was a small issue here, as ESXi 5.5 does not have support for the Intel Gigabit 82579 LM chip out of the ISO file.

This is not a biggie. You patch the iso with the correct driver for the E1000E chip using the esxi-customizer script and then you boot the customized .iso file.

I ended up with a esxi host that consumes 12 watt. A factor 4 better than my old AMD fusion based setup. And it feel snappier as well. The trade-off: I had to go from 2 x 2TB disks to 1 x 1TB. But that alone saved 10-15 watt.

About fixing Bluesound playlists after CIFS migration

November 2nd, 2014

I recently wiped TomatoUSB and installed OpenWRT Barrier Breaker on my Linksys E3000 based router. In that process I also migrated our FLAC collection from my x86 based server edison  to the OpenWRT router. Life was good….. until my wife complained that the her Bluesound playlists had stopped working.

Luckily I have root access to my Bluesound and can fix stuff like this. Heres the issue and the fix.

After the switch to OpenWRT the world look like this as seen from the Bluesound:

root@Stue /tmp/var/data$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               903080    342168    515040  40% /
tmpfs                   127488        48    127440   0% /tmp
tmpfs                   127488        36    127452   0% /dev
/dev/mmcblk0p3         2778768     86668   2550944   3% /tmp/var/data
shm                     127488         0    127488   0% /dev/shm
//192.168.1.254/flac 153703308  74379356  79323952  48% /tmp/var/mnt/OPENWRT-flac

But a peek inside the playlist.db on the Bluesound shows the following

‘StoredPlaylist::files’ => ‘/var/mnt/EDISON-flac/Arvo Part – Alina/01-Spiegel im Spiegel (Version fur Violine und Klavier).flac
/var/mnt/EDISON-flac/Arvo Part – Alina/02-Fur Alina (fur Klavier).flac
/var/mnt/EDISON-flac/Arvo Part – Alina/03-Spiegel im Spiegel (Version fur Violoncello und Klavier).flac
/var/mnt/EDISON-flac/Arvo Part – Alina/04-Fur Alina (fur Klavier).flac
/var/mnt/EDISON-flac/Arvo Part – Alina/05-Spiegel im Spiegel (Version fur Violine und Klavier).flac
/var/mnt/EDISON-flac/Arvo Part – Alina/03-Spiegel im Spiegel (Version fur Violoncello und Klavier).flac’

Notice how the name of the CIFS server is part of the playlist entry. After figuring out the format of the playlist.db, it was trivially easy to write a little perl program to convert them. I did have to take care of some latin1 to utf8 as well, but that was also easy. For anyone who cares:

#!/usr/bin/perl -w
#
# convert_playlist.pl – version 1.0 gamma. Project hours: 1
#
# —————————————————————————-
# “THE WISHLIST LICENSE” (Revision 42):
# <zensonic@zensonic.dk> wrote this file.  As long as you retain this notice you
# can do whatever you want with this stuff.
#
# If you feel it saved your world a gift from http://amzn.com/w/2Y27QA7V5FUGU
# is highly appriciated
# —————————————————————————-
#
# Copyright 2014.11.01 by Thomas S. Iversen (zensonic@zensonic.dk)

use strict;
use Storable qw(nstore retrieve);

die “$0 <path_to_playlist> <regexp_match> <regexp_replace>” if(!($#ARGV+1 == 3));
my $filename = $ARGV[0];
my $regexp_match = $ARGV[1];
my $regexp_replace = $ARGV[2];
my $storable;

die “$filename does not exist\n” if(! -f $filename);
$storable = retrieve($filename);
foreach my $playlist (@$storable) {
my $name=$playlist->{‘StoredPlaylist::name’};
print “Converting playlist ‘$name’\n”;
$playlist->{‘StoredPlaylist::files’}=~s/$regexp_match/$regexp_replace/g;

# capital danish
$playlist->{‘StoredPlaylist::files’}=~s/\xc5/\xc3\x85/g;
$playlist->{‘StoredPlaylist::files’}=~s/\xc6/\xc3\x86/g;
$playlist->{‘StoredPlaylist::files’}=~s/\xd8/\xc3\x98/g;

# lower danish
$playlist->{‘StoredPlaylist::files’}=~s/\xe5/\xc3\xA5/g;
$playlist->{‘StoredPlaylist::files’}=~s/\xe6/\xc3\xA6/g;
$playlist->{‘StoredPlaylist::files’}=~s/\xf8/\xc3\xB8/g;

# lower swedish
$playlist->{‘StoredPlaylist::files’}=~s/\xe4/\xc3\xA4/g;
$playlist->{‘StoredPlaylist::files’}=~s/\xf6/\xc3\xB6/g;

# capital swedish
$playlist->{‘StoredPlaylist::files’}=~s/\xc4/\xc3\x84/g;
$playlist->{‘StoredPlaylist::files’}=~s/\xd6/\xc3\x96/g;
}

my $filename_new=$filename . “.new”;
print “Saving playlist as $filename_new\n”;
nstore($storable, $filename_new);

Which I then ran as

root@Stue /tmp/var/data$ ./convert_playlist.pl stored_playlists.db EDISON OPENWRT
Converting playlist ‘Svensk jul’
Converting playlist ‘Hvid januar’
Converting playlist ‘Lektier’
Converting playlist ‘Moderne salmer’
Converting playlist ‘Total afslapning’
Converting playlist ‘P�ske’
Saving playlist as stored_playlists.db.new

And then the last part

mv playlist as stored_playlists.db.new playlist as stored_playlists.db
reboot

And restart the Bluesound app on the phone (it caches). Happy wife :-)

BluOS 1.12.1

November 1st, 2014

Yet another version with support for more streaming services. And yet again I found myself looked out of my player. I am getting faster and faster at regaining root on the player :-).

Cool that new features keep being developed!

Upgrading crucial M4 SSD firmware from grub2

October 28th, 2014

The download page for firmware for the Crucial M4 SSD have three options

  • One for windows 7
  • One for windows 8
  • One generic .iso for mac and windows

Lets for arguments sake think that someone have an x200s (no cdrom) with linux, then what? Actually not that hard:

sudo mount -o loop crucial-m4-070h-07-00.iso /mnt

sudo cp /mnt/boot/isolinux/memdisk /mnt/boot/isolinux/boot2880.img /boot/

sudo umout /mnt

sudo vi /etc/grub.d/40_custom

menuentry ‘Firmware Upgrade’ {
linux16 /memdisk floppy raw
initrd16 /boot2880.img
}

sudo update-grub2

sudo reboot

<hold shift for grub2 menu>

select ‘Firmware Upgrade’

Non-disruptive in my end, going from 0009 to 070H, but if you break anything, I will yell unicorns at you and let you keep the pieces. Because a crazy dane decideds to do this without backup, you should not do the same!

BluOS 1.12.0

October 17th, 2014

A new BluOS for my Bluesound. Version 1.12.0 brought Murfie and HDTracks support. And I almost trashed it in my attempt to gain root on the device after the upgrade. They have a bad habbit of shutting me out :-)

Barrier Breaker on my Linksys E3000

October 15th, 2014

I finally got the time after the release of Barrier Breaker to install it on my Linksys E3000. I have been really happy with the Tomato USB by shibby that I installed back in february.

TomatoUSB is a lean mean router distribution, actively developed and work really well. So why did I switch then? To a less polished, more do it yourself router? Mainly due to the fact that it turns my router into a generic linux distro. It gets more versatile. I can install whatever I pleases. At the cost of ease of use. An ok tradeoff when you are an fulltime Unix administrator at work.

edison% ssh root@192.168.1.254
root@192.168.1.254’s password:

BusyBox v1.22.1 (2014-09-21 02:05:47 CEST) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

_______                     ________        __
|       |.—–.—–.—–.|  |  |  |.—-.|  |_
|   –   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
|__| W I R E L E S S   F R E E D O M
—————————————————–
BARRIER BREAKER (14.07, r42625)
—————————————————–
* 1/2 oz Galliano         Pour all ingredients into
* 4 oz cold Coffee        an irish coffee mug filled
* 1 1/2 oz Dark Rum       with crushed ice. Stir.
* 2 tsp. Creme de Cacao
—————————————————–

BluOS 1.10.2

July 17th, 2014

Another small update to the Bluesound. I also noticed that someone has beenplaying around with Filter::Crypto::Decrypt in the source

root@Stue ~$ ls -al ms.pl
-rwxr-xr-x    1 root     root        164749 Jul 15 15:53 ms.pl
root@Stue ~$ wc ms.pl
1         3    164749 ms.pl
root@Stue ~$ cut -b 1- ms.pl
use Filter::Crypto::Decrypt;
ab176d4898affa5dcb8882cb377cfac18ee9bf79d1ccb3d50d7cebb3891….

That should actucally be fun to reverse engineer.

BluOS 1.10.1

July 2nd, 2014

Another BluOS update for my Bluesound N100. This time the major new thing is support for spotify. Good for Bluesound and the young generation. Not a biggie for me. I am old skool and have ripped all my CDs to .flac.

I love the Bluesound, but still miss stuff in the interface towards it. Mots notably I miss custom tagging of music (albums, songs, artists wise). ‘her music’, ‘his music’, ‘kids music’. And then being able to see only music that I care about in the interface.

But I am really being nitpicky now. Bluesound is about streaming quality. The interface is only next in priority :-).