Repository navigation
I2C busy names the other holder; closing CAN switches termination off (SDK + MCP 2.13.16) - #79
Merged
Merged
Conversation
… (SDK + MCP 2.13.16) open_i2c() refused with "i2c busy" while the desktop app held the pod's I2C master told the script to close its own open_i2c() session, which it never opened. The SDK now tells the two cases apart: another connection holds it (the error says so, with that session's pins and rate from i2c_status), or this BenchPod still has its own session open (close that one). I2CMaster.closed is new. CanBus.close() (and the MCP can_close) also sends can_term off, so a bus opened with term=True no longer leaves the 120 ohm termination in. Firmware 3.10.6 does the same in can_disable. HW-tested on benchpod-30a9f1 over the LAN (fw 3.10.5): both I2C messages, and CAN status after close reports enabled false, term false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wardviaene
enabled auto-merge (squash)
November 14, 2026 16:44
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.
Fixes two findings from the 2026-11-14 app test pass.
i2c busy: close the I2C session from bp.open_i2c() first, which points at the script. The firmware's I2C master is one per pod and does not track which connection opened it, so the SDK tells the cases apart: if thisBenchPodhas its own unclosed session it says to close that; otherwise it says another connection holds it (desktop app, web app, AI agent or another script) and names that session's pins and rate fromi2c_status. New:I2CMaster.closed.CanBus.close()and the MCPcan_closealso sendcan_termoff, so a bus opened withterm=Trueno longer leaves 120 ohm on the bus. Firmware 3.10.6 does the same incan_disable(benchpod-firmware PR).can_close, tool docstrings, both changelogs. Patch bump to 2.13.16.HW-tested on benchpod-30a9f1 over the LAN (fw 3.10.5): two connections, the second gets "another connection to this pod holds its I2C master (LA2 SDA, LA1 SCL, 100000 Hz) ..."; the first gets "this BenchPod already has an I2C session open"; CAN after close: enabled false, term false.
🤖 Generated with Claude Code