-l,--list
Print list of all connected sd-mux devices and exit. It takes optional --vendor--product arguments
that allow one to use other VENDOR and PRODUCT IDs then the default ones. The default value is
0x04e8:6001 which belongs to SAMSUNG Electronics Company. VENDOR and PRODUCT IDs are used to discover
all connected sd-mux devices. This is very important in post production (sd-mux device) phase, before
first use.
-i,--info
Print detailed information about selected device (--device-serial). Sample output of this command:
VID: 0x04e8
PID: 0x6001
Release: 0x0600
Bus Powered: 90 mA
Manufacturer: SRPOL
Product: sd-mux
Serial: odroid_u3_1
Checksum : ea57
Internal EEPROM
PNP: 1
Channel A has Mode UART VCP
C0 Function: TXLED
C1 Function: RXLED
C2 Function: TXDEN
C3 Function: PWREN
C4 Function: SLEEP
Shape of this output depends on libftdi library so may change along with library changes.
-u,--status
Print current state of selected device. Example command with output:
$ sd-mux-ctrl--status--device-serialodroid_u3_1USBconnectedto:DUTSDconnectedto:DUT
$
Or:
$ sd-mux-ctrl--status--device-serialodroid_u3_1Devicenotinitialized!
$
when the device is not initialized after connecting to a host.
-o,--show-serial
Print serial number of selected device. Use --device-id to select wanted device. This command outputs
only serial number, without end of line. This command is useful actually only for scripts. Example
command with output:
[sd-mux-ctrl-0.0.1]$ sudosd-mux-ctrl--device-id=0--show-serialminnow_max_1[sd-mux-ctrl-0.0.1]$
-r,--set-serial
Set serial number of selected device. Use --device-id or --device-serial to select wanted device.
Following example changes device's serial number from AL018T40 to odroid_u3_1 :
[rpm]$ sudosd-mux-ctrl--device-serial=AL018T40--vendor=0x403--set-serial=odroid_u3_1--set-serial command does actually a little bit more than setting a serial number. It also writes new
values of VENDOR ID, Product and Manufacturer. VENDORID(VID) is set to 0x04e8 (SAMSUNG Electronics
Company), Product is set to sd-mux and Manufacturer is set to SRPOL which is a short name of Samsung
R&D Poland.
-t,--init
Set connected device into well defined state. After powering up, sd-mux device is in random state. SD
card and USB may be connected either to DUT or TS. SD card and USB are not tied together so one of them
may be connected to DUT and the other one may be connected to TS. All combinations are possible. The
most important thing here is power steering. As we use bistable, two-coil relay we have to make sure
that in stable state both coils are disconnected from power. Unfortunately after connecting sd-mux to
USB host, state of power control lines is unknown so we have to set them into correct one. Init
command powers off DUT and connects USB and SD card to TS. Example:
[rpm]$ sudosd-mux-ctrl--device-serial=odroid_u3_1--init-d,--dut
Connect USB port and SD card to a DUT (Device Under Test) and power it on. After executing this
command the DUT should start and load image from SD card mounted in the sd-mux device.
Note that some devices won't (re)start after execution of this command. This is caused by SD
multiplexer chip. When SD is connected to TS then it is actually connected to USB SD card reader. The
reader powers up SD card and some part of the voltage is transmitted to the DUT through SD mux chip.
To force restart one must invoke --tick command after --dut is executed. Odroid U3 is an example of
device with such behavior.
$ sudosd-mux-ctrl--device-serial=odroid_u3_1--dut
$ sudosd-mux-ctrl--device-serial=odroid_u3_1--tick-s,--ts
Connect USB port and SD card to a TS (Test Server) and powers off the DUT (Device Under Test). After
executing this command SD card is connected to SD card reader at the TS side.
$ sudosd-mux-ctrl--device-serial=odroid_u3_1--ts-p,--pins
Set FTDI chip (FT245RL) pins to given state. --pins takes 8 bit word as an argument and optional
--invert argument inverts all bits in the given word. This value, after optional inverting, is written
to FT245RL D0-D7 pins.
$ sudosd-mux-ctrl--device-serial=odroid_u3_1--pins=0x69--invert-c,--tick
Disconnect power from the Device Under Test and reconnect again after 1000 ms. If --tick-time is used,
then 1000ms is replaced with number of milliseconds given in --tick-time argument.
$ sudosd-mux-ctrl--device-serial=odroid_u3_1--tick--tick-time=2000-y,--dyper1
Disconnect or connect terminals of dynamic jumper. Argument "on" connects and "off" disconnects the
terminals.
$ sudosd-mux-ctrl--device-serial=odroid_u3_1--dyper1on-z,--dyper2
Disconnect or connect terminals of dynamic jumper. Argument "on" connects and "off" disconnects the
terminals.
$ sudosd-mux-ctrl--device-serial=odroid_u3_1--dyper2on