{"id":38917,"date":"2023-09-27T20:12:48","date_gmt":"2023-09-27T12:12:48","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=38917"},"modified":"2023-09-27T20:12:48","modified_gmt":"2023-09-27T12:12:48","slug":"rhsyczkckxx","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/38917.html","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Centos\u67e5\u770b\u4e32\u53e3\u4fe1\u606f"},"content":{"rendered":"
CentOS\u662f\u4e00\u6b3e\u514d\u8d39\u7684\u5f00\u6e90\u64cd\u4f5c\u7cfb\u7edf\uff0c\u62e5\u6709\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u6ee1\u8db3\u5927\u591a\u6570\u7528\u6237\u7684\u9700\u6c42\u3002\u5728CentOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e32\u53e3\u67e5\u770b\u4e00\u4e9b\u7cfb\u7edf\u4fe1\u606f\uff0c\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u4e86\u89e3\u7cfb\u7edf\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Centos\u67e5\u770b\u4e32\u53e3\u4fe1\u606f\u3002<\/p>\n
CentOS\u7cfb\u7edf\u4e2d\u7684\u4e32\u53e3\u4fe1\u606f\u662f\u6307\u4e32\u53e3\u7aef\u53e3\u4e0a\u7684\u6570\u636e\u3002\u901a\u8fc7\u67e5\u770b\u4e32\u53e3\u4fe1\u606f\uff0c\u53ef\u4ee5\u4e86\u89e3\u7cfb\u7edf\u7684\u72b6\u6001\uff0c\u5982\u786c\u4ef6\u914d\u7f6e\u3001\u7cfb\u7edf\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\u7b49\u3002\u4e32\u53e3\u4fe1\u606f\u7684\u67e5\u770b\u9700\u8981\u4f7f\u7528\u7ec8\u7aef\u547d\u4ee4\uff0c\u5982\u4e0b\uff1a<\/p>\n
$ dmesg | grep tty<\/p><\/pre>\n
\u8be5\u547d\u4ee4\u5c06\u67e5\u770b\u7cfb\u7edf\u4e2d\u7684\u4e32\u53e3\u4fe1\u606f\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n
[ 0.000000] console [tty0] enabled<\/p>
[ 0.873939] serial8250: ttyS0 at I\/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A<\/p>
[ 0.873944] 00:03: ttyS0 at I\/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A<\/p>
[ 0.887720] serial8250: ttyS1 at I\/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A<\/p>
[ 0.887723] 00:04: ttyS1 at I\/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A<\/p><\/pre>\n
\u4e32\u53e3\u4fe1\u606f\u7684\u8bfb\u53d6<\/h2>\n
\u5728CentOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e32\u53e3\u5de5\u5177\u6765\u8bfb\u53d6\u4e32\u53e3\u4fe1\u606f\uff0c\u4ee5\u4e86\u89e3\u7cfb\u7edf\u7684\u72b6\u6001\u3002\u4e32\u53e3\u5de5\u5177\u53ef\u4ee5\u5b9e\u73b0\u53cc\u5411\u901a\u4fe1\uff0c\u5373\u53ef\u4ee5\u5c06\u4fe1\u606f\u53d1\u9001\u5230\u4e32\u53e3\u7aef\u53e3\uff0c\u4e5f\u53ef\u4ee5\u4ece\u4e32\u53e3\u7aef\u53e3\u8bfb\u53d6\u4fe1\u606f\u3002\u8981\u4f7f\u7528\u4e32\u53e3\u5de5\u5177\uff0c\u9700\u8981\u5148\u5b89\u88c5\u4e32\u53e3\u9a71\u52a8\uff0c\u7136\u540e\u4f7f\u7528\u4e32\u53e3\u5de5\u5177\u8bfb\u53d6\u4e32\u53e3\u4fe1\u606f\u3002<\/p>\n
\u5b89\u88c5\u4e32\u53e3\u9a71\u52a8<\/h3>\n
CentOS\u7cfb\u7edf\u4e2d\u63d0\u4f9b\u4e86\u4e32\u53e3\u9a71\u52a8\uff0c\u53ef\u4ee5\u901a\u8fc7yum\u6216rpm\u547d\u4ee4\u5b89\u88c5\uff0c\u5982\u4e0b\uff1a<\/p>\n
$ yum install serial-utils<\/p><\/pre>\n
\u4f7f\u7528\u4e32\u53e3\u5de5\u5177<\/h3>\n
\u5b89\u88c5\u5b8c\u4e32\u53e3\u9a71\u52a8\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e32\u53e3\u5de5\u5177\u8bfb\u53d6\u4e32\u53e3\u4fe1\u606f\uff0c\u5982\u4e0b\uff1a<\/p>\n
$ sudo minicom -s<\/p><\/pre>\n
\u8be5\u547d\u4ee4\u5c06\u6253\u5f00minicom\u4e32\u53e3\u5de5\u5177\uff0c\u7528\u6237\u53ef\u4ee5\u5728minicom\u4e2d\u8bbe\u7f6e\u53c2\u6570\uff0c\u8bfb\u53d6\u4e32\u53e3\u4fe1\u606f\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n
Serial port setup<\/p>
A - Serial Device : \/dev\/ttyS0<\/p>
B - Lockfile Location : \/var\/lock<\/p>
C - Callin Program :<\/p>
D - Callout Program :<\/p>
E - Bps\/Par\/Bits : 115200 8N1<\/p>
F - Hardware Flow Control : No<\/p>
G - Software Flow Control : No<\/p>
Change which setting?<\/p><\/pre>\n
\u603b\u7ed3<\/h2>\n
\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Centos\u67e5\u770b\u4e32\u53e3\u4fe1\u606f\u3002<\/strong>\u9996\u5148\uff0c\u53ef\u4ee5\u4f7f\u7528\u7ec8\u7aef\u547d\u4ee4\u67e5\u770b\u4e32\u53e3\u4fe1\u606f\uff1b\u5176\u6b21\uff0c\u53ef\u4ee5\u5b89\u88c5\u4e32\u53e3\u9a71\u52a8\uff0c\u7136\u540e\u4f7f\u7528\u4e32\u53e3\u5de5\u5177\u8bfb\u53d6\u4e32\u53e3\u4fe1\u606f\u3002\u4f7f\u7528Centos\u67e5\u770b\u4e32\u53e3\u4fe1\u606f\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u4e86\u89e3\u7cfb\u7edf\u7684\u72b6\u6001\uff0c\u4ece\u800c\u66f4\u597d\u5730\u7ba1\u7406\u7cfb\u7edf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
CentOS\u662f\u4e00\u6b3e\u514d\u8d39\u7684\u5f00\u6e90\u64cd\u4f5c\u7cfb\u7edf\uff0c\u62e5\u6709\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u6ee1\u8db3\u5927\u591a\u6570\u7528\u6237\u7684\u9700\u6c42\u3002\u5728CentOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e32\u53e3\u67e5\u770b\u4e00\u4e9b\u7cfb\u7edf\u4fe1\u606f\uff0c\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u4e86\u89e3\u7cfb\u7edf\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[69],"class_list":["post-38917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-cktx"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/38917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=38917"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/38917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=38917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=38917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=38917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}