Archive for the ‘fun-projects’ Category

Firmware update ILO of HPE DL385 gen1

Monday, July 17th, 2017

Playing around with old hardware brought me to a place where I needed to firmware upgrade the ILO of an HPE DL385 G1 server in linux (Centos6). Fairly simple actually

[root@dl385 ~]# ./CP023365.scexe
FLASH_iLO v1.10 for Linux (Mar 19 2009)
Copyright 2008 Hewlett-Packard Development Company, L.P.
Firmware image: ilo196.bin
Current iLO firmware version 1.87; Serial number ILOow�:nػ_�_�ܕ/ϟ

Component XML file: CP023365.xml
CP023365.xml reports firmware version 1.96
This operation will update the firmware on the
iLO in this server with version 1.96.
Continue (y/N)?y
***** DO NOT INTERRUPT! *****
Firmware image file is being sent … 100%
Flash is in progress…
Firmware flash is complete.
The device will reset …
Device reset will complete in 1 seconds…
Succeeded.
[root@dl385 ~]#

Firmware update HPE smartarray 6i in linux

Monday, July 17th, 2017

Playing around with old hardware brought me to a place where I needed to firmware upgrade some HPE Smart Array 6i controllers in linux (Centos6). Fairly simple actually

[root@dl385 ~]# sh ./CP009358.scexe
Firmware CD Supplemental Update / Online ROM Flash Component for Linux - Smart Array 6i
* Version of rom to be flashed: 2.84
* Number of controllers: 1
* The version of existing Array ROM is 2.68
* 1 controller(s) will be flashed
* This operation may take about 2 minutes
Flash ROMs Now? (Yes/No): yes
Flashing 1 controller(s), please wait....
Success: Product 40910e11 at controller position 0
with old version 2.68 has been updated with new version 2.84.
ROM Flash complete. New firmware will take effect when the server is rebooted.
As part of the reboot process, you should power cycle the server and any
external drive arrays.

Fiber 1.5 year later

Friday, December 23rd, 2016

So how did the fiber do after 1.5 year? Actually quite good. 0.03% lost packages (most of which happens to be me fooling around) and 1.5 ms avg latency to the ISP gateway. I could use more bandwidth, but hey, I get this for free, who am I to complain. 

FTTH via TDC HomeDuo Fiber (egen router på TDC HomeDuo Fiber)

Monday, July 13th, 2015

Finally I got FTTH. My manager at my work was cool enough to let me have FTTH by upgrading my work@home package from ADSL to Fiber. This picture shows the difference between ADSL and Fiber very well. Latency goes from 16ms to 2ms. And the packet loss is gone (the drops you see in the 2ms line is me fooling around, but about that in a moment)

fiber

Technically TDC HomeDuo fiber consists of a Raycore RC-OE1A followed by Sagem HomeBox (rebranded for TDC). The latter is geared towards mr. and ms. ignorance and is very limited to what you can actually do. To make matters even worse, my company has a special profile that locks the box down even further, making it impossible to live with if you are just a bit technical. Playing around with the setup, and wanting to go back to my beloved rt-n16 running openwrt, I had some experiments, where I played around with it, to make it work (hence the packet drops). It is actually not that hard

  • TDC FTTH uses wlan 101 for WAN
  • To get your own router online fast, I suggest using the mac address from the Sagem crap.

So to get that to work, select network in openwrt. Select switch. Enable vlan tagging. Assign  vlan 101 to port 0 (WAN) and CPU

Screenshot from 2015-07-13 14:11:59

After that is done, you select interface, select WAN (eth0.101) and press edit

interfaceUnder the advanced tab you then override the mac address if needed and it ofcourse has to start at boot

Screenshot from 2015-07-13 14:27:36

And then under physical, you bind the WAN to eth0.101

Screenshot from 2015-07-13 14:28:20

And the result of going from Sagem to openwrt is also measuable. The difference is not large in latency, but it is there. The usability of openwrt over the sagem box is however worth every hassle endured.

openwrt_over_sagemThe bandwith provided by my work is “only” 50Mbit/s. The raycore is providing/connect at 100Mbit/s, so the limit is artificial and done on the TDC equipment upstream.

Memory upgrade of my HP 4250 Laserjet printer

Tuesday, 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

Friday, 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

[code]

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

[/code]

And then the printer rebooted yielding.

hp4250

All done.

Migration to a new lowpower server (Thinkpad T420)

Monday, 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

Sunday, 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:

[code]
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
[/code]

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

[code]
‘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’
[/code]

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:

[code]
#!/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);
[/code]

Which I then ran as

[code]
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
[/code]

And then the last part

[code]
mv playlist as stored_playlists.db.new playlist as stored_playlists.db
reboot
[/code]

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

Upgrading crucial M4 SSD firmware from grub2

Tuesday, 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:

[code]

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’

[/code]

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!

Upgraded my routers to run Tomato by Shibby today.

Sunday, February 23rd, 2014

I upgraded my routers today. I ran EasyTomato v8.0 and 8.1 for a while on my Asus RT-N16 and had my Linksys E3000 laying dormant after I got the Asus RT-N16.

EasyTomato wins for having a porn/adult filter, and that was actually the reason for bying the Asus RT-N16 in the first place and running EasyTomato, but after some months I came to the conclusion, that the firmware lacked in the geek/hackability area.

After a bit of investigation, I have switched to Tomato by Shibby and both my Asus RT-N16 and my Linksys E3000 now runs Tomato Firmware 1.28.0000 MIPSR2-116 K26 USB Big-VPN.

The firmware works fine, have a lot of bells and whistles  and is actively developed as well with full sourcecode provided. If only I could read and write polish now :-).