Linux command stty

reference: https://blog.csdn.net/lqxandroid2012/article/details/78929506

Purpose

       Learning linux command stty for get/set serial uart speed 

 

Eevironment

       Ubuntu 16.04 terminal

 

Procdeure

       example get uart speed:

root@IoTP:~# stty -F /dev/ttyUSB2 -a
speed baud; rows ; columns ; line = ;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = ; time = ;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig -icanon iexten -echo -echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc

example set uart speed:

stty -F /dev/ttyS0 speed  cs8 -parenb -cstopb  -echo
解释:通过stty设置/dev/ttyS0串口, 波特率为115200 ,数据位cs8,奇偶校验位-parenb,停止位-cstopb,同时-echo禁止终端回显。

Linux command stty的更多相关文章

  1. linux command dialog

    Linux command dialog [Purpose]        Learning how to use dialog commad, do  man-machine interaction ...

  2. 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令

    Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...

  3. 《The Linux Command Line》 读书笔记02 关于命令的命令

    <The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...

  4. 《The Linux Command Line》 读书笔记01 基本命令介绍

    <The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...

  5. Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...

  6. Linux Command Line 解析

    Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...

  7. 15 Examples To Master Linux Command Line History

    When you are using Linux command line frequently, using the history effectively can be a major produ ...

  8. 10 Interesting Linux Command Line Tricks and Tips Worth Knowing

    I passionately enjoy working with commands as they offer more control over a Linux system than GUIs( ...

  9. Reso | The Linux Command Line 的中文版

    http://book.haoduoshipin.com/tlcl/book/zh/ 本书是 The Linux Command Line 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...

随机推荐

  1. [原]关于helios自定义面板简述

    想研究一下helios和自己仿真软件的适配,于是找了一下关于helios的使用 首先关于helios的使用有一个“vr2009”的发帖者有过很详细描述: http://www.insky.cn/bbs ...

  2. vuex中的辅助函数 mapState,mapGetters, mapActions, mapMutations

    1.导入辅助函数 导入mapState可以调用vuex中state的数据 导入mapMutations可以调用vuex中mutations的方法 四个辅助函数 各自对应自己在vuex上的自己 2.ma ...

  3. 关于datatables自适应以及自定义列宽度的总结

    table-layout:fixed;可以自定义列的宽度 <div id="bizhi" style="width:100%;height: 85%;overflo ...

  4. MySQL学习(十五)

    索引的概念 索引是数据的目录,能快速定位数据的位置.索引提高了查询速度,降低了增删改的速度.并非加的越多越好. 一般在查询频率高的列上加,而且在重复度低的列上加效果更好.如在性别列上不用加索引,但是身 ...

  5. Unity中角度与弧度之间的相互转换

    弧度数 = 角度数 * Mathf.Deg2Rad角度数 = 弧度数 * Mathf.Rad2Deg

  6. 创建型模式之Builder(建造者)模式

    GitHub地址:https://github.com/zhangboqing/design-mode/tree/master/src/main/java/com/zbq     一.定义 建造者模式 ...

  7. 最新的vueWebpack项目

    最近优化了我的vueWebpack多入口框架,感觉清新了好多:http://pan.baidu.com/s/1bNYJp0

  8. 深刻理解Web标准,对可用性、可访问性、可维护性等相关知识有实际的了解和实践经验

    WEB标准不是某一个标准,而是一系列标准的集合.网页主要由三部分组成:结构(Structure).表现(Presentation)和行为(Behavior).对应的标准也分三方面:结构化标准语言主要包 ...

  9. 矩阵最优路线DP

    母题:矩阵中每个点有权值,每经过一个点就累加权值,求从a点到b点的最优(最大)路线. 题型1: 从左上到右下,只能向下或者向右 for 行 for 列 dp=max dp左,dp上; 扫一遍就行 有时 ...

  10. 倒排索引(Inverted Index)

    倒排索引(Inverted Index) 倒排索引是一种索引结构,它存储了单词与单词自身在一个或多个文档中所在位置之间的映射.倒排索引通常利用关联数组实现.它拥有两种表现形式: inverted fi ...