Blip default firmware
The default firmware collects data from all onboard sensors, temperature/humidity, light, and accelerometer and sends it over BLE(bluetooth low energy). The Electronut Labs mobile app can be used to connect to the device and see the sensor data. Refer to the video at the end of this section.
The Instruction for uploading default firmware to Blip and observing sensor data on the phone are explained in the sections below.
Build and Flash firmware
No special build instructions, except that for now,
Zephyr needs a certain
branch, currently at
This branch is based off
Zephyr release v1.14, we only added drivers code for
which is not yet in mainline zephyr (it's in the process of being merged). To
use this branch, you will need Zephyr SDK v0.10.0.
To get to this branch:
cd /path/to/zephyr/ git remote add electronut https://github.com/electronut/zephyr.git git fetch --all git checkout electronut/blip_dev
Follow the command line instructions below to Build the firmware and flash to the Blip.
cd /path/to/default_fw git submodule init && git submodule update # for nanopb . /path/to/zephyr/zephyr-env.sh mkdir build cd build cmake -GNinja -DBOARD=nrf52840_blip .. ninja flash
The blip device will now advertise the sensor data which can be observed using Electronut Labs mobile app.
Sensors Data on Web Bluetooth demo
You can talk directly to Blip using Web Bluetooth. For this to work, your browser must support Web Bluetooth and the blip board should have the default firmware. To check list of available browsers, visit this link. On Google Chrome, you should have enabled experimental web features by visiting the url :
Sensors Data on Mobile App
The Electronut Labs mobile app is available here:
Here are the steps to get connected with the blip device after downloading the app.
- Open the app and go to blip
- Scan for any blip device, if it is advertising then you can see it like this below.
- Connect to the device. The sensor values will be displayed which will be consist of values of temperature, humidity, lux and accelerometer as shown below.
If you move the blip device you will see the change in accelerometer values along x,y and z axis. Similar changes can be seen for lux and other sensor values.
Indrium Data Format
We are using something we are calling Indrium as our specification for the data format for sending sensor data.
Indrium Protobuf Format
Indrium is a protobuf spec we are using for sensor data. Protobuf is a serialization format and it doesn't say anything about the transport layer (which could be BLE, or serial, or TCP etc.). Indrium spec contains BLE transport layer requirements also, like the UUIDs of the service and characteristec, and how large packets will be divided into smaller chunks (fragmentation).
Serialization using protobuf is structured data which is easy to parse using libraries generated with protobuf tools, so we don't have to manually parse the messages. In firmware we use nanopb library for parsing/generating protobuf messages.
The linked document contains information about BLE specific portions of the protocol also. Please see: BLE transport specification.
Here is the video of the default firmware in action.
The source for can be found on gitlab here.