This problem has recently plagued me for a long time, and finally realized that the problem lies in the virtual machine. It seems that I can communicate with my teachers and students and search for materials online.
It is important to solve some difficult technical problems. The following is a reprinted description of the lessons learned:
Minicom is a tool provided by Linux and the same as weindows Super Terminal. It is generally used for serial port communication with the Development Board. Of course, some boards also use USB, but only the serial port settings are described here.
1. Add a serial port to a vmwarevm (skip this step if no virtual machine is used)
If you are using a vmwarevm, make sure you confirm this step first. If you do not want to make it difficult for a lot of friends, you will be here!
First shut down Linux under the virtual machine, and then set the Virtual Machine: add the serial port COM1 com2 to the VM-> Settings-> hardware.
Ii. Set minicom
Enter minicom in a console character in Linux to start
In this case, you need to set
CTRL + A enter the control interface (ESC return) and press Z to set
Generally, set two
1. Set the third and fourth items by O (Note: O is not zero), which are the serial port settings and modem settings respectively.
Serial Port Settings: Needless to say, you can see that you have set the corresponding project by typing letters, such as "115200 8-n-1"
Modem setting: you also need to set whether or not you can see the above two options to be cleared, that is, press the letter in front of the line (like 'A' and what), then the cursor jumps over and deletes it.
Press enter to start selecting the third and fourth items and choose Save below (Don't forget to save the common mistakes of cainiao)
2. Go back to the O interface and check if the serial port settings in P are 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 settings, that is, "/dev/ttys0"
That's easy.
During this experiment, the main problems were:
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 "Super Terminal" in Windows was not disabled at startup. Therefore, after the virtual machine is started, "COM1" cannot work properly, shut down the "Super Terminal" in windows, and then restart the virtual machine. Now, 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 Development Board, some settings are required.
Vmware5.5 + redhat9
VMware settings
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 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 settings can be used after confirmation.
Note: sometimes some friends will find that your serial port COM is not available when you open Linux, so you should check whether your serial port is also not occupied by other devices or software, for example, the Super Terminal (to turn it off), of course, you must set up the serial port correctly. Instead of just a serial port, you have chosen a low-level error such as com2. Okay, next, let's set minicom in Linux. We should be able to smoothly enter the Linux system. The steps below are also very simple. Come on step by step, good luck!
Linux minicom settings
Method 1:
In redhat9, the default configuration file minirc. DFL is not found 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 development 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 troublesome. In fact, as long as you have a little bit of Command Options 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-s" as the root user on the terminal
You will find some warning information on the screen, saying that you cannot find the default configuration file and don't care about it. Then, a configuration menu option will appear, 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 settings menu is displayed, as shown below:
A-serial device:/dev/ttys1
B-lockfile location:/var/lock
C-callin program:
D-callout program:
E-bps/PAR/bits: 38400 8n1
F-hardware Flow Control: Yes
G-software flow control: No
Change which setting?
Press a to change ttys1 to ttys0, because my machine has only one serial port COM1, if you use other settings. Press E and set bps/PAR/bits to 115200 8n1. I think the general development board should be set 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 file.
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 exiting the settings menu, you can use minicom to communicate with the Development Board.
PS: You may find that in the/etc/minirc. DFL file, Method One and method two get different results. In fact, I do not know that brother Stein has added two lines.
Pu minit
Pu mreset
What is the function.