Miscellaneous

addressFromString()

canlib.kvrlib.addressFromString(type, address)[source]

configActiveProfileSet()

canlib.kvrlib.configActiveProfileSet(channel, profile_number)[source]

configActiveProfileGet()

canlib.kvrlib.configActiveProfileGet(channel)[source]

configNoProfilesGet()

canlib.kvrlib.configNoProfilesGet(channel)[source]

deviceGetServiceStatus()

canlib.kvrlib.deviceGetServiceStatus(device_info)[source]

deviceGetServiceStatusText()

canlib.kvrlib.deviceGetServiceStatusText(device_info)[source]

dllversion()

canlib.kvrlib.dllversion()[source]

Get the kvrlib version number as a str

generate_wep_keys()

canlib.kvrlib.generate_wep_keys(pass_phrase)[source]

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)[source]

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)[source]

Generate a hostname from ean and serial number

Parameters
  • ean `EAN` – European Article Number

  • serial `int` – Serial number

initializeLibrary()

canlib.kvrlib.initializeLibrary()[source]

kvrDiscovery

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

kvrConfig

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

stringFromAddress()

canlib.kvrlib.stringFromAddress(address)[source]

unload()

canlib.kvrlib.unload()[source]

verify_xml()

canlib.kvrlib.verify_xml(xml_string)[source]

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