iPods are fickle

I am now on my third 40GB click-wheel iPod. The second one failed the same as the first, with the hard drive making strange clicking noises. Occasionally on bootup the iPod would display a file-folder icon and suggest http://www.apple.com/support/ipod. Most songs wouldn’t play, presumably because they could not be read from the disk, and plugging the iPod into a computer caused that computer to basically hang until the iPod was unplugged.

Thankfully, my applecare still has no expired, and I walked into my local Apple Store and walked out with a shiny new iPod in the same visit. Mad props for good customer service. Additionally, $399 doesn’t seem so bad now that Apple has given me 3 of these things.


Symbian C++ application fails silently / app won’t start

First of all, I’m doing my development using gcc under linux, with sdk2unix-1.9, gcc-2.9 [gcc539src.zip], and Nokia Series 60 SDK 2nd edition Feture Pack 3 [nS60_jme_sdk_2nd_e_fp3.zip] (see previous post).

I have a perfectly good application that I have written which worked with sdk2unix-1.2 and then I upgraded to sdk2unix-1.9. The helloworld app that comes with sdk2unix-1.9 (really I think it gets ported by the sdk2unix folks from the Symbian SDK example) worked fine, and I observed some improvements in the structure of the makefiles. Thus, I modified the makefile for my application. I was able to convince it to build my application (I had some troubles with some Bluetooth Security classes no longer existing, which I have not worked out yet. I think they are a result of the change in Symbian SDK versions and not relevant to doing development under Linux), but when I tried to run my application it simply would not start. I have had a “would not start” problem like this before, so I will now describe it.

Basically, you develop your app, it compiles, you send it to the phone, it installs, the icon appears in the phone’s menu, and everything looks peachy. However, when you click that icon to start your application, the screen does a little “flicker” but nothing else happens. No error messages, nothing. Extendederr.sis (google for it) doesn’t help. I have heard there is a tool called Panix, but I haven’t tried it yet. Anyways, this is extremely frustrating, because the cause of the error cannot be located. This means any kind of significant code changes are out of the question without periodic testing.

Today, I discovered at least one thing that can cause this, and it is the values which are assigned to several variables in the makefile. These are U1, U2, and U3.

Antony Pranata has written an article about theE32 File Format, which is the format the Symbian C++ executables use. Quoting from his article:

TUint32 iUid1, TUint32 iUid2, TUint32 iUid3, represent the identifiers that uniquely identify your program.
The first UID can be thought of as a system level identifier, for example 0x10000079 for DLLs and 0x1000007A for executables.
The second UID distinguishes between objects having the same iUid1, for example 0x100039CE for polymorphic interface DLLs and 0x1000008d for static interface (shared library).
The third UID can be thought of as a program identifier. Usually you have to ask the third identifier directly to Symbian by sending an email to them. However, there are also some UID for testing, which can be chosen from the range 0x0100000 to 0x0FFFFFF.

I found that my application worked in sdk2unix-1.2 with values:
U1 = 1000007a
U2 = 100039ce
U3 = 10005b81

The helloworld application that comes with sdk2unix-1.9 includes only one value:
U3 = 10008ace

That helloworld application works fine, but when I edit that makefile to compile my application (which uses Bluetooth and the Camera, among other things), it exhibits the “fail silently” problem.

When I pasted my U1,U2,U3 values into the new makefile, magically everything became happy. Upon further experimentation, it turns out I didn’t even need to use U1 and U2, but just U3 = 10005b81. I also found an example application with U3 = 10005b79 and tried that; it failed. Thus, these numbers are very magical indeed, and I have yet to find a resource which clearly defines their values and what they mean. In the meantime, whenever an application fails silently, suspect them!

PKCS#12 and others

I finally broke down and figured out what goes on with PKCS#12, signed and/or encrypted email, and OpenSSL. I basically just ran a bunch of commands and examined the output to prove to myself what this stuff looked like. I found two web pages that were extremely useful by a guy named Nick Sayer:

Recovering Wordpress and Mediawiki

My primary hard drive on mccune.ece.cmu.edu crashed yesterday. It crashed in a pseudo-friendly way, so I didn’t lose any data. Of course, it was all backed up anyways… 😉

However, I opted to reinstall Debian including apache2 and mysql, the infrastructure for WordPress and MediaWiki. Thus, it was time to see how easy it is to restore this stuff.

I first copied all the actual .php files, etc into the directory which Apache makes accessible to the web.

For MediaWiki:

create database DATABASE;
create user USER identified by 'PASSWORD';
grant select,insert,update,delete on DATABASE.* to USER;

mysql -u root -p DATABASE < ~/mediawiki_backup.sql The DATABASE, USER, and PASSWORD go in LocalSettings.php. For WordPress:
create database DATABASE;
create user USER identified by ‘PASSWORD’;
grant all on DATABASE.* to USER;

mysql -u root -p DATABASE < ~/wordpress_backup.sql The DATABASE, USER, and PASSWORD go in wp-config.php. If, upon thinking everything is correct, it says "It doesn't look like you've installed WP yet. Try running install.php." go ahead and click it. You will then need to repopulate the database tables with your .sql file again, because install.php will overwrite them with default values. Those _backup.sql files were created with commands like this one: mysqldump --add-drop-table -u root -p DATABASE > DATABASE_backup.sql

The resulting .sql file contains SQL commands to reinsert everything into the database. The “add-drop-table” tells MySQL to drop destination tables if they already exist. For example, clicking the “install.php” for WordPress created the default, mostly-empty database tables. Those got dropped and replaced by my tables.