Skip to content

ADVANTECH-Corp/AlljoynSusiService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

AlljoynSusiService

Advantech implements an Alljoyn service sample for SUSI APIs. It uses AllJoyn Thin Core Library (AJTCL), so that you can apply it on both embedded systems and general-purpose devices.

This Alljoyn application supports

  • About Announcement
  • ControlPanel service
  • Event & Action

##Build Sample

  1. Follow the page to get Alljoyn source code, or directly download from Alljoyn Download.

    Note: We use v14.12 for SUSI Alljoyn service application.

  2. Set $AJ_ROOT

    $ export AJ_ROOT=`pwd`
  3. Get Alljoyn SUSI Service source code and put it under $AJ_ROOT/services/base_tcl/sample_apps

  4. Set environment variables (Cross-Compiler & SUSI4 lib path)

    $ export CROSS_PATH=/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
    $ export CROSS_PREFIX=arm-poky-linux-gnueabi-
    // Set your SUSI4 lib path
    $ export SUSI4_PATH=/home/root/Projects/SUSI_4.0/Library/DllSusi4
  5. Build Thin Core Library

    $ cd $AJ_ROOT/core/ajtcl
    $ scons WS=off TARG=linux
  6. Build SUSI service

    $ cd $AJ_ROOT/services/base_tcl/sample_apps/SusiService
    $ scons WS=off TARG=linux AJ_TCL_ROOT=$AJ_ROOT/core/ajtcl

##Run Sample After building, you can get the application binary named SusiService in build folder. Just copy it into your device and execute it!

About verification tools, you can use these two APK on Android system.

Or use AllJoynExplorer on Windows 10.

##Customization To customize ControlPanel properties, you need to generate source codes from XML file again.

  1. Modify susi_services.xml as your expected.

  2. Copy susi_services.xml into ControlPanel tools folder.

    $ cp susi_services.xml $AJ_ROOT/services/base_tcl/controlpanel/tools/CPSAppGenerator/SampleXMLs/
  3. Run generateCPSApp.py to produce the Control Panel Generated code.

    $ cd $AJ_ROOT/services/base_tcl/controlpanel/tools/CPSAppGenerator
    $ python generateCPSApp.py -p [output folder] ./SampleXMLs/susi_services.xml
  4. Copy ControlPanelGenerated.c and ControlPanelGenerated.h from [output folder] to $AJ_ROOT/services/base_tcl/sample_apps/SusiService folder.