Repository navigation
usb connection prefers the pod's USB network adapter (fw 3.9.0+) - #34
Conversation
Auto-detected USB pods: read the console status, and when its usb line says net on + link up and <pod ip>:8080 accepts a TCP connect within 1.5 s, return a TcpTransport to it (usb_console = the console's device path). Otherwise keep the SerialTransport as before. An explicit device path is never upgraded. VID 0x1209 (1209:0001, fw 3.9.0) ranks as a pod port; parse_text_status turns the usb line into the JSON status shape. Docs + changelogs + unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Guide, connect description, README and changelog: on firmware 3.9.0+ 'usb' uses the pod's USB network adapter (off while Wi-Fi is configured); a serial device path is the console only. connect/status report kind 'usb_net' when the SDK picked the USB network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Over the USB network a round trip is ~10 ms (LAN ~17 ms) and the rail needs ~20 ms to reach 4.9 V, so the immediate read caught it mid-ramp (2.25 V, 3.17 V). Poll up to 0.5 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
HW e2e over |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pod advertises on each of its interfaces, and an update from a second interface replaced the first entry's addresses. Merge them, and make DiscoveredPod.addr prefer the USB network link (10.237.0.0/16). New on_usb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors benchpod-cli: auto-detect reads each pod's identity short id from its console (`identity`). usb:<name> (baea06, benchpod-baea06, any case, optional .local) opens that pod and upgrades to its USB network as before; plain usb keeps probing the pod-VID ports after the first pod and errors listing both when it finds two. One pod's macOS cu/tty twins count once. MCP classifies usb:<name> as serial (usb_net when upgraded); docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firmware 3.9.0 reports what the USB-C source advertises (status.usb.source). default (500 mA) may not carry the pod plus a DUT on the internal 5 V rail, so status says so. The MCP e2e ignores that one warning (bench pods sit on computer ports). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added since the first push:
|
Firmware 3.9.0 moves la-voltage and power from the USB console to the JSON API. Over an explicit console device the SDK then says to connect with usb (the USB network adapter) or the pod's network address instead of reporting an unexpected reply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y table Firmware 3.9.0 answers console commands it moved to the JSON API with a moved-to-the-network-API line; the serial transport raises the connect with usb error for that line only (an unknown command still means firmware too old, as before). README: SDK x firmware compatibility table, Windows 10 supported but not tested, with the UsbNcm Host Device fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On firmware 3.9.0+ with Wi-Fi configured (USB networking off) or the adapter down, the trimmed console has no LA voltage or power. Connection usb now uses the pod's Ethernet or Wi-Fi address from the console status when it answers on :8080, logs a warning naming it (the external LAN policy applies there; clear-wifi turns USB networking back on), and sets TcpTransport.usb_lan_fallback. Firmware before 3.9.0 keeps the console. MCP: kind tcp and a status warning for that case. Tests and README table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le error With the external LAN policy off the pod accepts a TCP connection and resets it, so the LAN fallback now checks a JSON ping answers, not just a connect. The 3.9.0 console error names clear-wifi and the external LAN policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added: LAN fallback for |
…in the USB SDK The MCP server's and the OpenHTF plug's docs now say 'usb' reaches the full API over the USB network adapter, which only embeddedci 2.12.0 does: both require it (were >=2.9 and >=2.4). The mcp-min-sdk CI job installs the minimum from PyPI; while that minimum is the version this repository is about to release, it tests the in-repo SDK instead. Release order: publish embeddedci before embeddedci-mcp and embeddedci-openhtf, then rebuild the benchpod-mcp plugin (uvx caches, .mcpb bundle). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The STM32 pod's console never had a json mode (that was the retired RP2350 firmware), yet every serial open could wait up to 3 s probing for it. JSON goes over the network, also over USB through the USB network adapter; the serial transport is now the text console only. Tests for the old mode go; the unplugged and silent console tests move to the text-console fixture, plus a test that no json switch is ever sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The console tier set the LA voltage over the console at open; firmware 3.9.0 moved that to the JSON API, so every test errored. It now detects 3.9.0 from the console status's usb line, expects the network-command error for LA voltage and power there, and runs the old checks on older firmware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firmware 3.9.0 takes cloud_ca and cloud_proxy changes over the USB network adapter as well as the console, so the refusal on Ethernet/Wi-Fi now reads "<verb>: change it from the cloud or over USB". sig_policy and lan_policy keep "... or the USB console". Host tools accept both texts (older firmware). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under external LAN policy locked, firmware 3.9.0 still takes T2/T3 commands over its USB network adapter, so the refusal on Ethernet/Wi-Fi now reads "locked: <cmd> needs the cloud or USB". Host tools match the "locked:" prefix; hwe2e accepts both texts (older firmware). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 events at 0.2 s ran past the 4 s capture; the late ones queued behind the read-back and went out back to back, and over the USB network one arrived while the previous 1 ms step train still held the pin (pin conflict, 5/5 over USB, never over Ethernet). 18 events end at ~3.8 s, as the ADC sibling test already does. Now 3/3 over USB, 2/2 over Ethernet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Linux the console (/dev/ttyACM0, root:dialout 0660) is closed to users outside the dialout group, so 'usb' never reached the USB network adapter there. The SDK now reads this computer's interfaces (getifaddrs): one /30 in 10.237.0.0/16 names the pod's address with no console; usb:<name> picks among several links by identity_public. TcpTransport.usb_net marks a USB network transport; MCP reports usb_net for it. Found in the 3.9.0 Linux e2e run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Goes with embeddedci-com/benchpod-firmware#47 (firmware 3.9.0: the pod's USB port is also a CDC-NCM network adapter) and #48 (the console trim).
What is in it
usb: finds the console as before. When itsstatusreports the USB network on and up, and port 8080 answers, it returns aTcpTransportto the pod's10.237.x.yaddress (transport.usb_consolenames the console). Otherwise it keeps the console. An explicit device path stays the console.usb:<name>selects one of several USB pods by identity (usb:benchpod-baea06). Plainusbwith several pods raises an error listing them.discover()keeps every address a pod answers from, andDiscoveredPod.addrprefers the USB link (newon_usb).POD_VIDSgains 0x1209 (pid.codes; PID 0001 is the test ID until ours is assigned). 0x0483 and 0x2E8A stay.parse_text_statusparses the console'susbline.la-voltage/powerand raises an error that says to connect withusbor the pod's address. A plainunknown commandstill means firmware too old, as before.usb_net, and the guide/connect text forusbandusb:<name>;statuswarns when the USB-C port offers only default power (500 mA); the MCP e2e ignores that one warning;power_statusalready shows the pod's own draw (pod,total_current) on boards with the 0x41 monitor.Backward compatibility
The SDK decides per pod from its console
status, never from its own version.usb= console, as before.usb= console. Status and ping work. LA voltage and power show the pod's "moved ... update" line.Tests
make test: embeddedci 655 passed, mcp 157, openhtf 74, scripts 12.BenchPod("usb")andusb:benchpod-baea06giveTcpTransport; an unknown name lists the pods found;--benchpod-connection=usb: SDK e2e, examples and MCP e2e gave 124 passed, 50 skipped (no DUT firmware) and 1 failure. That failure was the smoke-test timing race, fixed here.🤖 Generated with Claude Code