Skip to main content

SD Wire Driver

jumpstarter-driver-sdwire provides functionality for using the SDWire storage multiplexer. This device multiplexes an SD card between the DUT and the exporter host.

Installation

:substitutions:
$ pip3 install --extra-index-url {{index_url}} jumpstarter-driver-sdwire

Configuration

Example configuration:

:language: yaml
:hide:
>>> from jumpstarter.config.exporter import ExporterConfigV1Alpha1DriverInstance
>>> ExporterConfigV1Alpha1DriverInstance.from_path("source/reference/package-apis/drivers/sdwire.yaml").instantiate() # doctest: +ELLIPSIS
Traceback (most recent call last):
...
FileNotFoundError: failed to find sd-wire device...

Unprogrammed (factory-default) SD Wire devices

SD Wires are normally initialized with sd-mux-ctrl --init, which rewrites the FTDI FT200X EEPROM to the Samsung VID/PID (0x04E8/0x6001, product sd-wire) and configures the FT200X's CBUS0 pin as a GPIO so the mux can be switched.

A device that still has the factory-default FTDI EEPROM (0x0403/0x6015) is also supported, but with two requirements:

  1. A serial must be configured. A bare FT200X has no reliable runtime signature that distinguishes an SD Wire from any other FT200X, so the driver will only bind one when you pin it by serial number.

  2. CBUS0 must be set to GPIO in the EEPROM (one-time fix). This is the critical prerequisite:

    The FT200X's CBUS bitbang mode (used to switch the mux) requires CBUS0 to be configured as GPIO/IOMODE in the EEPROM. On an unprogrammed FT200X CBUS0 defaults to a fixed function (e.g. TXLED) and completely ignores bitbang commands — the green LED never lights and the mux never switches to DUT.

    The driver does not reprogram the EEPROM; it only sends the runtime bitbang command and assumes CBUS0 is already a GPIO. Perform this one-time fix first (it preserves the original VID/PID and only changes CBUS0):

    from pyftdi.eeprom import FtdiEeprom
    
    e = FtdiEeprom()
    e.open("ftdi://0x0403:0x6015/1")
    e.set_property("cbus_func_0", "GPIO")   # FT200X uses 'GPIO', not 'IOMODE'
    e.commit(dry_run=False)
    

    After flashing, unplug and replug the SD Wire USB cable. If you run the driver against an unprogrammed device that has not had this fix applied, the device is found but host()/dut() silently fail to move the mux.

macOS notes

On macOS (Darwin) the driver does extra work that is unnecessary on Linux:

  • dut() ejects the card before switching. The mux only switches when the SD bus is fully idle; while macOS holds the SMSC reader open it keeps polling the card. The driver runs diskutil eject (SCSI STOP UNIT) first. If the disk cannot be determined, dut() aborts rather than risk corrupting a mounted volume.
  • Power on the DUT immediately after dut() (< ~500 ms). The mux has a protection circuit that reverts to HOST if it sees no SD activity on the DUT side shortly after switching.
  • host() power-cycles the reader's hub port. Because the prior eject leaves the SMSC reader stopped, host() routes the card back and then power-cycles port 1 of this SD Wire's internal hub to force a clean re-enumeration (correlated by USB topology so other attached SD Wires are not disturbed).
  • Storage discovery uses system_profiler (pyudev is Linux-only) and may take a moment to re-enumerate after a switch, so reads/writes retry discovery up to storage_timeout.

API Reference

The SDWire driver implements the StorageMuxClient class, which is a generic storage class.

.. autoclass:: jumpstarter_driver_opendal.client.StorageMuxClient()
    :members:

Release files for jumpstarter-driver-sdwire 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jumpstarter-driver-sdwire 0.9.0
File Size Uploaded
jumpstarter_driver_sdwire-0.9.0.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jumpstarter-driver-sdwire 0.9.0
File Interpreter ABI Platform
jumpstarter_driver_sdwire-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / jumpstarter_driver_sdwire-0.9.0.tar.gz

Download URL jumpstarter_driver_sdwire-0.9.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
918b6c7f483d9a06a2e59f44138b57db4f2428142b88c3d774b06227be41280d
BLAKE2b-256 checksum
How to use checksums
e6a60b8bd34cf4932684a61d50327ac445cb9bf2429946834554c628a73176ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / jumpstarter_driver_sdwire-0.9.0-py3-none-any.whl

Download URL jumpstarter_driver_sdwire-0.9.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec8d39790639b14252d8886f75f603530d4abe9844837ee04090a0a035aac1ad
BLAKE2b-256 checksum
How to use checksums
ebd6b2c598b7145c403c331a08af7ea23f1f6afba5c27e1667f95bd7f49b8dbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.1

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page