Hi all, recently I can send messages to nuki for the authentication but there’s no reply from nuki. The only reply that I saw is when the payload sent has error i,e: bad crc. We setup a handler that is listen for data when the pairing characteristics sent any but, as I said before, when data is sent correctly I don’t see any response, anybody can share some lights on these, thanks all!
but has no answer from the nuki, opposite when I changed the payload of the first message array then the nuki answer with error notification 12:00:FD:01:00:E7:C3 , but no clue why with the correct message I have no answer from the nuki.
Hi @marc can I ask you what are the possible values for this two fields in the authorization data payload:
ID Type: The type of the ID to be authorized.0 … App1 … Bridge2 … Fob3 …Keypad. App-ID/Bridge-ID/Fob-ID: The ID of the Nuki App, Nuki Bridge or Nuki Fob to be authorized.
I don’t know if there’s stablished values for these or do I need to define random values, for example this is what I’ll think that are the proper values:
If you provide Fob as Type, the Smart Lock will treat your authorization as a Fob and e.g. the app won’t show you settings for remote access, as the fob never communicates through the Bridge.
The App-ID/Bridge-ID/Fob-ID is used by the Smart Lock to detect multiple pairings by the same device. So if you e.q. provide 12 as ID and later create another pairing with ID 12 the previous one will be overwritten.
To avoid this, you may either provide 0 as ID or a random value.
Within Wireshark protocol I can see a response byte 0x13.
0x13 is an error code, this tells that the maximum number of users is reached.
There are only 6 users registered.
Here is a short summary of the situation:
Definition
>>: send to NUKI
<<: receive from NUKI
NUKI State:
Ring is fully shinning (button >5sec pressed)
BLE connect successful
char-write-req 00 8b 01 00 03 00 27 a7
wireshark BT ATT Protocol
>>: 128b000100030027a7
<<: 13
wireshark full HEX stream:
>>: 0240000d0009000400128b000100030027a7
<<: 02402005000100040013
This is your outgoing message in wiresharks format:
Op-Code | Handle | Value
12 | 8b00 | 0100030027a7
12 means “Write Request”
Your incoming message 13 is just the “Write Response” sent by the Bluetooth stack to confirm the successful write operation.
So this is no message from the Smart Lock.
Did you subscribe for indications on the characteristic before sending your outgoing message?
Hi @marc I have this error and I don’t know if I understand well the message can you help me to confirm it please:
Error: 12 00 11 1E 00 FA 05
12 00: ERROR
11: P_ERROR_BAD_AUTHENTICATOR
1E 00: here will be the command that was sent at the time of the error but I was sending authorization data
FA 05: CRC calc
It tells you, you’re sending a bad authenticator at the “Authorization ID confirmation” step.
If you send me the whole communication during the pairing including the keypair your side has created I can further analyze this.
Hi @marc I just resolve the issue, the error was from my side inserting in the wrong order (big endian) the appId, I just resend the correct message and recieve the data for Authorization-Id, thanks for your support!