Advertise Eddystone Using node.js

We recently came across node-eddystone-beacon that advertises Eddystone using node.js (Javascript). It works across MacOS, Linux (including Raspberry Pi) and Windows but obviously requires the device to have a Bluetooth adapter.

The open source code advertises Eddystone-URL, Eddystone-UID and Eddystone-TLM. Examples are provided.

Our previous post mentioned node-beacon-scanner that provides for node.js Bluetooth scanning.

New Python Library

Most use of Bluetooth LE and beacons only looks at the transmitted advertising containing identification and sensor information. More advanced use requires connection to the device using GATT to write, read and be notified of changes in values (Bluetooth Service Characteristics). The most common use for connecting is to set configurable settings as in the case of device manufacturer smartphone apps.

Some solutions need to manipulate Bluetooth Service Characteristics programmatically. Barry Byford has a new Pyton library BLE-GATT for Linux based devices. It’s based on the BlueZ D-Bus API, features a small number of dependencies and can be easily installed without sudo privileges.

Node Beacon Scanner

If you are developing using Node, there’s a Node.js module, node-beacon-scanner, that allows you to scan Bluetooth beacon packets and parse the packet data.

While Node tends to be associated with Linux, servers and hence web sites, Node can also be used on small single board computers such as the Raspberry Pi. Hence, this module provides an easy way to scan for Beacons and other Bluetooth devices.

The module supports iBeacon and Eddystone and outputs the MAC address, local name, transmit power level, RSSI and the iBeacon/Eddystone specific attributes.

Graphical Bluetooth Analyser for Linux

Sparrow is an open source Graphical Bluetooth and WiFi Analyzer for Linux. It provides a 2.4 GHz and 5 GHz spectrum view, listens for Bluetooth LE advertising and tracks advertisement or iBeacons advertisement sources. It can also be used to advertise iBeacon.

Sparrow is useful for advanced users who need to diagnose more advanced problems related to interference or which part of a system isn’t working.

Bettercap for Debugging Bluetooth LE

There’s a useful tool called bettercap that claims to be the “Swiss Army knife for WiFi, Bluetooth Low Energy, wireless HID hijacking and Ethernet networks reconnaissance and MITM attacks”.

While you might want to use it to test Bluetooth LE security, a more interesting use is for debugging Bluetooth LE. If you are scanning for advertising or creating or using GATT, for example with a beacon, it’s sometimes useful to have a separate way of exercising Bluetooth LE.

Bettercap is written in Go and runs on GNU/Linux, BSD, Android, Apple macOS and the Microsoft Windows. However, a bug in Windows and macOS prevents the Bluetooth commands from working. Hence, it’s for Linux or Android only.

Better caps runs in the browser and you can create scripts.

UPDATE: There’s a tutorial on Medium.