Linux ubuntu test and ARM board serial port is connected unobstructed

--- --- restore content begins

surroundings:

1, PC machine ubuntu16.04

2, a development board ESM335x

3, using a serial line cable (DB9) + Serial kind of the USB (DB9)

Description:

No need to install any drivers, just need to know which computer port corresponding to the port ARM board

step:

1, check the computer using the USB port

root@PC:/dev# dmesg |grep ttyUSB*

 

 

If you do not use USB, you can use the code:

root@PC:/dev# dmesg | grep tty

 

 Figure: I use the / dev / ttyUSB0

2. Determine which ARM board using the serial port

That depends on the port's own serial cable, and is RS232 (three-wire, read write access, read-write access, grounded) or RS485 (A then A, B then B; because it is a differential signal), as well as to determine the It is the first of several mouth.

Check the product manual or user manual, look up the corresponding serial device name, mine is / dev / ttyS2

3, test the connection

ARM board using the command monitor port equipment

[root@EM335X ~]#cat /dev/ttyS2

PC, use the command to send a test message

root@PC:/dev# echo "123" > /dev/ttyUSB0

4, the effect of FIG.

The PC:

 

 Development board:

 

 

 

 

 

 

 

 

 

 

--- end --- restore content

Guess you like

Origin www.cnblogs.com/shuoguoleilei/p/11433428.html