Skip to content

Communication

Overview

The SDK handles the communication functionality via the IEvsCommunicationService interface (received from the Evs.instance().comm() method).

The communication with the glasses is performed over BLE 4.2 and above, whereas BLE 5 is recommended to achieve better performance.

The glasses are connectable using GATT over BLE protocol whereas the glasses act as BLE peripheral device.

Configuring Maverick

The SDK, via the IEvsCommunicationService interface, handles the communication with the glasses.

The glasses are discoverable when they are powered on, if no other device is currently connected to it.

Scanning

Scanning for Maverick is done using the standard BLE scanning API:

  • CBCentralManager::scanForPeripherals for iOS
  • BluetoothLeScanner::startScan for Android

The glasses service UUID is defined in BTConstants.serviceUUID.

The format of the glasses bluetooth name, as appears on the scan, is: EV[GLASSES_NUMBER], for example: EV0080.

Connecting

In order to connect the glasses, the application needs to configure the SDK with the glasses Bluetooth address and name.

The configuration is done via the Evs.comm().setDeviceInfo(deviceId:String?, name:String?) method.

Once configured, call Evs.comm().connect().

The SDK will maintain the connection until the Evs.comm().disconnect() is called.

Pairing

If your application requires pairing, the Evs.comm().connectSecured() should be called instead of Evs.comm().connect().

In that case:

  • The phone will trigger a pair request
  • Upon the pair request from the phone the glasses will display a numeric code
  • The user should enter the pairing code correctly on the phone's pairing dialog

Persistent Configuration

The SDK, once the glasses were configured, will remember the configured address.

The following logic is recommended when initializing the SDK:

Evs.init(context).start()
if(Evs.instance().comm().hasConfiguredDevice()){
    Evs.instance().comm().connect()
}
Evs.instance().start()
if(Evs.instance().comm().hasConfiguredDevice()) {
    Evs.instance().comm().connect()
}

Stock UI

To shorten your development cycle, the SDK comes with built-in UI for your application (currently only portrait is supported).

To open the scanning stock ui call:

Evs.instance().showUI("configure")
Evs.instance().showUI(name: "configure")

Learn about the Glasses Display