Getting started with LTE Beacon

Estimote LTE Beacon is a “super-beacon” that:

  • can talk directly to Estimote Cloud over LTE
  • can position itself outdoors via GPS and other satellites
  • can detect other Bluetooth beacons

And, you can program it to do all that in JavaScript!

In this quick-start guide, we’ll show you how to push your first JavaScript code to the LTE Beacon.

Tip: Another great way to try out your LTE Beacon is to download the Estimote app to your iOS or Android smartphone, and check the IoT demos we’ve prepared.

What’s ahead (aka Table of Contents)

Prerequisites

Step 1: Check if your beacon has cellular connection

The LTE Beacon already comes with a SIM card, and will automatically connect to the best network it can find.

There must be a mobile carrier in your area which supports one of the two new cellular standards designed for low-power IoT devices: LTE-M, or NB-IoT. GSMA has a helpful map of countries with LTE-M/NB-IoT coverage, but local providers keep adding LTE-M and NB-IoT support continuously, so you might want to check if your area is covered, even if most of your country isn’t.

If there’s no compatible carrier in your area, you can still use your LTE Beacon, but it won’t be able to talk to Estimote Cloud directly.

To check if your LTE Beacon is connected to network: open the Estimote app, find your LTE Beacon in the Configuration section and tap on it, then check the Carrier row.

Step 2: Create your first IoT App

An IoT App is a combination of two things:

  • micro-app, this is the code that runs on the LTE Beacon
    • for example: wait for a button press, and when pressed, send an “alert” event to Estimote Cloud
  • cloud code, which runs in Estimote Cloud, receives events from the LTE Beacon, and processes them
    • for example: when receiving an “alert” event from the LTE Beacon, call a Twilio API to send an SMS

To create your first IoT App:

  1. Go to Draft IoT Apps in the LTE Beacons section in Estimote Cloud.

  2. Click Add New IoT App and pick the Alert Button template. Confirm with the Use this Template button.

This will open the Estimote Web IDE with some ready-made code.

Step 3: Push your micro-app to LTE Beacon via Web Bluetooth

First, establish a Web Bluetooth connection with your LTE Beacon:

  1. Click the Connect via Web Bluetooth button to the right of the Micro App Code.

  1. In the pop-up that shows, find your LTE Beacon and click Pair.

    • The name of the beacon shown in the pop-up equals the first few characters of its identifier.

    • You can check the identifiers of your LTE Beacons on the LTE Beacons page in Estimote Cloud. This way you’ll know that 1B87 is your mint (green) beacon, and C012 is your icy (blue) beacon.

Once connected, you can Compile & Send the micro-app to the beacon.

Step 4: Give it a try!

This is the moment we know you’ve been waiting for: go ahead, press the button on top of the beacon!

The beacon will take a moment to establish connection with Estimote Cloud—this could be ranging from near-instant up to a minute. When it’s done, you should see an alert in the Event Log next to the Cloud Code. This confirms that Estimote Cloud received the event from the beacon.

If you want, you can go ahead and put your Twilio credentials (accountSid and authToken) in the Cloud Code, your own phone number in to, and your Twilio number in from. Then click Deploy to deploy the new Cloud Code to Estimote Cloud. Now press the button again, and you should soon be getting a text message!

Troubleshooting & debugging tips

When connected to the LTE Beacon via Web Bluetooth, you can use the print function in your micro-app for some basic debugging. Anything you print on LTE Beacon will appear in your Web IDE, in the Event Log next to the Micro App Code. For example, to test if detecting a button press works correctly, you could do:

io.press(() => {
    print('Button press detected');
});

Or, to check the status of the LTE connection: (the print output goes to the micro-app’s event log via Web Bluetooth, so this will work even if you don’t have an LTE connection)

io.press(() => {
    print(JSON.stringify(lte.getStatus()));
});

Note: print accepts a string only, while lte.getStatus() yields a JavaScript object with various information about the connection. Hence, we encode this object into a string via JSON.stringify, so that we can see all of it in our event log.

Tip: We put our print in a button-press handler, so that we can check the status of the LTE connection on-demand.

The “main” code outside the handler runs only when the micro-app is starting. If we put our debug code in there, we’d only see the connection status once.

Summary & next steps

Congrats on running your first IoT app! 🎉

You now have a beacon connected to the LTE network, and paired with the Web IDE via Web Bluetooth. You know how to push code to it, and the basics of debugging. You’re all set to start experimenting and building your own IoT apps!

To learn more about using Cloud events, GPS, and Bluetooth in your micro-apps, you can head over to these pages:

Or, check out the list of all the LTE Beacon APIs available to your micro-apps and cloud apps, and take it from there:

  • Micro-app API reference — a list of everything you can do in your micro-app!
  • Cloud code & APIs — this covers what you can do in your IoT app’s cloud code, but also how you can access the LTE Beacon events in your own app, via Estimote Cloud’s RESTful API.

Go forth, and build some IoT apps! 😋🛠