Locking and Unlocking the Bike
To prevent replay attacks, the lock and unlock commands use a locking counter. This counter resets to zero each time a new authorized connection is established. Therefore, the counter value for the first lock/unlock command after connecting must be 1 and should increment with every subsequent command, regardless of its success.
Unlocking via proximity or automatically is not available in the I LOCK IT sharing firmware. Please contact us if your application requires this functionality.
Additionally, a button-based unlock is possible if the user is authenticated and near the lock (only available if explicitly ordered).
Unlocking
To unlock the lock, send a 16-byte encrypted packet to the relevant characteristic. If unlocking while already unlocked, the I LOCK IT button will flash red as feedback.
- On success, the button lights green for ~3 seconds and a status notification will be sent.
- On failure (e.g. mechanical blockage or low battery), an error state will be notified after a timeout (~30 seconds).
Packet format (before encryption):
| Byte 0 | Byte 1 | Byte 2 | Byte 3 ... 15 |
|---|---|---|---|
| Counter LSB | Counter MSB | 0x01 | 0x00 ... padding |
- Encrypt the block using key
Ku(orKafor admin). - Increment counter for every new command.
GATT Service Info:
- Service: Lock Control
UUID:0000f00d-1212-efde-1523-785fef13d123 - Characteristic: Activate Lock
UUID:0xBEEE
Locking
To lock the lock, send a 16-byte encrypted packet similar to unlocking. This works only if the lock is either currently unlocked or in an undefined state.
Locking behavior:
- The lock checks for motion before starting.
- If no motion, an acoustic signal plays, followed by another check. If still motionless, locking proceeds.
- If motion is detected or bolt is blocked, an error is notified and a fallback unlock may be attempted.
Packet format (before encryption):
| Byte 0 | Byte 1 | Byte 2 | Byte 3 ... 15 |
|---|---|---|---|
| Counter LSB | Counter MSB | 0x02 | 0x00 ... padding |
- Encrypt the block using
KuorKa. - Counter must start at
1and be incremented before each command.
GATT Service Info:
- Same as above.
Unlocking the Chain (Only I LOCK IT PRO)
The plug-in chain/cable typically unlocks together with the main lock. If not, or if the chain is blocked, you may use a separate command:
Packet format (before encryption):
| Byte 0 | Byte 1 | Byte 2 | Byte 3 ... 15 |
|---|---|---|---|
| Counter LSB | Counter MSB | 0x03 | 0x00 ... padding |
- Encrypt with
KuorKa.
GATT Service Info:
- Service: Lock Control
UUID:0000f00d-1212-efde-1523-785fef13d123 - Characteristic: Activate Lock
UUID:0xBEEE
Locking the Chain (Only I LOCK IT PRO)
To lock the plug-in chain:
Packet format (before encryption):
| Byte 0 | Byte 1 | Byte 2 | Byte 3 ... 15 |
|---|---|---|---|
| Counter LSB | Counter MSB | 0x04 | 0x00 ... padding |
- Encrypt with
KuorKa.
GATT Service Info:
- Same as above.
Lock Status
Status values can be read after a successful authentication. The device also sends notifications if the status changes:
| Value | Description |
|---|---|
| 0x00 | Lock is open |
| 0x01 | Lock is closed |
| 0x02 | Lock state is unknown |
| 0x03 | Lock could not close due to motion |
| 0x04 | Lock could not open due to blockage |
| 0x05 | Lock could not close due to blockage |
Characteristic Info:
- Service: Lock Control
UUID:0000f00d-1212-efde-1523-785fef13d123 - Characteristic: Lock state
UUID:0xBAAA
Chain Status (Only I LOCK IT PRO)
Provides chain connection and lock state. The data is sent as two bytes:
| Byte | Value | Description |
|---|---|---|
| 0 | 0x00 | Chain is not plugged in |
| 0x01 | Chain is plugged in | |
| 1 | 0x00 | Chain is unlocked |
| 0x01 | Chain is locked |
Characteristic Info:
- Characteristic: Chain state
UUID:0xBBBB