Skip to main content

Module kkm

Module kkm 

Source
Expand description

KKM KBeacon frames, as KKM’s own MIT-licensed SDK reads them (https://github.com/kkmhogen/android_kbeaconlib2, KBAdvPackage).

FrameCarried inFirst byte
Sensor v1: a 16-bit mask, then the readings it namesEddystone service data (0xFEAA)0x21
Sensor v1, encryptedmanufacturer data 0x0A530x06
Sensor v2: a model byte, battery, then length-type-value recordsmanufacturer data 0x0A530x24
Sensor v2, encryptedmanufacturer data 0x0A530x07
System: model, battery %, MAC, firmwareEddystone service data0x22

Encrypted frames carry 16 bytes of AES-128-ECB ciphertext and a 4-byte UTC second count; the key is MD5(password padded to 16 bytes || MAC as printed || UTC seconds).

Structs§

Kkm
A KKM frame.

Constants§

COMPANY_ID
KKM’s company identifier.

Functions§

decode_manufacturer
Decodes a frame in KKM’s manufacturer data (types 0x06, 0x07 and 0x24). Encrypted frames are decrypted when ctx has the advertiser’s address and a password for it.
decode_service_data
Decodes a frame in Eddystone service data (types 0x21 and 0x22).