How to Build the OMA-DM Client on Windows XP with VS 2005

Overview

The OMA-DM client V.0.7.2 is depend on many tools. It is complex and it takes long time to built it.

See also how-to-build.txt in the source.

System Requirements

OS

Windows XP SP3

Compiler

  • Visual Studio 2005
  • Platform SDK(Windows Server 2003 SP1 Platform SDK) (only for curl)

http://www.microsoft.com/en-us/download/details.aspx?id=12261

Software Requirements

OMA-DM client

V.0.7.2

Tools

  • Funambol cpp client sdk v10ga
  • boost 1.39.0
  • libwbxml2 0.9.2
  • openssl 0.9.8.r
  • curl 7.21.4

Build Tools

Funambol cpp client sdk

a.Get Code

Checkout source code from

http://svn.code.sf.net/p/funambol/code/client-sdk/tags/cpp-sdk/v10ga

to some place(ex. C:/cpp-sdk-v10ga).

Also checkout cjson and zlib from

svn://svn.code.sf.net/p/funambol/code/tools/cjson

svn://svn.code.sf.net/p/funambol/code/tools/zlib

into the sub folder:

C/:cpp-sdk-v10ga/tools/cjson

C:/cpp-sdk-v10ga/tools/zlib

respectively.

b.Compilation

Change Verison from 9.00 to 8.00 in the VS project file:C:/cpp-sdk-v10ga/build/win32/win32.vcproj.

Open the project file and build release from VS.

c.Output

We get a library file: win32.lib in the folder:C:/cpp-sdk-v10ga/build/win32/output/win32-rel.

Rename the file:win32.lib to funambol.lib.

boost

We need the following libralies

  • date_time
  • filesystem
  • program_options
  • system
  • test
  • thread

a.Get Code

Download source codes from

http://sourceforge.net/projects/boost/files/boost/1.39.0/

and expand it to some place(ex. C:/boost/boost_1_39_0).

b.Compilation

Execute the following commands in the folder:C:/boost/boost_1_39_0 from the command prompt

> bootstrap.bat
> bjam.exe toolset=msvc-8.0 variant=release,debug threading=multi link=static --with-date_time --with-filesystem --with-program_options --with-system --with-test --with-thread
c.Output

We get libary files in the folder:C:/boost/boost_1_39_0/stage/lib (ex.libboost_date_time-vc80-mt.lib).

libwbxml2

a.Get Code

Download source code from

http://sourceforge.net/projects/wbxmllib/files/wbxml2/0.9.2/

and expand it some place(ex. C:/dm-client-tools/wbxml2-0.9.2).

b.Compilation

Open the workspace file:libwbxml.dsw in the folder:C:/dm-client-tools/wbxml2-0.9.2/win32 and convert it to a project file from VS.

Build release.

c.Output

We get a library and dll files in the folder:C:/dm-client-tools/wbxml2-0.9.2/win32/libwbxml2/Release

  • libwbxml2.lib
  • libwbxml2.dll

openssl

We need Perl(ex. Strawberry Perl:http://strawberryperl.com/) to compile source code.

a.Get Code

Download source code Ver.0.9.8r from

http://www.openssl.org/source/

and expand it to someplace(ex. C:/dm-client-tools/openssl-0.9.8r).

b.Compilation

Run the Configure command in the folder:C:/dm-client-tools/openssl-0.9.8r from the command promt

> perl Configure VC-WIN32 --prefix=C:/dm-client-tools/openssl-0.9.8r
Run the the follwing command in the folder:C:/dm-client-tools/openssl-0.9.8r from the VS command prompt
> nmake -f msntdll.mak
c.Output

We get dll and libarary files in the folder:C:/dm-client-tool/sopenssl-0.9.8r/out32dll

  • libeay32.lib
  • ssleay32.lib
  • libeay32.dll
  • ssleay32.dll

curl

a.Get Code

Download source code Ver.7.21.4 from

http://curl.haxx.se/download/

and expand it to somewhere(ex.C:/dm-client-tools/curl-7.21.4).

b.Compilation

Set the OPENSSL_PATH enviroment variable in the folder:C:/dm-client-tools/curl-7.21.4 from the command promt

> set OPENSSL_PATH=C:/dm-client-tools/openssl-0.9.8r
Replace VC from vc6 to vc8 of Makefile in the folder:C:d/m-client-tools/curl-7.21.4.

Set VS enviroment variable with Platform SDK.

> vsvars32psdk.bat
vsvars32psdk.bat:vsvars32psdk.bat

Run the following command

> nmake vc-dll-ss-dll
c.Output

We get a dll and libaray file in the folder:C:/dm-client-tools/curl-7.21.4/lib/release-dll-ssl-dll

  • libcurl.dll
  • libcurl_imp.lib

Build OMA-DM client

a.Get Code

Download source code from

http://en.sourceforge.jp/projects/okamoto2/releases/

and expand to the folder:C:/dm-client.

b.Compilation

Set the enviroment variables for tools in the folder:C:/dm-client/src from the command prompt

> set BOOST_ROOT=C:/boost/boost_1_39_0
> set FUNAMBOL_INCLUDE=C:/cpp-sdk-v10ga/srci/nclude
> set FUNAMBOL_LIB_PATH=C:/cpp-sdk-v10ga/build/win32/output/win32-rel
> set OPENSSL_INCLUDE=C:/dm-client-tools/openssl-0.9.8r/inc32
> set OPENSSL_LIB_PATH=C:/dm-client-tools/openssl-0.9.8r/out32dll
> set WBXML_PATH=C:/dm-client-tools/wbxml2-0.9.2
> set WBXML_LIB_PATH=C:/dm-client-tools/wbxml2-0.9.2/win32/lib/wbxml2/Release
> set CURL_INCLUDE=C:/dm-client-tools/curl-7.21.4/include
> set CURL_LIB_PATH=C:/dm-client-tools/curl-7.21.4/lib/release-dll-ssl-dll
Run the following command
> %BOOST_ROOT%/bjam.exe release
c.Output

We get exe and libary files in the folder:C:/dm-client/build/win32/release.

Copy TestClientAdapter1.exe from the folder:

C:/dm-client/build/bin/ClientAdapter/TestClientAdapter/msvc-8.0/release/optimization-space/threading-multi

to the above folder.

Start OMA-DM client

Configuration

Setup the folder:"%ALLUSERSPROFILE%/Funambol/DMClient" properly.

Install dlls

Copy tools dlls to the system folder:C:/WINDOW/Ssystem32.

Start the service

Run the following command in the folder:C:/dm-client/build/win32/release

> oma_dm_client.exe -i
To remove the service run
> oma_dm_client.exe -u
To get help run
> oma_dm_client.exe -h

Start a DM server

Start a DM server and set a processor for this device.

project:okamoto

Start session to the DM server

Run the UI stub in the folder:C:/dm-client/build/win32/release

> UIAPIClientTest.exe
Run the client stub
> TestClientAdapter1.exe startDMSession
You will get a log file in the folder:"%ALLUSERSPROFILE%/Funambol/DMClient/Logs".

How to Configure the OMA-DM Client on Windows XP

The configuration file

The OMA-DM client configuration file:config.priv is located

"%ALLUSERSPROFILE%/Funambol/DMClient/DataStorage/conf"

Profiles

Root folder of MO

The root folder of MO is set by

<Profile Name="WiMAX_Profile" Description="WiMAX_device_profile" Enabled="true">
which means the real path
"%ALLUSERSPROFILE%/Funambol/DMClient/DataStorage/WiMAX_Profile"

Device Id

The device id:dm-client is set by

<Param Name="DeviceID">dm-client</Param>

MOTreeManager

Auto start on LAN

Enable auto start on LAN

<Param Name="StartOnLAN">1</Param>

ServerExchangeManger

Default account name for DM server

The default account name:funambol for DM server is set by

<Param Name="DefaultAccountName">funambol</Param>

MO

The MO is given by the folder under

"%ALLUSERSPROFILE%/Funambol/DMClient/DataStorage/WiMAX_Profile"
as set by above.

Properties of nodes

The Name of a node is given by the folder name.
The other properties of the node are given by the following files in the folder

File nameDescription
ACL.privAccess Control List
content.privValue
Format.privFormat
Type.privType

A sample for the ./DevInfo node is following

DevInfo
│  ACL.priv[Get=*]
│  Format.priv[node]
│  Type.priv[node]
│
├─DevId
│      ACL.priv[void]
│      content.priv[dm-client]
│      Format.priv[chr]
│      Type.priv[text/plain]
│
├─DmV
│      ACL.priv[void]
│      content.priv[0.7.2]
│      Format.priv[chr]
│      Type.priv[text/plain]
│
├─Lang
│      ACL.priv[void]
│      content.priv[English]
│      Format.priv[chr]
│      Type.priv[text/plain]
│
├─Man
│      ACL.priv[void]
│      content.priv[Funambol]
│      Format.priv[chr]
│      Type.priv[text/plain]
│
└─Mod
        ACL.priv[void]
        content.priv[dm client winxp]
        Format.priv[chr]
        Type.priv[text/plain]

Logging

The configuration file:LogRequired.txt of the logging system is in the folder

"%ALLUSERSPROFILE%/Funambol/DMClient/Logs"
Log files are in the same folder.

Configuartion

Each line of the configuration file is

component_name log_level
A sample is
Daemon 2
"*" of component_name is default setting.

Log levels

The log levels are following

Log levelDescription
0Dump
1Error
2Warning
3Info
4Debug
5Dump

Log files

The log files name is given by

<exe_name>_<PID>.txt

Sample configuration

The sample configuration for the Funambol DM server is given.
DMClient.zip:DMClient.zip

conf.priv

PropertyValue
DeviceIDdm-client
StartOnLAN1
DefaultAccountNamefunambol

./DevDetails

NodeValue
./DevDetail/LrgObjtrue
./DevDetail/URI/MaxDepth0
./DevDetail/URI/MaxSegLen0
./DevDetail/URI/MaxTotLen0
./DevInfo/DevIddm-client

Account infomation

ItemValue
Namefunambol
Server IDfunambol
Addresshttp://localhost/funambol/dm
Port number8080
Server authentificationDIGEST
Server passwordsrvpwd
Client authentificationDIGEST
User namefunambol
User passwordfunambol
ServerNonce5678
ClientNonce1234