Comment on page

Connecting in the field

With the Device Connection Service, you can build a completely custom in-field production-grade device onboarding process that works for you and your use case. You can also use it to quickly connect devices during development.
There are two ways to connect a device using the Device Connection Service:
  • Option 1 (Developer mode) - Using default connection pages of the Blecon Console - the easiest way to get started
  • Option 2 (Production mode) - Create a Connection Handler in your application and use the Blecon API to connect the device.
Device Connection Options
The mechanism that is used is controlled by your Network Configuration in the console, explained below.
Whichever option you are using, the objectives remain the same:
  1. 1.
    Obtain Network ID. Either provided by the installer at connection time, or coded directly into your Connection Handler.
  2. 2.
    The device installer must provide the Device identity, including the Device ID and public key. The mechanism of obtaining this information varies depending on the device and the use case.
  3. 3.
    The connection to the specified network is created in an authenticated context, either in the Blecon Console or via your own Connection Handler.

Choosing a connection method

Let's have a look at why there are two options on how to connect a device, and in what situations you might want to choose which method.

Option 1, using the Blecon Console

This is the default method. When you use the Blecon Scanner, the device installer will be directed to the Blecon Console to confirm the connection to the selected network. The installer will need a Blecon login and permission to add devices to your network.
When to use this method when you are in one of these situations:
  1. 1.
    You are prototyping and want to get started quickly
  2. 2.
    You (or your Blecon team) will always install devices yourself

Option 2, in your application, using a Connection Handler

This method is how we expect most production deployments of Blecon Devices to operate.
In this approach, your application needs to build a connection page. This page will need to receive a web request from the installer and handle the registration in the background using the Blecon API.
The benefits of using this method are:
  1. 1.
    The device installer does not need to interact with Blecon or have a login to Blecon.
  2. 2.
    Your application can present whatever installer experience makes sense for your use case. For example, you could ask additional information about the device or installer.
  3. 3.
    You can choose what authentication method the installer needs if any. Typically, the installer would log into your application.
Option 1 is the default, but it's easy to choose Option 2 - once you have built your application connection page, enter the URL of the connection page in the Device connect page section of your Blecon Network settings.