gtkterm是一個用GTK+寫的串口終端。spa
安裝:sudo apt install gtkterm code
配置文件的位置爲:~/.gtktermrcblog
1 [default] 2 port = /dev/ttyUSB0 //配置端口號 3 speed = 9600 //配置波特率 4 bits = 8 //配置數據位 5 stopbits = 1 //配置中止位 6 parity = none //配置奇偶性 7 flow = none 8 wait_delay = 0 9 wait_char = -1 10 rs485_rts_time_before_tx = 30 11 rs485_rts_time_after_tx = 30 12 echo = False 13 crlfauto = False 14 font = "Monospace 12" 15 term_block_cursor = True 16 term_rows = 80 17 term_columns = 25 18 term_scrollback = 200 19 term_visual_bell = True 20 term_foreground_red = 0.660000 21 term_foreground_blue = 0.660000 22 term_foreground_green = 0.660000 23 term_foreground_alpha = 1.000000 24 term_background_red = 0.000000 25 term_background_blue = 0.000000 26 term_background_green = 0.000000 27 term_background_alpha = 1.000000
其實只改了第二行,還有第三行。ci
鏈接上開發板,上電後,在終端敲命令dmesg
來查看安裝驅動的信息。也可使用命令:ls /dev/ttyUSB*
來查看相關信息。 開發
1 [ 5398.036071] usb 2-1.1: new full-speed USB device number 9 using ehci-pci 2 [ 5398.131459] usb 2-1.1: New USB device found, idVendor=10c4, idProduct=ea60 3 [ 5398.131466] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 4 [ 5398.131470] usb 2-1.1: Product: CP2104 USB to UART Bridge Controller 5 [ 5398.131474] usb 2-1.1: Manufacturer: Silicon Labs 6 [ 5398.131478] usb 2-1.1: SerialNumber: 008FA13B 7 [ 5398.133162] cp210x 2-1.1:1.0: cp210x converter detected 8 [ 5398.133501] usb 2-1.1: cp210x converter now attached to ttyUSB0
能夠看出鏈接的是ttyUSB0.
在終端敲入命令:sudo gtkterm
若是沒有設置默認配置,能夠在「Configuration」選項卡設置—>Port—>Boud Rate設置爲115200;Port設置爲/dev/ttyUSB0
而後打印出信息來。(若是沒打印,能夠將開發板reset一下)string