Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/embeddedci/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 2.12.0

- Firmware 3.9.0 keeps ST's USB id `0483:5740` (pre-release builds used `1209:0001`); auto-detect
ranks both vendor ids.
- `BenchPod.usb_network(on=None)`: read the pod's USB network setting (firmware 3.9.0+), or turn
the adapter off over the USB link (`False`). Ethernet, Wi-Fi and the cloud get
`PodLockedError`; turning it back on is `benchpod usb-network on` on the USB console.
Expand Down Expand Up @@ -40,7 +42,7 @@
pods raise `ConnectionConfigError` listing both, and the same pod seen on two ports (macOS
`/dev/cu.*` and `/dev/tty.*`) counts once. The selected pod then upgrades to its USB network
as with `usb`. `autodetect_port(name="")` takes the name.
- USB auto-detect ranks the new USB id `1209:0001` (firmware 3.9.0) with the older pod ids; a pod
- USB auto-detect ranks the pre-release 3.9.0 USB id `1209:0001` with the older pod ids; a pod
is still identified by probing its console.
- The console's text `status` parses the `usb` line into the JSON status's shape:
`{"net": "on"|"off", "link": bool, "ip": ..., "host_ip": ...}`.
Expand Down
4 changes: 2 additions & 2 deletions packages/embeddedci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ explicitly. The pytest plugin does **not** fall back to it (see [pytest plugin](
| `saved` | the default connection `benchpod-cli` saved (`benchpod set-connection`); errors when none is saved |

**USB network (firmware 3.9.0 and later).** The STM32 pod's USB port is a composite device
(USB id `1209:0001`; older firmware uses `0483:5740`): the console plus a USB network adapter
(ST's USB id `0483:5740`, as on older firmware; pre-release 3.9.0 builds used `1209:0001`): the console plus a USB network adapter
(CDC-NCM) that carries the same JSON API as the LAN. The link is a point-to-point `/30` in
`10.237.0.0/16` (the pod is the first address, your computer the second, handed out by the pod's
DHCP server). With connection `usb` the SDK first looks at this computer's own interfaces (Linux
Expand Down Expand Up @@ -229,7 +229,7 @@ console `status`), never from its own version:
| | Pod firmware before 3.9.0 | Pod firmware 3.9.0 and later |
|---|---|---|
| **This SDK (2.12.0+)** | As before: `usb` is the console (status, ping, LA voltage, target power); the rest needs the network or the cloud. Console auto-detect still finds `0483:5740` and `2E8A`. | `usb` is the full API over the USB network adapter when it is up. When USB networking is off (Wi-Fi configured) or down, it is the full API over the pod's Ethernet or Wi-Fi address from its console status, when this computer reaches it (logged as a warning; the pod's external LAN policy applies there; `transport.usb_lan_fallback` says why); else the console. |
| **An older SDK (2.11.x)** | Unchanged. | `usb` is the console: its auto-detect probes every USB serial port, so it finds a 3.9.0 pod under its new USB id `1209:0001` (tested). Status and ping work; LA voltage and target power, which 3.9.0 moved to the JSON API, fail with the pod's "moved to the network API ... update" line. A network address or `embeddedci:<name>` works fully. |
| **An older SDK (2.11.x)** | Unchanged. | `usb` is the console: its auto-detect probes every USB serial port, so it finds a 3.9.0 pod (same USB id `0483:5740`; tested). Status and ping work; LA voltage and target power, which 3.9.0 moved to the JSON API, fail with the pod's "moved to the network API ... update" line. A network address or `embeddedci:<name>` works fully. |

**Several pods on USB.** Auto-detect reads each pod's name (its identity short id, `baea06` for
`benchpod-baea06`) from the console's `identity` command. Connection `usb:<name>` opens the pod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@
from .base import RawLink, Transport

# USB vendor ids a bench-pod console enumerates under: 0x2E8A (Raspberry Pi,
# the RP2350 pod), 0x0483 (STMicroelectronics, the STM32H563 pod up to firmware
# 3.8, which uses ST's stock CDC VID/PID 0483:5740 so the host binds its in-box
# driver) and 0x1209 (the STM32H563 pod from firmware 3.9.0: a composite device
# with the CDC-ACM console plus a CDC-NCM network adapter, for now under the
# pid.codes test VID/PID 1209:0001).
# the RP2350 pod), 0x0483 (STMicroelectronics: the STM32H563 pod, which uses ST's
# stock CDC VID/PID 0483:5740 on every firmware, from 3.9.0 as a composite device
# with the CDC-ACM console plus a CDC-NCM network adapter) and 0x1209 (pre-release
# 3.9.0 builds, under the pid.codes test id 1209:0001).
#
# None of these ids is exclusive to a bench pod (0x2E8A is shared with the
# CMSIS-DAP probe's CDC, 0483:5740 with every ST Virtual COM Port on the bench
# and 1209:0001 is a shared test id), so they only ORDER the ports to probe.
# and 0x1209 is every pid.codes device), so they only ORDER the ports to probe.
# Identification is by probing for BENCHPOD_MARKER, never by vendor id alone.
POD_VIDS = (0x2E8A, 0x0483, 0x1209)
RP_VID = 0x2E8A # deprecated alias, kept for callers that imported it
Expand Down
3 changes: 2 additions & 1 deletion packages/embeddedci/tests/test_serial_autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def test_finds_stm32_pod_under_st_vendor_id(monkeypatch):


def test_pid_codes_vendor_id_ranks_as_a_pod_port(monkeypatch):
# Firmware 3.9.0 enumerates as 1209:0001 (console + USB network adapter). It ranks with the
# Pre-release 3.9.0 builds enumerated as 1209:0001 (console + USB network adapter); any
# pid.codes product id (VID 0x1209) ranks with the
# other pod vendor ids, ahead of an unknown port, but is still identified by probing.
infos = [PortInfo("/dev/cu.aaa-other", vid=0x1234), PortInfo("/dev/cu.zzz-pod", vid=0x1209)]
opened = install(monkeypatch, infos, {"/dev/cu.aaa-other": "not a pod\n> ",
Expand Down