Blecon Modem Firmware on the NRF52840-DK
The Blecon Modem Firmware is a pre-compiled binary specifically designed for the NRF52840-DK. By flashing this firmware onto the NRF52840-DK, it will function as a Blecon Modem. With this firmware, the NRF52840-DK provides a serial connection over the USB interface, allowing you to conveniently test and interact with the modem directly from your computer.
The aim of this getting started guide is to showcase the functionality of the Blecon Modem, specifically in the context of building a device where the Blecon Modem is controlled by a microcontroller.
Flash the above firmware to the NRF52840-DK using the Programmer from the nRF Development Tools.
Connect a USB cable from your computer to the MCU USB port on the NRF52840-DK. This will allow you to access the modem's serial interface.
To test your connection, run something like
./blecon-cli --port <PORT> ping
You should get a 'pong' back from the modem. If not, check the previous steps including the Blecon CLI instructions.
Blecon connects Bluetooth devices to a cloud application.
An example of the functionality your cloud application needs to provide for a Blecon request is as follows:
- 1.Accept HTTP requests on a URL you specify
- 2.Verify authentication of Blecon request
- 3.Determine the type of device and request
- 4.Handle the request, storing data as appropriate for your application
- 5.Send the response back to Blecon
Blecon supports any cloud, any web framework and any language, so how you perform the above is up to you.
Creating a request handler
Ensure you configure the response correctly for Blecon.
Click Edit at the top of webhook.site and configure the response as follows. Don't forget to set the Content-Type also.
Creating a Blecon Network
Your Blecon Network
Installing the Blecon App
Blecon uses access points to connect your devices. You can choose either software (the Blecon App) or physical gateways. For this walkthrough we'll use the Blecon App.
Connecting your modem to your network
deThe Blecon Scanner
This is the Device Connection Service. You can use it to build a custom production onboarding experience for your products. Here, it's operating in the default developer mode, allowing us to easily connect a device.
To connect your modem, first, we need the modem's Device URL. To obtain this, we can use the Blecon CLI.
./blecon-cli --port <PORT> get-device-url
Open this URL in your browser, and you should be able to follow the prompts to connect this modem to your network.
To make your first request, run the following.
./blecon-cli --port <PORT> request 48656c6c6f20426c65636f6e21
If you have completed the previous steps correctly, you should see:
With Blecon, you can send any binary data from Bluetooth devices to your Cloud integration.
In this getting started guide, you have learned how to securely communicate over Bluetooth Low Energy to the cloud and back.