• 1x USB B
  • 2x USB A
  • 1x SD card
  • 1x SD-DUT adapter
  • 2x Power supply terminal
    • 5V up to 2A
    • 3.3V up to 2A
  • 8x GPIO
  • 1x UART
  • 2x DUT reset
  • 1x I2C

MuxBox is powerful device aimed at developers for rapid prototyping and test automation. The most important feature it offers is dynamic multiplexing USB and MMC interfaces between PC, device under development and other devices (e.g. memory card).

Thanks to this developer can plug MuxBox into PC, insert SD card into MuxBox, connect device's SD card slot with MuxBox with provided cable and then dynamically change SD card connection between PC and device under development. This removes the hassle of plugging in/out SD card from PC and device. Similar setup applies to the USB interface.

Moreover MuxBox has more interfaces which can be also used during automatic testing/flashing device. To start using all MuxBox features you need only connect one USB cable to your PC.

Following block diagram shows what interfaces MuxBox offers and typical setup for SD card and USB multiplexing.

For convenient usage we provide python software package which allows to easily control MuxBox. With simple command line interface you can use MuxBox in CI workflow or for faster daily development.


Controlling interfaces

SD card

USB-SD mux allows to plug in micro SD card and share it between host and DUT. There are 3 high-level operations supported:

  • disconnect micro SD card from host and DUT:
  $ gmux sd off
  • connect micro SD card to host:
  $ gmux sd host
  • connect micro SD card to DUT:
  $ gmux sd dut


USB-USB mux allows to plug in USB device (e.g. pendrive) to SLAVE interface and share it between host and DUT. Additionally it is possible to have direct connection between host and DUT, in which case DUT should behave as USB Device (e.g. via MTP, adb, fastboot, dfu). Supported operations are:

  • disable USB power from DUT and SLAVE interfaces
  $ gmux usb off
  • enable connection between host and SLAVE
  $ gmux usb pc-slave
  • enable connection between host and DUT
  $ gmux usb pc-dut
  • enable connection between DUT and SLAVE
  $ gmux usb slave-dut


For resetting DUT:

  $ gmux reset

For resetting MuxBox:

  $ gmux reset-hub

Using MuxBox during development

Sometimes device we develop does not support booting from net and only can be booted from SD card. To remove necessity of juggling SD card back and forth from PC to device we can use MuxBox in configuration shown above. With this setup when we compile new version of firmware all we have to do to test it is running following commands without the need to plug/unplug cables or reinserting SD card:

  $ gmux sd host
  $ dd if=new_firmware.img of=/dev/sdX bs=1M
  $ gmux sd dut
  $ gmux reset

Using MuxBox in CI workflow

Following example shows how one can incorporate MuxBox during running automatic tests on device.

Diagram above shows physical setup of a testing rig for a liteSOM. MuxBox is connected to PC via USB cable, SD card is present in MuxBox and device under test is connected to MuxBox with cable provided for MMC interface, UART cable and reset cable hooked up to reset pin of the device.

Flow chart above shows typical CI workflow incorporating previously shown MuxBox setup for running automatic tests on physical device. Those tests can check not only if developed code (application, kernel module, etc.) is compiling without problems, but also if there are no runtime errors.

  • devices/muxbox.txt
  • Last modified: 2019/03/01 13:57
  • by m.sloniewski