In VMWare, Linux uses MINICOM to implement communication with the R & D board.
Source: Internet
Author: User
In VMWare, Linux uses MINICOM to implement communication with the R & D board-Linux general technology-Linux programming and kernel information. The following is a detailed description. MINICOM is a tool provided by LINUX and the same as WEINDOWS ultimate terminal. It is generally used for serial port communication and R & D board communication. Of course, some boards also use USB, but only the serial port configuration is described here.
1. Add a serial port to a vmwarevm (skip this step if the VM is useless)
If you are using a vmwarevm, make sure that you confirm this step first. If this step is not good, you will be able to make a lot of friends here!
First shut down LINUX under the virtual machine, and then configure the Virtual Machine: add the serial port COM1 COM2 to the vm-> settings-> hardware.
Ii. Configure MINICOM
Enter minicom in a console character in LINUX to start
In this case, you need to configure
Ctrl + A enter the control interface (Esc return) and press Z for configuration
Generally, two
1. Configure the third and fourth items by O (Note: O is not zero), including serial port configuration and MODEM configuration.
Serial Port Configuration: Needless to say, I can see that I have typed a letter to configure the corresponding project, such as "115200 8-N-1"
MODEM configuration: configure the MODEM. Otherwise, clear the above two options and press the letter (like 'A' and what) in front of the line. Then, the cursor jumps over and deletes it.
Press enter to start selecting the third and fourth items and choose Save below.
2. Go back to the O interface and check whether the serial port configuration in P is correct.
No need to change.
Note: The number of a LINUX device starts from 0, for example, Serial Port 1, or COM1. in LINUX, the device number is ttyS0.
Add all paths to the serial port configuration, that is, "/dev/ttyS0"
The main problems in this experiment are:
1. The serial port is not added to the VM when you try the vmwarevm. Therefore, minicom under the Linux VM cannot identify the serial port connected to the host. Solution: As shown in the preceding figure, a serial port is added to VMware to access the serial port device through a virtual machine.
2. The "ultimate terminal" in windows was not disabled at startup. Therefore, after the virtual machine is started, "com1" cannot work properly, shut down the "ultimate terminal" in Windows, and then restart the virtual machine. From now on, the Linux virtual machine is able to smoothly connect to the serial port.
In order to use minicom in the virtual machine to communicate with the R & D board, some configuration is required.
VMWare5.5 + Redhat9
VMWare Configuration
The method for adding a file is as follows:
Select Edit virtual machine settings before starting the VM. In the pop-up dialog box, you will find an Add... Click this button to add a serial device.
First, an Add Hardware Wizard will be displayed. Select the Serial Port of the Serial device according to this Wizard. Remember to use the actual physical device and connect it to the power-on device, these configurations can be used after confirmation.
Note: sometimes some friends will find that your serial port COM is not available when you open Linux. Check whether your serial port is also not occupied by other devices or software, for example, the ultimate terminal (to turn it off), of course, you must configure the serial port correctly. Instead of making a serial port, you have chosen a low-level error such as COM2. Okay, next we will configure minicom in Linux. We should be able to smoothly enter the Linux system. The steps below are also very simple. Let's proceed step by step.
Linux minicom Configuration
Method 1:
In redhat9, there is no minirc. dfl under/etc by default.
Therefore, add the following content after vi/etc/minirc. dfl:
Pr port/dev/ttyS0
Pu baudrate 115200
Pu minit
Pu mreset
Pu rtscts No
After saving and exiting, you can run minicom as the root user. After Entering minicom in the command line, you can enable the R & D board switch. Welcome to minicom 2.00.0
OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Jan 25 2003, 00:15:18.
Press CTRL-A Z for help on special keys
Boot 1.0 (Jan 6 2005-17:48:32)
Uncompressing image...
U-Boot 0.3.2 (Jan 12 2005-14:51:54)
U-Boot code: 21F00000-> 21F12DF4 BSS:-> 21F16924
DRAM Configuration:
Bank #0: 20000000 32 MB
Intel FLash
Id = 0x18 ..........
Intel FLash1
Flash: 32 MB
......
Yes.
Method 2:
This method seems a little more troublesome. In fact, as long as you have a little Command Option for minicom, It is not troublesome! It seems much easier than the first method. I tried it only after I knew the Command Options of minicom. The procedure is as follows:
Enter the command "minicom?" as the root user on the terminal? S
You will find some warning information on the screen, which means it is difficult to find the default configuration document and leave it alone. Then, it will show a configuration menu option, as shown below:
Filenames and paths
File transfer protocols
Serial port setup
Modem and dialing
Screen and keyboard
Save setup as dfl
Save setup ..
Exit
Exit from Minicom
After Serial port setup is selected, the Serial port configuration menu is displayed, as shown below:
Press A to change ttyS1 to ttyS0, because my machine has only one serial port COM1. If you use other configurations. Press E and set Bps/Par/Bits to 115200 8N1. I think the general R & D board should be configured like this. Then press F to change Yes to No and exit.
The result before exiting should be as follows:
A-Serial Device:/dev/ttyS0
B-Lockfile Location:/var/lock
C-Callin Program:
D-Callout Program:
E-Bps/Par/Bits: 115200 8N1
F-Hardware Flow Control: No
G-Software Flow Control: No
Change which setting?
After exiting, select Save setup as dfl and Save it as the default read configuration document.
Filenames and paths
File transfer protocols
Serial port setup
Modem and dialing
Screen and keyboard
Save setup as dfl
Save setup ..
Exit
Exit from Minicom
Finally, exit the configuration menu to use minicom to communicate with the R & D board.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.