Giter Site home page Giter Site logo

mx-ble-widget's Introduction

mx-ble-widget

Add a widget to scan and connect to your BLE devices from a Mendix application.

Widget built for TI CC2650 SensorTag.

Requires PhoneGap plugin cordova-plugin-ble-central in your hybrid mobile Mendix application configuration.

Follow instructions at https://docs.mendix.com/howto/mobile/ to deploy your hybrid mobile application.

Thanks to Don Coleman (https://github.com/don) for the code and tutorials available at https://github.com/don/phonegap-ble-workshop

Watch the demo at https://youtu.be/eLvtzRvMy40

Installation

  1. Install the widget in your project
  2. Include the ScanBLE widget in a context wrapper (i.e. Data Grid, List view) on a page. Include the ConnectBLE widget in the context for the 'Scanned Device Types' entity.
  3. Create entities to store device types, scanned devices and device data.
  • Entity: AllowedDeviceTypes

    • Attributes: deviceType , String
      • Purpose: Provide a comma separated list of device type ids to limit the devices to be scanned.
      The widget does not currently use this value. It is hardcoded to look for TI CC2650 sensors
  • Entity: ScannedDevices

    • Attributes:
      • deviceID, String
      • deviceName, String
      • deviceType, String
      • deviceMfgData, String , unlimited
  • Entity: DeviceData

    • Attributes:
      • deviceID, String
      • deviceType, String
      • characteristicUUID, String
      • characteristicName, String
      • dataValue, String
      • dataUnits, String
  1. Configure the widget's settings: ScanBLE

    1. On the Input tab, Configure:
      1. 'BLE Device Types' : set to the deviceType field of the enclosing AllowedDeviceTypes
      2. 'Scan Time (seconds)': set to an integer value
    2. On the Output tab, Configure:
      1. 'Object to Create' : set to 'ScannedDevices' entity
      2. Map entity fields
    3. On the Button tab, Configure:
      1. 'Button Label'
      2. 'Button Class' : optional

    ConnectBLE

    1. On the Input tab, Configure:

      1. 'BLE Device ID' : set to the deviceID field of the enclosing ScannedDevices entity
    2. On the Device Data tab, Configure:

      1. 'Object to Create' : set to 'DeviceData' entity
      2. Map entity fields

Typical usage scenario

Known Limitations

Only scans TI CC2650 sensors.

Based on the Mendix Widget Boilerplate

See AppStoreWidgetBoilerplate for an example

mx-ble-widget's People

Contributors

si48github 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.