Archive for the ‘Computers’ Category.

Recovering a HTC Desire

Last night I thought I would try out “Remote Media” by Mark Martinsson on my HTC Desire as an alternative to Twonky Media Server. I started it up, and then left it indexing my files. However, due to me being extremely tired I then left it and went to bed instead. I briefly checked on it in the middle of the night to plug it in and charge, and spotted the “Low storage space” warning. I thought nothing of it, as I’ve encountered that many times before and decided I would deal with it the next morning.

So, 7 hours later I looked at the phone and spotted the HTC logo endlessly looping. This Is Bad(tm). The phone had died in the middle of the night, and was now failing to boot. Great.

I booted up the Recovery image with the volume down & power button combo, and had a look around. Every time I tried a command I got the following error.

E:Error in DATA:data/recovery/log
(No space left on device)

Great. Google have made an OS that fails to boot when it’s out of space. How clever. I subsequently decided against just formatting all and starting from scratch for two reasons. Firstly, my backup was more than a few days old, and secondly I didn’t want to be beaten by a stupid design failure. Onto the recovery images and remote access.

Now, I’ve used ClockWorkMod before in order to install other ROMs, but for some reason my phone had defaulted back to the normal Recovery image. This image doesn’t have ADBD, and also doesn’t offer any Backup to SD options. After spending I good hour or two hunting down an independent recovery image for the Desire, I discovered the ClockworkMod Recovery image sitting on my SD card! Back into Recovery Mode, select Apply update.zip, and relax as ClockWorkMod Recovery appeared.

In this ROM it would be trivial to backup and then reinstall, but doing all that just due to lack of space seems silly. Download the Android Developer Kit, connect up the phone with the USB cable, and run ./adb device from the tools directory to check that the phone is discovered.

Once discovered, connect to the built in ADBD instance with ./adb shell.

root@kyleg-laptop:/home/kyleg/Applications/android-sdk-linux_86/tools# ./adb devices
List of devices attached
HT067PL05406 recovery

root@kyleg-laptop:/home/kyleg/Applications/android-sdk-linux_86/tools# ./adb shell
~ #

A quick df -h displays the obvious

~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 199.2M 0 199.2M 0% /dev
/dev/block/mtdblock4 40.0M 1.2M 38.8M 3% /cache
/dev/block/mtdblock5 147.6M 147.6M 0 100% /data
/dev/block/mmcblk0p1 6.7G 4.3G 2.5G 63% /sdcard
~ #

Now we’re in business. We have access to the phone and the filesystem. We can then do some hunting around to find what’s taking up the space. A few minutes later, du -h /data | grep M shows up the following…

58.5M ./data/com.noname.remotemedia/databases
58.5M ./data/com.noname.remotemedia

Culprit found. Thanks guys.

/data/data/com.noname.remotemedia/databases # rm remotemedia.db
/data/data/com.noname.remotemedia/databases # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 199.2M 0 199.2M 0% /dev
/dev/block/mtdblock4 40.0M 1.2M 38.8M 3% /cache
/dev/block/mtdblock5 147.6M 89.2M 58.5M 60% /data
/dev/block/mmcblk0p1 6.7G 4.3G 2.5G 63% /sdcard
/data/data/com.noname.remotemedia/databases #

And off we go. A quick sync and exit, and the phone can safely be rebooted and used. I highly recommend uninstalling Remote Media though..

Upgrading Firefox with MSI packages

Post moved. I felt it was more suited as a page within the site rather than a mere blog entry.

See here

Changing OES DHCP Range

Recently we were in the unfortunate position of running out of IP address in our DHCP pool. The Novell DNS/DHCP Management Console will give you a handy utilization % for your subnet, but will not tell you how much of your allocatable pool is in use. As a result, machines were timing out whilst waiting for an IP.

To diagnose this, we loaded dhcpsrvr.nlm with the -d3 option, and checked sys:/etc/dhcp/dhcpsrvr.log. The tell-tale sign is copied below.

67  : Get type:2, IPAddr:10.240.64.119, LeaseTime:0, MacIndx:774, pIP:B23F2540
AMAGet() exit err:0, subnet:10.240.64.0, addr:10.240.64.119
2010/05/21 10:15:56  <DHCPINFORM> packet received from client <0:13:72:9D:1C:E6>, IP Address <10.240.64.119>.
2010/05/21 10:15:56  Sending BOOTP/DHCP reply <DHCPACK> to <0:13:72:9D:1C:E6> as <10.240.64.119>.
Get type:4, IPAddr:10.240.64.106, LeaseTime:0, MacIndx:1042, pIP:0
Fill pool returned error 1
Error 5 adding new ip
AMAGet() exit err:5, subnet:0.0.0.0, addr:10.240.64.106

Ultimately, we needed more addresses in the pool. It would appear that in order to change your pool range in OES, you export the pool, edit it, and reimport the pool.

This seemed like far too much of a faff for me, so it was time for some rummaging. Normally the eDirectory enabled DHCP server stores lease data in eDirectory. First port of call was the WM_Subnet container that we use for those objects. In there, there’s an object called WM_Range. This contains details of the IP range available for DHCP use.

First off, unload the dhcpsrvr.nlm module, and then open the object up in ConsoleOne, and click on the “Other” tab. The attributes “DNIP:Start Address Number” and “DNIP:End Address Number” are decimal representations of the start and end IPs respectively, and can be expanded out to edit each attribute individually. Simply overwrite the current entry with the new decimal address that you want to use, click ok, and load dhcpsrvr.nlm back up.

Figuring out a decimal address is fairly easy, and is described in this Technet article. You can also convert a quad octet (IP address) to decimal notation with an online calculator.

Sure/Smartie LCDProc

Recently I’ve been looking at getting a computing device into the Land Rover. Short of buying a full sized 7″ touch screen, I opted to go for a slightly cheaper £20 4×20 LCD display. This was more to be proof of concept, and give me a starter to work on, before I decide whether or not to put a full sized screen in.

Ultimately, I purchased a SmartieLCD module from Ebay. It arrived, I plugged it into my laptop running Windows at work, and it worked first time. Now it was time to get it working with LCDProc!

Earlier on I had spotted that SmartieLCD in Windows used the Matrix Orbital DLL file. Sadly, when using LCDProc in Linux, Matrix didn’t work at all. It was time to go looking

Enthused by http://lists.omnipotent.net/pipermail/lcdproc/2009-July/013021.html, and manufacturers documentation, I decided to check out the CVS copy of LCDProc. The last ‘release’ was back in 2007, so if I was to get anything recent it would have to be from CVS

cvs -d:pserver:anonymous@lcdproc.cvs.sourceforge.net:/cvsroot/lcdproc login
cvs -z3 -d:pserver:anonymous@lcdproc.cvs.sourceforge.net:/cvsroot/lcdproc co -P lcdproc

Having a look around the source files indicate that Sure Electronics displays were supported, but not enabled by default. A simple ./configure flag would enable them, so it was time to get compiling. Firstly some support files have to be installed first.

sudo apt-get install libusb-dev autogen automake

After that, kick off the build process, and enable Sure Electronics support at configure time.

sh ./autogen.sh
./configure –enable-drivers=SureElec
make
sudo make install

Now that the software is installed, LCDd needs configured in order to send data to the LCD display.

sudo vim /usr/local/etc/LCDd.conf

In here, a few parts need changed -

driver=SureElec
DriverPath=/usr/local/lib/lcdproc/
Edition=3
Contrast=200
Brightness=480

And that’s it! Execute /usr/local/sbin/LCDd, and you should get a Clients: 0 and Screens: 0 on the LCD display.

All is good!

Lost your APC UPS?

I was in a sticky situation this weekend. I had casually set up one of our APC UPS RT 5000 units to use DHCP to get a statically assigned address. However, I hadn’t implemented Option 43 on the DHCP server and the APC management card had fallen off the network.

Unable to find a serial cable of the right type, and unable to get the card onto the subnet, I was faced with resetting the firmware. That was until I read the manual!

With the APC9619 card, at least, if you know the MAC address (I did, it was in our DHCP server config), you can prod the card with an ICMP packet to assign the desired address.

Simply do this…

Assign an IP address to the MAC address in your local ARP table
sudo arp -s 10.240.64.32 00:C0:B7:CA:D8:9B

Ping the address with a 113 byte ICMP packet.
ping 10.240.64.32 -s 113

This causes the management card to accept the address as its own, and at that point you can now telnet to the card and enter the administration console (unless you like clicky pointy things, in which case you can use your web browser)

It seems to time out rather quickly, so don’t mess about in the admin console. Jump in, remove the DHCP Vendor cookie requirement (2, 1, 1, 1, 2, 8, 1, 9) and reboot the management card.

All done! No cables, no firmware, no massive reconfiguration.

Asterisk Jabber Call Notifications

The other evening I busied myself with tweaking Asterisk to do some more geeky things. One such item was where I configured it to send a message to my Jabber account every time there was a call to a particular extension. Great for call logging, integration, and general user friendliness. If I was so inclined, it could message a Yahoo, MSN, ICQ, or AOL account through the Jabber platform to inform me of a new call. How rather flexible.

A Reason to Hate Cisco

Last week I ‘accidentally’ bought a Cisco 7911 phone on Ebay. My bid was low, the device was missing a few bits, but I still thought I wouldn’t get it.

Suffice to say… I’ve just written this piece on how to load the SIP firmware onto a Cisco 7911 phone. The procedures are covered elsewhere, but I thought I could compress it into a format that’s slightly easier to understand. Hope it makes sense. :-)

Whilst I’m at it, if anyone can email me a working SIP based cnf.xml file, it would be greatly appreciated. Getting the firmware onto the phone is easy… configuring it for Asterisk seems to be a completely different ballgame.

PS3 and Matroska? Could be soon…

Word is that the Matroska container format will be officially supported by DivX 7. Surely a good thing, as Sony have a deal with Divx to provide decoding software for the PS3. Maybe this will spell the end of having to transcode those ubiquitous MKV files for use on a PS3. With a due date of around January 2009, how long before the PS3 officially supports the MKV format? After that… roll on 1440p support :-) Continue reading ‘PS3 and Matroska? Could be soon…’ »

Disable Compiz

Since KDE have ruined Kubuntu with KDE4, it’s time to use Gnome. However Compiz and glitzy pointless effects irritate me no end. A few quick commands will disable them for the current user…

gconftool-2 –set /desktop/gnome/applications/window_manager/current /usr/bin/metacity –type=string

gconftool-2 –set /desktop/gnome/applications/window_manager/default /usr/bin/metacity –type=string

The next time you log in, it will use the default Metacity window manager instead of Compiz. Happiness all round.

*** UPDATE *** See Calum’s response below for the correct method.

EVE Online Badness

Recently EVE Online had been playing up. It was still in demo mode, but I quite fancied having a shot at it. The app was having none of it though…

kyleg@CHLP0023:~$ eve
Single-user install…
This is the update checker…
Running /home/kyleg/.cedega/.updater/cedega_updater.py
Running… /home/kyleg/.cedega/.ui/runGUI
kyleg@CHLP0023:~$ err:client:receive_fd FD went missing; attempting recovery
wine client perror:0: write/writev: Bad file descriptor
kyleg@CHLP0023:~$

Some hunting revealed a similar issue for Mac users. It translated to Linux use quite easily though.

kyleg@CHLP0023:~$ rm -rf ~/.cedega/EVE\ Online/c_drive/Documents\ and\ Settings/Local\ Settings/Application\ Data/CCP/EVE/c_program_files_ccp_eve_tranquility/cache/
kyleg@CHLP0023:~$

Sadly the issue still continued, so the settings directory was nuked as well. I also killed off some wineserver apps at the same time, so it could have been down to them at this point…

kyleg@CHLP0023:~$ rm -rf ~/.cedega/EVE\ Online/c_drive/Documents\ and\ Settings/Local\ Settings/Application\ Data/CCP/EVE/c_program_files_ccp_eve_tranquility/settings/
kyleg@CHLP0023:~$ ps waux | grep -i [w]ine
kyleg 21418 0.0 0.0 36552 1728 ? Ss 00:41 0:00 /home/kyleg/.cedega/.winex_ver/winex-eve-000130/winex/bin/wineserver
kyleg 21419 0.0 0.0 36552 1728 ? S 00:41 0:00 /home/kyleg/.cedega/.winex_ver/winex-eve-000130/winex/bin/wineserver
kyleg@CHLP0023:~$ kill 21418
kyleg@CHLP0023:~$ kill 21419
kyleg@CHLP0023:~$

All was pretty by this point, and EVE continued as expected.

[ad]