Repository navigation
setup, discover --save: save the LAN address or usb, not the USB link - #35
Merged
Merged
Conversation
On firmware 3.9.0 a pod plugged in over USB is also heard over mDNS on its USB network link (10.237.x.y), and discovery prefers that address to drive it. setup saved it as the default connection and printed it in the pytest hint, so a pod set up at a desk broke once it moved to Ethernet in a lab. Discovery now keeps the pod's Ethernet/Wi-Fi address next to the link one. The saved default is that LAN address when there is one, else `usb` for a pod only on its USB link (it re-detects on any port), else the address as is. setup saves an explicit --connection as given, says why it saves `usb`, and no longer calls the USB link "on the network". discover shows the LAN address in its health line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Found on 2026-10-15 while onboarding benchpod-baea06 (firmware 3.9.0, on USB and on the LAN at 192.168.1.220) with
benchpod setupfrom v0.7.0:network 10.237.8.85:8080: mDNS hears the pod on every interface, andpreferredPodIPpicks the USB network link address.10.237.8.85:8080as the default connection, and the next steps printedpytest --benchpod-connection=10.237.8.85.That address only works while the pod is plugged into this computer. A tester who sets up at a desk and then moves the pod to Ethernet in a lab gets a broken default.
discover --savealready mapped a USB-link address tousb, but it also ignored the LAN address when the pod had one.Rule
The saved default connection (
savedConnection) is:status);usbfor a pod reached only on its USB link (10.237.0.0/16), which re-detects on any port and falls back to the console when Wi-Fi turns USB networking off;A
--connectionpassed tosetupis saved as given (usb:<name>is kept instead of plainusb). Setup still drives the pod over the USB link during the run; only the saved value and the pytest hint change.Changes
discoveredPod.lanAddr: the first non-USB-link IPv4 that mDNS returned.discovershows it in the health line (LAN address 192.168.1.220:8080).saveTarget(discover --save) and setup step 5 both usesavedConnection.USB network 10.237.8.85:8080, network 192.168.1.220:8080. Step 2 no longer calls the USB link "on the network": a USB-only pod is fine for this computer, and setup says how to add Ethernet or Wi-Fi for other machines and CI. Step 5 explains why it savesusb.setupanddiscover, plus the README, are updated. The public docs (getting started, CLI page, CLI reference) are updated in embeddedci-server main.Tests
go test ./cmd/...passes. There are new unit tests forsavedConnection,lanPodIP, the LAN-over-link preference insaveTarget, setup saving the LAN address,usb, and explicit connections, andmergeSetupPodskeeping the LAN address. These are host-only tests; nothing was run on the bench pod.internal/fwrefusalsfails locally because it reads the sibling firmware checkout, which is on another branch. That failure is unrelated to this change.🤖 Generated with Claude Code