Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XAP] info.json transformation for XAP-related info #15600

Open
tzarc opened this issue Dec 27, 2021 · 4 comments
Open

[XAP] info.json transformation for XAP-related info #15600

tzarc opened this issue Dec 27, 2021 · 4 comments

Comments

@tzarc
Copy link
Member

tzarc commented Dec 27, 2021

XAP Task Info

Original Issue
Original spec document
Current XAP Definitions
Current XAP Generated Docs
Placeholder PR

Description

Any work in this area needs to be discussed with QMK Collaborators first, and in this case primarily with @tzarc due to their prior work in this area.

The info.json needs to be "massaged" to only require relevant information for XAP. This includes enabled subsystems such as rgb_matrix and dynamic_keymap, as well as information like layout options.

Currently the xap branch of qmk_firmware compresses the entire output of qmk info -f json for a keyboard as a proof-of-concept; this is not sufficient as it currently does not include keymap-level selections (e.g. disabling rgb at the keymap is not reflected in the output), and the generated output also includes a lot of irrelevant information in the output that has no bearing on XAP's functionality.

For this issue, a transformation needs to be applied such that it filters for a set of known-used items from info.json into an appropriate equivalent to be embedded into the firmware.

A corresponding *.jsonschema file should also be provided so host applications can determine what information is to be available.

This blob of data should be compressed -- an appropriate algorithm should be chosen as part of this work.

NOTE: for simplified porting from Chinese vendors who don't bother upstreaming to QMK, relevant information such as pin definitions should be included in this output. This is intended as a future work item; the idea is to be able to connect to a XAP-enabled firmware with the XAP client and export as much of a keyboard's info.json as possible.

@tzarc tzarc added enhancement help wanted xap XAP-related issues/PRs labels Dec 27, 2021
@tzarc
Copy link
Member Author

tzarc commented Dec 27, 2021

This item also needs to add to the QMK subsystem in the XAP protocol, exposing a handler that allows retrieval of the info.json-like blob from the firmware.

This will need multiple XAP requests, and will likely need to be implemented by supplying a "read offset" as an argument to the handler; the host app requesting the information can then concatenate, decompress, and parse the final output.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs.
For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

@stale stale bot added the stale Issues or pull requests that have become inactive without resolution. label Apr 16, 2022
@stale stale bot removed the stale Issues or pull requests that have become inactive without resolution. label Apr 16, 2022
@tzarc
Copy link
Member Author

tzarc commented Jan 3, 2023

Moved back to "To do" so that we can sort out the firmware-based jsonschema for clients.

@zvecr
Copy link
Member

zvecr commented Jan 4, 2023

Its currently just data/schemas/keyboard.jsonschema, do we expect to duplicate the content?

@tzarc tzarc added this to XAP MVP Sep 25, 2023
@tzarc tzarc moved this to To do in XAP MVP Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

2 participants