Geotab Keyless SDK Logging Schema
Support Document
0 mins to read
Learn more about the Geotab Keyless SDK Logging Schema.
Updated:
Schema
Fields | Format | Description |
Timestamp | DATE | Time when the event occurred (nanoseconds, uint64). |
Level | STRING | This is the log level which indicates the level of detail of the log message. See Severity Levels. |
DeviceSerialNumber | STRING | The GO device serial number the Geotab Keyless Mobile Software Development Kit (SDK) will execute commands against. |
VirtualKeyId | STRING | The Universally Unique Identifier (UUID) of the Virtual Key token used to authenticate commands sent to the GO device. |
UniqueMobileDeviceId | STRING | The Universally Unique Identifier (UUID) generated to separate devices that may be the same HardwareModel, OsVersion and KeylessSdkVersion. This ensures that we are capturing logs from unique devices. |
BleConnectionState | STRING | The state of the connection between the Integrator’s mobile app (using the Geotab Keyless Mobile SDK) and the Geotab Keyless device (IOX-KEYLESS or the IOX-KEYBOX). |
HardwareModel | STRING | The mobile device hardware model used when connecting with the Geotab Keyless device. |
KeylessSdkVersion | STRING | The version of the Geotab Keyless Mobile SDK being used by the Integrator’s mobile app. |
OS | STRING | The operating system used by the Integrator’s mobile app (e.g. Android or iOS). |
OsVersion | STRING | The version of the operating system used by the Integrator’s mobile app. |
Message | STRING | This is the logged event. Texts articulating the operations performed by the Geotab Keyless Mobile SDK, including the Standard Log Events outlined in the table below. |
ContextId | STRING | A Universally Unique Identifier (UUID) for identifying the flow of interactions with the Geotab Keyless Mobile SDK. This identifier will tie log messages together that are initiated per the following SDK methods: - Connect - Disconnect - Execute |
ThreadId | Number/STRING | The id of the thread in execution. This can help debug implementation issues. |
SessionId | STRING | A UUID that uniquely identifies a session. A session is a period from when a successful connection is established between the mobile device and the Geotab Keyless device (IOX-KEYLESS or IOX-KEYBOX) to when it’s terminated. |
OutgoingCommandState | STRING | Represents the state the command protocol layer is in. Logs in this layer with this attribute will provide insights into what the state was when an event was recorded.
IDLE, REQUESTING_TO_SEND, AWAITING_CHALLENGE, ISSUING_COMMAND, AWAITING_CHALLENGE_ACK, AWAITING_COMMAND_RESULT |
TransportState | STRING | Represents the state the transport protocol layer is in. Logs in this layer with this attribute will provide insights into what the state was when an event was recorded.
IDLE, CONNECTING, SYNCING, HANDSHAKING, CONNECTED |
BleSocketState | STRING | Represents the state the Bluetooth socket layer is in. Logs in this layer with this attribute will provide insights into what the state was when an event was recorded.
Advertising, Connected, Connecting, Disconnecting, Idle, Initializing |
SourceContext | STRING | This is the SDK component in which the logs are captured.
KeylessManager, ConnectionManager, KeylessClient, CommandProtocol, TransportProtocol, BluetoothLeSocket, BlePermissionChecker |
Error | STRING | Error type, including the Standard Log Events outlined in the table below. |
Operations | STRING | The list of operations to be executed by the Keyless device. E.g. “[IGNITION_ENABLE, UNLOCK_ALL]” |
Levels
The severity levels set out in the table below are then assigned to applicable Standard Log Events, Platform Specific Log Messages, and Debug Log Events.
If you are implementing the Logger interface, you can choose your level of logging. Geotab will capture all levels.
Text | Description |
Verbose | Contain the most detailed messages. |
Debug | For debugging and development. |
Information | Tracks the general flow of the app. |
Warning | For abnormal or unexpected events. Typically includes errors or conditions that don't cause the app to fail. |
Error | For errors and exceptions that cannot be handled. These messages indicate a failure in the current operation or request, not an app-wide failure. |
Standard log events
Event | Description | Message | Severity |
Connection process initiated | The SDK’s connect method is successfully called. | Connecting to keyless device | Information |
Connection process initiated | The SDK successfully starts advertising the mobile device over Bluetooth. | Advertising mobile device as Bluetooth peripheral | Information |
Mobile device failed to advertise | The SDK failed to start advertising the mobile device over Bluetooth. | Advertising mobile device as bluetooth peripheral failed due to {Error}. (The error here can only be determined at runtime)
| Error |
Connection established | The SDK registered a successful connection attempt. The elapsed time to connect is logged.
Elapsed time is calculated from the time when the connect method on the SDK is called to when a callback is received after physical BLE connection and IOX protocol handshake is complete. | Logged messages: - Successful connection established with keyless device
| Information |
Connection attempt initiated while already connected | If the SDK recognizes that it’s already connected to the Keyless device through its internal state, subsequent connection calls are rejected to avoid resetting the state. | A successful connection to the keyless device is active | Error |
Keyless device commands issued | The SDK’s execute method is successfully called. The SDK starts the process of sending the operations to the Keyless device. | Sending operations to Keyless device Possible operations: - Lock, Unlock, Locate, IgnitionEnable, IgnitionInhibit | Information |
Attempting to issue commands while not connected | If the SDK recognizes that it’s not connected to the Keyless device through its internal state, calls to issue commands are rejected | No active connection to Keyless device | Error |
Disconnection process initiated | The SDK’s disconnect method is successfully called. | Closing connection to keyless device | Information |
Connection closed | The SDK registered the successful termination of the connection to the Keyless device. | Connection terminated successfully with keyless device | Information |
Received response from Keyless device | The SDK registered that some data has been received. In this received response, a success or failure message is encapsulated. |
- Invoked operations failed to execute on Keyless device | Information/ Error |
Connection closed unexpectedly | The SDK registered an unexpected disconnection from the Keyless device. | Connection closed unexpectedly | Error |
Keyless Token Transform Failure | The passed token is invalid, therefore the SDK failed to transform it and extract required information. | Failed to transform keyless token | Error |
Platform-specific log messages
Event | Description | Android Message | iOS Message | Severity |
Mobile device failed to advertise | The SDK failed to start advertising the mobile device over Bluetooth. | Advertising mobile device as bluetooth peripheral failed due to {ErrorCode}. ErrorCodes: Examples - ADVERTISE_FAILED_ALREADY_STARTED = 3 - ADVERTISE_FAILED_FEATURE_UNSUPPORTED = 5 … |
| Error |
Logging layers
The SDK has several layers at which information is logged. Some of the debug level logs can be observed across these layers to help track where specifically a failure is occurring. When referencing a specific flow or ContextId, start tracing the activity from the outermost (abstracted) layer and then work towards the innermost (physical connection) layer.
Debug log events in command protocol layer
Event | Description | Message | Severity |
Connection process initiated | The SDK’s connect method is successfully called. | Initiating connection in CommandProtocol layer | Debug |
Connection established | The SDK registered a successful connection attempt. The elapsed time to connect is logged. | Connection established in CommandProtocol layer | Verbose |
Keyless device commands issued | The SDK’s execute method is successfully called. The SDK starts the process of sending the operations to the Keyless device. | Sending operations to Keyless device | Debug |
Attempt to overwrite command in progress | The SDK recognizes a command is still in progress. | Operations in progress | Warning |
Disconnection process initiated | The SDK’s disconnect method is successfully called. | Closing connection in CommandProtocol layer | Debug |
Connection closed | The SDK registered the successful termination of the connection to the Keyless device. | Connection closed in CommandProtocol layer | Verbose |
Received response from Keyless device | The SDK registered that some data has been received. In this received response, a success or failure message is encapsulated. | Possible success messages logged in this state:
CommandProtocol layer received data from device
Possible failure messages logged in this state: - Error occurred on receiving a challenge ack. - Challenge failed ack ${ackValue}. ackValue is 00 or 01
| Debug/Error |
Debug log events in transport protocol layer
Event | Description | Message | Severity |
Connection process initiated | The SDK’s connect method is successfully called. | Opening connection transport layer | Debug |
Attempting to initiate a connection while not in idle state | This scenario shouldn’t occur but it’s currently logged in the SDK. Any attempt to initiate a connection while not in an idle state will result in an error. | Attempting to open a connection to keyless device
Transport protocol state is added as a field in the log record: - CONNECTING - SYNCING - HANDSHAKING - CONNECTED | Warning |
Send data to Keyless device | Compose message to send to Keyless device based on messaging protocol. | Sending data to device from TransportProtocol layer | Debug |
Send transport message | Send message composed as extended app data. | Send transport message | Verbose |
Bluetooth socket open callback triggered while transport in wrong state | The transport protocol layer registers the opening of the lower Bluetooth socket layer while it’s not in the connecting state. | Socket opening while state is: - CONNECTING - SYNCING - HANDSHAKING - CONNECTED | Warning |
Bluetooth socket close callback | The transport protocol layer registers the closing of the lower Bluetooth socket layer. | Bluetooth socket close | Verbose |
Send sync message | The transport protocol layer sends sync messages as dictated by the IOX communication protocol. | Sending sync message while in state $connectionState: - CONNECTING - SYNCING - HANDSHAKING - CONNECTED | Verbose |
Data sent from the IOX Keyless/ IOX Keybox device to the mobile device | The transport protocol layer received data from the Bluetooth socket. | TransportProtocol layer received data from Bluetooth socket | Debug |
Failure to send data to IOX-Keyless/ IOX-Keybox device from mobile device | The transport protocol layer attempted to send data through the bluetooth socket layer but the bluetooth socket layer registered a failure in sending. | Bluetooth socket failed to send while in state $connectionState
- CONNECTING - SYNCING - HANDSHAKING - CONNECTED | Error |
Failure to receive data from the IOX-Keyless/ IOX-Keybox device | The transport layer is waiting to receive data from the IOX but fails. | Bluetooth socket failed to receive while in state $connectionState - CONNECTING - SYNCING - HANDSHAKING - CONNECTED | Error |
Debug log events in socket layer
Event | Description | Message | Severity |
Connection attempt | This message is logged whenever an attempt is made to connect but the device has no support for Bluetooth. | BLE is not supported on this mobile device | Error |
Connection attempt | Logged when Bluetooth is turned off on a mobile device attempting to connect to an IOX-Keyless or IOX-Keybox device. | Bluetooth is not enabled on this mobile device | Error |
Connection attempt | Logged when Bluetooth advertising is not available on a mobile device attempting to connect to an IOX- Keyless or IOX-Keybox device. | BLE advertising is not supported on this mobile device | Error |
Connection attempt | Logged when a connection attempt is made while the Bluetooth socket state is not in the expected Idle state. | The current state ${state.getName()} is not appropriate in order to open a connection: - Idle - Initializing - Advertising - Connecting - Connected - Disconnecting | Error |
Opening Gatt Server | When a connection attempt is made, the SDK opens a Bluetooth Gatt server. | Opening Gatt server and configuring notification characteristic | Verbose |
Connection state change callback triggered when mobile device is connected to or disconnected from IOX-Keyless/ IOX-Keybox | When a connection is established with the IOX device, the bluetooth connection state callback is triggered. The callback is also triggered when it’s disconnected. | ConnectionStateChange callback with BLe new state | Debug |