Create a Network and register a device
Making your first requests over Blecon
In order for a Blecon device to communicate with your cloud application, it needs to be added to a Blecon network. Blecon networks allow you to configure the handling of events generated by devices such as requests and messages.
This guide will show you how to create a Blecon network and add a device to that network.
Create a new network
Go to the Blecon Console and click the green "Create Network" button
Give your network a name and click "Create Network"
Once the network has been created, you will see the Network Information page for the network you just created. You can return to this page from the main Blecon Console page.
Register a device on the network
While there are different ways to register a device, let's follow the Console workflow for this getting started guide.
Go to the Network Information page for the network you want to add your device to.
Click the Use Scanner button and follow the prompts. You may want to follow a specific device getting started guide.
When the device has been successfully added, you will see the Device Information page for that device. You can return to this page by selecting the Device ID under the "Devices" tab in the Network Information page.
Check network connectivity by sending a request
Once you have registered your device, you can attempt to send a message to your network. You can do this with the Blecon CLI and an attached Blecon modem.
On your computer, use the request
subcommand in the CLI to send a test message to the network.
The example below sends a four-byte message with values: 4b
1e
c0
17
The CLI can convert text strings to binary for you
Blecon devices send data to the network as raw bytes but you can send text strings from the CLI using the-t
option. The CLI will perform the conversion from text to binary (UTF-8).
For example:
./blecon-cli request -t "hello cloud!"
The modem reports it successfully connected to the network. Since you have not yet set up any routes to handle incoming device requests, there is no response returned.
You can confirm this is the case based on the network.routing_failed
event in the "Recent Events" tab of the Network Information page:
Next Steps
Last updated