Connecting a device refers to the act of registering a device on a Blecon Network. It only needs to be done once for each device.
There are two ways to connect a device:
- Option 1 (Developer mode) - Using default connection pages of the Blecon Console - the easiest way to get started
- Option 2 (Production mode) - Handling connection in your application, using 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.User must obtain the Network ID.
- 2.User must obtain the Device identity, including the Device ID and public key. Typically via NFC from the device.
- 3.Confirm the connection, either in the Blecon Console, or via your own web application
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.
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.You are prototyping and want to get started quickly
- 2.You (or your Blecon team) will always install devices yourself
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.The device installer does not need to interact with Blecon or have a login to Blecon.
- 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.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.