Use Blecon from your computer with the Blecon CLI
Communicating from your PC to the Blecon Modem
Although Blecon is usually used with embedded devices, you can use Blecon's functionality from your computer by connecting a Blecon Modem and controlling it with the Blecon CLI.
The Blecon CLI tool is a command-line tool for interacting with the Blecon network and attached modems from your Linux, Mac or Windows computer. With the CLI you can get information about attached Blecon modems as well as send and receive messages from the Blecon network.
By giving access to the full functionality of the Blecon modem, the Blecon CLI turns your computer into a Blecon device. This can be helpful for prototyping software that uses the Blecon modem or testing the web endpoints that will handle messages from your devices.
Set up a Blecon Modem
Your computer will need to communicate through a Blecon Modem to use Blecon. Refer to the Install Blecon Modem Firmware getting started guide to flash the Blecon Modem firmware on a supported development board.
Download and run the CLI tool
Downloads
Instructions
Download and extract the application for your platform. Note where you extracted the
blecon-cli.exe
application file.Launch a command prompt. Press the Windows key + R, type "cmd", and press Enter. This will open a Command Prompt window.
Use the
cd
command to navigate to the directory where you saved theblecon-cli.exe
application fileType
.\blecon-cli.exe
to run the tool and see a list of supported commands(Optional) Copy or move
blecon-cli.exe
to a more convenient location on your machine.
Use the CLI tool to get your modem's ID
For this step to succeed you will need to have set up and connected a Blecon Modem to your computer
Run the CLI tool with the get-identity
subcommand to print out your modem's ID. Your modem ID gives your computer a unique identity on the Blecon network.
You will see output that looks like the following (output from Linux)
You now have a fully-working Blecon CLI and modem on your computer!
Next Steps
Set up a Blecon hotspot to allow your modem to connect to the cloud.
Register your modem to your Blecon virtual network so that messages from this modem are routed to your web endpoints.
Last updated