zoukankan      html  css  js  c++  java
  • Linux 串口调试工具gtkterm

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

    Ubuntu安装: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一下)

    转自:https://www.cnblogs.com/jikexianfeng/p/10223015.html

  • 相关阅读:
    vue自定义指令,自动调用下载的方法
    electron桌面通知,修改默认通知应用名electron.app.Electron为自己应用的名称
    C++二叉树前中后序遍历(递归&非递归)统一代码格式
    反转链表和反转链表2
    基于partition的递归
    C++归并排序(数组&链表)
    关于C++跨平台
    Visual Studio 2019社区版:错误 MSB6006 “CL.exe”已退出,代码为 2
    腾讯2017校招开发工程师笔试试卷(一)答题解析
    C++面试高频题
  • 原文地址:https://www.cnblogs.com/pipci/p/13604406.html
Copyright © 2011-2022 走看看