MDS Automaton Command Line Interface
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 only enters 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
To see all the available commands, type:
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 . 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 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.
Most of the commands are available within the MDS app, but a few are used to trigger a new mode in the MDS Automaton from the macOS Terminal, SSH, or Apple Remote Desktop.
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 time zone. 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 Terminal, echo “dep” to the modem port:
echo dep >> /dev/cu.usbmodem*
If the MDS automaton is plugged into a Mac and in 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. This is usually used in combination with the reboot command. For example:
echo recovery >> /dev/cu.usbmodem* && reboot
Alternatively, if rebooting takes a long time and macOS will be reinstalled, the fast options for rebooting can be specified:
echo recovery >> /dev/cu.usbmodem* && reboot -n -q
By default, the MDS Automaton enters in the command line mode for the first 5 seconds after it powers on. To change this behavior and enter in command line mode indefinitely, use “set_autorun off”:
Use “set_autorun on” to have the Automaton behave normally again (though this is usually unnecessary as autorun is automatically set to on).