How to Read the AnkhMaway Sensor Data?

Since we have been selling the AKMW-iB003N-SHT  and AKMW-iB004N PLUS SHT we have been getting a few questions regarding accessing the temperature and humidity data.

You should first read the manufacturer’s SHT20 User Guide (username and password supplied with your beacon).

If you are connecting via GATT to read the sensor data then you will need to set the beacon to be always connectable. The way to do this is (for some strange reason) only shown in the iB001M user guide:

advertisementcontrol

So if you wish to transmit iBeacon and remain connectable, set the value to 0x82. Note that if you subsequently set the beacon ‘on’ or ‘off’ in the ‘simple’ configuration screen, accessed via the spanner icon (Android) or Configure option (on iOS), then this will overwrite your set value.

However, you might instead consider reading the sensor data from the advertising data which a) is much easier to program and b) uses much less beacon battery power and c) allows multiple apps to see the data at the same time.

There’s also an iOS example app in the BeaconZone AnkhMaway technical area.

Measuring Distance with Bluetooth LE

There’s a useful recent Webinar at Nordic Semiconductor on Measuring distance with the Nordic Distance Toolbox. The Nordic Distance Toolbox (NDT) provides ways to measure the distance between two Nordic SoCs. An SoC (System on a Chip) is the main chip found in beacons and Nordic is one of the main manufacturers.

The webinar covers the theory of distance measurement based on radio phase, RSSI, Round Trip Timing (RTT) and processing such as Inverse Fast Fourier Transform (IFFT). Practical performance is measured and the conclusions are:

  • Phase based ranging gives best accuracy but is range limited maximum range is limited to 8 to 10m (in the office environment)
  • RTT gives lower accuracy (Standard deviation 3.8m) but can be used up to the maximum Bluetooth connectivity range that can be several 100 metres
  • High precision with a median 3 filter gives the best accuracy (Standard deviation of 37cm)

The presentation PDF is also available.


Using the SoC radio to determine distance is power-hungry, relatively complex to develop and, as the above shows, doesn’t result is very good accuracy. If you want to measure distance it’s simpler, more accurate and more battery-efficient to use a dedicated hardware-based distance sensor. For example, the IBS03R uses a dedicated time of flight (TOF) sensor to achieve accuracy of +-25mm and a battery life of 1.8 to 2.8 years.

Beacons, IoT and Platforms

Our article on Beacon Proximity and Sensing for the Internet of Things (IoT) explains how beacons can become part of the Internet of Things. Most implementations need to use a server or cloud IoT platform. However, in working with clients we have seen many problems with most of today’s commercial IoT platforms:

Cost – Many aren’t financially scalable in that costs escalate once the number of sensors and/or sensor reporting frequency is increased. Future costs are also unknown and unpredictable which is unacceptable for many organisations.

Continued Existence – It’s still early days for IoT and it’s not known if today’s platforms will be around for as long as the project. Some early beacon-specific platforms have already closed. Others have been taken over by large companies that have other agendas.

Security – Many projects, particularly those with sensitive data, can’t be run on or through shared public servers, services or platforms.

Control – For some organisations, aspects such availability and reliability need to be controlled in-house.

Functionality – IoT is a nebulous concept covering many specialist areas and industries. It’s difficult for a given IoT platform to cater for all needs. It’s usually necessary to compromise on your required functionality. Many IoT platforms have limited alerts, analytics and dashboards because they have cater for the lowest common denominator and not provide industry specific features.

A solution to these kinds of problem is the use of open source IoT platforms. The current and future costs are known, there’s full control and you are free to extend in any way you wish.

Platforms such as ThingsBoard offer data collection, processing, visualisation, and device management. In the case of ThingsBoard it offers a secure, scalable solution that uses a Cassandra database that’s well suited for storage and querying of time-series data while providing high availability and fault-tolerance.

Thingboard Dashboard Showing Sensor Beacons

If you need more help, consider our development services.

New M52 Variants in Stock

We have some new variants of the Meeblue M52 available.

  • The M52-PIR is a sensor beacon with built in passive infrared (PIR) sensor. It can be used to detect room occupancy.
  • The M52-PA is a long range version of the M52 Plus. It uses an extra Bluetooth output amplifier to achieve a range up up to 170m.
  • The M52-SA Plus Waterproof is an IP68 version of the M52-SA Plus sensor beacon providing temperature, humidity (SHT20) and acceleration (LIS3DHTR) sensors. The humidity sensor obviously isn’t useful when the beacon is waterproof.

View MeeBlue Beacons

View Sensor Beacons

View Using Bluetooth Wireless Sensors

New Meeblue Platform

Meeblue has a new platform for users of the W1 Bluetooth WiFi gateway. It’s designed to work with Meeblue sensor beacons to easily capture and view sensor data.

The platform is free to use and is publicly available. However, devices need be registered with the platform in advance. Requests can be made no more than once per second and you must use https.

Steps to set up the W1 gateway with the Meeblue platform

The API allows you to GET a gateway’s status, POST data from a gateway, GET a sensor device status, POST a sensor’s status, POST and GET sensor storage data.

View All Gateways

Using Bluetooth Sensor Beacons for AI Machine Learning

Sensor beacons provide a quick and easy way to obtain data for AI machine learning. They provide a way of measuring physical processes to provide for detection and prediction.

Beacon Temperature Sensor

Beacons detect movement (accelerometer), movement (started/stopped moving), button press, temperature, humidity, air pressure, light level, open/closed (magnetic hall effect), proximity (PIR), proximity (cm range), fall detection, smoke and natural gas. The open/closed (magnetic hall effect) is particularly useful as it can be used on a multitude of physical things for scenarios that require digitising counts, presence and physical status.

The data is sent via Bluetooth rather than via cables which means there’s no soldering or physical construction. The Bluetooth data can be read by smartphones, gateways or any devices that have Bluetooth LE. From there it can be stored in files for reading into machine learning.

Such data is often complex and it’s difficult for a human to devise a conventional programming algorithm to extract insights. This is where AI machine learning excels. In simple terms, it reads in recorded data to find patterns in the data. The result of this learning is a model. The model is then used during inference to classify or predict situations based on new incoming data.

The above shows some output from accelerometer data fed into one of our models. The numbers are distinct features found over the time series as opposed to a single x,y,z sample. For example ’54’ might be a peak and ’61’ a trough. More complex features are also detectable such as ‘120’ being the movement of the acceleration sensor in a circle. This is the basis for machine learning classification and detection.

It’s also possible to perform prediction. Performing additional machine learning (yes, machine learning on machine learning!) on the features to produce a new model tells us what usually happens after what. When we feed in new data to this model we can predict what is about to happen.

The problem with sensor data is there can be a lot of it. It’s inefficient and slow to detect events when this processing at the server. We create so called Edge solutions that do this processing closer to the place of detection.

Read more about SensorCognition

Easy IoT with Bluetooth Beacons

When people think about IoT sensors they tend to envisage, for experimenters, discrete electronic components connected to single board computers (SBC) or for industrial, custom sensors connected to microcontrollers.

The problem for experimenters is the solution is fragile and needs to be evolved into a custom electronic design before it can be used in production. For industrial solutions, they tend to be proprietary, require deeply invasive installation and very expensive.

Example IoT Dashboard Using Sensor Beacons

Sensor beacons provide an easy, ready-made solution that have the following advantages:

  • They provide a solution that’s equally as good for experimentation as it is for the final production
  • They require no soldering or electronics skills.
  • They can be placed in remote areas where there’s no power or network connectivity.
  • They can be self powered and last for 5+ years.
  • They can detect quantities such as position, movement, temperature, humidity, air pressure, light and magnetism (hall effect), proximity and heart rate.
  • They can be easily attached to existing to exiting assets to make them IoT enabled.
  • Being Bluetooth standards-based, the sensor data can be easily read via gateways, smartphone apps or single board computers and sent on, as necessary, to servers.
Bluetooth-WiFi Gateway

Using beacons sensors in this way also provides for the ‘big data’ required for AI machine learning.

Read more about Beacon Proximity and Sensing for the Internet of Things (IoT)

View Sensor Beacons

FedEx SenseAware Beacon

FedEx has started to use Bluetooth sensor beacons to track packages. The SenseAware ID device provides more frequent location updates and temperature, humidity and vibration data for premium packages.

SenseAware ID is part of the FedEx SenseAware offering that has previously used devices with cellular technologies. SenseAware ID devices are instead detected by gateways at UPS sites.

View sensor beacons

View gateways

Using iBeacon for Sensing in Viticulture

There’s new research by Sotirios Kontogiannis and Christodoulos Asiminidis of University of Ioannina, Greece on A Proposed Low-Cost Viticulture Stress Framework for Table Grape Varieties.

The system automatically monitors vine stress to provide real-time surveillance and alerts. It identifies specific areas for irrigation, thereby saving water, energy and time.

The Bluetooth iBeacon protocol is used to relay temperature, humidity, UV levels and soil moisture levels. The authors modified the standard iBeacon protocol, using the existing iBeacon minor and major fields to encode the telemetry data.

View Sensor Beacons