Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)

Physical Web

27 Jan 2015

Physical Web is about advertising URLs from low-power peripherals.

It's similar to NFC tags or QR codes; but over BLE. The current design broadcasts a URL in the advertising payload; any number of devices can pickup the information passively and prioritize based on user's preferences.

Here's an introduction and some technical details. Here's some more reading material around it.

In order to get up and running you need two things:

  • A hardware beacon.
  • Software on your phone/tablet to see that beacon.

The software is the easiest thing to take care of. Here's a program for your Nordic mKit or smart-beacon kit to implement the peripheral:

Import programBLE_URIBeacon

The Uniform Resource Identifier Beacon (UriBeacon) defines Bluetooth 4.0 Advertisement Data that contain Web URIs. URIBeacon provides a way for Bluetooth Low Energy devices to discover nearby URIs, for example, provides a way for a user to discover a short URL and then download it on their smartphone.

You can get the latest list of Android releases. Just make sure you go to Settings>Security>Unknown Sources and flip the check-box on before you do.

The hardware is essentially a micro-controller interfacing to a BLE radio with an application broadcasting your URL; you could use any of the mbed supported BLE platforms.

Enjoy.

09 Oct 2014

static const uint8_t BEACON_UUID[] = {0xD8, 0xFE};
uint8_t urldata[] = {
    BEACON_UUID[0], BEACON_UUID[1],
    0x00, // flags
    0x20, // power
    0x00, // http://www.
    'm',
    'b',
    'e',
    'd',
    0x08, // .".org"
};

If you're interested to know what can be shortened in URLs, I found a list in this java source.

ByteRepresents
0x00http://www.
0x01https://www.
0x02http://
0x03https://
0x04tel:
0x05mailto:
0x06geo:
0x07.com
0x08.org
0x09.edu
09 Oct 2014

The geo URI scheme (http://geouri.org/, http://en.wikipedia.org/wiki/Geo_URI) makes sense, physical addresses for the physical web.

I wondered how useful they could be with only enough space for 18 bytes of data, minus one for the "geo:" and one for the comma separating the two coordinates gives 16bytes, or 8bytes per dimension.

To get an idea of the scale of the area that would be specified I used this distance measuring tool to calculate the length of diagonal.

The coordinates with the least significant figures that would fill the 16 bytes that I could think of was -89.9999, -179.999 this represents the area from (-89.9999, -179.9999) to (-90, -180) the distance across the diagonal of that area, the most inaccurate a 16 byte coordinate could be, is 11.12 metres. In the northern hemisphere and east of the Greenwich meridian it's even better.

There will be lots of great uses to put this to.

27 Jan 2015

The link to BLE_PhysicalWeb is wrong now. Instead we should link to:

http://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_URIBeacon/

IE:

Import programBLE_URIBeacon

The Uniform Resource Identifier Beacon (UriBeacon) defines Bluetooth 4.0 Advertisement Data that contain Web URIs. URIBeacon provides a way for Bluetooth Low Energy devices to discover nearby URIs, for example, provides a way for a user to discover a short URL and then download it on their smartphone.

I'm happy to edit Rohit's post to do this if I've found the right project.

Jonny