Tasks

Once you have created a new OMA-DM simulator, you can simulate some connections to one OMA-DM server.

Simulate one connection by the client device to one OMA-DM server

The simulator is divided in three tags: Configuration, Simulation and Dashboard. These tags allow you to configure the simulator before to run connections on the OMA-DM server. The two first tabs offer you a way to configure the simulator. The last tab is use to run connections to one OMA-DM server.

The Configuration tab

The first tab is Configuration. It allows to fill basic informations to identify the OMA-DM server and authenticate the client device on the server. These informations are similar with the Device Configuration page of the wizard.

The Device Management Tree tag: three sections

Device Management Tree tab is divided in three sections: Device tree, Node properties and Node management.

Section 1: Device tree

This section allows to edit the OMA-DM tree. By default, the simulator create one basic tree with non optional nodes. This section is the most important section of this tag. With this section, you can insert or delete nodes and leafs directly into all the tree. Delete non optional nodes is forbidden by the editor.

You can recognize into the tree the informations that you filled in the Configuration tag. Below is the correspondence between information in the Configuration tab and leafs into the OMA-DM tree:

The node "./DMAcc/AppAuth/Default" and "./DMAcc/AppAddr/Default" are optional nodes. The leafs "AuthName", "Addr" and "AuthSeret" can be stored anywhere in the node "./DMAcc/AppAuth". You can edit all informations about nodes and leafs in the next section: Node properties. If you change data of nodes which are listed above, the new values will be directly updated in the Configuration tag.

Section 2: Node properties

This section allows you to edit informations about the current node or leaf which is selected in the Device tree. These informations are described in the Data representation section.

As you can see in the screen shot above, you just can edit the data of the selected node. Indeed, for standard nodes, the name, format and type are not settable. But, for non standard nodes, all informations are settable.

Section 3: Node management

This section allows you to choose how execute all OMA-DM commands. There are four modes to execute one command. By default the root of the tree has all commands set in automatic mode. And all other nodes have commands set in inherit mode. There are two other modes: manual and constant. Below is the explication of all management modes:

The manual mode is very interesting. The user can change the result of any command directly during the simulation. For example, during one Replace command, you can refuse to set the value of the node.

You can also change the value of one node during one Get command.

One last example of the command management is available in the FUMO section. Here, the command management is use during one Exec command with FUMO.

The Dashboard tag: three other sections

The Dashboard tag is also divided in three sections: Device tree, Node properties and session management.

The dashboard with the Command view.

The dashboard with the message view.

Section 1: Device tree

This section is almost similar with the tree section in the Device Management Tree tag. But here, you just can to select one node. You can't edit the tree.

Section 2: Node properties

This section is almost similar with the properties section in the Device Management Tree tag. But, here, you just can edit Data information of the selected node. You can't edit other information.

Section 3: Session management: two views

This section is the most important section of this tag. With this section, you can create a new connection between the simulator and one OMA-DM server. When you click on the connect button the simulator create a connection. Then, the simulator and the OMA-DM server will exchange XML messages through HTTP requests. During these exchanges, if the OMA-DM server have to execute some commands, it will send instructions on the simulator. Then, the simulator will execute each instructions. The execution of instructions depends on the node management which is associated with the concerned node.

Section 3.1: Command view

In this view, you can see an abstract of all commands which have been executed.

Section 3.2: Message view

In this view, you can see the details of all OMA-DM messages which are exchange between the simulator and the server.

Simulate FUMO (Firmware Update Management Object)

This section describes all steps to simulate one firmware update with the simulator.

Step 1: Prepare the node management

If it is the first FUMO for your simulated device, this node management is recommended for the root node.

And for other nodes:

Step 2: Launch the simulation

Now click on the connect button for receive the FUMO. Perform the manual get and replace are automatically performed. At one point, the simulator demand you if you want perform a FUMO on the exec node. If you want select "Yes".

Now a pop-up appears and demand you to select FUMO result code and if you choose "Successful" the new version of the firmware version.

When you click on "OK" the FUMO work flow end. Moreover, you can put management commands of the root node in "automatic" except "exec".

Like all commands, one notification of the exec command is show in the Command view.

How to configure and use the OMA-DM server provided by Funambol

This section explains how install the OMA-DM server provided by Funambol. This server is called dm-server. The document also explains how use the web interface of the dm-server and where data are stored. To finish, the document shows how interact the OMA-DM simulator with the dm-server.

The official documentation about Funambol's products is available at this address: www.forge.funambol.org/download/documentation.

All versions of the source code and documentations about Funambol are available at this address: download.forge.objectweb.org/sync4j

Prerequisites

This tutorial has been realized with

Install the Funambol Device Management server

This section explains how install Funambol dm-server with PostgreSQL database. It supposes PostgreSQL is already installed on your machine.

Step 1: Download required programs
Funambol Device Management server

The dm-server is available at this address: sourceforge.net/projects/funambol/files/dm-server

JBoss

JBoss is available at this address: www.jboss.org/jbossas/downloads

Warning: Funambol dm-server only works with Jboss 5.1! With latest versions of Jboss, the dm-server doesn't work! Indeed, the latest version of Jboss has a new architecture and Funambol dm-server doesn't support it.

JDBC driver for PostgreSQL

The JDBC driver is available at this address: jdbc.postgresql.org/download

Step 2: Extract archives

The architecture which has been used for this document looks like this:

Extract downloaded archive in the good path.

Step 3: Configure PostgreSQL database

Of course, all these parameters are settable.

Step 4: Set your environment variable

Warning: JBOSS_CLASSPATH variable may already exists. To don't break your system, a good solution is to use this command: export JBOSS_CLASSPATH=$JBOSS_CLASSPATH":/opt/Funambol/postgresql.jar. The JBOSS_CLASSPATH variable is used by dm-server during its execution. If this variable is not set, you will not be able to correctly use the server.

Step 5: Edit the file /opt/Funambol/dm-server/install.properties

This file is use to configure the installation of the dm-server. Some parameters have to be set.

Step 6: Install the dm-server

To install the dm-server you just need 2 commands:

Warning: jboss5 is not an optional parameter. Without it, the installation doesn't work !

The program will offer you to recreate the PostgreSQL database. Accept, and choose 'y'. If it's the first time you run the script, some errors will appear. It's not a bug. It just means the program tried to delete some SQL tables which doesn't exist yet... If everything is OK, the last message should be: “BUILD SUCCESSFUL”. Then, you are ready to run the dm-server.

Step 7: Run the dm-server

To run the dm-server you just need 2 commands:

After a few seconds, you should have one message which inform that the server is started.

If you want to change the server name parameter setted in the install.properties file during the Step 5: Edit the file /opt/Funambol/dm-server/install.properties , you don't have to re-install the dm-server. A good way consists to edit the file "/opt/Funambol/dm-server/config/Funambol.properties". The first line ( server.uri) set the dm-server name.

Use the web interface of the dm-server

Create one new device on the dm-server

To test the dm-server, go on this page: http://localhost:8080/dmdemo/. You should see one page which looks like this:

Warning: The address of the web interface is not settable. It's not the same address than the name-server parameter available in the install.properties file. The server name parameter is only use for the OMA-DM protocol, not for the web interface.

Click on “Add New device” and choose one device ID. "MyID” has been choose for this document. Once you chose your device ID, click on “Add”. If everything all right, you should have one message which inform you the device is correctly created. Now you have one new device store on your dm-server which is identify by its ID: “MyID”.

Now you can go on the LogIn page and insert the ID of your new device. In this example, it's "MyID". Once you’re logged in, you can choose some OMA-DM command which will be executed on the client device.

Add one new OMA-DM command to the device

Once you are logged, you can choose an operation and add it in the operation list.

From this page, you can chose three types of operations

+ Operations example
Tree discovery operation Custom operation

Once you chose which operation you want to execute, it is showed in the operations table.

After the execution of the new command, its status change and the date of start time and end time is set.

Now, you can launch new operations.

Use the dm-server with the OMA-DM simulator

Using the OMA-DM simulator with the dm-server needs one specific configuration. In the Configuration tag, fill these informations:

This parameters are those which have been fill in the Step 4: Edit the file install.properties. The server URI is different than the URI of the web page of the server. Indeed, the web interface is available on this URI: http://localhost:8080/dmdemo/ whereas the OMA-DM server is available on this page: http://localhost:8080/funambol/dm. The server Login and password are used to identify the user on the OMA-DM server. It's the user name and the password for the PostgreSQL account. The device ID is the ID which was use to create a new device on the dm-server.

Once all parameters are set on the simulator, you can run a new connection to the dm-server. If some commands are associated to the device which you want to simulate they will be executed. Then, you will see the result of the operations in the Command view of the dashboard and on web interface of the dm-server.

Access to the database of dm-server

In this document, the dm-server uses PostgreSQL server. The dm-server can use other database server like MySQL or ORACLE. You can get and set the database of the dm-server with your PostgreSQL account (user name = "funambol", password = "funambol", database name = "funambol"). Below is the list of all tables which are created by dm-server during the installation.

A complete description of this database with the foreign keys is available in the document Funambol DM Server Developer’s Guide.