Git Product home page Git Product logo

azure-iot-gateway-ble-data-convertor-module's Introduction

azure iot gateway ble data convertor module

This is a native module written in C programming language, which can be loaded by the Azure IoT Gateway SDK.

The convertor module will receive the message sent from a BLE or Simulated_Device module, and then convert the data into json format as

{"deviceId": "Intel NUC Gateway", "messageId": 0, "temperature": 0.0}

What you need

You can run the SDK's BLE or simulated_device_cloud_upload sample correctly.

compile the module

clone this repo into a linux system (Intel NUC), then run the following command:

chmod 777 build.sh  # change the build script runnable
sed -i -e "s/\r$\/\/" build.sh  # remove the invalid windows character
./build.sh

Note the libmy_module.so binary file's absolutely path.

config the gateway's config

  1. Choose the ble_gateway.json or simulated_device_cloud_upload.json according to whether you run a BLE sample or simulated_device sample

  2. Add a new module as MyModule using the following json

    {
      "name": "MyModule",
      "loader": {
        "name": "native",
        "entrypoint":{
          "module.path": "[Your libmy_module.so path]"
        }
      },
      "args": null
    },
  3. Modify the links part

    a. if you are using the BLE sample, modify the links part

    from:

    {
        "source": "SensorTag",
        "sink": "mapping"
    }

    to:

    {
        "source": "SensorTag",
        "sink": "MyModule"
    },
    {
        "source": "MyModule",
        "sink": "mapping"
    }

    b. if you are using the simulated_device_cloud_upload sample, modify the links part

    from:

    {
        "source": "BLE",
        "sink": "mapping"
    }

    to:

    {
        "source": "BLE",
        "sink": "MyModule"
    },
    {
        "source": "MyModule",
        "sink": "mapping"
    }

azure-iot-gateway-ble-data-convertor-module's People

Contributors

yuwzho avatar

Watchers

 avatar

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.