@ -77,6 +77,6 @@ This subsystem is always present, and provides the ability to query information
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Version Query | `0x00 0x00` | |<br>__Response:__ `u32`| XAP protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Version Query | `0x00 0x00` | |__Response:__ `u32`| XAP protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
@ -90,10 +90,10 @@ This subsystem is always present, and provides the ability to query information
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Version Query | `0x00 0x00` | |<br>__Response:__ `u32`| XAP protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Version Query | `0x00 0x00` | |__Response:__ `u32`| XAP protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Capabilities Query | `0x00 0x01` | |<br>__Response:__ `u32`| XAP subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Capabilities Query | `0x00 0x01` | |__Response:__ `u32`| XAP subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Enabled subsystem query | `0x00 0x02` | |<br>__Response:__ `u32`| XAP protocol subsystem query. Each bit should be considered as a "usable" subsystem. For example, checking `(value & (1 << XAP_ROUTE_QMK) != 0)` means the QMK subsystem is enabled and available for querying.|
| Enabled subsystem query | `0x00 0x02` | |__Response:__ `u32`| XAP protocol subsystem query. Each bit should be considered as a "usable" subsystem. For example, checking `(value & (1 << XAP_ROUTE_QMK) != 0)` means the QMK subsystem is enabled and available for querying.|
| Secure Status | `0x00 0x03` | |<br>__Response:__ `u8`| Query secure route status<br><br>* 0 means secure routes are disabled<br>* 1 means unlock sequence initiated but incomplete<br>* 2 means secure routes are allowed<br>* any other value should be interpreted as disabled|
| Secure Status | `0x00 0x03` | |__Response:__ `u8`| Query secure route status<br><br>* 0 means secure routes are disabled<br>* 1 means unlock sequence initiated but incomplete<br>* 2 means secure routes are allowed<br>* any other value should be interpreted as disabled|
@ -103,18 +103,18 @@ This subsystem is always present, and provides the ability to address QMK-specif
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Version Query | `0x01 0x00` | |<br>__Response:__ `u32`| QMK protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Version Query | `0x01 0x00` | |__Response:__ `u32`| QMK protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Capabilities Query | `0x01 0x01` | |<br>__Response:__ `u32`| QMK subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Capabilities Query | `0x01 0x01` | |__Response:__ `u32`| QMK subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Board identifiers | `0x01 0x02` | |<br>__Response:__<br> * Vendor ID: `u16`<br> * Product ID: `u16`<br> * Product Version: `u16`<br> * QMK Unique Identifier: `u32`| Retrieves the set of identifying information for the board.|
| Board identifiers | `0x01 0x02` | |__Response:__<br> * Vendor ID: `u16`<br> * Product ID: `u16`<br> * Product Version: `u16`<br> * QMK Unique Identifier: `u32`| Retrieves the set of identifying information for the board.|
| Board Manufacturer | `0x01 0x03` | |<br>__Response:__ `string`| Retrieves the name of the manufacturer|
| Board Manufacturer | `0x01 0x03` | |__Response:__ `string`| Retrieves the name of the manufacturer|
| Product Name | `0x01 0x04` | |<br>__Response:__ `string`| Retrieves the product name|
| Product Name | `0x01 0x04` | |__Response:__ `string`| Retrieves the product name|
| Config Blob Length | `0x01 0x05` | |<br>__Response:__ `u32`| Retrieves the length of the configuration data bundled within the firmware|
| Config Blob Length | `0x01 0x05` | |__Response:__ `u32`| Retrieves the length of the configuration data bundled within the firmware|
| Config Blob Chunk | `0x01 0x06` | |<br>__Request:__ `u16`<br>__Response:__ `u8[32]`| Retrieves a chunk of the configuration data bundled within the firmware|
| Config Blob Chunk | `0x01 0x06` | |__Request:__ `u16`<br><br>__Response:__ `u8[32]`| Retrieves a chunk of the configuration data bundled within the firmware|
| Jump to bootloader | `0x01 0x07` | __Secure__ |<br>__Response:__ `u8`| Jump to bootloader<br><br>May not be present – if QMK capabilities query returns “true”, then jump to bootloader is supported<br><br>* 0 means secure routes are disabled, and should be considered as a failure<br>* 1 means successful, board will jump to bootloader|
| Jump to bootloader | `0x01 0x07` | __Secure__ |__Response:__ `u8`| Jump to bootloader<br><br>May not be present – if QMK capabilities query returns “true”, then jump to bootloader is supported<br><br>* 0 means secure routes are disabled, and should be considered as a failure<br>* 1 means successful, board will jump to bootloader|
| Unique Identifier | `0x01 0x08` | |<br>__Response:__ `u32[4]`| Retrieves a unique identifier for the board.|
| Hardware Identifier | `0x01 0x08` | |__Response:__ `u32[4]`| Retrieves a unique identifier for the board.|
### Keyboard - `0x02`
### Keyboard - `0x02`
This subsystem is always present, and reserved for user-specific functionality. No routes are defined by XAP.
This subsystem is always present, and reserved for vendor-specific functionality. No routes are defined by XAP.
### User - `0x03`
### User - `0x03`
@ -147,4 +147,8 @@ Secure status has changed. Payloads include a `u8` matching a 'Secure Status' re
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| **Purpose** | Token | Token | Broadcast Type | Secure Status |
| **Purpose** | Token | Token | Broadcast Type | Secure Status |
| **Value** | `0xFF` | `0xFF` | `0x01` | `0x01` |
| **Value** | `0xFF` | `0xFF` | `0x01` | `0x01` |
### Keyboard - `0x02`
Reserved for vendor-specific functionality. No messages are defined by XAP.
### User - `0x03`
Reserved for user-specific functionality. No messages are defined by XAP.
@ -90,10 +90,10 @@ This subsystem is always present, and provides the ability to query information
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Version Query | `0x00 0x00` | |<br>__Response:__ `u32`| XAP protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Version Query | `0x00 0x00` | |__Response:__ `u32`| XAP protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Capabilities Query | `0x00 0x01` | |<br>__Response:__ `u32`| XAP subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Capabilities Query | `0x00 0x01` | |__Response:__ `u32`| XAP subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Enabled subsystem query | `0x00 0x02` | |<br>__Response:__ `u32`| XAP protocol subsystem query. Each bit should be considered as a "usable" subsystem. For example, checking `(value & (1 << XAP_ROUTE_QMK) != 0)` means the QMK subsystem is enabled and available for querying.|
| Enabled subsystem query | `0x00 0x02` | |__Response:__ `u32`| XAP protocol subsystem query. Each bit should be considered as a "usable" subsystem. For example, checking `(value & (1 << XAP_ROUTE_QMK) != 0)` means the QMK subsystem is enabled and available for querying.|
| Secure Status | `0x00 0x03` | |<br>__Response:__ `u8`| Query secure route status<br><br>* 0 means secure routes are disabled<br>* 1 means unlock sequence initiated but incomplete<br>* 2 means secure routes are allowed<br>* any other value should be interpreted as disabled|
| Secure Status | `0x00 0x03` | |__Response:__ `u8`| Query secure route status<br><br>* 0 means secure routes are disabled<br>* 1 means unlock sequence initiated but incomplete<br>* 2 means secure routes are allowed<br>* any other value should be interpreted as disabled|
@ -103,18 +103,18 @@ This subsystem is always present, and provides the ability to address QMK-specif
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Version Query | `0x01 0x00` | |<br>__Response:__ `u32`| QMK protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Version Query | `0x01 0x00` | |__Response:__ `u32`| QMK protocol version query.<br><br>* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`<br> * e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.|
| Capabilities Query | `0x01 0x01` | |<br>__Response:__ `u32`| QMK subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Capabilities Query | `0x01 0x01` | |__Response:__ `u32`| QMK subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Board identifiers | `0x01 0x02` | |<br>__Response:__<br> * Vendor ID: `u16`<br> * Product ID: `u16`<br> * Product Version: `u16`<br> * QMK Unique Identifier: `u32`| Retrieves the set of identifying information for the board.|
| Board identifiers | `0x01 0x02` | |__Response:__<br> * Vendor ID: `u16`<br> * Product ID: `u16`<br> * Product Version: `u16`<br> * QMK Unique Identifier: `u32`| Retrieves the set of identifying information for the board.|
| Board Manufacturer | `0x01 0x03` | |<br>__Response:__ `string`| Retrieves the name of the manufacturer|
| Board Manufacturer | `0x01 0x03` | |__Response:__ `string`| Retrieves the name of the manufacturer|
| Product Name | `0x01 0x04` | |<br>__Response:__ `string`| Retrieves the product name|
| Product Name | `0x01 0x04` | |__Response:__ `string`| Retrieves the product name|
| Config Blob Length | `0x01 0x05` | |<br>__Response:__ `u32`| Retrieves the length of the configuration data bundled within the firmware|
| Config Blob Length | `0x01 0x05` | |__Response:__ `u32`| Retrieves the length of the configuration data bundled within the firmware|
| Config Blob Chunk | `0x01 0x06` | |<br>__Request:__ `u16`<br>__Response:__ `u8[32]`| Retrieves a chunk of the configuration data bundled within the firmware|
| Config Blob Chunk | `0x01 0x06` | |__Request:__ `u16`<br><br>__Response:__ `u8[32]`| Retrieves a chunk of the configuration data bundled within the firmware|
| Jump to bootloader | `0x01 0x07` | __Secure__ |<br>__Response:__ `u8`| Jump to bootloader<br><br>May not be present – if QMK capabilities query returns “true”, then jump to bootloader is supported<br><br>* 0 means secure routes are disabled, and should be considered as a failure<br>* 1 means successful, board will jump to bootloader|
| Jump to bootloader | `0x01 0x07` | __Secure__ |__Response:__ `u8`| Jump to bootloader<br><br>May not be present – if QMK capabilities query returns “true”, then jump to bootloader is supported<br><br>* 0 means secure routes are disabled, and should be considered as a failure<br>* 1 means successful, board will jump to bootloader|
| Unique Identifier | `0x01 0x08` | |<br>__Response:__ `u32[4]`| Retrieves a unique identifier for the board.|
| Hardware Identifier | `0x01 0x08` | |__Response:__ `u32[4]`| Retrieves a unique identifier for the board.|
### Keyboard - `0x02`
### Keyboard - `0x02`
This subsystem is always present, and reserved for user-specific functionality. No routes are defined by XAP.
This subsystem is always present, and reserved for vendor-specific functionality. No routes are defined by XAP.
### User - `0x03`
### User - `0x03`
@ -127,10 +127,10 @@ This subsystem allows for query of currently configured keycodes.
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Capabilities Query | `0x04 0x01` | |<br>__Response:__ `u32`| Keymap subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Capabilities Query | `0x04 0x01` | |__Response:__ `u32`| Keymap subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Get Layer Count | `0x04 0x02` | |<br>__Response:__ `u8`| Query maximum number of layers that can be addressed within the keymap.|
| Get Layer Count | `0x04 0x02` | |__Response:__ `u8`| Query maximum number of layers that can be addressed within the keymap.|
| Get Keycode | `0x04 0x03` | |<br>__Request:__<br> * Layer: `u8`<br> * Row: `u8`<br> * Column: `u8`<br>__Response:__ `u16`| Query the Keycode at the requested location.|
| Get Keycode | `0x04 0x03` | |__Request:__<br> * Layer: `u8`<br> * Row: `u8`<br> * Column: `u8`<br><br>__Response:__ `u16`| Query the Keycode at the requested location.|
| Get Encoder Keycode | `0x04 0x04` | |<br>__Request:__<br> * Layer: `u8`<br> * Encoder: `u8`<br> * Clockwise: `u8`<br>__Response:__ `u16`| Query the Keycode at the requested location.|
| Get Encoder Keycode | `0x04 0x04` | |__Request:__<br> * Layer: `u8`<br> * Encoder: `u8`<br> * Clockwise: `u8`<br><br>__Response:__ `u16`| Query the Keycode at the requested location.|
### Remapping - `0x05`
### Remapping - `0x05`
This subsystem allows for live reassignment of keycodes without rebuilding the firmware.
This subsystem allows for live reassignment of keycodes without rebuilding the firmware.
@ -138,10 +138,10 @@ This subsystem allows for live reassignment of keycodes without rebuilding the f
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Capabilities Query | `0x05 0x01` | |<br>__Response:__ `u32`| Remapping subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Capabilities Query | `0x05 0x01` | |__Response:__ `u32`| Remapping subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Get Layer Count | `0x05 0x02` | |<br>__Response:__ `u8`| Query maximum number of layers that can be addressed within the keymap.|
| Get Layer Count | `0x05 0x02` | |__Response:__ `u8`| Query maximum number of layers that can be addressed within the keymap.|
| Set Keycode | `0x05 0x03` | __Secure__ |<br>__Request:__<br> * Layer: `u8`<br> * Row: `u8`<br> * Column: `u8`<br> * Keycode: `u16`| Modify the Keycode at the requested location.|
| Set Keycode | `0x05 0x03` | __Secure__ |__Request:__<br> * Layer: `u8`<br> * Row: `u8`<br> * Column: `u8`<br> * Keycode: `u16`| Modify the Keycode at the requested location.|
| Set Encoder Keycode | `0x05 0x04` | __Secure__ |<br>__Request:__<br> * Layer: `u8`<br> * Encoder: `u8`<br> * Clockwise: `u8`<br> * Keycode: `u16`| Modify the Keycode at the requested location.|
| Set Encoder Keycode | `0x05 0x04` | __Secure__ |__Request:__<br> * Layer: `u8`<br> * Encoder: `u8`<br> * Clockwise: `u8`<br> * Keycode: `u16`| Modify the Keycode at the requested location.|
### Lighting - `0x06`
### Lighting - `0x06`
This subsystem allows for control over the lighting subsystem.
This subsystem allows for control over the lighting subsystem.
@ -149,7 +149,7 @@ This subsystem allows for control over the lighting subsystem.
| Name | Route | Tags | Payloads | Description |
| Name | Route | Tags | Payloads | Description |
| -- | -- | -- | -- | -- |
| -- | -- | -- | -- | -- |
| Capabilities Query | `0x06 0x01` | |<br>__Response:__ `u32`| Lighting subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
| Capabilities Query | `0x06 0x01` | |__Response:__ `u32`| Lighting subsystem capabilities query. Each bit should be considered as a "usable" route within this subsystem.|
## Broadcast messages
## Broadcast messages
@ -177,4 +177,8 @@ Secure status has changed. Payloads include a `u8` matching a 'Secure Status' re
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| **Purpose** | Token | Token | Broadcast Type | Secure Status |
| **Purpose** | Token | Token | Broadcast Type | Secure Status |
| **Value** | `0xFF` | `0xFF` | `0x01` | `0x01` |
| **Value** | `0xFF` | `0xFF` | `0x01` | `0x01` |
### Keyboard - `0x02`
Reserved for vendor-specific functionality. No messages are defined by XAP.
### User - `0x03`
Reserved for user-specific functionality. No messages are defined by XAP.