Tools

ESP32

We provide a library that can be used to create and scan for SemBeacon's with the Arduino-ESP32 library. The library can be found in this repository.

// Create a SemBeacon
BLESemBeacon beacon = BLESemBeacon();
beacon.setManufacturerId(0x004C);                           // Manufacturer of the beacon
beacon.setSignalPower(-56);                                 // RSSI at 1m distance
beacon.setNamespaceId(BLEUUID(BEACON_UUID));                // Namespace UUID
beacon.setInstanceId(0xBEACBEAC);                           // Instance Identifier
beacon.setResourceURI("https://tinyurl.com/3u9tpt7k");      // URI to the resource

// Start the advertising
BLESemBeaconAdvertising* advertising = new BLESemBeaconAdvertising();
advertising->setBeacon(&beacon);
advertising->start();

TypeScript (Hybrid App)

Using the OpenHPS framework we created the @sembeacon/openhps npm module. This module provides a service for retrieving SemBeacon information as well as the building of new SemBeacons.

Android

SemBeacon provides an extension on top of the android-beacon-library by AltBeacon which adds the ability to scan for SemBeacons and broadcast the data. The library can be found in this repository.

BeaconManager beaconManager = BeaconManager.getInstanceForApplication(this.getApplicationContext());
// Clear AltBeacon from the added parsers to prevent it from having a higher priority
beaconManager.getBeaconParsers().clear();
// Detect a SemBeacon
beaconManager.getBeaconParsers().add(new SemBeaconParser());
// Add AltBeacon again
beaconManager.getBeaconParsers().add(new BeaconParser().
    setBeaconLayout(BeaconParser.ALTBEACON_LAYOUT));

While this tool enables you to broadcast and scan for SemBeacons, it does not provide the necesarry tools for extracting semantic data from the public URI.

An example implementation of this library can be found here.