码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2019-01-05 00:11:39      阅读:335      评论:0      收藏:0      [点我收藏+]

标签:efault   reset   查看   ubunt   dev   abs   文件   安装   scroll   

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一下)

 

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

标签:efault   reset   查看   ubunt   dev   abs   文件   安装   scroll   

原文地址:https://www.cnblogs.com/jikexianfeng/p/10223015.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!