Methods for configuring the Minicom MSVS program. Connect to Cisco from Linux

Setting up different switches, routers and other equipment is usually done through a serial COM port (RS232). At first, you need to find and connect the computer and switch to the appropriate cable cable (via COM port or USB adapter) computer. In this article, let's see how to set up in Linux OS.

Setting through minicom

First of all, you need to find in the documentation for the configuration of the port Console COM. To connect under Linux, you must install the Minicom program. Put from the package under Debian (Ubuntu):

Aptitude Install Minicom

To minicom saw Cisco it needs to be properly configured to start with the key:

Sudo Minicom -s.

We go into configuration of the serial port (Serial Port Setup) and change the values \u200b\u200bof 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 adjust the flow control parameters (Flow Control). In this example, this / dev / ttys0 is the address of the COM1 port. When connecting through the MINI-USB connector, the port may be as / dev / ttyacm0.

Help by commands can be found 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. No.

Keep the configuration as default settings in the Main Main Menu (Save Setup AS DFL) or as a configuration with specific title (Save Setup as ..).

To exit minicom, you must press Ctrl + a then Q.

Either with saved settings.

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

And this is an example of settings for a 3COM switch (HP) 4210 and 4500

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 device / dev / ttyusb0 is usually used when connected via USB-\u003e COM adapter. The speed of 19200 sometimes 115200 is used on 3COM switches (now HP) and any other speed they do not understand. So before connecting you need to carefully read in the documentation, what speeds and flow control should be set. However, sometimes the connection parameters are written directly on the device next to the console port.

Settings through the CU utility

You can connect to the Console team

CHOWN UUCP / DEV / TTYUSB0 CU -S 115200 -L / DEV / TTYUSB0

If you do not set chown rights to the device file, you can get a 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.

FreeBSD will work like this:

Chown UUCP / DEV / CUAA0 CU -S 115200 -L / Dev / Suaa0

The only one needs to select the device file correctly where the device is connected.

on two hostats Linux with a port, let's see the team

Add a user to the Dialout group

user NameUser.from which we will

UserMod -g Dialout NameUser

Check in Dapt Lie User to the group:

ID NameUser

We refer sending symbols using a comer port in the console

Open the terminal on the Linux host and to wait for the receipt of characters on the COM-PORT to type the command

CAT / DEV / TTYS0

Send from another host Linux symbols from the console

Echo 1\u003e / Dev / TtyS1

Must be seen in the first host console on the ttys0 compective symbols that were sent from the second host through the ttys1 com

Checking whether the minicom package is installed

Aptitude show minicom

If you need to install

Sudo Apt-Get Install Minicom

Initial configuration of the MINICOM configuration

i want (configure you need from root otherwise do not save configuration setting)

Minicom -l -8 -c on -s

where are the keys:
l - ANSI display - graphics
8 - octime input mode for Russian language
with ON - turn on color display
s - Run the MINICOM setup utility

Set up
Catalogs and Files - Directory for reception - Directory to send
Configuring Serial Port - Serial Port (For example / Dev / TTYS0) - Speed \u200b\u200b/ parity / bits
Save the configuration - Save Settings as DFL
Pressing output from Minicom, you will be back to the console

Running Minicom

with just saved parameters as default type in the console:

Minicom -L -8 -C ON

Minicom device / dev / ttys blocked

After using Minicom, the old lock-file remains, which does not allow working fine
minicom -\u003e Device / DEV / TTYS0 IS Locked
Device / dev / ttys0 blocked
To restore performance, it is enough to delete a lock file in the directory / var / tmp or / var / lock
Location LOCK files are set
minicom -L -8 -C On -S -\u003e Configuring Serial Port -\u003e B - Placing Lock File

Pupsen and Putsen 29 April 2016 at 12:19

Setting up USB. ZTE MF180 modem for operation in Ubuntu-based systems

  • * NIX,
  • Setting up Linux

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

Recently, by going to Lunux Mint 16, I encountered the problem of accessing the Internet through your 3G USB modem. Permanent communication breakdowns forced to look for a solution. Valorous Google did not suggest anything, I had to collect parts.

Let's start in order.

We will need Minicom - a program for using a serial port in UNIX-like operating systems. It is located in the repositories of most distributions, the poet of its installation should not cause any difficulty.

Open terminal and introduce:

Sudo Apt-Get Update Sudo Apt-Get Upgrade Sudo Apt-Get Install Minicomhttpps: // Site / Sandbox / Edit / 93467 / # Sudo Minicom -s
The program menu will appear in the terminal.
Select the settings item "Configure Serial Port"
And press the A key and cordon:

/ dev / ttyusb1
Then press ENTER. After saving the settings, select the "Exit" item to get into the Minicom console and enter:

ATI0.
The result should be as follows:

Manufacturer: ZTE Corporated Model: MF190 Revision: BD_BLNKZMF190V1.0.0B01 IMEI: 12345678901234 + GCAP: + CGSM, + DS, + ES OK
Copy the command, be sure to console Minicom:

ECHO -E "AT + ZCDRUN \u003d E \\ R \\ N"\u003e / dev / ttyusb1

The answer will be like this:

ENTER download Mode. Result (0: Fail 1: Success): 1
Press Ctrl + A, then q, choose "Yes."

Configuring a modem with minicom is finished.

Then go to the settings of the connections, select the Mobile tab of the click "Add" button. The dialog box opens, we click the "Forward" button in it (I chose Kazakhstan), then select the operator (in my case Beeline - and then I will give the settings for Beeline KZ when requested tariff plan I chose the "Other" point and pointed out the Internet.Beeline.kz access point. Click the "forward" button, then "apply". Then you need to specify the username and password (I have .Beeline and Beeline), click "Save".

On this, my modem was fully configured and operational, good luck in the setup.

Tags: 3G modem, linux Mint. 16, Minicom, K "Cell, ZTE MF 180

Run "minicom -s" and select the "Serial Port Setup" menu item.

The first is the "Serial Device" item is the most important setting: your modem is swinging to a serial device. (Who wants to force Minicom to work with multiple serial devices at the same time?) Press RETURN to confirm and ESC to exit the initial settings menu. Select "Exit to Minicom" and type "ATDT99999". Your modem will immediately start typing the number and you will hear a click when the modem lifts the handset. Of course, "99999" is a non-existent number.

2.2 Run PPP manually

You may have tried to call your provider instead of "99999" by phone. Have you seen random characters on the screen after registration (if not, type "PPP")? They suggest that the "PPPD" (or its equivalent) is launched on the other end of the line. If so, then you can try to run the "PPPD" daemon and subsequently assess the contents of log files.

To start "PPPD" inside Minicom, you can define a new download method "Upload" (that is, from you) or override the "Kermit Programm" setting from the "FileName and Paths" configuration menu:

A - Download Directory: B - Upload Directory: C - Script Directory: D - Script Program: / USR / BIN / Runscript E - Kermit Program: / USR / SBIN / PPPD File / ETC / PPP / MINI_Options
Now, if you saw these random characters, with the next time you call your provider, you can click Alt-K to run "pppd".

The remaining part of this mini-howto is devoted to the issues of logging and running "PPPD".

2.3 Logging

Although I'm not going to explain how the PPP is configured, I will briefly describe how to read logs. To allocate significant information from the log "/ Var / Log / Debug" (or "/var/log/daemon.log") Commands

Tail -n 40 / var / log / debug | \\ grep -e "pppd \\ [* \\]:" | \\ Sed -e "s / s / s / rcvd
Which show that we sent a request to install the maximum size of the host block (MRU) to the value of 296. The other side rejected this setting ("Configuration Rejected"). In this case, I only deleted the "MRU" option from the "/ etc / ppp / options" file (see below).

2.4 Setting up phone numbers

If the actions were successful, you may want to save telephone number In the minicim database "a. Press Alt-D to call the call menu and use the cursor keys to select" Edit ":

A - Name: Xeno B - Number: 022039697303 C - Dial String #: 1 D - Local Echo: No E - Script: /etc/ppp/login.script F - UserName: PPP-382 G - Password: TOP-SECRET H - Terminal Emulation: VT102 I - Backspace Key Sends: Delete J - LineWrap: Off K - Line Settings: Curr 8N1
This is an example of an entry for one of my providers. The "/etc/ppp/login.script" script is shown below. In this scenario there are two special variables: $ (login) and $ (PASS), which set the values \u200b\u200bof the username (F) and password (G). This feature attaches minicom "with some flexibility, because you only need one script to automatically connect to several providers.

2.5 registration scenario

"Minicom" launches the registration script (login-script) after it takes the "Connect" string. To be accurate, "Minicom" does not execute the script itself, and calls the "RunScript" utility for this as a child process.

Below is an example, which I use for my provider.

# V1.0, 20.08.96 WinFried Tremper Print "" Print "automatic registration via /etc/ppp/login.script" ## Unlock if you need to click To ## Get the #Send invitation string "" Expect ("Ogin:" Ogin\u003e "" Sername: "" Sername\u003e "" No Carrier "Exit 1) Send" $ (login) "Expect (" Assword: "" Assword\u003e "Timeout 20) Send" $ (pass) "expect (" port "send" ppp "" start your ppp now "")!}" timeout 10 } print "" print "Сейчас переключаемся в ppp-режим..." print "" ! /usr/sbin/pppd file /etc/ppp/mini_options print "" print "команда killall -TERM pppd прекращает работу pppd" !}

To start "PPPD", the "RunScript" is used to cause external programs. Copy your own Options file for PPP in "/etc/ppp/options.ttys1" (here you can replace "TTYS1" to the device to which your modem is connected) and delete all rows from / etc / ppp / options, which belong to Your modem (like "Connect", "Crtscts" or "Modem"). Insert the options that are specific to PPP connections via Minicom in "/ etc / ppp / mini_options". One of these options will be

DISCONNECT "CHAT" "" \\ D \\ D +++ \\ D \\ Dath \\ R \\ C ""
This option must be, since "PPPD" reads the data through the standard input stream and cannot force the modem to throw the tube via "CRTSCTS".

2.6 Automatic Dial at Startup

To call at a specific number when you start Minicom, use the "-D" option. You can also try

To transfer Minicom to another console (see Consoles-Many Mini-Howto).

2.7 Future extensions

Since "PPPD" - a demon, it is not intended for interactive communication with a user or observation. This is true. And after all this we use Unixes ...

Canonical decision behind. Have volunteers hack minicom? Desired extensions such:

  • automatic creation of a registration script for a sequence of actions produced by user when manually establishing a connection
  • automatic valuation of logs with adjustment options
  • allocation of messages like those mentioned in pp.2.3.
Next

The article is considered the simplest way Connections to the Cisco Terminal from Linux medium. Initially, you need to connect the console cable to the COM port of the machine, with the Linux installed OS and the port console on Cisco. To connect to the Cisco console, you must install the Minicom package. Installation is different depending on the distribution. This example adds installation from Linux Debian.

aptitude Install Minicom

Minicom is located in the repositories of most distributions, the poet of its installation should not cause any difficulty.

Setting Minicom

For the proper operation of Minicom with Cisco, it is necessary to produce its initial setting.

  1. We go into configuration of the serial port (Serial Port Setup) and change the value speed / parity / bits (BPS / PAR / BITS) by 9600.
  2. We change the serial port (Serial Device) to the port to which Cisco equipment is connected. In this example, this / dev / ttys0 is 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 modified configuration as default settings in the Mainicom main menu, or as a configuration with a specific name (Save Setup as ..).