barnowl-aruba converts the decodings of any ambient Bluetooth Low Energy & EnOcean Alliance devices by Aruba Networks access points into standard developer-friendly JSON that is vendor/technology/application-agnostic.
barnowl-aruba 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 included in reelyActive's Pareto Anywhere open source middleware suite, and can just as easily be run standalone behind a barnowl instance, as detailed in the code examples below.
Follow our step-by-step Configure an Aruba Instant AP tutorial to get started with barnowl-aruba or Pareto Anywhere. Or visit our Aruba Networks integration page to learn about alternative configurations such as Aruba IoT Transport for Azure.
Learn "owl" about the raddec JSON data output:
Clone this repository, install package dependencies with npm install
, and then from the root folder run at any time:
npm start
barnowl-aruba will indiscriminately accept WebSocket clients and their data on localhost:3001/aruba and output (flattened) raddec JSON to the console.
Developing an application directly from barnowl-aruba? Start by pasting the code below into a file called server.js:
const Barnowl = require('barnowl');
const BarnowlAruba = require('barnowl-aruba');
let barnowl = new Barnowl({ enableMixing: true });
barnowl.addListener(BarnowlAruba, {}, BarnowlAruba.TestListener, {});
barnowl.on('raddec', (raddec) => {
console.log(raddec);
// Trigger your application logic here
});
From the same folder as the server.js file, install package dependencies with the commands npm install barnowl-aruba
and npm install barnowl
. Then run the code with the command node server.js
and observe the simulated data stream of radio decodings (raddec objects) output to the console:
{
transmitterId: "fee150bada55",
transmitterIdType: 2,
rssiSignature: [
{
receiverId: "204c0fffffff",
receiverIdType: 2,
rssi: -77,
numberOfDecodings: 1
}
],
packets: [ '001a55daba50e1fe0201060303e1ff1216e1ffa1034affe7004500fa55daba50e1fe' ],
timestamp: 1645568542222
}
See the Supported Listener Interfaces below to adapt the code to listen for your AP(s).
The following listener interfaces are supported.
barnowl.addListener(BarnowlAruba, {}, BarnowlAruba.WsListener, { port: 3001 });
Provides a steady stream of simulated TelemetryReports for testing purposes.
barnowl.addListener(BarnowlAruba, {}, BarnowlAruba.TestListener, {});
Each AP has two or more radio identifiers:
- IP radio MAC
- Bluetooth radio MAC
- (optional) USB-connected radio identifier(s)
To the extent possible, all BLE raddecs will use the Bluetooth radio MAC as the receiverId
property. As the Bluetooth radio MAC is not included in BLE Telemetry reports, as of barnowl-aruba v1.2.1, it is instead automatically inferred from AP Health messages and, when available, BLE Data reports.
WiFi raddecs and USB-connected raddecs will use the IP radio MAC as the receiverId
property.
Aruba IoT Transport supports both periodic telemetry reports (ex: BLE Telemetry or Periodic Telemetry) and real-time packet reports (ex: BLE Data or Data Frames). By default, barnowl-aruba will accept only the real-time packet reports, as these include all the properties to form a raddec with rssiSignature
and packets
.
To process periodic telemetry reports regardless, set the listener options as follows:
{ decodingOptions: { acceptTelemetryReports: true } }
In this case, the raddec data will be limited to the transmitterId/Type
, rssiSignature
and timestamp
properties.
For the best RTLS (real-time location) performance from telemetry reports, the following BLE Telemetry Websocket options are recommended:
- Reporting interval: 2 seconds
- RSSI reporting format: Bulk
- Report devices that have had activity in the last 30 seconds
Note that frequent telemetry reporting may significantly increase network traffic: consider the use of Filters to limit reporting only to devices of interest.
RSSI Bulk reporting provides a timestamped history of decodings which will be included in the raddec, provided they are not stale. If required, adjust the staleness threshold by setting the listener options as follows:
{ decodingOptions: { historyMilliseconds: 2000 } }
The default is 2000ms which coincides with the recommended 2s reporting interval.
barnowl-aruba supports the following Transport Services:
- BLE Data
- BLE Telemetry (see Data vs. Telemetry above)
- Serial Data
- EnOcean Serial Protocol (requires USB dongle)
- WiFi Telemetry & RTLS
The following IoT Transport Profile options should be configured on the Aruba AP.
Config Option | Value |
---|---|
bleDataForwarding | (TRUE) |
endpointType | telemetry-websocket |
endpointURL | ws://xxx.xxx.xxx.xxx:3001/aruba |
endpointToken | token (cannot be left blank) |
payloadContent | all |
transportInterval | 1 (seconds) |
rssiReporting | average |
For example, this can be achieved by SSHing into the AP and executing the following commands:
# configure terminal
(config) # iot transportProfile test
(IoT Transport Profile "test") # bleDataForwarding
(IoT Transport Profile "test") # endpointType telemetry-websocket
(IoT Transport Profile "test") # endpointURL ws://xxx.xxx.xxx.xxx:3001/aruba
(IoT Transport Profile "test") # endpointToken token
(IoT Transport Profile "test") # payloadContent all
(IoT Transport Profile "test") # transportInterval 1
(IoT Transport Profile "test") # rssiReporting average
(IoT Transport Profile "test") # end
# commit apply
The configuration can be validated with the command:
# show iot transportProfile test
While barnowl-aruba 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 a variety of barnowl-x listeners, APIs and interactive web apps.
barnowl-aruba v1.0.0 was released in August 2023 with an upgrade from the AOS 8.8 to the AOS 8.10 protobuf. The latter includes the AP's Bluetooth MAC which is used as the receiverId
property in place of the AP's WiFi MAC which was used in previous versions.
Discover how to contribute to this open source project which upholds a standard code of conduct.
Consult our security policy for best practices using this open source software and to report vulnerabilities.
MIT License
Copyright (c) 2020-2023 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.