Last Updated On November 05, 2019

The MDS Automaton has a command line interface for changing modes and viewing/changing settings. In order to use the command line interface, download a serial terminal. In this article, the serial terminal Serial is used, but any serial terminal with the same settings should work.

Setting up Serial

Download Serial and install on macOS. When Serial first launches, plug in the MDS Automaton and immediately press return to enter into command line mode. By default, the MDS Automaton can only enter command line mode for the first 5 seconds.

Once in command line mode, configure the settings for Serial by selecting Terminal->Settings…:

  • Baud Rate: 9600
  • Data Bits: 8
  • Parity: None
  • Stop Bits: 1
  • Return Key: CR+LF
  • Echo Types Characters : On

Entering Commands

To see all the available commands, type :

help

All the available commands will be printed as well as short description of how to use them

help: this message
show: show current settings
reset: reset settings to defaults
reboot: reboot the device
set_command <command> : set command to run in recovery.
set_firmware_password <password> : set firmware password to enter prior to booting to recovery.
set_startup_delay <seconds>: how many seconds to wait from booting in recovery to launching terminal.
set_pre_command_delay <seconds>: how many seconds to wait after launching terminal until typing command.
set_settings <json>: Provide all settings in JSON format.
get_settings: Get all settings in JSON format.
dep:<SSID>:<PASSWORD> Automatically configure DEP in setup assistant using provided SSID and PASSWORD for WiFi network.
recovery: provide keyboard commands to boot into recovery and run resources from external volume or remote disk image.
set_autorun <on|off>: automatically enter recovery mode after admin time.

Entering Command Line Mode

Command line mode can be entered in a number of different ways. When the MDS Automaton is first plugged in, it will enter command line mode for 5 seconds. If the autorun setting is on (by default), the MDS Automaton will start the recovery keyboard commands to enter the recovery partition and run a command in Terminal in the Recovery partition. Once this sequence is complete, the MDS Automaton will return back to command line mode. If the “recovery” or “dep” commands are given, those keyboard sequences will be entered and then the MDS Automaton will return to command line mode.

If the autorun setting is set to off, then the MDS Automaton will enter command line mode indefinitely once it is powered on.

Advanced Commands

Most of the commands are available within the MDS app, but a few are used to trigger new mode in the MDS Automaton from the macOS terminal, SSH, or Apple Remote Desktop.

dep

The “dep” command will immediately start sending the keyboard commands to accept the default settings for the Remote Management part of setup assistance. Specifically, it will accept the default keyboard and language, Remote Management, and timezone. In order to send the dep command, the MDS Automaton must be in command line mode. To send the dep command to the MDS automaton via ARD, ssh, or the macOS terminal, echo “dep” to the modem port:

echo dep >> /dev/cu.usbmodem*

recovery

If the MDS automaton is plugged into a mac and is command line mode (see above), the MDS Automaton will immediately begin sending the keyboard commands to boot into the recovery partition and run the specified commands in Terminal in the recovery partition. This is usually used in combination with the reboot command. For example:

sudo -s
echo recovery >> /dev/cu.usbmodem* && reboot

Alternatively, if rebooting takes a long time and macOS is going to be reinstalled, the fast options for rebooting can be specified:

sudo -s
echo recovery >> /dev/cu.usbmodem* && reboot -n -q

set_autorunĀ <on|off>

By default, the MDS Automaton enters in the command line mode for the first 5 seconds after power on. To change this behavior and enter in command line mode indefinitely, use the set_autorun to off:

set_autorun off