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. 你真的了解restful api吗?

    前言 在以前,一个网站的完成总是“all in one”,页面,数据,渲染全部在服务端完成,这样做的最大的弊端是后期维护,扩展极其痛苦,开发人员必须同时具备前后端知识.于是慢慢的后来兴起了前后端分离的 ...

  2. 《剑指offer》第五十题(字符流中第一个只出现一次的字符)

    // 面试题50(二):字符流中第一个只出现一次的字符 // 题目:请实现一个函数用来找出字符流中第一个只出现一次的字符.例如,当从 // 字符流中只读出前两个字符"go"时,第一 ...

  3. SpringBoot 文件上传、下载、设置大小

    本文使用SpringBoot的版本为2.0.3.RELEASE 1.上传单个文件 ①html对应的提交表单 <form action="uploadFile" method= ...

  4. Python数据分析-Day2-Pandas模块

    1.pandas简介 Python Data Analysis Library 或 pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的.Pandas 纳入了大量库和一些标 ...

  5. 第 6 章 存储 - 042 - 用 volume container 共享数据

    volume container volume container 是专门为其他容器提供 volume 的容器.它提供的卷可以是 bind mount,也可以是 docker managed volu ...

  6. 数据结构(C语言版)-第6章 图

    6.1 图的定义和基本术语 图:Graph=(V,E)  V:顶点(数据元素)的有穷非空集合:  E:边的有穷集合. 无向图:每条边都是无方向的 有向图:每条边都是有方向的 完全图:任意两个点都有一条 ...

  7. spring cloud: Hystrix(四):feign类似于hystrix的断容器功能:fallback

    spring cloud: Hystrix(四):feign使用hystrix @FeignClient支持回退的概念:fallback方法,这里有点类似于:@HystrixCommand(fallb ...

  8. tomcat ----> 源码关联/编译/....

    今天在搞Servlet时想看下tomcat Servlet-API.jar的源码,按照惯性思维用以往关联SSH2框架的源码的方式去做但是结果没有成功,尝试过换不同的文件夹,起初怀疑可能是路径太深关联不 ...

  9. English trip M1 - AC6 How to make salad? Teacher:Patrick

    In this lesson you will learn to give instructions.  在本课中,您将学习如何提供说明. 课上内容(Lesson) How to make a sal ...

  10. 基于Struts2框架的文件下载 --- Struts2

    一.Struts2指定类型文件的下载 1.最终功能实现的截图:(点击文件下载链接,下载文件 ) 2.核心代码 index.jsp: <%@ page language="java&qu ...