Category Archives: Hardware

Unifi AP Recovery

I finally got around to manually reloading the firmware on two Unifi UAPs that I’ve had laying on my desk for months. It didn’t go so well last time around.

[PiwigoPress id=71 url=’http://gallery.justanotherdave.ca/’ size=’2s’ desc=1 class=’img-shadow’]

Step one was cracking them open and connecting my usb ftdi adapter to the onboard uart. The bootloader talks at 115200 baud, btw.

As the bootloader does its thing, it prompts you to press any key to interrupt the boot process. I found that by the time I saw that message, it was too late. I started spamming the space-bar as soon as it iterated the onboard flash and ram. Based on the recovery guides I’d originally read when at the boot-prompt I ran:

urecover

which spawns a tftp server listening at 192.168.1.20 and then tftp over a copy of the firmware.bin from the BZ2 folder on your controller. When I did that I got the following:

Error code 2: Firmware check failed

Of course. I spent some time running that particular message through google this time around and found this thread, which revealed the magic sauce.

mtdparts default

Then launch

uresecue

and go through the tftp process. All better. Haxxy cat was not so interested in this recovery, unfortunately.

Kobo Mini Haxxing

Last weekend a buddy of mine picked up a Kobo Mini on sale for $40 while we were out and about. Smoking deal for the baby brother of the ereader I use (Kobo Glo). After sharing the sale info with friends it was pointed out to me that the kobo is readily hackable. At $40 it was really hard to turn down the opportunity. So I bought two of them.

Foolishly I went through the setup/registration/autoupdate on them before doing much reading into it. After finding out that the first app (Kobo Weather App) I wanted to try out required a python library that didn’t like the latest firmwares (2.6.x) project number one became revert back to an older firmware.

After some trial and error the process worked out as such:

  1. Reset the device to factory defaults. Settings -> Device Information -> Factory Reset
  2. The device will reboot after it restores to the factory image. Select Computer Setup.
  3. Plug the Kobo in and copy the desired firmware (from here) to the .Kobo folder on the SD card
  4. Umount the kobo and unplug it, it will reboot again.
  5. Select Computer Setup a second time, plug in via USB.
  6. Using sqlite open .kobo/KoboReader.sqlite I found instructions for this here, however when I attempted the sql insert it failed saying that the user table now has 7 columns and I was only giving it 5 columns of data.  I ran:
    PRAGMA table_info(user);
    to display the current table schema. It seems like at some point they added a column for Facebook Login and whether or not you’ve purchased anything from the store. I added the extra two columns of data to the insert statement:
    INSERT INTO "user" VALUES('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa','aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa','xxxx@xxxx.xx','xxxx@xxxx.xx','2aaaa aaaaaaaaaaaaa==','','0');
  7. Exited sqlite, ejected the mounted volume, unplugged the Kobo Mini, and it jumped from the setup screen to the main screen of the Kobo software. My mini was now running 2.5.2

After that I copied over the update package to enable telnet, shut down the device, disassembled it, took out the sd card and used ddrescue to create an image of the card. Now I can install apps and muck around and have a good point to revert back to should I break the install too horribly in my playing.

Quick shot

3200

I picked up a tube of 10 ATMega328 microcontrollers for an embedded project I’m working on. I’d wired everything up Wednesday on a breadboard according to this guide with the intent of then connecting my original Arduino Duemillanove and burning the Arduino bootloader to the blank ATMegas using the ArduinoISP sketch. Attempt after attempt, rewire after rewire resulted in the following error:

avrdude: Expected signature for ATMEGA328P is 1E 95 0F

I spent a few hours searching around trying to find a solution and the forum posts involving that error really didn’t seem to apply to my situation. I eventually noticed that the uC that shipped on my Duemillanove was the ATMega328P-PU and the chips I had ordered/received were the ATMega328-PU, signifying that is not in the pico-power series. Armed with that little tid-bit I found this post containing the piece of information I needed to move forward.

3204

I now have signatures in /etc/avrdude.conf (excerpt below) for both the 328 and the 328p, and I now uncomment the appropriate signature for the chip I will be interfacing with. With that sorted I was able to finish burning bootloaders on all the ATMegas, breadboard my test bed, and get to learning bi-direcitonal half-duplex RS485 comms between microcontrollers using TI sn75176bp differential bus tranceivers.

part
id                  = "m328p";
desc                = "ATMEGA328P";
...
##      m328p signature
signature           = 0x1e 0x95 0x0F;
##      m328 signature
##   signature         = 0x1e 0x95 0x14;

I just got a call from my cell carrier

They verified who I was and then told me a qualified for a new FREE phone!! Oooh!! I could have my very own Nokia 6085 if I sign up for a new 2 year contract with them.

I told the guy no thanks, and he sounded confused. He asked why I wouldn’t want a new phone, and I told him I was quite happy with my Treo 680. He said according to their records I had an old Nokia (the last phone I bought from them). I said I wasn’t interested in the Nokia clamshell and wished him a good day.

It really seemed as if he thought I was lying to him….

So far so good.

The new hardware has been stable in apoc so far. Almost 48 hours solid, which is a fairly big jump from rebooting every 12-16 hours.  It’s also a far cry from “proven stable” in my mind though.  I think I’m going to start running some tests on the hardware I pulled out though.  First round is going to be a couple passes of memtest.  If that clears then I guess I’ll be getting a pair of hard drives and trying to mimic the OS install.

From there I hope that the same behavior will present itself.  Then I can try the tweaks one by one, disable hyperthreading, disable usb, disable apic, etc.  Until we find out what solves the problem.  Then I can get this board back in apoc.  I’d really much prefer to have the full 3gb in the VM host.

I’ve got all the MD units renamed now, so instead of /dev/md0 consisting of /dev/sda5 and /dev/sdb5 those units are in/dev/md5 and so forth. Does it make a difference to anyone but me? No not really.  But I like having things consistent.

There may be life yet

Today I headed down to the colo after work.  I swapped out the mobo, proc, mem, and sata controller in apoc.  So far things seem to be a bit more stable.  However, I made a number of other tweaks that may have fixed the instability. On the new board, I disabled hyperthreading and onboard usb. Unfortunately this board doesn’t do dual-channel ddr and only has three slots instead of four for ram.  I would eventually like to get the original board back in apoc, but only after extensive testing at home.

Here’s to hoping we get a stable Xen box soon.

The hotswap cage is here!

I picked up the 5-in-3 Sata cage this morning at the suppliers, along with a 40pin to 44pin IDE adapter. The adapter is for a data recovery attempt on a laptop drive.

I’m going to test a few things with the sata cage tonight, hopefully. Preliminary tests last night hot-pluging a sata drive on a linux box at home on a promise controller didn’t look to promising though. Nothing showed up in the system logs, nothing seemed to recognize the new drive until a reboot. So even if the linux driver for the promise tx4 I have doesn’t support hot plug, having the cage will make swapping drives when they die much faster than the current process of pulling the 4U out of the rack, half-way disassembling it all, replacing the drive, and putting everything back.

It looks pretty too!

A bit of housecleaning

I’ve made a couple changes to the site after I upgraded to the new release of WordPress. The drag and drop arranging of the sidebar widgets is pretty neat and I was able to add in the last.fm dealy pretty painlessly. Just created a new text box and pasted in the embed code from last.fm.

I’ve cleaned up at home a bit. Got a pipe rack in off ebay so I re-arranged the shelves here to fit that in. Pictures here.

I’ve had another hard drive failure downtown. It’s one of the recently replaced units too. Luckily I got it through our supplier at work so it’ll be painless to get a new unit in. I’m really debating getting a SATA 4in3 hotswap cage for that machine. I’ll think about it this weekend. If I do get it now, I can get them to order it in and I can install it when I swap the drive sometime this week.

It also looks like I’m preparing to revamp the entirety of my setup downtown. Time to move on from VHCS to the new fork. ISPCP Omega. I’ve installed a fresh copy of etch in VMware at home that I’m going to test it on. As soon as RC3 comes out with the migration script, I’ll be moving node1 over. Once that’s settled down, I think I’m going to move email hosting for my friends domains to be managed by VHCS instead of ISPMAN as it currently is. Once that’s done, I’ll be able to make a decision as to what I should do about my own email. I suppose I could even do it under VHCS too.

VOIP stuff has stalled for now. I had trixbox working under VMWare for a while, and I got it to tftp stuff to the CP7960 without issue, but there were latency issues and the voice prompts were getting garbled. Though I have to wonder how necessary it will be to run asterisk at home.

More later… back to work.