Ubuntu16.04安装串口调试工具gtkterm

gtkterm是一个用GTK+写的串口终端。

安装:sudo apt install gtkterm 

配置文件的位置为:~/.gtktermrc

 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

其实只改了第二行,还有第三行。

连接上开发板,上电后,在终端敲命令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一下)

 

posted @ 2019-01-04 23:23  极客先锋  阅读(6074)  评论(0编辑  收藏  举报