Getting Started With Minicom

From wiki.emacinc.com
Revision as of 14:36, 3 November 2015 by Jjung (talk | contribs)
Jump to: navigation, search
TODO: {{#todo: Review (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+);(11.3.2015-14:25->JJ+)|Jeffrey Jung|OE 5.0,Review,JJ,MD}}

Background

minicom is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in /etc/minicom/minirc.dfl. For those using a Windows, PuTTY is a great application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at http://wiki.emacinc.com/wiki/PuTTY.


General Information

The use of minicom is required when connecting an EMAC board for testing purposes. This pages sets out to provide general information about using minicom to communicate between EMAC devices and your development PC.

Getting Started With Minicom

  1. If minicom has yet to be installed on your Linux machine, use apt-get to install the minicom package

    user@developerpc:~# sudo apt-get install minicom
  2. The minicom settings will need to be changed so that the application will be able to find your device. Pull up the settings using the -s option.

    user@developerpc:~# sudo minicom -s

    This should bring up a colorful display listing the different settings. If the display isn't colored, arrow down to Exit from Minicom. Run the minicom command with the options -scon. The c specifies the color display and on tells minicom to display the interface in color. minicom can be made to always run in color by modifying the ~/.bashrc file and setting minicom to alias to minicom -con .

  3. The first thing that will need to be configured is the Serial port setup. Arrow down to the title and press the 'Enter' key.

  4. To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the path to the Serial Device. Press the 'Enter' key to save the parameters for the setting. The settings for specific EMAC devices can be found at the Serial Connectoins page.
    Serial Port Setup for minicom
    In this screenshot, the "115200 8N1" for the Bps/Par/Bits setting indicates the baud rate is set to 115200, data bits set to 8 (the '8' in 8N1), parity is set to none (the 'N' in 8N1), and stop bits is set to 1 (the '1' in 8N1). If you're likely to use the same serial port when connecting to your device with minicom, modify the Serial Device setting to have the path to the port. This way, you'll be able to run the command without any options or commands. Press the 'Esc' key to be be brought back to the configurations page.

  5. The next setting that needs to be configured is the Modem and dialing. Press the 'A' key and delete its content. Hit the 'Enter' key to set the setting as blank. Do this for B-K, and H. Hit the 'Esc' key when finished deleting the content of these settings.

  6. That's all the modifications that need to be done to get minicom set up. Arrow down to Save setup as dfl and press 'Enter'. If a message pops up saying " cannot write to /etc/minicom/minirc.dfl", you likely aren't running the command as root. Re-run the command with sudo.

  7. Once you're able to save the configurations, arrow down to Exit from Minicom.

Running Minicom

Now that everything is configured, let's make the connection to the device.

  1. Run the minicom command with the option -D and the path to the device as an argument.

    user@developerpc:~# minicom -D /dev/ttyS10

    If the path to the device is what you have configured in the minicom settings, you won't need to use the -D /dev/ttyS10 arguments and options. /dev/ttyS10 is just an example of a path to a serial port; your path may be different. Using the -o option will allow minicom to make the connection more quickly by not sending AT commands to initialize a modem.

  2. Log in with the appropriate username and password for the device. Log in information can be found at here. You're now able to communicate to the device and use minicom in the same way as using the terminal for the device.

Conclusion

This program is a very powerful tool for developers. While functioning largely as a terminal for the connected device, it also can be be used to view important output form other system functions like when the system starts up or reboots.

Further Information

Where to Go Next


Pages with Related Content