Hey Marc,
Excellent, that makes sense. And yes, in this instance it was intended to use a bridge pairing.
So essentially status 0xF1
is equivalent to the notification flag (LSB of TX) in the advertisement, meaning upon receiving this I should request the keyturner states for an update? If so, why not just use the advertisement? Are there more (publicly) undocumented status values?
If this status is only meant for the bridge, if it cannot decrypt the communication when forwarding commands, why am I receiving it when using the shared secret of the bridge pairing and thereby being able to read the communication? Moreover, how come I am receiving this status when sending an (un-)lock action to an already (un-)locked Smart Lock? The status would not change, would it? Although, the last lock action/trigger/completion status could. I would expect similar behavior for the Opener as well, but I don’t see the status message there at all. So does this only apply to the Smart Lock?
Opening a can of worms here: How does the Smart Lock know, if a command is being bridged and therefore should send the aforementioned status message? Is this where the duplicate authorization ID for encrypted messages (PDATA
and ADATA
) comes into play? According to my testing the ID specified in PDATA
indicates which shared key was used to encrypt the message. The ID specified in ADATA
determines what shared key to use to encrypt the response. However, this does not seem to be documented publicly. Specifying an invalid authorization ID in ADATA
still produces a response, although I would expect an authentication error.
So when relaying data from the app remotely via the bridge, the app would initiate the connection by asking the bridge to send the first command with its own shared key, thereby indicating to the Smart Lock, that it needs to send an unencrypted status message on GIDO. Does that work out?
One last one: It also seems to be required to wait for that status message before sending consecutive commands, otherwise they essentially will be ignored resulting in a timeout. Is this intended?
Well, that’s a lot of questions. Sorry for that.
Just trying to improve my custom BLE implementation and error handling. Thanks for being open about this.
Best Regards,
Peter