CentOS installation and configuration of minicom (serial port to USB)
1. Install minicom and the file transfer Tool
Sudo yum-y installminicom lrzsz
2. Check whether your computer supports usb-to-serial communication before using the serial port. If the following words appear, OK is supported.
Lsmod | grepusbserial
Usbserial 33694 3 pl2303
3. After plugging in the usb, the connection is successful.
Dmesg | grep USB0
Check whether the device/dev/ttyUSB0 exists. If not, create one:
Ls/dev/ttyUSB0
Mknod/dev/ttyUSB0 c 188 0
4. Configure The minicom serial port
Sudo minicom-s
Note: The items selected below can also be in lowercase letters.
Select Serialport setup. The cursor is displayed on "Change which setting", type "A", move the cursor to the corresponding position of item A, and Change it to ttyUSB0 (because I am A USB-to-serial port ).
Configure the baud rate, data bit, and stop bit, and enter "E". The baud rate is 1152008N1 (Data bit 8, no parity check, stop bit 1 ), type "F" and "G" for hardware/software traffic control respectively, and select "No" (Note: If this parameter is not set to "NO", you cannot enter a character on the terminal ).
The specific configuration information is as follows:
Serial port setup [Enter]
+ ------------------------------------------------------------- +
| A-Serial Device:/dev/ttyUSB0 |
| B-LockfileLocation:/var/lock |
| C-CallinProgram: |
| D-CalloutProgram-: |
| E-Bps/Par/Bits: 115200 8N1 |
| F-Hardware FlowControl: No |
| G-Software FlowControl: No |
|
| Change whichsetting? |
+ ------------------------------------------------------------- +
Return to the upper-level menu and enter the Modemand dialing option:
A-Init string .........
B-Reset string ........
K-Hang-up string ......
Clear all three items
After confirming that the configuration is correct, you can press enter to return to the upper-level configuration interface and save it as the default configuration (that is, savesetup as dfl ). Finally, select the "Exit from Minicom" command to Exit.
5. Problems Encountered
Note: If the serial port is not used but is used directly, the SerialDevice must be configured as/dev/ttyS0.
1) if your/dev file does not contain ttyUSB0, enter
Mknod/dev/ttyUSB0 c 188 0
2) Restart minicom (note that the root permission is required). Otherwise, Device/dev/ttyUSB0 access failed: No such file or directory will be displayed.
$ Sudominicom
Make the configuration take effect. After connecting to the USB to serial port of the Development Board, you can print the correct serial port information in minicom. In the console, press Ctrl + a z to enter the minicom menu.
3) Device/dev/ttyS0 lock failed: the operation is not allowed. run ps-aux | grep minicom to check and kill the minicom process with kill-9, and then start the ps-aux | grep minicom terminal:
Warning: badsyntax, perhaps a bogu '-'? See/usr/share/doc/procps-3.2.7/FAQ
Root XXXX XXX
Root 8319 0.0 0.1 5416 676 pts/1 S + grep minicom
Then kill-9 XXXX. The XXXX here is similar to the 8319 on the second line. It is also a four-digit number.
4) if not, try to change the USB port and then perform the above steps again.
5) Run mincom on the terminal
6. Implement file transfer between PC and Development Board
Connect PC AND DEVELOPMENT BOARD
Start minicom, and then CTRL + A S
Select zmode and find the file to be sent, so that the cross-compiled executable file can be directly executed on the Development Board terminal!