barnowl-huawei
v1.0.2
Published
Collect ambient Bluetooth Low Energy packets from Huawei access points for real-time location and sensing. We believe in an open Internet of Things.
Downloads
52
Maintainers
Readme
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.
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.