Chapter 1. The First Sync

Maria uses her mobile phone to keep in touch with friends and colleagues. She is a busy person and likes to organize her time using her personal computer's calendar. Maria is an open source fan, so whenever possible, she chooses open source software such as Mozilla Thunderbird, which she uses for both e-mail and calendaring. It would be really useful for her to have her address book and agenda when she is not at her desk. She would like to be able to update her contact list and take appointments when traveling, and have these changes automatically saved to her personal computer, so when she gets home she can resume work without further action.

Funambol is designed for deployments that support millions of users; however, the basic setup package can be installed on a personal computer for personal use. In this chapter, we will learn how to install Funambol to keep our mobile phones, computer address books, and calendars in sync.

In this chapter, we will follow Maria as she installs and starts using Funambol to solve her synchronization issues.

Overview

As illustrated in the following figure, all Maria needs is a computer connected to the Internet on which Mozilla Thunderbird, her preferred e-mail client, is installed and on which Funambol will also be installed. Thanks to SyncML, the only other device needed is a SyncML-capable mobile phone.

Note

SyncML is a widely adopted synchronization protocol that can work in both the cases—over the air or wired. The vast majority of modern mobile phones have SyncML onboard, usually accessed through an Internet connection. This feature is usually called remote synchronization or simply synchronization and allows to synchronize the phone address book, calendar, notes and sometimes even SMS. With these phones, users do not need to download or install any additional software; they will just have to configure the SyncML synchronization feature to connect to a proper service. Maria will see all these aspects in detail in the next chapters.

Overview

After setting up Funambol, when Maria is working at her desk, any changes to her contacts or calendar will be sent by Thunderbird to the Funambol Server. When she is on the road, the changes made on the phone will be synchronized to the Funambol Server, and from there to Thunderbird.

We will assume that Maria is working with the following systems:

  • Windows XP/Vista personal computer

  • Mozilla Thunderbird 2.0

  • A SyncML-capable phone

Working with Maria's personal computer

The Funambol Server package comes in two OS-specific versions, one for Microsoft Windows and one for Linux distributions. This section details the software and hardware requirements for a successful installation on Microsoft Windows.

Minimum system requirements

Maria's personal computer must meet the following minimum system requirements:

  • Pentium 4 CPU, running at 1.8GHz

  • Windows XP Professional or Windows Vista

  • 250 MB of free disk space

  • 768 MB RAM

Obtaining and installing the Funambol Server package

A personal installation of Funambol can be achieved from the Funambol Server package that contains everything needed to run all the Funambol services on a single system, potentially a Personal Computer. Note that this type of installation is intended for personal use and evaluation only. The next chapters describe how to address more complex needs and scenarios.

Note

The book covers Funambol v7.1, which is the version available at the time of writing. However, everything described in the book will work smoothly with the upcoming Funambol v8.

The first thing that Maria must do is download the Funambol Server package for Windows from http://www.forge.funambol.org/download as shown in the following screenshot:

Obtaining and installing the Funambol Server package

The file is called funambol-<version>.exe, for example, funambol-7.1.1.exe. Once it has been downloaded, Maria can double-click it to start the setup wizard, as shown in the next screenshot:

Obtaining and installing the Funambol Server package

After accepting the open source license and all of the default options suggested by the wizard, the software installation will complete in a few seconds.

The setup program loads the following key components onto the computer:

  • Funambol Data Synchronization Service

  • Java Runtime Environment, 1.5.x

  • Hypersonic database

  • Funambol Administration Tool

  • Software accessories/emulators for testing

At the end of installation, the setup wizard will ask Maria if she wants to start the server and read the Test Drive Guide. Let's start the server and ignore the Test Drive Guide by unchecking the Open Funambol Test Drive Guide option as shown in the following screenshot:

Obtaining and installing the Funambol Server package

Note

SyncML is transported on an Internet connection over the HTTP protocol. This means the server is fundamentally an HTTP server, even if its primary goal is not to serve web pages. By default, the Funambol Server starts listening on port 8080.

Maria can check whether the server has started and is running, by looking at the system tray that displays the Funambol status icon as highlighted in the following screenshot:

Obtaining and installing the Funambol Server package

Preparing the e-mail client

In this section, we will see how Maria can configure Mozilla Thunderbird to get the most out of Funambol. The Funambol Sync Client for Thunderbird can synchronize both address books and calendars. Out of the box, Thunderbird 2.x does not come with a calendar application, so Maria will need to install a Thunderbird extension called Lightning that can be found in the Thunderbird add-ons directory at http://addons.mozilla.org/thunderbird. She can download the extension by searching for "Lightning" on the website and then clicking Download Now to save the file lightning-<version>-tb-win.xpi on her computer.

The extension can be installed from Thunderbird by selecting Tools | Add-ons and then clicking Install in the window that pops up. Maria then needs to select the Lightning extension setup file downloaded previously and click Install Now.

After a few seconds, the setup window will ask to restart Thunderbird to complete the installation of the extension. When Thunderbird restarts, Maria will find the Events panel on the right pane of the e-mail client window and a Today Pane button in the button bar.

The Funambol Sync Client can be found in the Mozilla Thunderbird Add-ons directory by searching for "Funambol". The Funambol Mozilla Sync Client extension is a Funambol community project, developed by an external contributor (see https://mozilla-plugin.forge.funambol.org). Maria should download the Windows version and save it on the hard drive. The name of the file will be in the form funambol_mozilla_sync_client-<version>-tb+sb-win.xpi.

Note

Community projects are those projects that may receive contributions from Funambol developers, but they are started and/or maintained by people who may not have any relationship with the Funambol company Funambol core developers.

At the time of writing, the most recent release of the Funambol Mozilla Sync Client is version 0.9. This is still flagged as experimental, and so you must register and log in to the Mozilla website before downloading it. This is a normal procedure for Mozilla extensions—they are tested for a while as experimental, before becoming official.

The installation of the Funambol Mozilla Sync Client is similar to the installation of Lightning. It can be done from Thunderbird by going to the Tools | Add-ons menu, then selecting the previously downloaded file and installing it. Again, Maria will be requested to restart Thunderbird. Once restarted, the Thunderbird button bar will have an additional button to launch the Funambol add-on as illustrated in the following screenshot:

Preparing the e-mail client

At this point, Maria needs to tell the Funambol Mozilla Sync Client to connect to the Funambol Server installed on her desktop computer. She can do it by selecting Options from the Funambol icon drop-down menu and then configuring the Account and Sync settings. Following is the screenshot showing configuration of Account settings (note that the Password is guest):

Preparing the e-mail client

The next is the screenshot showing Sync setting configuration:

Preparing the e-mail client

Once the settings have been configured, Maria can save the changes by clicking OK.

Before starting the first synchronization, Maria should enter some contacts in Thunderbird's Personal address book and some appointments in Thunderbird's Calendar. To synchronize these, she clicks the Funambol icon. The synchronization takes place in a few seconds and the Funambol Thunderbird Sync Client window will display the result of the synchronization.

Consider that Maria has added a card in Thunderbird for her friend Mark Edwards as shown in the following image:

Preparing the e-mail client

After the synchronization, the status will be as represented in the following illustration:

Preparing the e-mail client

Now Mark Edwards is stored in both the Funambol Server and Maria's address book.

Preparing the computer for Internet access

The first synchronization was done by connecting the Funambol Mozilla Sync Client to the Funambol Server installed on the local PC. A mobile phone cannot usually do the same because it is on a different network, usually the GPRS/UMTS network provided by the mobile operator, and can only reach the desktop server through the Internet. Therefore, the personal computer must be connected to the Internet with a public IP address (and optionally a host name) that can be accessed by the outside world.

The steps used to configure your system so that it is externally accessible are beyond the scope of the book. If you need more details and help, please contact your service provider.

Let's assume the IP address of Maria's personal computer is routable and is 87.1.21.205. To check that the server is up and running, she can point the browser on her mobile phone to the URL http://87.1.21.205:8080/funambol. If the server is reachable, the following image is displayed:

Preparing the computer for Internet access

Preparing the mobile phone

The Funambol Server uses SyncML as its synchronization protocol, which is used by most mobile phones today. You can find a list of phones that support SyncML at http://www.funambol.com/ solutions/devices.php.

To synchronize the address book and calendar on her mobile phone, a Nokia 6650, Maria will first need to configure the phone using the following steps (for a more general description of the configuration of different devices, please refer to Chapter 7):

  1. Go to Menu and choose Tools.

  2. Select Sync (on some devices this option is under Menu | Settings | Connectivity).

  3. Select Options | New sync profile.

  4. Set the Sync profile name to Funambol and press OK.

  5. Select Applications.

  6. Select Contacts.

  7. Set Include in sync to Yes.

  8. Set Remote database to card.

  9. Press Back.

  10. Select Calendar.

  11. Set Include in sync to Yes.

  12. Set Remote database to cal.

  13. Press Back twice.

  14. Select Connection settings.

  15. Set the Server Version to 1.2.

  16. Set Data bearer to Internet.

  17. To set an Access point, enter a working Internet connection (if you don't have one, contact your mobile provider).

  18. Set the Host address (in the previous example, this was http://87.1.21.205:8080/funambol/ds).

  19. Set Port: 8080.

  20. Set User name: guest.

  21. Set Password: guest.

  22. Press Back to save the changes.

Completing the first synchronization

Following the example described earlier, let's assume Maria's phone address book contains the phone number of John Doe.

Completing the first synchronization

Maria can start the synchronization of her mobile phone by following these steps:

  1. Go to Menu | Tools.

  2. Select Sync (on some devices this option can be accessed as Menu | Settings | Connectivity).

  3. Select the Funambol profile. Then select Options | Synchronize to start sync.

Note

If your mobile asks what data to sync, select Contacts and then Calendar.

If your phone returns an error, this may be due to network coverage or remote server reachability issues; often restarting the sync solves the problem.

Make sure that the access point selected in the previous steps is under a flat billing data plan, as data traffic can be expensive.

Once the synchronization ends successfully, the server contains a merged version of Maria's address books and calendars stored on her phone and Mozilla Thunderbird.

The new status of the example will be:

Completing the first synchronization

As seen in the previous figure, Thunderbird is now out of sync because it is missing John Doe. Therefore, to complete the first synchronization scenario on her desktop, Maria needs to synchronize again using the Funambol Mozilla Sync Client. This can be done by clicking on the Funambol icon on the Thunderbird menu bar. After a few seconds, depending on how many contacts and appointments need to be transferred from the server, the job is done, as illustrated in the next figure:

Completing the first synchronization

Maria can now open the address book and have a look at the calendar to check that all contacts and appointments contained in the phone have been copied to Thunderbird as well.

Note that if the same contact is present on the phone and on Thunderbird's address book, then the address book entry will not be duplicated, but instead the information coming from the two sources will be merged in one single contact. For example, if Maria has her husband's mobile phone number on the phone and his e-mail address in Thunderbird, the resulting contact will contain both the mobile phone number and the e-mail address.

Installing Funambol on Linux

In the previous sections we saw how Maria installed Funambol on her Microsoft Windows system; it is also possible to install Funambol on a Linux desktop computer. This installation requires the use of a terminal window and a command line shell. Have the Funambol Server package version number available (as indicated in the downloaded package filename) for use in this procedure. You do not need to log in as root to complete this installation; any administrator account can perform this task.

To proceed with the installation, follow these steps:

  1. Open a terminal window and type the following command:

    sh funambol-<version number>.bin
    
    
    • press Enter to proceed.

      When the license agreement appears, read the text; to accept the terms of the agreement, type yes at the prompt and press Enter.

    Installing Funambol on Linux
  2. Specify a directory in which to install the bundled software; by default, Funambol will be installed to the following directory:

  3. /opt/Funambol

    In this book, we will refer to this directory as <FUNAMBOL_HOME>.

  4. At the end of the installation, you will be prompted to start the server. At the prompt, type yes and press Enter.

  5. If you prefer to delay the startup of the server, you can always change to the<FUNAMBOL_HOME> directory and run the following command at a later time:

    sh bin/funambol.sh start
    
    

This concludes the installation.

Verifying the Funambol Server startup

After installing and starting the Data Synchronization Service, you can verify that it is up and running using one of these methods:

  • Run a ps command; when the results appear, use the grep command to search for the string "funambol". If a listing is found, the server is in operation.

  • Start a web browser and link to this URL:http://localhost:8080/funambol.

    If the server is up and running, the Funambol Data Synchronization Service test page (illustrated earlier) should appear .

Once the server is installed, the rest of the procedure (described earlier in the chapter) for a Microsoft Windows system is still valid. Just make sure that Thunderbird 2.0 for Linux is installed and then download and install the Linux version of the Funambol Mozilla Sync Client.

Summary

In this chapter, we learned how to set up a personal computer and a mobile phone to keep the address book and calendar on Mozilla Thunderbird 2.0 in sync with the address book and calendar on the mobile phone. The steps followed to achieve this were:

  • Installing Funambol on the personal computer that is set up to be accessed from the Internet

  • Installing the Lightning extension and the Funambol Mozilla Sync Client into Mozilla Thunderbird

  • Configuring the mobile device

  • Synchronizing Thunderbird with the Funambol Server, then the mobile phone with the Funambol Server, and then again synchronizing the Thunderbird

We have also learned how to install the Funambol Server on a Linux machine in addition to a Microsoft Windows system.

In the next chapter, we will learn in detail how Funambol makes all of this function, which components are involved, and the functions they perform.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.46.69