Thursday, June 28, 2018

Reading Temperature and Humidity on AppsFactory Beacons

AppsFactory Beacons have SHT20 High precision Temperature and Humidity sensor embedded in them. Reading the values from the beacons is not that easy that is why this post is written which will serve as guide. Temperature and Humidity is important as it will allow building owners discover patterns that can not be detected by ordinary humans not unless of course humans are so super intelligent that they may not need tools to predict or discover patterns which could suggest something is just about to happen.

There are two ways to read the sensor data which are as follows:

  1. can be read via GATT
  2. can be included in the beacon advertisement data.

Here is the detail:

1. Reading the Temperature and Humidity via GATT Service
The data can be accessed via GATT Service 0xFFB0 see table below:
The characteristic 0xFFB3 is used to enable the measured Teperature and Humidity on the Advertisement Data. The possible values are as follows(2 bytes):

  • 0x0 - Enable
  • 0x00 - Disable 
Other values maybe entered to specify the rate which it will be advertised, example if 0x0F was entered means the temp and humidity will be advertised every 30 seconds. 
2. Reading the Temperature and Humidity from Beacon Advertisement Data
The Temperature and Humidity is included at the last bytes of the major and minor of the Ibeacon frame.

After obtaining the value, the conversion formula to get the actual values are as follows:

Monday, June 25, 2018

Beacon Scanner App Updated

Remember the app I created to scan Ibeacons and list them on screen and wrote about it that it is possible to modify the app to scan EddyStones as well? To prove it, I have decided to modify it myself. In case you haven't read the previous posts, here are the links:
A Simple Ibeacon Scanner App in Android
An Update to the Ibeacon Scanner App for Android
The a small change I made is to change the name of device whether it is an Ibeacon or an EddyStone-UID.

Like I said, the file DeviceScanActivity.java needs to be modified to detect the 3 Eddystone frames, but I only modified it to scan the UID frame on for demo purposes. And here is the code I insterted:


This is the raw data taken from Ibeacon Detector App:

And here is the resulting app:


Sunday, June 10, 2018

How to Setup AppsFactory Beacons to Broadcast Ibeacon/EddyStone/TLM(Sensor Data)

AppsFactory Beacons Model A just arrived and has made me busy doing tests on each features that the beacons were design to have whether it really works. Doing the program was  not that easy and to see your design work as expected makes you happy.

One notable feature of the beacons is that it can be configured over the air using nRfConnect App for Android or IOS. And can be made to broadcast ibeacon, eddystone and sensor data at an alternating interval. the beacon is also capable of motion triggered broadcast but I haven't test this part yet.

BTW, the sensor data consists of acceleration and temperature data. I will this this part later.



I have designed the beacon to be configured at Bluetooth service 0xff70, and under this is characteristic 0x2a80. The possible values that can be enterered are the ff:
No advertisement: 0x01
iBeacon only: 0x02
Eddystone only:0x08
TLM only: 0x20
To broadcast all three frames : 0x02 + 0x08 + 0x20 = 0x2A

And here is the video: