The Web Uri Open Beacon specification for the Internet of Things
(pronounced YUR-ee-BEE-kun)
Check out how UriBeacons are used in the Physical Web project.
This is not an official Google product. This is an early-stage experiment that we are developing in the open as we do all things related to the web. This should only be of interest to developers looking to provide feedback and contribute.
The UriBeacon Specification is designed with one goal in mind: to create the easiest, most open way to discover and use nearby smart things.
UriBeacon is a wireless advertisement format for broadcasting Uris to any nearby smart device. By leveraging the Open Web it enables a real-World Wide Web where every person, place and thing can have its own Web presence. Our design is:
- Compliant with Bluetooth 4.0 Advertising messages.
- Compatable with iOS and Android low power scanning modes.
- Independent of any particular hardware, user-agent, service or mobile platform.
- Openly licensed under Apache 2.0 and as such free of restrictive and proprietary terms.
In short, UriBeacon connects low power beacons to the family of Open Web technologies and is one step towards making the Internet of Things as easy to use as the World Wide Web.
This repository contains the UriBeacon written specification and sample code for advertisers and scanners:
- specification - The UriBeacon Open Specification.
- android-uribeacon - Allows Android apps to interact with UriBeacons.
- ios-uribeacon - Allows iOS apps to interact with UriBeacons.
- linux uribeacon - Allows Linux users to experiment with UriBeacons.
- nRF51 uribeacon - Flash instructions for the Nordic Semiconductor nRF51822 beacon.
- android uribeacon - Allows Android 5.0 devices to broadcast beacons.
- NodeJS uribeacon - Allows Linux user to create UriBeacons with NodeJS.
- RFduino uribeacon - Allows RFduino to broadcast as a UriBeacon.
We will also be providing instructions on how to assemble and program standalone UriBeacon tags.
One can classify URIs as Locators (URLs), or Names (URNs), or both.
A Name functions like a person’s name (or Government ID number), while a Locator resembles that person’s postal address.
In other words: URN is an item’s identity, while the URL is a method for finding it.
UriBeacons can broadcast familiar HTTP URLs (http
and https
), UUID URNs (128-bit universally unique identifiers) as well as other URIs.
Various things may broadcast UriBeacons. Smart devices such as phones, tablets, laptops, vending machines, irrigation controllers may incorporate built in UriBeacons. Other things such as movie posters, bus stops, and meeting rooms may use small hardware devices, or tags, specifically designed to emit a UriBeacon advertisement. The libraries and sample code in this repository are a resource for developers who want to encorporate UriBeacons in existing devices and also to create standalone UriBeacon tags.
In order to allow arbitrary sized Urls in short messages the specification finds inspiration from Twitter where all Url links posted in Tweets are auto-shortened. Similarly the UriBeacon contains either a naturally short Uri or one that is shortened through a third-party service. The actual Uri shortener service used is up to the tag writer.
UriBeacon also uses an encoding that replaces common strings like
https://
with a single byte code. The result are Uris that can fit
within the limited size of ADV_NONCONN_IND
packets as shown in the
table below:
Service | Example | Length | Encoded Length |
---|---|---|---|
goo.gl | http://goo.gl/lNhc7 | 19 | 13 |
bit.ly | http://bit.ly/a99vaw | 20 | 14 |
is.gd | http://is.gd/EstPIk | 19 | 13 |
t.co | http://t.co/LEGhQ4i0 | 20 | 14 |
Table 1: Sampling of Url Shorteners
Note that short Urls are mostly transparent: user agents can hide short and show long URLs, titles, etc. and configuration tools can automatically shorten long Urls when writing beacons. Also this specification does not preclude additional information exchange over a GATT service following discovery.