Configuring your Infrafon to be an iBeacon

A common method of determining the position of devices, particularly indoors, is to detect their emission of BLE iBeacon frames.

The Infrafon CC1 can be configured to emit these BLE messages regularly, allowing it to be detected by such RTLS (Real Time Location System) infrastructures. For more information about iBeacon messages and thei specific fields, see either your RTLS documentation or the wikipedia entry for iBeacon.

To do this, you need to configure the “ibeacon” dev output. This can be done in the global json configuration, before allocation (Go to your ‘Site’ Page), or you can do it on the fly with a MQTT message sent to the device.

The configuration looks like this:

		"dev":{
			"ibeacon": { "major":5, "minor":5, "intervalMS":300, "txPower":6,"durationSecs":0 }
		}

‘intervalMS’ controls if beaconing is enabled or disabled, and sets the interval between beacon messages - if set to 0 then beaconning is disabled (default). Currently the interval is set to 300ms (limitation due to a bug firmware).

The ‘major’ and ‘minor’ fields are the identity of the device, and it is also possible to set the ‘uuid’ if required. ‘txPower’ sets the radio power (-20 to +6) of the transmission (and hence determines the range at which the messages can be received). -20(db) will give a range <1m, while 6(db) will give up to 20m detection (this depends on many factors such as the receiver’s antenna, any intermediate objects, movement etc)

The ‘durationsSecs’ controls for how long the messages are emitted. If 0, the messages start immediately and continue until a new config is received. If >0, this is the time period that they are sent for (starting when the config is received). If <0, then any ongoing beaconning is cancelled and intervalMS is set to 0.

The advertised name of the device by default is ‘infrafon-XXXX’ (like the wifi AP). This can be changed with the ‘adname’ attribute to any string.

Note: iBeaconing means that the device cannot ‘sleep’, and so will consume the device’s battery much more rapidly. A run time of 3-4 hours max should be expected in this case.