Tuesday, August 30, 2016

Transferring SMS messages from Windows Mobile to Blackberry devices

Transferring SMS messages from Windows Mobile to Blackberry devices


UPDATE (14 Feb 2015): Due to some outstanding issues with the SMS2IPD tool such as Unicode support and message extraction issues on some devices, which will most likely forever remain unfixed because I no longer have any Windows Mobile 6.x devices (which are no longer supported by Microsoft), I have decided to stop maintaining SMS2IPD and removed the download from this article.

For a more robust tool to restore text messages to Blackberry devices from a CSV (comma-separated values) backup, refer to my other tool, CSV2IPD.

The original article, written in 2010, is archived below for informational purposes only.



This may seem an easy task - one may immediately think of using the Device Switch Wizard in Blackberry Desktop Manager or do a quick search for some SMS backup/restore software which will do the job. However, while I was doing it, I came across some challenges which turns this into a difficult job:

1. The Device Switch Wizard found in the Blackberry Desktop Manager simply does not migrate the SMS messages.

2. There are plenty of applications that perform SMS backup/restore for Windows Mobile but there are none for Blackberry.

The first challenge is expected as many users simply do not need to migrate text messages to their new phones and it is therefore understandable that the Device Switch Wizard ignores SMS during the migration process but the second challenge disappoints me. I was realistic - I never expected to find a tool that transfers text messages on-the-fly, perhaps with the tool running on Windows, the Blackberry connected via Blackberry Desktop Manager and the Windows Mobile device connected via ActiveSync. BUT I was hoping to find some software that can restore Blackberry SMS from a backup, perhaps XML-formatted, which can be created by a tool running on Windows Mobile.

I was wrong - there are no such applications for Blackberry. This is explained by the fact that RIM does not provide an API for Blackberry applications to programmatically access the SMS messages store (there are, however, APIs to access email messages).

My approach

My ideas come from the fact that Blackberry Desktop Manager allows user to backup device memory (including contacts, calendar and SMS) into an IPD file, and restore from the IPD backup. Although the IPD file format is not documented by RIM, it is easy to reverse engineer (for example, by using a hex-comparison tool) due to its unencrypted and tokenized nature. There are previous attempts to do this, for example ipddump and MagicBerry. The latter is extremely useful as it allows you to view, edit, merge and split IPD files.

Keeping the above in mind, I came up with a tool that runs on Windows Mobile device and backs up all text messages into an IPD file. The file created can later be opened using Blackberry Desktop Manager and the text messages can be restored back onto the Blackberry device.

Final product: SMS2IPD

In the lack of a better name, let me call it SMS2IPD, short for SMS to IPD Converter. Heres how to use it:



1. Run the tool on your Windows Mobile device. You will need .NET Compact Framework 3.5 and above.

2. Select the correct time offset so that SMS timestamps will be correctly displayed. For example, if you are in GMT+8, select -8 for the time offset. The selection is needed as I am not sure which field to set to specify the timezone of the SMS messages.

3. Click on Start, choose the location to save the IPD file. Give the application some time to run, when completed, it will produce the IPD file.

4. Connect your Blackberry and start Desktop Manager, choose Backup/Restore, then click on Restore again. Select the IPD file created in step 1 and Desktop Manager will proceed to transfer all SMS to the device.

Note: this process may take a long time during which Desktop Manager may seem to hang. It will also overwrite all existing text messages on the Blackberry device, so back them up and merge them to the IPD first using MagicBerry. MagicBerry may also seem to hang when loading a large IPD file, so be patient.

Limitations and future improvements

I myself reverse engineer the IPD file format by using a hex editor, a hex comparison tool and MagicBerry, with some references to ipddump and MagicBerry source code, so there will be cases not handled properly. These include SMS with special characters, unicode SMS, and SMS sent from a timezone different from your device timezone.

Upon imported on the Blackberry device, all messages may appear as unread. You can mark all as read by scrolling to the top of the messages list (which displays the date), press the Blackberry key and choose Mark Prior Opened.

Some Blackberry devices by default will delete text messages older than 30 days. This behaviour can be changed by opening Options in Messages, choose General Options, and select a longer period for "Keep Messages".

I attached the source code for those interested to improve the application. You can modify and re-distribute the application and its source code as you like, but please mention that the source code was taken from my blog. You may not, however, use the source code and/or the application for any commercial purposes.

Credits

To read the SMS messages from a Windows Mobile device, I am using MAPIDotNet library found on codeproject, written by rwt33. The version I used was downloaded some time back, so it may differ significantly from the current version found in the project article.

Downloads

SMS2IPD CAB Installer for Pocket PC and Smartphone, Windows Mobile 5 and above with .NET Compact 3.5 (updated 10 Oct 2010) - removed as SMS2IPD is no longer maintained. See notice at the beginning of this article.

Get