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. AD中的library中有些文件的后缀有.intlib .schlib .pcblib 这些都是库文件,但有什么区别呢?

    intlib 是集成原理图和PCB封装的 schlib .只有原理图 pcblib 只有PCB封装 参考资料 1 https://zhidao.baidu.com/question/259298801 ...

  2. icehouse版本中常用操作命令

    •Glance操作常用命令1,列出所有镜像.glance image-list 2,显示某个image的详细信息.glance image-show 某个image的ID. 3,获得命令的帮助.gla ...

  3. Linux中计划任务执行脚本crontab-简洁版

    我使用的是ubuntu16,所以在ubuntu中一切正常,在其他linux系统中应该都差不多. 1 计划任务,crontab命令选项:     -u指定一个用户,     -l列出某个用户的任务计划, ...

  4. 第 2 章 容器架构 - 006 - 容器 What, Why, How

    What - 什么是容器? 容器: 容器是一种轻量级.可移植.自包含的软件打包技术,使应用程序可以在几乎任何地方以相同的方式运行. 开发人员在自己笔记本上创建并测试好的容器,无需任何修改就能够在生产系 ...

  5. nodejs导出excel

    //导出Excel var nodeExcel = require("excel-export"); var fs = require("fs"); var c ...

  6. json包

    1.官网下载 2.pom文件下载: <dependency> <groupId>net.sf.json-lib</groupId> <artifactId&g ...

  7. sgu 203 Hyperhuffman

    题意:给出字符出现的次数,问替换成哈夫曼编码后的文本长度. 实际上观察发现就等于树的所有节点的和.用nlogn超时.用O(n),用两个队列,一个放原始数组,一个放新生成的节点. #include &l ...

  8. 通过selenium控制浏览器滚动条

    目的:通过selenium控制浏览器滚动条 原理:通过 driver.execute_script()执行js代码,达到目的 driver.execute_script("window.sc ...

  9. System.Web.Optimization 找不到引用,教你如何解决?

    在vs 2017 创建 BundleConfig 时添加引用 using System.Web.Optimization 是报错 提示未找到 解决方法: 在最下端窗口中写入:Install-Packa ...

  10. Visual Studio 类模板的修改

    总共有三个步骤: No1:找到类文件模板路径 我的安装盘在D盘 visual studio 2010: D:\Program Files (x86)\Microsoft Visual Studio 1 ...