Thunderboard BLE System Setup Tutorial
- Setup the Thunderboard device
- Import the thunderboard-ble-system from ipm.clearblade.com
- Configure Adapter
- Setup & start the edge on Raspberry Pi
- Test and Verify the setup
- Start the Adapter
- See Visualization
Setup the Thunderboard device
- The default advertisement time is 30 seconds on Thunderboard Devices. We will be modifying this to advertise indefinitely.
- Follow the steps in the instructions-to-setup-thunderboard to flash the Thunderboard’s default firmware with new changes.
Import BLE system on platform
- Create a developer account on platform.clearblade.com
- Once logged in, the developer can access a console.
- To import
- A new system: click the
Newbutton & search for
- An existing system: click the
installbutton & search for
- A new system: click the
- Select the system and hit
- In the developer console, select your system and switch to the adapters tab.
- Select the
ThunderBoardAdapteradapter & edit the configuration.
- Download the
adapterconfig.txtfile and edit the absolute paths based on where you install and run the
edgeon your gateway (here raspberry pi)
- This python file has code which communicates with the edge running locally on the raspberry pi.
credentialsbased on the
TODOcomments in the python file.
## Change the following fields in the pythonScanner.py "platformURL" - the platform where the system resides, default is communicating to the edge, keep it unchanged. "systemKey" & "systemSecret" - The key & secret of the system, can be found by going in the about section of the system of the clearblade developer console. "username" - the user which is there in the users table "password" - respective password for the above username
Replace these changed files in the adapter configuration.
Setup and start the edge on Raspberry Pi
- Switch to the
edgesection in the developer console.
- An edge
ThunderBoardOnPiwould already be created, if not create one by clicking the
- Note that it will not be connected as of now.
- Click on the setting icon in the name column of the
edge pageclick on
Select target as
Linux 32bit - ARM
Assuming a Raspberry Pi is up and running, ssh into the Pi’s terminal & create a directory
cbedgeinside the home folder and
cdinto it. Note: By default, the edge folder will be set as
Permissionoperations on the Pi.
lsthe folder to find the edge binary. [Image]
Given edge ip and platform ip are as shown in the image. [Image]
Start the edge by running the command in Pi’s terminal.
Test and Verify the setup
- Verify the edge is connected in the
edgetab of the developer console
- Verify the adapter is deployed, go to the adapter’s section and find the edge in the connected section. [Image]
Start the adapter
- Navigate to the adapter section of the console.
- Select the edge in the connected section
- Select the ThunderBoardAdapter adapter, select the ThunderboardOnPi edge, and press the play button.
- Go to the Devices tab and confirm your device is listed there. For an additional check, navigate to the Messages tab, and confirm there are MQTT messages listed.
- To see a visualization of the data, go to the Portals tab and click on the AnomalyDetection portal. Change the topic field on the right to be thunderboard/environment/THUNDERBOARD_ID/_platform (the ID will be a 5 digit number in pretty much every MQTT topic in the Messages tab)
- Update the Sensor Key field to one of