{"id":60385,"date":"2023-11-04T21:02:23","date_gmt":"2023-11-04T13:02:23","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=60385"},"modified":"2023-11-04T21:02:23","modified_gmt":"2023-11-04T13:02:23","slug":"lpzckbtl","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/60385.html","title":{"rendered":"Linux\u914d\u7f6e\u4e32\u53e3\u6ce2\u7279\u7387"},"content":{"rendered":"

  \u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4e32\u53e3\u6ce2\u7279\u7387\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u8bbe\u7f6e\u53c2\u6570\uff0c\u5b83\u53ef\u4ee5\u63a7\u5236\u8ba1\u7b97\u673a\u548c\u5916\u90e8\u8bbe\u5907\u4e4b\u95f4\u7684\u901a\u4fe1\u901f\u7387\uff0c\u4ece\u800c\u786e\u4fdd\u6570\u636e\u4f20\u8f93\u7684\u6b63\u786e\u6027\u548c\u53ef\u9760\u6027\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u914d\u7f6e\u4e32\u53e3\u6ce2\u7279\u7387\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u4e32\u53e3\u6ce2\u7279\u7387\u6765\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u6027\u80fd\u3002<\/p>\n

\u4e32\u53e3\u6ce2\u7279\u7387\u6982\u8ff0<\/h2>\n

  \u4e32\u53e3\u6ce2\u7279\u7387\uff08Serial Port Baud Rate\uff09\u662f\u6307\u8ba1\u7b97\u673a\u4e0e\u5916\u90e8\u8bbe\u5907\u4e4b\u95f4\u901a\u4fe1\u7684\u901f\u7387\uff0c\u5b83\u662f\u4ee5\u6bcf\u79d2\u4f20\u8f93\u591a\u5c11\u6bd4\u7279\uff08bit\uff09\u4e3a\u5355\u4f4d\u6d4b\u91cf\u7684\uff0c\u5e38\u89c1\u7684\u4e32\u53e3\u6ce2\u7279\u7387\u6709300\u3001600\u30011200\u30012400\u30014800\u30019600\u300119200\u300138400\u300157600\u3001115200\u7b49\u3002<\/p>\n

Linux\u914d\u7f6e\u4e32\u53e3\u6ce2\u7279\u7387<\/h2>\n

  \u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528stty\u547d\u4ee4\u6765\u914d\u7f6e\u4e32\u53e3\u6ce2\u7279\u7387\uff0c\u5176\u8bed\u6cd5\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n

  stty -F \/dev\/ttyS0 baud_rate<\/p>\n

  \u5176\u4e2d\uff0c\/dev\/ttyS0\u662f\u4e32\u53e3\u7684\u8bbe\u5907\u6587\u4ef6\uff0cbaud_rate\u662f\u8981\u8bbe\u7f6e\u7684\u6ce2\u7279\u7387\uff0c\u4f8b\u5982\uff0c\u8981\u5c06\u4e32\u53e3\u6ce2\u7279\u7387\u8bbe\u7f6e\u4e3a9600\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n

  stty -F \/dev\/ttyS0 9600<\/p>\n

\u4e32\u53e3\u6ce2\u7279\u7387\u7684\u4f18\u52bf<\/h2>\n

  \u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u6027\u80fd<\/h3>\n

  \u4f7f\u7528\u8f83\u9ad8\u7684\u4e32\u53e3\u6ce2\u7279\u7387\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u6027\u80fd\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u66f4\u5feb\u5730\u4f20\u8f93\u6570\u636e\uff0c\u4ece\u800c\u51cf\u5c11\u6570\u636e\u4f20\u8f93\u7684\u5ef6\u8fdf\u3002<\/p>\n

  \u51cf\u5c11\u6570\u636e\u4f20\u8f93\u7684\u8bef\u7801\u7387<\/h3>\n

  \u4f7f\u7528\u8f83\u9ad8\u7684\u4e32\u53e3\u6ce2\u7279\u7387\u53ef\u4ee5\u51cf\u5c11\u6570\u636e\u4f20\u8f93\u7684\u8bef\u7801\u7387\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u66f4\u5feb\u5730\u4f20\u8f93\u6570\u636e\uff0c\u4ece\u800c\u51cf\u5c11\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u5e72\u6270\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  \u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u914d\u7f6e\u4e32\u53e3\u6ce2\u7279\u7387\uff0c\u4ee5\u53ca\u4e32\u53e3\u6ce2\u7279\u7387\u7684\u4f18\u52bf\u3002<\/strong>\u4f7f\u7528\u8f83\u9ad8\u7684\u4e32\u53e3\u6ce2\u7279\u7387\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u6027\u80fd\uff0c\u51cf\u5c11\u6570\u636e\u4f20\u8f93\u7684\u8bef\u7801\u7387\uff0c\u4ece\u800c\u786e\u4fdd\u6570\u636e\u4f20\u8f93\u7684\u6b63\u786e\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4e32\u53e3\u6ce2\u7279\u7387\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u8bbe\u7f6e\u53c2\u6570\uff0c\u5b83\u53ef\u4ee5\u63a7\u5236\u8ba1\u7b97\u673a\u548c\u5916\u90e8\u8bbe\u5907\u4e4b\u95f4\u7684\u901a\u4fe1\u901f\u7387\uff0c\u4ece\u800c\u786e\u4fdd\u6570\u636e\u4f20\u8f93\u7684\u6b63\u786e\u6027\u548c\u53ef\u9760\u6027\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u914d\u7f6e\u4e32\u53e3\u6ce2<\/p>\n","protected":false},"author":1,"featured_media":1839,"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-60385","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\/60385","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=60385"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/60385\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/1839"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=60385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=60385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=60385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}