Capabilities

→ GetCapabilities

Declaration

hmkit.autoapi.commands.get_capabilities.GetCapabilities()

Discussion

Command to request the vehicle capabilities. The car will respond with the Capabilities command that manifests all different APIs that are enabled on the specific car. It is good practice to only inspect the vehicle capabilities the first time when access is gained. The capabilities are fixed for each car type and will not change between every session unless the user meanwhile receives new permissions (requires a whole new certificate).

← Capabilities

Discussion

Command sent when a Get Capabilities command is received by the car.

Capabilities()

Declaration

hmkit.autoapi.commands.Capabilities()

Discussion

Response received will be resolved into Capabilities() object. Capabilities that are available for the vehicle.

Example

# send get capabilities command to Vehicle
constructed_bytes = get_capabilities.GetCapabilities().get_bytearray()
hmkit.bluetooth.link.sendcommand(constructed_bytes)

# To check get DoorLock capability of the vehicle

# in Link_Listener Class
def command_incoming(self, link, cmd):

cmd_obj = CommandResolver.resolve(cmd)

if isinstance(cmd_obj, capabilities.Capabilities):
    print("Capabilities Command received (resolved to Class capabilities.Capabilities())")

    # Example: Capability Checks
    doorlock_capability = cmd_obj.get_capability(Identifiers.DOOR_LOCKS)
    if doorlock_capability is not None:
        is_sup = doorlock_capability.is_supported(msg_type.MsgType(Identifiers.DOOR_LOCKS,0x00))
        print("App: get doorlocks() capability is_sup: " + str(is_sup))

get_capabilities()

Declaration

get_capabilities():

Returns

list of properties.capability.Capability

Discussion

Get all of the Capabilities that are available for the vehicle.

get_capability()

Declaration

get_capability(identifier):

Parameters

identifier

hmkit.autoapi.identifiers.Identifiers

Returns

properties.capability.Capability

Discussion

Get the capability for a specific command type.