[edit] Funambol Device Management
Funambol is a open source (formerly under Honest Public License, from v3 it's agpl) implementation of the OMA-DM standard, which is itself a platform independent information synchronization standard. So that will allow device management commands to be executed against management objects on a syncml-dm compliant device by third parties. That's to configure devices, make inventories, diagnosis and maintain software on the devices.
As with funambol-ds, funambol-dm provides the server and a client API.
[edit] Data structure
Data is organized in a hierarchical structures called dm trees, composed of nodes (subtrees) and leafs (objects).
OMA-DM (and so funambol) works with the concept of objects, which are almost everything (from a config value to an entire app)
DM transactions works around objects some of them are manufacturer defined.
Dynamic objects are objects that can be added or deleted like a wallpaper, songs...
There are also those called permanent objects, usually built at the time of manufacture, that can't be deleted or modified.
An object is manipulable, funambol can execute the following actions on objects:
- Add: Add an Object (Node) to a tree.
- Get: Returns a Node name based on the URI passed with the GET request.
- Replace: Replaces an Object on the tree.
- Delete: Deletes an Object on the tree.
- Copy: Copies an Object on the tree.
- Exec: Execute a device-defined command on an Object on the tree.
Objects will have properties to define the format, name, size and so on of the object apart of the object value itself, some of these are required properties common to all objects, as acl, format and name.
The following extract from funambol developers' guide illustrates the current properties available for objects
• ACL (required) – Access Control List, defines who can manipulate the underlying object.
• Format (required) – determines how an object is interpreted, i.e., if the underlying object is
a URL for a particular management server, the Format may be defined as chr (character).
• Name (required) – the object in the tree.
• Size (required for leaf objects, not applicable for interior nodes) – the size of the object in
bytes.
• Title (optional) – user-friendly name.
• Tstamp (optional) – the time stamp of the last modification.
• Type (required for leaf objects, optional for interior nodes) – the MIME type of the object.
• VerNo (optional) – the version number of the object
[edit] Synchronization
Synchronization consists on executing previously described actions on device tree's objects.
A client can establish the connection starting from "Setup Phase" or server, with the Alert phase.
In OMA-DM (and so in funambol) it goes trough 3 phases:
- Alert (Optional)
- Setup (Required)
- Data (Required)
[edit] Alert phase
Alert phase is the phase where the DM server tells the client to start a new management session. It's usually done sending an WAP SMS trough a Push Proxy Gateway (PPG in the future). Funambol doesn't have the capability of sending the SMS so you'll have to configure a PPG to it (see [wiki:Funambol/DM#IntegratingKannelwithFunambol Integrating Kannel with Funambol]), there are open source PPG out there like Kannel.
Although it's possible for OMA-DM to do it via OBEX you'll have to make your own component for that.
Extracted from funambol dm server developer guide:
Since Funambol does not implement a service to deliver SMS messages (i.e., shipping
notification/bootstrap messages), a custom component must be implemented. You can
configure the Funambol DM Server to use such a component by simply changing the
appropriate server JavaBean.
And
This method will deliver the alert via a Push Initiator through a Push Proxy
Gateway as defined by the WAP protocol. The SyncML server will act as a Push Initiator in
this example, and will deliver the message via an SMS message. The message will have a
unique application ID and the message will be routed to the device management user
agent per the WAP Specification.
[edit] Integrating Kannel with Funambol
As said before, Funambol DM doesn't have the capability of sending the SMS, you need to integrate an external application to do that work. Kannel is a powerful open source WAP and SMS gateway that has been chosen as the best approach as it's got 11 years of experience.
The integration of Kannel and Funambol DM is pretty easy, first of all, you have to setup a Kannel push proxy gateway, you can follow the chapter 6 of the official Kannel User Guide.
When you have installed and configured Kannel properly, you have to configure Funambol, on a standard Funambol DM server installation edit the next configuration file:
default/config/common/beans/com/funambol/server/engine/dm/HttpNotificationSender.xml
It is an XML file, which content is something like:
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.4.2_01" class="java.beans.XMLDecoder">
<object class="com.funambol.server.notification.HttpSender">
<void property="deviceAddress">
<string>http://localhost:80</string>
</void>
</object>
</java>
As you may suppose now, you have to change the !http://localhost:80 string to the proper URL where Kannel listen. That's all.
[edit] Setup Phase
Setup phase phase is always required, the client sends a request to the server, the server responds with its credentials and then sends the first data command.
First request from the client contains:
- DevInfo Node
- EXT (optional) Internal object, marking up the single branch of DevInfo
- Bearer wich is the transmission method
- DevID, the id of the device
- Man, the manufacturer identifier
- Mod, Model identifier (manufacturer specified)
- DmV, a syncml client version identifier (manufacturer specific)
- Lang, Language
- Client authentication information, to identify the device against the server
- A token that informing the server it's a client-initiated session or server-initiated session.
[edit] Data phase
The client sends a reply to the server's first command in setup response from server. Then the server can issue new commands or just tell there are no more operations (client will close the session).
This is the culmination phase of the synchronization
[edit] References
Some useful resources:
|