Mesh networking

We’ve started our Mesh Network stack as a solution that used flooding protocols to communicate data over the network. That was just the beginning, though. We’ve upgraded our beacons to use a routed and addressable protocol, which means you can send specific pieces of data to specific beacons along specific paths.

This gives you a much greater degree of control over the process, and has the serious upside of using much less power, since only a fraction of the devices in the network are involved.

Read on to see how you can set it up and use it to make managing your fleet of beacons more efficiently.

What’s ahead (a.k.a. Table of Contents)

Prerequisites

Getting set up

Update firmware

If you need to update the firmware on your beacons, a quick way to do it is to keep them close, and run Firmware Update using the Deployment app. Since we’ll be doing a bit of work with multiple beacons at a time, you might want to go ahead and grab that app. And if you don’t have an iOS device handy, don’t worry! We’ve made a tutorial on how to get the same functionality on Android.

Create a mesh

Setting up your devices for a mesh network takes just a few clicks in the Cloud interface.

Enabling mesh networking in Estimote Cloud

Select the beacons you want using the checkboxes to the left of the beacons’ list, then click “Create Mesh”. The only step now is connecting to the beacons, to ensure their newly-minted mesh settings are applied. You can use the Estimote app, and connect to each beacon individually, or the Deployment app, and have it update all the becons at once.

Now let’s move to a more interesting subject, i.e. setting unique values for individual beacons.

Place your beacons

On the physical world side, we need to make sure the beacons are able to communicate with each other. A safe distance is usually about 13-15 ft (4-5 m), but you definitely should experiment!

Let’s start by putting your Candy beacon at the end of your office (unless it’s really, really big—bear in mind the effective distance we’ve mentioned). Place Beetroot about halfway between Candy and your desk, and keep Lemon on hand.

Configuring meshed beacons

But, seeing that work in action would require you to walk around with an app set to detecting those regions, so for now, we’ll stick to changing the state of the GPIO port in the beacons. Our latest firmware ties the GPIO state with the beacon’s built-in LED.
That means you’ll be easily able to see the changes you make (without moving a muscle), and you’ll be prepared to do things like the demo in our blog post.

Keep in mind: To change the state of the LED from the Cloud interface, you’ll need Location Beacons with firmware 4.13.1 or newer.

Go ahead and open our API documentation, prepare a POST request for your Candy beacon, then change its GPIO setting to High / Output.

Send the request (remember to authenticate yourself!) to https://cloud.estimote.com:433/v2/devices/0123456789101112131415 with its body formatted as follows:

{
    "identifier": beacon_id,
    "pending_settings": {
        "gpio": {
            "config_0": 3,
            "port_data": 1,
            "interrupt_enabled": true,
            "gpio_0_state_led_indicator_enabled": true
        }
    }
}

This will turn the LED on. To turn it off, send a POST with the following data:

{
    "identifier": beacon_id,
    "pending_settings": {
        "gpio": {
            "config_0": 3,
            "port_data": 0,
            "interrupt_enabled": true,
            "gpio_0_state_led_indicator_enabled": true
        }
    }
}

Then pick another beacon … and rinse and repeat.

To make things more interesting, use the Estimote app to connect to just one of the beacons, Lemon (no cheating, keep the Deployment app closed!). Let the updates sync, and voila! If you’ve changed the LED state, take a look around—it shouldn’t take more than 30 seconds for all the meshed beacons to light up.

You’re now a proud owner of a routed, addressable mesh. Connect to just one device, and have unique changes propagate to any other device you specify.