# Miscellaneous

## configActiveProfileSet()

canlib.kvrlib.configActiveProfileSet(channel, profile_number)

  Set active profile.

## configActiveProfileGet()

canlib.kvrlib.configActiveProfileGet(channel)

  Get active profile.

## configNoProfilesGet()

canlib.kvrlib.configNoProfilesGet(channel)

  Get the maximum number of profile(s) the device can store.

  When a remote device is connected to the host it can be configured. The remote device can hold a number of different profiles.

## deviceGetServiceStatus()

canlib.kvrlib.deviceGetServiceStatus(device_info)

  Returns local connection status of the selected device.

## deviceGetServiceStatusText()

canlib.kvrlib.deviceGetServiceStatusText(device_info)

  Returns local connection status of the selected device as ASCII text.

## dllversion()

canlib.kvrlib.dllversion()

  Get the kvrlib version number as a `VersionNumber`

## generate_wep_keys()

canlib.kvrlib.generate_wep_keys(pass_phrase)

  Generates four 64-bit and one 128-bit WEP keys

  Parameters

    pass_phrase (`str`) – The pass phrase to use to generate the keys.

  Returns a `(key64, key128)` (`WEPKeys`) namedtuple, where `key64` is a list of four `bytes` object with the four 64-bit WEP keys, and where ``key128` is a `bytes` object with the single 128-bit WEP key.

## generate_wpa_keys()

canlib.kvrlib.generate_wpa_keys(pass_phrase, ssid)

  Generate a WPA key from a pass phrase and ssid

  Parameters

    - pass_phrase (`str`) – The pass phrase to use to generate the key.

    - ssid (`str`) – The SSID to use to generate the key.

  Returns

    `bytes` – The generated WPA key.

## hostname()

canlib.kvrlib.hostname(ean, serial)

  Generate a hostname from ean and serial number

  Parameters

    - ean (`canlib.EAN`) – European Article Number

    - serial (`int`) – Serial number

## kvrDiscovery

class canlib.kvrlib.kvrDiscovery(kvrlib=None)
  clearDevicesAtExit(onoff)
  close()
  classmethod getDefaultAddresses(addressTypeFlag=AddressTypeFlag.BROADCAST, listSize=20)
  getResults()
  setAddresses(addressList)
  setEncryptionKey(device_info, key)
  setPassword(device_info, password)
  setScanTime(delay_ms, timeout_ms)
  start(delay_ms=None, timeout_ms=None)
  storeDevices(deviceInfos)

## kvrConfig

class canlib.kvrlib.kvrConfig(kvrlib=None, channel=0, mode=0, password='', profile_no=0)
  MODE_ERASE = 2
  MODE_R = 0
  MODE_RW = 1
  XML_BUFFER_SIZE = 2046
  clear()
  close()
  getXml()
  openEx(channel=None, mode=None, password=None, profile_no=None)
  setXml()

## unload()

canlib.kvrlib.unload()

  Unloads library stuff.

## verify_xml()

canlib.kvrlib.verify_xml(xml_string)

  Verify that the xml string complies with both the DTD and internal restrictions

## WEPKeys

class canlib.kvrlib.WEPKeys(key64, key128)
  property key128

    Alias for field number 1

  property key64

    Alias for field number 0