{"id":45444,"date":"2023-09-27T09:21:22","date_gmt":"2023-09-27T01:21:22","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=45444"},"modified":"2023-09-27T09:21:22","modified_gmt":"2023-09-27T01:21:22","slug":"syldkckml","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/45444.html","title":{"rendered":"\u4f7f\u7528Linux\u6253\u5f00\u4e32\u53e3\u547d\u4ee4"},"content":{"rendered":"

  \u4e32\u53e3\u662f\u4e00\u79cd\u53ef\u4ee5\u5728\u8ba1\u7b97\u673a\u548c\u5916\u90e8\u8bbe\u5907\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u7684\u63a5\u53e3\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u7684\u63a7\u5236\u548c\u7ba1\u7406\u5916\u90e8\u8bbe\u5907\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Linux\u547d\u4ee4\u884c\u6253\u5f00\u4e32\u53e3\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528Linux\u4e32\u53e3\u547d\u4ee4\u6765\u914d\u7f6e\u4e32\u53e3\u53c2\u6570\u3002<\/p>\n

\u4e32\u53e3\u9a71\u52a8\u7684\u5b89\u88c5<\/h2>\n

  \u5728\u4f7f\u7528Linux\u6253\u5f00\u4e32\u53e3\u4e4b\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u4e32\u53e3\u9a71\u52a8\uff0c\u4ee5\u4fbf\u8ba9Linux\u7cfb\u7edf\u80fd\u591f\u8bc6\u522b\u4e32\u53e3\u8bbe\u5907\u3002\u5b89\u88c5\u4e32\u53e3\u9a71\u52a8\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u6700\u5e38\u7528\u7684\u662f\u4f7f\u7528Linux\u81ea\u5e26\u7684\u9a71\u52a8\u7ba1\u7406\u5668\uff0c\u4f8b\u5982apt-get\u3001yum\u7b49\u3002\u6b64\u5916\uff0c\u4e5f\u53ef\u4ee5\u4ece\u7b2c\u4e09\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u4e32\u53e3\u9a71\u52a8\uff0c\u7136\u540e\u624b\u52a8\u5b89\u88c5\u3002<\/p>\n

Linux\u4e32\u53e3\u547d\u4ee4<\/h2>\n

  \u5728\u5b89\u88c5\u5b8c\u4e32\u53e3\u9a71\u52a8\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528Linux\u4e32\u53e3\u547d\u4ee4\u6765\u6253\u5f00\u4e32\u53e3\u4e86\u3002Linux\u4e32\u53e3\u547d\u4ee4\u4e3b\u8981\u6709\u4e09\u4e2a\uff1astty<\/b>\u3001setserial<\/b>\u548cminicom<\/b>\u3002<\/p>\n

  stty\u547d\u4ee4<\/h3>\n

  stty\u547d\u4ee4\u7528\u4e8e\u914d\u7f6e\u4e32\u53e3\u53c2\u6570\uff0c\u4f8b\u5982\u6ce2\u7279\u7387\u3001\u6570\u636e\u4f4d\u3001\u505c\u6b62\u4f4d\u7b49\u3002\u4f7f\u7528stty\u547d\u4ee4\u9700\u8981\u6307\u5b9a\u4e32\u53e3\u8bbe\u5907\u6587\u4ef6\uff0c\u4f8b\u5982\uff1a<\/p>\n

stty -F \/dev\/ttyS0 115200<\/pre>\n

  \u4e0a\u9762\u7684\u547d\u4ee4\u7528\u4e8e\u5c06\u4e32\u53e3\u8bbe\u5907\/dev\/ttyS0\u7684\u6ce2\u7279\u7387\u8bbe\u7f6e\u4e3a115200\u3002<\/p>\n

  setserial\u547d\u4ee4<\/h3>\n

  setserial\u547d\u4ee4\u7528\u4e8e\u67e5\u770b\u548c\u8bbe\u7f6e\u4e32\u53e3\u8bbe\u5907\u7684\u786c\u4ef6\u53c2\u6570\uff0c\u4f8b\u5982\u4e32\u53e3\u7684\u4e2d\u65ad\u53f7\u3001I\/O\u5730\u5740\u7b49\u3002\u4f7f\u7528setserial\u547d\u4ee4\u9700\u8981\u6307\u5b9a\u4e32\u53e3\u8bbe\u5907\u6587\u4ef6\uff0c\u4f8b\u5982\uff1a<\/p>\n

setserial \/dev\/ttyS0 irq 3<\/pre>\n

  \u4e0a\u9762\u7684\u547d\u4ee4\u7528\u4e8e\u5c06\u4e32\u53e3\u8bbe\u5907\/dev\/ttyS0\u7684\u4e2d\u65ad\u53f7\u8bbe\u7f6e\u4e3a3\u3002<\/p>\n

  minicom\u547d\u4ee4<\/h3>\n

  minicom\u547d\u4ee4\u7528\u4e8e\u5728Linux\u7ec8\u7aef\u4e2d\u6253\u5f00\u4e32\u53e3\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u6536\u53d1\u4e32\u53e3\u6570\u636e\u3002\u4f7f\u7528minicom\u547d\u4ee4\u9700\u8981\u6307\u5b9a\u4e32\u53e3\u8bbe\u5907\u6587\u4ef6\uff0c\u4f8b\u5982\uff1a<\/p>\n

minicom -D \/dev\/ttyS0<\/pre>\n

  \u4e0a\u9762\u7684\u547d\u4ee4\u7528\u4e8e\u6253\u5f00\u4e32\u53e3\u8bbe\u5907\/dev\/ttyS0\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  \u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Linux\u547d\u4ee4\u884c\u6253\u5f00\u4e32\u53e3\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528Linux\u4e32\u53e3\u547d\u4ee4\u6765\u914d\u7f6e\u4e32\u53e3\u53c2\u6570\u3002<\/strong>\u5b89\u88c5\u5b8c\u4e32\u53e3\u9a71\u52a8\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528stty\u3001setserial\u548cminicom\u7b49\u547d\u4ee4\u6765\u63a7\u5236\u4e32\u53e3\u8bbe\u5907\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e32\u53e3\u662f\u4e00\u79cd\u53ef\u4ee5\u5728\u8ba1\u7b97\u673a\u548c\u5916\u90e8\u8bbe\u5907\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u7684\u63a5\u53e3\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u7684\u63a7\u5236\u548c\u7ba1\u7406\u5916\u90e8\u8bbe\u5907\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Linux\u547d\u4ee4\u884c\u6253\u5f00\u4e32\u53e3\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528Linux\u4e32\u53e3\u547d\u4ee4\u6765\u914d<\/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-45444","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\/45444","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=45444"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/45444\/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=45444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=45444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=45444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}