Author: Ben

  • A View Into The (Shitty) Past

    So after remembering/discovering that I still have my old sites database stored in SQL on here, I’ve been pondering how/if I should retro post all of this stuff into wordpress or not.

    If it wasn’t for the fact There’s like 60 posts to do, I’d do it manually. So I’m going to write some kind of script to do it,  hell, I might even go so far as to add all the old comments (although I’m not sure what pearls of wisdom this will add to the mix).

    So over the next few days (hopefully), I should convert most of the old stuff over.

    Deep joy, etc.

  • How to overinstall a home network

    So due to our house being kinda… revamped slightly, with some new central heating, kitchen bathroom and such, I had to refit my network solution upstairs as what I had was going to be in the way of the new boiler that was going upstairs. This meant I had to relocate a lot of my shit, including my file server, some switches and the router/modem etc. Whilst doing this I thought I might as well rewire the entire house properly, instead of the madness I had:

    This meant  purchasing a few things required for the job:

    • Much cable (100m)
    • Some sockets
    • Patch panel
    • Punchdown tool since mine broke
    • Many patch cables
    • couple of cable couplers
    • and some kind of rack to put the shit in

    I bought most of it off eBay, and ended up with a large mountain of shit in the loft where I’d been storing it until after the central heating had been fitted, when I could begin:

    Now my first plan had been to use an Ikea coffee table as a rack, like I’d seen on a website I’d found whilst looking for cheap rack solutions (actual server racks from eBay were silly money), however when I’d bought one, put it together, I found it to be pretty flimsy. My fileserver could only really sit at the bottom of said rack due to the wieght of it, this wasn’t quite the idea as access down there would be shit:

    So after looking around my house, I realised my bedside cabinet/printer storage thing had the same dimensions inside as the coffee table, allowing me to use this as a rack. This was much better as it was solid, instead of a honeycomb cardboard affair that the table was. Here it is before hand, being used a printer cabinet monnnnths ago:

    Now this cabinet also had pre-drilled holes for shelf placement, and one shelf that I could use to put shit on. Also rather strangely, it was *exactly* the same depth as cookiemonster (almost as if Ikea had intended it to be used for such a purpose maybe?), and also seems to be exactly 6u high. Weird.

    So anyway, onto the building shit. I have something stupid like 11 devices to connect to the network via wired, and a further like 4 with wireless. this requires all of this shit to connect:

    Looks stupidly overkill. Before I had this strewn all over the house in various locations, with bundles of cables everywhere (mostly in the loft or behind wardrobes and shit). I wanted to consolidate it all into one place. So after I’d swapped over my new £5 Ikea coffee table with my printer table, I was ready:

    I started off fitting my server at the top leaving a gap for airflow (like I said before, using the top hole seems to leave exactly 3u as my server is 2u and there’s a 1u space at the top), using some shelf fixing studs I found:

    Next I put the shelf in, and sorta planned out where stuff was gonna go:

    Looks like a lot of crap :\. Now I had to make some modifications to the cabinet thing so I could make the amount of cables that came out the back semi-tidy:

    Next I had to start the immense task of putting sockets in, my room looks overkill with the stupid amount of ports I have:

    My brothers room however was the single worst situation ever for installing the socket. He has all his computer shit in a small tunnel along the end of his bed, under the desk between the bed and the wall, I had to get into this to pull the wire through from where I’d fed it, right to the end to where the socket went. This was basically hell, as this hole was just about small enough for me to not fit:

    Once I’d got all the sockets in, I started to run some of the cable, this wasn’t as hard as I thought since a lot of the holes I needed were already there. Once I’d ran a few cables I terminated them at both ends and started to test a few of them:

    My work area got pretty shit quick:

    Also, what happened to my nice tidy reel? 🙁 :

    After many, many hours stuck in a hot loft I’d laid all the cables, and terminated/tested them all:

    Now I could finally set shit up, I put all the switches onto the shelves, plugged them in, ran the coax for the cable internet, and connected the monitor up to cookiemonster. And after hours fucking about with tieing cables up a the back and arranging patch cables I was done:

    Finally! It took me like 3 days but was actually quite worth it, as shit not works a bit better than before (somehow), and it looks so much nicer downstairs, as the only peice of network shit I have down here is the wireless point, and I only left that down here for signal’s sake. The most telling thing about how complicated it all is though is the amount of cables feeding into the airing cupboard from upstairs, somehow I’d used OVER 100m of the stuff:

    Overkill? Yes? Necessary? Yes.

  • For Anyone Who’s Sad Enough To Be Interested…

    There appears to be a bug in phpsysinfo on FreeBSD 8.1, where it formats the network interfaces section wrong, due to a change in how netstat operates; it seems they’ve changed the amount of columns and spacing with “netstat -nibd”, which is how phpsysinfo gets its networking info. I thought at first it was just me breaking shit, but after searching around on several other peoples phpsysinfo pages, it seems to be a common issue.

    It took me a while to find the issue, but I’ve fixed it through trial and error, for anyone who’s interested, the fix is here:

    phpsysinfo/includes/os/class.FreeBSD.inc.php:

    function network () {
    $netstat = execute_program('netstat', '-nibd | grep Link');
    $lines = split("\n", $netstat);
    $results = array();
    for ($i = 0, $max = sizeof($lines); $i < $max; $i++) {
    $ar_buf = preg_split("/\s+/", $lines[$i]);
    if (!empty($ar_buf[0])) {
    $results[$ar_buf[0]] = array();if (strlen($ar_buf[3]) < 15) {
    $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[6];
    $results[$ar_buf[0]]['rx_packets'] = $ar_buf[3];
    $results[$ar_buf[0]]['rx_errs'] = $ar_buf[4];
    $results[$ar_buf[0]]['rx_drop'] = $ar_buf[11];$results[$ar_buf[0]]['tx_bytes'] = $ar_buf[9];
    $results[$ar_buf[0]]['tx_packets'] = $ar_buf[7];
    $results[$ar_buf[0]]['tx_errs'] = $ar_buf[8];
    $results[$ar_buf[0]]['tx_drop'] = $ar_buf[11];

    $results[$ar_buf[0]]['errs'] = $ar_buf[4] + $ar_buf[8];
    $results[$ar_buf[0]]['drop'] = $ar_buf[11];
    } else {
    $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[7];
    $results[$ar_buf[0]]['rx_packets'] = $ar_buf[4];
    $results[$ar_buf[0]]['rx_errs'] = $ar_buf[5];
    $results[$ar_buf[0]]['rx_drop'] = $ar_buf[12];

    $results[$ar_buf[0]]['tx_bytes'] = $ar_buf[10];
    $results[$ar_buf[0]]['tx_packets'] = $ar_buf[8];
    $results[$ar_buf[0]]['tx_errs'] = $ar_buf[9];
    $results[$ar_buf[0]]['tx_drop'] = $ar_buf[12];

    $results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[9];
    $results[$ar_buf[0]]['drop'] = $ar_buf[12];
    }
    }
    }
    return $results;
    }

    That might not fix it for everyone, but it seems to have done the trick for me.

  • Even more useless electrics…ish.

    So laying around I have one of my old laptops; a Thinkpad T23. Now I’d added wireless to this like 4 years ago using a mini-pci card, only cause I was using some shitty antennas, the signal was shite. Even in the same room as the AP I was getting pretty much no signal.

    So in my boredom a few weeks back I decided to start my genius plan to improve this. Many, many years ago (like at least 10) I’d used a similar solution to fix my shitty TV reception. The solution was to  extend the antennas using kitchen foil. This sounds rather… Wile E Coyote, but it worked pretty well back then. So I thought, why can’t it work here?

    I took apart the screen of the laptop, to reveal the shitty antennas that I’d installed all those years ago:

    These I think were never intended to be LCD antennas, as I had to bend them into place, I’m pretty sure they were keyboard mounted ones.

    So I cut them off just at the end of the wire, and then proceeded to try and solder the foil onto the end. This took absolutely ages, as I’m pretty sure you can’t solder aluminium using tin solder, but whatever, it worked eventually:

    Now after I’d done this it was getting pretty late, so I shoved the whole thing onto my side and went to bed. It sat here for probably 2 months until a couple of weeks ago when I got a new bed, and had to empty my room of shit to get the damn thing in. I decided to actually put it together properly instead of leaving it. After much shouting to get the damn wire to follow the path *I* wanted, it turned out pretty well (I fucked with the levels so you can see:

    After spending years trying to get the damn LCD back into place without breaking it, I booted the thing up..only to realise it had a failed attempt at a FreeBSD compile on it which just kernel panic’d. (I still never figured out what I did, but whatever). Again, I threw it onto the side and went onto other things.

    This week, I finally decided I should actually see how my work went. I went upstairs and plugged in my backup disc to cookiemonster, then came down and booted up Symantec Ghost, restored an image I had; which turned out to be like 4 years old as well, which was pretty interesting. Turns out my hack has worked incredibly well:

    That was taken the other side of my house to the AP, whereas before I’d get barely one bar in the same room, not bad, I’ll think you’ll agree.

  • I am the world’s worst electrician.

    So as some of you may/may not know, I rigged up a switch (pretty poorly rigged up) to control the LEDs on the front of my case. Being a slight insomniac sometimes, I can’t stand any form of LEDs being on at night; I’ve even gone around my room taping up those I don’t need. However in the case of my desktop computer I actually wanted to still be able to see them when I wanted; hence the need for a switch.

    Now this switch was rigged up on the back of the PCI slots, and this had presented me with an issue, I kinda wanted to go crossfire, and to do this… the switch had to go. I already had another switch further up the back of the case to control the cathode tubes I had. So I thought I’d move the switch up there (there were some nice holes here provided by Lian-Li for water cooling hoses, so nicked them for use as switch holes, to save me drilling into the case.

    Old switch:

    Problem is, for continuity’s sake, I wanted another switch that looked fairly similar to the one already there, so using the original toggle switch wasn’t an option, so I looked on maplin’s website. I could only find single pole switches of this type (I needed a dual pole one to turn off two LEDs). So I ended up going to maplin to buy a single pole switch, and a dual pole relay to turn the two circuits off.

    This presented me with an issue as I.. can’t solder for shit, but whatever, I’d figure that out further down the road.

    First thing I did was to get the switch to fit in the hole, as the holes in the back are for hoses, they’re pretty large, at least compared to a switch. So I had to make a template thing to put the switch in. Last time I used a CD case, but as everyone knows, these things are designed to break, so it was really hard. I didn’t fancy ruining 4 CD cases again this time. So instead I used a DVD case as these are far more flexible. I used a holesaw to drill out a largish section of the case, then  a smaller part of the holesaw to drill out the plastic in the middle for where the switch would sit. However one issue I had  is… my Dad’s holesaw is kinda fucked, so getting the different size blades in was… annoying, so at first I thought I’d use the drills motor to assist getting them in, kinda like you do to tighten the keyless chuck… yeah, bad idea:

    Fucked holesaw:

    After stopping the bleeding and cleaning up, I got back to work.

    Half completed template:

    After some cleaning up with a Stanley knife:

    Now I had my switch I had to start with some of the wiring.  I needed both a case for the relay to sit in, and some wiring, so I had a genius idea, I cannibalised a Zalman fanmate, as this had a fan header on, which I could use to power my relay, and sufficient amounts of cable for wiring it all up.

    Fanmate case:

    Wiring:

    So I cut off the bits I didn’t need, and trimmed the wire to the length I needed.

    Now I needed to start soldering shit to my relay, however as I stated earlier I..suck. After several failed attempts, washing and even grinding shit off the end of my soldering Iron I was still no better. I even watched several youtube videos, and whilst this helped, I was still pretty bad,  so I gave up, and heated the solder with a lighter (one of those that’s almost a blowtorch). This worked perfectly (aside from half melting the casing :D), and before long I had wired it all up.

    Sucky soldering:

    And finally done:

    Here’s the whole thing fitted inside the zalman fanmate case:

    And fitted into the case:

    And the switches together:

    The whole thing has turned out incredibly well considering my lack of skill, I’m pretty impressed. The next step is to wire both the LEDs and cathode tubes to the same switch with another relay so I have a “night mode” :D.