HOWTO Install Funambol DM Server with MySQL

There is a cmpatibility issue of Timestampe of MySQL 5,x,
http://dev.mysql.com/doc/refman/5.1/en/datetime.html

You will need to configure a JDBC driver. Here is a example of install.properties,

  jdbc.classpath=/usr/local/jdk1.7.0_10/jre/lib/ext/mysql-connector-java-5.1.22-bin.jar
  jdbc.driver=com.mysql.jdbc.Driver
  jdbc.url=jdbc:mysql://localhost/fnbl_dm?zeroDateTimeBehavior=convertToNull
  jdbc.user=fnbl_dm
  jdbc.password=fnbl_dm
  jdbc.file=mysql-connector-java-5.1.22-bin.jar
  jdbc.module=com.mysql
# ==============================================================================
# Funambol Device Management Server
# ==============================================================================
# Installation properties
# ==============================================================================

# The server URI
server-name=http://xxx90:8080/funambol/dm

# The context path to use to access DM Server
context-path=/funambol

#
# The DBMS name. One of:
#   - mysql
#   - postgresql
#
dbms=mysql

#
# JDBC settings:
#   classpath: the classpath of the JDBC driver
#   url:       the url to access the database with the choosen JDBC driver
#   user:      the db user
#   password:  the user's password
#   file:      the file name of the JDBC driver
#   module:    the module name of the JDBC driver
#
# PostgreSQL
# ==========
#
# jdbc.classpath=<somepath>/postgresql.jar
# jdbc.driver=org.postgresql.Driver
# jdbc.url=jdbc:postgresql://<hostname>/funambol
# jdbc.user=funambol
# jdbc.password=funambol
# jdbc.file=postgresql.jar
# jdbc.module=org.postgresql
#
# MySQL
# =====
#
# jdbc.classpath=<somepath>/mysql-connector-java-bin.jar
# jdbc.driver=com.mysql.jdbc.Driver
# jdbc.url=jdbc:mysql://[hostname][,failoverhost...][:port]/[dbname][?param1=value1][&param2=value2]
# jdbc.user=funambol
# jdbc.password=funambol
# jdbc.file=mysql-connector-java-bin.jar
# jdbc.module=com.mysql
#
###jdbc.classpath=/opt/postgresql/share/java/postgresql.jar
###jdbc.driver=org.postgresql.Driver
###jdbc.url=jdbc:postgresql://localhost/fnbl_dm
###jdbc.user=fnbl_dm
###jdbc.password=fnbl_dm
###jdbc.file=postgresql.jar
###jdbc.module=org.postgresql
jdbc.classpath=/usr/local/jdk1.7.0_10/jre/lib/ext/mysql-connector-java-5.1.22-bin.jar
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost/fnbl_dm?zeroDateTimeBehavior=convertToNull
jdbc.user=fnbl_dm
jdbc.password=fnbl_dm
jdbc.file=mysql-connector-java-5.1.22-bin.jar
jdbc.module=com.mysql

HOWTO Logging

Please refer logging about JBoss AS 7, JBoss AS 7 Admin Guide:
https://docs.jboss.org/author/display/AS71/Documentation

Default setting are,

  • Log File: <JBOSS_HOME>/stanalone/logs/funambol.log
  • Log Level: INFO
  • Log Category: com.funambol

Log Level is able to be changed by JBoss management console(or CLI)

HOWTO Configure Notification Sender

You configure sender component to support device address list.

1.Java Beans

  • change NotificationSender: <DM_HOME>/config/com/funambol/server/engine/dm/NotificationSender.xml as following:
      <?xml version="1.0" encoding="UTF-8"?>
      <java version="1.4.2_01" class="java.beans.XMLDecoder">
        <object class="com.funambol.server.notification.HttpSender2">
            <void property="deviceFile">
                <string>/path/to/devices.properties</string>
            </void>
        </object>
      </java>
    

<?xml version="1.0" encoding="UTF-8"?>
<java version="1.4.2_01" class="java.beans.XMLDecoder">
    <object class="com.funambol.server.notification.HttpSender2">
        <void property="deviceFile">
            <string>/Funambol/dm-server/dmdemo/devices.properties</string>
        </void>
    </object>
</java>
2.device address list

  • create device address list: devices.properties under /path/to folder as following:
       device1:url1
       device2:url2
    

device01=http://xxx21:80
device02=http://xxx06:80
3.device address(phone number)

  • change Description field of fnbl_device table with device_id:deviceid1 in DB as following:
        device1
    

You send a notification to the device wth device_id:deviceid01 by following command:

   bin/notification.sh device1 operation1

HOWTO play the Funambol DM Clients with the DMDemo.

OMA DM Client

project:okamoto2

Setting up the clients

a. Change the configuration file: "conf.priv" as following,

DeviceID:           dm-client
StartOnLAN:         1
DefaultAccountName: funambol
b. Change your profile as following,
./DevDetail/LrgObj:        true
./DevDetail/URI/MaxDepth:  0
./DevDetail/URI/MaxSegLen: 0
./DevDetail/URI/MaxTotLen: 0
./DevInfo/DevId:           dm-client
c. Change your account information as following,
Name:                    funambol
Server ID:               funambol
Address:                 http://localhost/funambol/dm
Port number:             8080
Server authentification: DIGEST
Server password:         srvpwd
Client authentification: DIGEST
User name:               funambol
User password:           funambol
ServerNonce:             5678
ClientNonce:             1234

Connecting to the DM Server.

a.install service,

oma_dm_client.exe -i
b.start service,
oma_dm_client.exe -s
c.start a UI stub,
UIAPIClientTest.exe
d.start a client adapter stub to connect to the Server,
TestClientAdapter1.exe startDMSession

Win32 DM Client

Setting up the clients

chnage your account information as following,

ClientPW:     funambol
UserName:     funambol
Addr:         http://localhost:8080/funambol/dm
PortNumber:   8080
ServerID:     funambol
ServerNonce:  5678
ClientNonce:  1234
Note: Device ID is w32dm.

Connecting to the DM Server

Eecute,

dm.cmd
Note: functions of this client are very limited.

OMA-DM simulator

see koneki project:
http://www.eclipse.org/koneki/omadm-simulator/