Skip to main content
FW version: Stable

term basics I : Hands-on

this tutorial shows how to begin with the term tool: starting a session, logging in, using keyboard shortcuts and exiting.

info
  • Let's presume that a successful comlink with the device was already established (the device is connected, connection options were set, the driver was installed, etc.)
  • Let's presume that you have an experience with a CLI environment.
tip
  • For more information, check the term manual page.
  • The term tool provides an interface to the device's CLI. That is different from your operating system's CLI (Windows CMD, where e.g. the term can be invoked from). Do not mix the two environments.
  • You may type term -? to display the embedded manual.

Starting a session

Usually, the first thing to do after starting the term, is to hit enter. In the picture below, the term first initializes itself and then prompts you to do so. Once the YOS/Shell receives the <CR> character, it binds with the host and initializes the session, which can be seen as a burst of initialization text coming out from the device. Therefore, hitting enter is a useful way how to probe that your device is responding. If your device is there, you should see the prompt (on the last line) as a response to your hit:

term

Logging in

When starting the session for the first time, the device prompts you to log in. There are two ways to do so:

  • You may enter the credentials manually. For exp. use the default guest as the username and guest as the password. These will give you the default access level. Or you may give custom credentials provided by siliXcon for your application to gain deeper access.
  • You may also log in automatically by pressing ctrl+a. The term uses the credentials provided through options (usually, these are predefined with LaunchPad) and the external auth tool to make automatic log-in. In that way, more advanced (i.e. floating token authentication) is supported. If no credentials are given, the default access level is granted.
tip
  • With the manual approach, you may also give a single sentence in the form of username:password.
  • If you want to log in again (for exp. as a different user), you may simply repeat the automated log-in with a keyboard shortcut. For the manual approach, you have to log out first with the logout command.

The automatic log-int with ctrl+a will look like this. From now on, you have the access to device through its CLI:

term

Keyboard shortcuts

Among others, let's dive into a few of the most useful keyboard shortcuts. You may use them all the time (even when not logged in):

  • ctrl+a will initiate the automatic log-in (see above).
  • ctrl+r will reboot your device. You have to repeat the log-in process, obviously.
  • ctrl+x will reboot your device and all other devices in the same mesh. You have to repeat the log-in process, obviously.
  • ctrl+c will terminate a running script (if any).

Worth mentioning is that you can start other tools directly (without having to navigate e.g. back to LaunchPad):

  • ctrl+s to run the scope
  • ctrl+g to run the emgui
  • ctrl+l to run the srm bootloader

Rebooting through ctrl+x will generate a text output that looks like this. On the top, you can see messages from the USB driver about losing the device first and then re-establishing the connection. On the bottom, after the enter was pressed, a new session header is printed out by the rebooted device:

term

warning

Rebooting a device that is actively engaged in the control loop may be dangerous. For example, interrupting the motor control during active field-weakening may result in device destruction, as the high-DC voltage induced from the back-EMF may damage the MOSFETs, even the battery and other appliances.

Quitting

Simply hitting ESC will exit the tool. Catching the \27 character from the device also kills the term.