Post to WordPress Blogs from Nokia Lifeblog
Update 10 March 2009: People wanting to use Share Online 3.x should read Posting to WordPress Blogs From Share Online 3.0 instead.
I’ve been trying to figure out if something existed that would allow posting from Nokia Lifeblog. I found code a couple of places, but it didn’t seem to work. Furthermore, the sites that had them were written in German, so there wasn’t a whole lot of documentation on it other than the sparse code comments.
Debugging what was going on was difficult. I use a shared hosting environment at 1&1 for my blog, which meant I didn’t have much access to logs or a sniffer at that end. Obviously when posting from the mobile phone, there isn’t a whole lot of debugging either. I used a Nokia N93 with WiFi, which was accessing the net via a Linksys WRT54GS that I had loaded DD-WRT firmware on. This means I had shell access to my WiFi router and could run tcpdump to troubleshoot what was going on at the network layer.
I started doing the usual sorts of things one does when debugging code: I added a whole mess of “verbose debugging” statements which spewed copious amounts of data to the debug logs. Somewhere along the way, Nokia changed how LifeBlog passed the authentication credentials, so I had to make a change to the code slightly. Probably breaks backward compatibility of course.
After I corrected all the various references to items in the WordPress database that didn’t exist in 2.0.5 and accounted for other various issues, I discovered something peculiar: a function inside of WordPress was crashing for no good reason. Specifically, it was wp_create_thumbnail. Instead of trying to debug that function, which I think was also the reason I was having troubles with the Postie plugin a few days ago, I ended up hacking in ImageMagick support. Specifically, all it uses is the “convert” binary to do what wp_create_thumbnail does.
Anyway, the code was a little messy before I got it and I’m sure my mucking about in the code made it just a little worse. But the code works on my current setup (Nokia N95 with Lifeblog application). Maybe it will work for you. Maybe it won’t. Try it and post your feedback/questions/etc in the comments.
Known To Work With:
- WordPress 2.0.5 and later
- Lifeblog from a Nokia N73, Nokia N93, and Nokia N80 Internet Edition
- Lifeblog from a Nokia N95 that has been upgraded to Share Online 3.0
- Share Online 2.0 and earlier (except on N95 with 20.x firmware and possibly others)
Known Not To Work With:
- WordPress 2.0.4 (and probably earlier versions)
- LifeBlog PC Application–since I have a Mac, unless someone else wants to hack in the support, it’s not going to be supported.
- Newer Nokia phones (N95 with 20.x firmware, N81 8GB, N95 8GB) that has NOT been upgraded to Share Online 3.0–they apparently do something different with the Lifeblog protocol, which I haven’t been able to suss out yet.
- Nokia Share Online 3.0 as there is no way to configure a third-party service in the application. (Update: Fixed in the latest release)
Installation Instructions (also available in Dutch)
- Download Lifeblog PHP for WordPress 2.0.5-2.2 Blogs or Lifeblog PHP for WordPress 2.3+
- Copy file to the root of your WordPress installation. Should be at the same level as wp-blog-header.php.
- Rename the file to lifeblog.php, make executable if needed.
- If the root directory of your WordPress installation is not writable, then you will need to create a file called atomdata.txt that is writable by the web server process. In many cases this means the file needs to be made world-writable.
- Ensure that wp-content/uploads directory is writable by the web server process. In many cases this means the directory needs to be made world-writable.
- Edit lifeblog.php. See the comments at the top of lifeblog.php.txt on what will need to be edited.
- Configure your Nokia device to use this new Lifeblog service. The important settings are:
- Username: admin (or whatever username you use to post)
- Password: (whatever password you specify in lifeblog.php–not your normal WordPress password)
- Server Address: http://www.examplewordpressblog.com/lifeblog.php
After that, you should be able to use Lifeblog on your Nokia handset to post to your WordPress blog.
Known Issues
- Video uploading doesn’t work in the WordPress 2.0.5 version. It won’t unless someone wants to hack it in.
- Video uploading in the 2.3 version might not work for MP4 files as I was getting 500 server errors on my webhost. Please try and report.
Troubleshooting Instructions:
- Uncomment out any of the lines that have “logme” in them.
- Attempt to post
- Send me the following information via email (address listed to the right):
- atomdata.txt file
- Phone you are using to post with firmware version (Dial *#0000#)
- Version of Lifeblog software on the phone, if possible to obtain:
- On N80i: Tools > App. Mgr. > Lifeblog, then Select > View Details
- On N93 and N73, I don’t see a clear way to get that information since it is an included app.