Calimotion Mobile App

From Calimacil
Jump to: navigation, search

This Mobile App uses Bluetooth to communicate with the Calimotion Board. This App will work on both iOS and Android mobile operating systems. It will primarily configure color patterns and sound level with a Calimotion in range.

Calimacil mobile app demo.png

Bluetooth Protocol

The Calimotion Mobile App uses a Bluetooth 4.1 BLE pairing communication protocol. The Calimotion will have its button LED turn blue when a Bluetooth communication is established with a mobile device. The main usage of the Mobile App is to communicate with the Calimotion using the following public BLE service and characteristic:

Service

This is the primary service to establish a pairing Bluetooth communication with the Calimotion:

UUID: 00000100-5122-4338-A5CC-FDA9F670BBE0

LED and Sound Characteristic

This is the main characteristic available from the BLE public service of the Calimotion. This characteristic contains a 20 bytes data frame to activate LEDs and set the volume.

UUID: 00000106-5122-4338-A5CC-FDA9F670BBE0

Properties: READ, WRITE

Ex: 0x01:00:FF:FF:FF:FF (Set LED into RGB mode to full, with maximum volume)

The characteristic data value is the following:

Byte [0]: 0x00 = LUX option, 0x01: RGB option, 0x02: Live RGB option.
Byte [1]: If LUX option is selected in byte 0, set the LUX ID to use.
Byte [2]: RED, if RGB or Live RGB option is set in byte [0].
Byte [3]: GREEN, if RGB or Live RGB option is set in byte [0].
Byte [4]: BLUE, if RGB or Live RGB option is set in byte [0].
Byte [5]: Volume, 0x00 = OFF, 0xFF = Max

Hit Characteristic

Note: This characteristic will be updated only if the client subscribe to it.

UUID: 00000103-5122-4338-A5CC-FDA9F670BBE0

Properties: NOTIFY, READ, WRITE

The characteristic data value is the following:

Byte [0, 1]: Get the nb of hit.
Byte [2, 3, 4]: Get the Time of the last hit since the boot (in ms).
Byte [5]: RESET, 0x01 : Nb hit, 0x10 : Timer, 0x11 : Both.

Example

It's also possible to connect directly with the Calimotion using the nRFConnect app.

Here is a example to connect to the Calimotion with nRFConnect Mobile app.

NrfConnect screenshot.png

You can download those app:

Android nRFConnect [1]

IPhone nRFConnect [2]