Document the three fields GET /v1/info gained - #33
Open
enver-haase wants to merge 2 commits into
Open
Conversation
`git_commit_hash`, `ethernet_mac` and `wifi_mac` were added to the endpoint in GideonZ/1541ultimate#827 and merged for 3.15, but the sample response here still showed the older shape. Each of the three needs a word about when it is absent, which a JSON sample cannot carry on its own, so they get short paragraphs below the sample rather than only a trailing comment: which firmware first answers with them, that only the first interface of each kind is reported, and that it is the Wi-Fi address, not the wired one, that a magic packet wakes the device through. The sample's firmware version moves from 3.12 to 3.15, because a sample cannot carry fields that the version it names does not have.
The firmware builds this field as `sprintf(core_version, "1.%02x", ...)` in `software/api/routes.cc`, so it always carries the dot: an Ultimate 64 Elite reports `1.49`. The sample here showed `143`, which no device answers with. Separate from the rest of this branch, since it predates the three fields being documented and can be dropped on its own.
enver-haase
force-pushed
the
docs/info-mac-and-git-hash
branch
from
September 3, 2026 19:33
7a0c9f8 to
8396fb8
Compare
Author
|
Raised the firmware side as GideonZ/1541ultimate#842, so the two do not end up disagreeing: the same too-broad sentence is in the Merging one of the two without the other leaves one source telling callers that a packet to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GET /v1/infogained three fields in GideonZ/1541ultimate#827, merged for 3.15:git_commit_hash,ethernet_macandwifi_mac. The sample response inapi/api_calls.rststill showed the shape before that.All three need a word about when they are absent, which a JSON sample cannot really carry, so they get short paragraphs under it:
firmware_versionmoves from3.12to3.15for the same reason — a sample cannot carry fields the version it names does not have.git_commit_hash— the abbreviated hash of the commit the firmware was built from, the same string the System Information screen shows. It tells two builds apart that carry the same version number.ethernet_macandwifi_mac— the wired and wireless hardware addresses, upper case and colon separated (routes.ccformats them with%b, which resolves to"0123456789ABCDEF"). Each is left out when the device has no such interface, and while an interface has not started and its address is not known yet. Only the first interface of each kind is reported —routes.ccskips any later one withif (reported[kind]) continue;.wifi_mac. The wired interface does not wake the device: the only matcher issoftware/u64ctrl/main/wol_magic.c, called from one place,wifi_modem.c:164on the ESP32, and the setting isCFG_WAKE_ON_WIFI. Nothing equivalent exists on the RMII side.That last point is worth flagging beyond this PR. I first wrote the broader claim here because I copied it from the comment in
routes.ccand from the description inrest_api_openapi_u64.yaml/_u2.yaml, both of which say the two addresses are what a Wake-on-LAN packet is addressed to. The same overreach is already merged in the firmware repository. Happy to raise a small PR againsttest-mergeto narrow it there too, so the two sources do not disagree — say the word.The second commit is separate and can be dropped on its own: the sample's
core_versionread143, but the firmware builds that field assprintf(core_version, "1.%02x", ...), so an Ultimate 64 Elite reports1.49. No device answers with143.Built with
sphinx-build . ./build/before pushing: exit 0, no warning namingapi_calls.rst. The warnings the build does emit are the pre-existingtoc.not_readableones about missingconfig/pages. I read the renderedapi/api_calls.htmltoo, so the paragraphs really do land inside the table cell rather than after the table.