Skip to content

feat(onboard): register devices with their firmware's type; fix the ESP-IDF component install - #18

Merged
reubenmiller merged 2 commits into
mainfrom
feat/onboard-device-type-and-standalone-component
Nov 12, 2026
Merged

reubenmiller merged 2 commits into
mainfrom
feat/onboard-device-type-and-standalone-component

Conversation

@reubenmiller

Copy link
Copy Markdown
Contributor

What

1. tedge-onboard registers devices with the type their firmware reports. Until now it registered every device as go-c8y-cli's default, thin-edge.io, so firmware offered for a device's own type (for example thin-edge.io-esp-idf-agent) never showed in the device's Firmware tab.

  • Device: the provisioning library's info command (0xE0) now ends with the device type, from the new tedge_get_device_type(). A tool that reads only the first five fields still understands the reply.
  • Tool: tedge-onboard passes that type to deviceregistration register-ca --type. A device with older firmware reports no type and keeps the default.
  • DTM: the definitions now also tag thin-edge.io-esp-idf-agent.

2. The ESP-IDF component builds when the component manager installs it. The README's git + path dependency failed to configure. The component manager fetches only ports/freertos/esp-idf/tiny_edge, but the component builds core/, provisioning/, and ports/common/ from beside it.

  • Fetching the rest: outside a tiny-edge checkout, the component fetches the rest of tiny-edge into the build directory at configure time. It uses the commit the component manager resolved (the component's version) and the URL in the project's dependencies.lock, so a fork is fetched from the fork. TINY_EDGE_DIR uses a checkout instead.
  • Early pass: ESP-IDF's early requirements pass no longer needs the sources.
  • Symlinks rejected: I tried symlinks first. They don't work, because the component manager does a sparse checkout of the component's path, so the link targets are never fetched.

Tests

  • Component manager: a copy of the sample used the component through git: file://… + path: with a tag, starting from an empty component cache. The component fetched tiny-edge at the resolved commit, and the image built (tedge-minimal.bin, 37% of the slot free).
  • In-tree: the sample still builds without warnings.
  • POSIX: ctest passes, 3 of 3, and the provisioning test now checks the type field. host-compile passes.
  • Go: go vet is clean and go test ./... passes, including new tests for parsing the info reply with and without the type, and for --type in the registration.
  • Not tested on a board yet: the C6 was unplugged before I could onboard it with the new firmware and tool.

🤖 Generated with Claude Code

reubenmiller and others added 2 commits November 12, 2026 23:55
tedge-onboard registered every device with go-c8y-cli's default type,
"thin-edge.io", so firmware offered for a device's own type (for example
thin-edge.io-esp-idf-agent) never showed in its Firmware tab.

- The provisioning library's info command (0xE0) now ends with the device
  type, from the new tedge_get_device_type(). A tool that reads only the
  first five fields still understands the reply.
- tedge-onboard passes that type to `deviceregistration register-ca --type`.
  A device with older firmware reports none and keeps the default.
- The DTM definitions tag thin-edge.io-esp-idf-agent too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The component manager fetches only ports/freertos/esp-idf/tiny_edge, but the
component builds the core, the provisioning library and the shared port
code from beside it, so the documented git + path dependency failed to
configure.

Outside a tiny-edge checkout, the component now fetches the rest of
tiny-edge into the build directory at configure time: the commit the
component manager resolved (the component's version), from the URL in the
project's dependencies.lock. TINY_EDGE_DIR uses a checkout instead. ESP-IDF's
early requirements pass no longer needs the sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reubenmiller
reubenmiller merged commit fe360dd into main Nov 12, 2026
19 checks passed
@reubenmiller
reubenmiller deleted the feat/onboard-device-type-and-standalone-component branch November 12, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant