Methodology for setting up the minicom msvs program. Connecting to Cisco from Linux

The article discusses the simplest way connecting to a Cisco terminal from a Linux environment. Initially, you need to connect the console cable to the COM port of the machine with Linux OS installed and to the port console on Cisco. To connect to the Cisco console, you must install the minicom package. Installation varies depending on the distribution. IN in this example installation from Linux Debian is considered.

aptitude install minicom

Minicom is in the repositories of most distributions, so installing it should not cause any difficulties.

Setting up minicom

For minicom to work correctly with Cisco, it is necessary to perform its initial setup.

  1. Go to the Serial port setup and change the value of Speed/Parity/Bits (Bps/Par/Bits) to 9600.
  2. We change the serial port (Serial Device) to the port to which the Cisco equipment is connected. In this example, this is /dev/ttyS0 - the address of the COM1 port.

As a result, you need to get the following settings:

A - Serial Device: /dev/ttyS0
B - Lockfile Location: /var/lock
C - Callin Program:
D - Callout Program:
E - Bps/Par/Bits: 9600 8N1
F - Hardware Flow Control: Yes
G - Software Flow Control: No

We save the changed configuration as the default settings in the minicom main menu (Save setup as dfl), or as a configuration with specific name(Save setup as..).

Minicom - a program for using the serial port in UNIX-like operating systems(analogous to Hyper Terminal in Windows).
In this example, we will look at the operation of the minicom program with the Huawei E171 modem in the Ubuntu operating system.

First, let's insert the 3G modem into USB port computer and see if Ubuntu OS sees it by typing the command in the terminal:

We'll see everything USB devices, connected and recognized by the system.

Among them there should be a line similar to this:

Bus 002 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem

Now you need to find the modem itself in the /dev/ directory by typing the command in the terminal:

Among the many devices appeared:

ttyUSB0
ttyUSB1
ttyUSB2

This is a 3G modem

If the minicom program is not installed on the system, then you need to install it by typing the command in the terminal:

sudo apt-get install minicom

To work with a specific port, you need to configure the configuration file by typing the command in the terminal:

The minicom configuration environment will start


Moving through the menu using the arrow keys (up or down), to the item “Setting up the serial port”, select this item by pressing Enter. The serial port setup menu appears.


In the "Serial port" item you need to install the device /dev/ttyUSB0; to do this, press the A (Latin) key and change the device file name. After editing, press Enter twice.
We don't change anything else in the settings. Use the arrow keys (up or down) to go to “Save settings as dfl” and press Enter. Next, exit the minicom configuration environment by pressing Esc or selecting the Exit menu item and get into the minicom program itself to enter AT commands.


The "OK" message in the window indicates normal operation modem To verify this again, type AT and press Enter. The response should be "OK".
Now you can use AT commands to switch operating modes in Huawei and ZTE modems. These commands are given in the article AT commands for Huawei and ZTE modems.
To exit the minicom program you need to press Ctrl+A and then the Q key.

on two Linux hosts with a com port, let's see with the command

Add a user to the dialout group

user NameUser, from which we will

Usermod -g dialout NameUser

Let's check whether the user has been added to the group:

Id NameUser

We receive and send characters using the com port in the console

Let's open a terminal on the Linux host and, to wait for characters to be received on the com-port, type the command

Cat /dev/ttyS0

Let's send console symbols from another Linux host

Echo 1 > /dev/ttyS1

You should see in the console of the first host on com port ttyS0 the symbols that were sent from the second host via com port ttyS1

Checking whether the minicom package is installed

aptitude show minicom

If necessary we install

Sudo apt-get install minicom

Initial configuration of the minicom package

let's type (you need to configure as root, otherwise the configuration settings will not be saved)

Minicom -l -8 -c on -s

where are the keys:
l - ANSI Displays – Graphics
8 - Eight-bit input mode for Russian language
with on - Turn on color display
s - Launch the minicom configuration utility

Make the settings
Directories and files - Directory for receiving - Directory for sending
Serial port setup - Serial port (for example /dev/ttyS0) - Baud/parity/bits
Save the configuration - Save setting as dfl
Clicking Exit Minicom will take you back to the console

Launch minicom

with the parameters you just saved as default, type in the console:

Minicom -l -8 -c on

minicom Device /dev/ttyS is locked

After using minicom, an old lock-file remains, which prevents it from working normally
minicom -> Device /dev/ttyS0 is locked
Device /dev/ttyS0 is locked
To restore functionality, simply delete the lock file in the /var/tmp or /var/lock directory
Location Lock files is given
minicom -l -8 -c on -s -> Serial port setup -> B - Lock file location

knight with gun April 29, 2016 at 12:19 pm

USB setup ZTE mf180 modem for working in Ubuntu-based systems

  • *nix,
  • Linux setup

In this publication I want to talk about how to configure the ZTE mf180/190 modem for correct operation on systems based on Linux Ubuntu.

Recently, after switching to Lunux Mint 16, I encountered a problem connecting to the Internet via my 3g usb modem. Constant disconnections forced us to look for a solution. The valiant Google did not suggest anything in its entirety, I had to collect it in parts.

Let's start in order.

We will need Minicom - a program for using the serial port in UNIX-like operating systems. It is located in the repositories of most distributions, so installing it should not cause any difficulties.

Open a terminal and enter:

Sudo apt-get update sudo apt-get upgrade sudo apt-get install minicom https://site/sandbox/edit/93467/# sudo minicom -s
The program menu will appear in the terminal.
Select the settings item “Serial port settings”
And press the A key and bring it to the form:

/dev/ttyUSB1
Then press Enter. After saving the settings, be sure to select the “Exit” item to get into the minicom console, and enter:

Ati0
The result should be something like this:

Manufacturer: ZTE CORPORATE Model: MF190 Revision: BD_BLNKZMF190V1.0.0B01 IMEI: 12345678901234 +GCAP: +CGSM,+DS,+ES OK
We copy the command, be sure to the minicom console:

Echo -e "AT+ZCDRUN=E\r\n" > /dev/ttyUSB1

The answer will be:

Enter download mode result(0:FAIL 1:SUCCESS):1
Press CTRL+A, then Q, select “Yes”.

Setting up the modem using minicom is complete.

Then go to the connection settings, select the “mobile” tab and click the “add” button. A dialog box will open, in it we press the “forward” button, select the country (I chose Kazakhstan), then select the operator (in my case Beeline - and then I will give the settings specifically for “Beeline KZ” When requested tariff plan I selected the “other” option and indicated the access point internet.beeline.kz. Click the “forward” button, then “apply”. Then you need to specify the username and password (I have .beeline and beeline), click “save”.

At this point my modem was fully configured and operational, good luck with the setup.

Tags: 3g modem, linux mint 16, Minicom, K"Cell, ZTE MF 180

Configuration of various switches, routers and other equipment is usually done through a serial COM port (RS232). First you need to find and connect the computer and the switch with a suitable console cable (via a COM port or USB adapter) computer. In this article we will look at how to configure it in Linux OS.

Setup via minicom

First of all, you need to find the console settings in the documentation for the equipment. com port. To connect under Linux, you need to install the minicom program. Let's install from the package under Debian (ubuntu):

Aptitude install minicom

In order for minicom to see Cisco, it must be configured correctly, launch with the key:

Sudo minicom -s

Go to the Serial port setup and change the values ​​of Speed/Parity/Bits (Bps/Par/Bits) to 9600 8N1.

We change the serial port (Serial Device) to the port to which the equipment is connected and configure the Flow Control parameters. In this example, this is /dev/ttyS0 - the address of the COM1 port. When connected via a mini-usb connector, the port may be /dev/ttyACM0.

Help on commands can be obtained by pressing Ctrl+A then Z.

As a result we get standard settings for Cisco and HP procurve:

A - Serial Device: /dev/ttyS0 B - Lockfile Location: /var/lock C - Callin Program: D - Callout Program: E - Bps/Par/Bits: 9600 8N1 F - Hardware Flow Control: Yes G - Software Flow Control : No

We save the configuration as default settings in the minicom main menu (Save setup as dfl), or as a configuration with a specific name (Save setup as..).

To exit minicom, press Ctrl+A then Q.

Or with saved settings.

Minicom<имя_конфигурации>

And this is an example of settings for 3com(hp) 4210 and 4500 switches

A - Serial Device: /dev/ttyUSB0 B - Lockfile Location: /var/lock C - Callin Program: D - Callout Program: E - Bps/Par/Bits: 19200 8N1 F - Hardware Flow Control: No G - Software Flow Control : Yes

The /dev/ttyUSB0 device is usually used when connecting via a usb->com adapter. The speed of 19200 is sometimes 115200 used on 3COM (now HP) switches, and they do not understand any other speed. So before connecting, you need to carefully read in the documentation what speeds and flow control you need to set. However, sometimes the connection parameters are written directly on the device next to the console port.

Settings via the cu utility

You can connect to the console with the command

Chown uucp /dev/ttyUSB0 cu -s 115200 -l /dev/ttyUSB0

If you do not set chown rights to the device file, you may receive the following message:

/dev/ttyUSB1: Device busy

The main advantage of the cu utility is that it works equally well under Linux and under freebsd, only the names of the devices differ.

On freebsd it will look like this:

Chown uucp /dev/сuaa0 cu -s 115200 -l /dev/сuaa0

The only thing you need to do is select the correct device file where the device is connected.