Giter VIP home page Giter VIP logo

device-manager's Introduction

Device Manager

Device Manager application is used to provision the gateway device and constrained devices with access details to register with the FlowCloud. It runs on the gateway device and uses the Awalwm2m sdk to communicate with the awalwm2m server and client running on the same. Currently it can be used to :

  • Provision the gateway device
  • Check if the gateway device is provisioned or not
  • Provision the constrained device
  • Check if the constrained device is provisioned or not
  • List the constrained devices connected to the local server

Revision History

Revision Changes from previous revision
0.9.0 External Beta Trial Release

Prerequisites

Prior to running device manager, make sure that:

  • Awalwm2m client daemon(awa_clientd) is running.
  • Awalwm2m server daemon(awa_serverd) is running.

NOTE: Please do "ps" on console to see "specific" process is running or not.

Application flow diagram

Device Manager Sequence Diagram

Using the ubus interface of Device Manager

Provisioning the gateway device:

root@OpenWrt:/# ubus -t 60 call device_manager provision_gateway_device '{"device_name":"MyCi40","device_type":"FlowGateway","licensee_id":7,"fcap":"XXXXXXXXXX", "licensee_secret":"XXXXXXXXXXXXXX"}'
{
        "provision_status": 0
}

Status 0 : The device was provisioned successfully. Status 1 : Provisoning failed Status 2 : The device was already provisioned.

Checking if the gateway device is provisioned or not

root@OpenWrt:/# ubus call device_manager is_gateway_device_provisioned
{
        "provision_status": false
}

Listing the devices connected to the gateway device

root@OpenWrt:/# ubus call device_manager get_client_list
{
        "clients": [
                {
                        "clientId": "LedDevice",
                        "is_device_provisioned": false
                }
        ]
}

Provisioning a constrained device:

root@OpenWrt:/# ubus -t 60 call device_manager provision_constrained_device '{"fcap":"XXXXXXXXXX", "client_id":"LedDevice", "licensee_id": 7, "device_type" : "FlowCreatorLED", "parent_id": "08 5A 24 DE A8 C2 0A 4B AB 24 4C F6 ED 5D 5F 62 "}'
{
        "status": 0
}

NOTE: The parent id should be the same as the device id of the gateway device. It can be read from /etc/lwm2m/flow_access.cfg

Checking if the constrained device is provisioned or not

root@OpenWrt:/# ubus call device_manager is_constrained_device_provisioned '{"client_id":"LedDevice"}'
{
        "provision_status": false
}

Debugging

The logs of device manager application can be found at /var/log/device_manager_ubusd

API guide

Device Manager documentation is available as a Doxygen presentation which is generated via the following process.

  1. Install Doxygen : sudo apt-get install doxygen

  2. Generate the documentation:

    $ device-manager: mkdir build $ device-manager/build: cd build $ device-manager/build: cmake ../docs $ device-manager/build: make docs

The output can be found in the build/html directory and viewed by opening index.html with your web browser.


Contributing

We welcome all contributions to this project and we give credit where it's due. Anything from enhancing functionality to improving documentation and bug reporting - it's all good.

For more details about the Contributor's guidelines, refer to the contributor guide.

device-manager's People

Contributors

mayank-sirotiya-imgtec avatar nikhil-zinjurde-imgtec avatar pratik-prajapati-imgtec avatar rahul-daga-imgtec avatar

Watchers

 avatar

Forkers

changeyourname

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.