Skip to content

Android app compatibility #3

@filipnavara

Description

@filipnavara

The simulated lock is not compatible with the Nuki Android app, which doesn't see it at all.

The first problem is that the Android application expects the BLE advertising data in an exact format, which differs from what SimNuki sends. The difference is the length of the advertising data, which seems to be 0x15 for a real Nuki, but only 0x11 for a simulated one. Seems relatively easy to workaround by modifying main.js line 87 from

var advDataBuf = Buffer.concat([typeBuf, uuidReverseBuf]);

to

var nullBuf = new Buffer([0, 0, 0, 0]);
var advDataBuf = Buffer.concat([typeBuf, uuidReverseBuf, nullBuf]);

I am not exactly sure what real Nuki sends in these additional four bytes, but the Android application doesn't seem to care about it.

The second problem is that the authorization gets abruptly terminated after step 19. I've tried to examine the communication by hand and I didn't see anything out of the ordinary when comparing it to the official specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions