Difference between revisions of "Getting Started With Minicom"

From wiki.emacinc.com
Jump to: navigation, search
Line 1: Line 1:
{{todo| InProgress (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+)|Jeffrey Jung| project=OE 5.0,InProgress,JJ,MD }}
+
{{todo| Review (10.28.2015-16:36->JJ+);(11.2.2015-18:00->JJ+);(11.3.2015-14:25->JJ+)|Jeffrey Jung| project=OE 5.0,Review,JJ,MD}}
 
{{#seo:minicom
 
{{#seo:minicom
 
|title=Getting Started With Minicom
 
|title=Getting Started With Minicom
Line 6: Line 6:
 
|description=A guide to help customers connect to their devices with minicom
 
|description=A guide to help customers connect to their devices with minicom
 
}}
 
}}
 
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /****************************************  Page Description Text  ****************************************/ -->
 
<!-- /****************************************  Page Description Text  ****************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span>
 
<!-- <span style="background:#00FF00;color:#FF0000;font-size:300%">'''''Put the page description text here.'''''</span>
 
 
__TOC__
 
__TOC__
 
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /***************************************** Background Information ****************************************/ -->
 
<!-- /***************************************** Background Information ****************************************/ -->
Line 19: Line 16:
 
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 
{{:Templateimpl:bg | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 
<code>minicom</code> 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 <code>/etc/minicom/minirc.dfl</code>. 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.
 
<code>minicom</code> 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 <code>/etc/minicom/minirc.dfl</code>. 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.
 +
  
 
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages -->
 
<!-- Pulling a lot of this information from the LifeRay 'Using Minicom' and 'iPac-9x25 Getting Started' pages -->
Line 26: Line 24:
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 
{{:Templateimpl:geninfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
The use of <code>minicom</code> is required when connecting to and EMAC board for testing purposes. This pages sets out to provide general information about using <code>minicom</code> as well as a guide to demonstrate using it to connect with EMAC devices.
+
The use of <code>minicom</code> is required when connecting an EMAC board for testing purposes. This pages sets out to provide general information about using <code>minicom</code> to communicate between EMAC devices and your development PC.
  
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
Line 32: Line 30:
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 
{{:Templateimpl:using | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
<cl>1. If <code>minicom</code> has yet to be installed on your development Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package
+
<cl>1. If <code>minicom</code> has yet to be installed on your Linux machine, use <code>apt-get</code> to install the <code>minicom</code> package
 
{{clo|indent=1}}
 
{{clo|indent=1}}
 
{{clio|sudo apt-get install minicom|hostname=developerpc|username=user}}
 
{{clio|sudo apt-get install minicom|hostname=developerpc|username=user}}
Line 40: Line 38:
 
{{clo|indent=1}}
 
{{clo|indent=1}}
 
{{clio|sudo minicom -s|hostname=developerpc|username=user}}
 
{{clio|sudo minicom -s|hostname=developerpc|username=user}}
{{clos}}
+
{{clos}}<br />
 
+
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 <code>minicom</code> command with the options <code>-scon</code>. The <code>c</code> specifies the color display and <code>on</code> tells <code>minicom</code> to display the interface in color. <code>minicom</code> can be made to always run in color by modifying the <code>~/.bashrc</code> file and setting <code>minicom</code> to alias to <code>minicom -con</code> .
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the Enter key.<br/>[Screenshot?]
+
<br />
 
 
* To modify the different configurations, press the key corresponding to the setting. For example, press the 'A' key to modify the '''Serial Device'''. Press the 'Enter' key to save the parameters for the setting. The EMAC devices will require the '''Bps/Par/Bits''', and flow control settings. Set '''Bps/Par/Bits''' to 115200 baud, 8 data bits and no priority. Set both flow control settings to ''''No''''. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]
 
  
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 save the settings and to be be brought back to the configurations page
+
* The first thing that will need to be configured is the '''Serial port setup'''. Arrow down to the title and press the 'Enter' key.
 
+
<br />
* The next setting that needs to be configure is the '''Modem and dialing'''. Press the 'A" key and delete its content. Hit the 'Enter' key to save the setting as blank. Do this for B-K, and H. Hit the 'Esc' key when finished deleting the content of these settings. That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Exit from Minicom''' and press 'Enter'.
 
  
 +
* 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_Connections | Serial Connectoins]] page. <br /> [[File:Minicomserialport.png| Serial Port Setup for minicom]]
 +
<br />
 +
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.
 +
<br />
 +
* 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.
 +
* That's all the modifications that need to be done to get <code>minicom</code> set up. Arrow down to '''Save setup as dfl''' and press 'Enter'.
 +
If a message pops up saying "<code> cannot write to /etc/minicom/minirc.dfl</code>", you likely aren't running the command as root. Re-run the command with <code>sudo</code>.
 +
* Once you're able to save the configurations, arrow down to '''Exit from Minicom'''.
 
</cl>
 
</cl>
 
 
== Running Minicom ==
 
== Running Minicom ==
 
Now that everything is configured, let's make the connection to the device.
 
Now that everything is configured, let's make the connection to the device.
Line 58: Line 61:
 
{{clio|minicom -D /dev/ttyS10|hostname=developerpc|username=user}}
 
{{clio|minicom -D /dev/ttyS10|hostname=developerpc|username=user}}
 
{{clos}}
 
{{clos}}
Using the <code>-o</code> option will allow <code>minicom</code> to make the connection more quickly by not sending AT commands to initialize a modem.
+
If the path to the device is what you have configured in the <code>minicom</code> settings, you won't need to use the <code>-D /dev/ttyS10</code> arguments and options. <code>/dev/ttyS10</code> is just an example of a path to a serial port; your path may be different. Using the <code>-o</code> option will allow <code>minicom</code> to make the connection more quickly by not sending AT commands to initialize a modem.
 
+
* Log in with the appropriate username and password for the device. Log in information can be found at [[System_Log_In | here]].
* Log in to the device as the root user
+
You're now able to communicate to the device and use <code>minicom</code> in the same way as using the terminal for the device.
{{clo}}
 
{{clos}}
 
 
</cl>
 
</cl>
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*****************************************      Examples        *****************************************/ -->
 
<!-- /*****************************************      Examples        *****************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
{{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
+
<!-- Don't really need an example do we? It's rather straight forward -->
 
+
<!-- {{:Templateimpl:examples | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }} -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /******************************************    Conclusion      ******************************************/ -->
 
<!-- /******************************************    Conclusion      ******************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 
{{:Templateimpl:conclusion | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 +
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. 
  
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
Line 78: Line 80:
 
<!-- /*********************************************************************************************************/ -->
 
<!-- /*********************************************************************************************************/ -->
 
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 
{{:Templateimpl:moreinfo | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
*  
+
* [[System_Log_In | System Log In]]
 +
 
  
 
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
 
{{:Templateimpl:whatnext | initials=JJ | title=Getting Started With Minicom | desc=Description for SEO | project=OE 5.0 }}
*
+
* [[Serial_Connections | Serial Connections]]

Revision as of 14:36, 3 November 2015

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