Coder Social home page Coder Social logo

reelyactive / barnowl-huawei Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 19 KB

Collect ambient Bluetooth Low Energy packets from Huawei access points for real-time location and sensing. We believe in an open Internet of Things.

Home Page: https://www.reelyactive.com/pareto/anywhere/

License: MIT License

JavaScript 100.00%
bluetooth-low-energy huawei barnowl raddec rtls ble pareto-anywhere

barnowl-huawei's Introduction

barnowl-huawei

barnowl-huawei converts Bluetooth Low Energy decodings from Huawei access points into software-developer-friendly JSON: a real-time stream of raddec objects which facilitate any and all of the following applications:

  • RFID: what is present, based on the device identifier?
  • RTLS: where is it relative to the receiving devices?
  • M2M: how is its status, based on any payload included in the packet?

barnowl-huawei is a lightweight Node.js package that can run on resource-constrained edge devices as well as on powerful cloud servers and anything in between. It is typically run behind a barnowl instance which is included in the Pareto Anywhere open source middleware suite.

Installation

npm install barnowl-huawei

Quick Start

Clone this repository, install package dependencies with npm install, and then from the root folder run at any time:

npm start

barnowl-huawei will listen for UDP packets from Huawei APs on localhost:50010 and print any processed raddec data to the console.

Hello barnowl-huawei!

The following code will listen to simulated hardware and output packets to the console:

const BarnowlHuawei = require('barnowl-huawei');

let barnowl = new BarnowlHuawei();

barnowl.addListener(BarnowlHuawei.TestListener, {});

barnowl.on('raddec', function(raddec) {
  console.log(raddec);
});

As output you should see a stream of raddec objects similar to the following:

{
  transmitterId: "fee150bada55",
  transmitterIdType: 2,
  rssiSignature: [
    {
      receiverId: "24a52cffffff",
      receiverIdType: 2,
      rssi: -72,
      numberOfDecodings: 1
    }
  ],
  packets: [ '000755daba50e1fe02011a03ff7d02' ],
  timestamp: 1547693457133
}

Regardless of the underlying RF protocol and hardware, the raddec specifies what (transmitterId) is where (receiverId & rssi), as well as how (packets) and when (timestamp).

Is that owl you can do?

While barnowl-huawei may suffice standalone for simple real-time applications, its functionality can be greatly extended with the following software packages:

  • advlib to decode the individual packets from hexadecimal strings into JSON
  • barnowl to combine parallel streams of RF decoding data in a technology-and-vendor-agnostic way

These packages and more are bundled together as the Pareto Anywhere open source middleware suite, which includes several barnowl-x listeners.

Supported Listener Interfaces

The following listener interfaces are supported.

UDP

barnowl.addListener(BarnowlHuawei.UdpListener, { path: "0.0.0.0:50010" });

Test

Provides a steady stream of simulated Huawei packets for testing purposes.

barnowl.addListener(BarnowlHuawei.TestListener, {});

Huawei Bluetooth Service Profile Parameters

Use the following Bluetooth Scanning parameters for the Huawei AP/AC:

Property Value
Monitoring surrounding BLE devices ON
Monitoring mode Transparent transmission
Data reporting ON
Data reporting time Real-time

For the IPv4 address/port parameter, specify the IP address of the server running barnowl-huawei and port 50010.

Supported Decoding Options

Each listener interface supports decodingOptions with the following properties:

Property Default Description
timestampOnArrival true Override any timestamp included in the inbound packet with the time at which it is received by barnowl-huawei

Contributing

Discover how to contribute to this open source project which upholds a standard code of conduct.

Security

Consult our security policy for best practices using this open source software and to report vulnerabilities.

Known Vulnerabilities

License

MIT License

Copyright (c) 2021-2022 reelyActive

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

barnowl-huawei's People

Contributors

jeffyactive avatar

Watchers

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