{"id":40110,"date":"2023-10-05T05:46:20","date_gmt":"2023-10-04T21:46:20","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=40110"},"modified":"2023-10-05T05:46:20","modified_gmt":"2023-10-04T21:46:20","slug":"lxckrfssjml","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/40110.html","title":{"rendered":"Linux\u5411\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u547d\u4ee4"},"content":{"rendered":"
\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4f7f\u7528\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u547d\u4ee4\u662f\u4e00\u79cd\u7b80\u5355\u800c\u6709\u6548\u7684\u65b9\u5f0f\u6765\u63a7\u5236\u5916\u56f4\u8bbe\u5907\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Linux\u7cfb\u7edf\u4e2d\u7684\u4e32\u53e3RX\u6765\u53d1\u9001\u6570\u636e\u547d\u4ee4\uff0c\u4ee5\u53ca\u5982\u4f55\u89e3\u51b3\u4e00\u4e9b\u5e38\u89c1\u7684\u95ee\u9898\u3002<\/p>\n
\u4e32\u53e3RX\uff08Receive\uff09\u662f\u4e00\u79cd\u7528\u4e8e\u63a5\u6536\u5916\u90e8\u8bbe\u5907\u53d1\u9001\u6570\u636e\u7684\u63a5\u53e3\u3002\u5b83\u901a\u5e38\u7531\u4e32\u884c\u7aef\u53e3\uff08serial port\uff09\u63d0\u4f9b\uff0c\u662f\u4e00\u79cd\u7528\u4e8e\u7535\u8111\u4e0e\u5916\u90e8\u8bbe\u5907\u4e4b\u95f4\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u7684\u63a5\u53e3\u3002<\/p>\n
\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u547d\u4ee4\u3002\u9996\u5148\uff0c\u9700\u8981\u4f7f\u7528\u7ec8\u7aef\u7a0b\u5e8f\u6253\u5f00\u4e32\u53e3RX\uff0c\u7136\u540e\u4f7f\u7528\u6307\u5b9a\u7684\u547d\u4ee4\u53d1\u9001\u6570\u636e\u3002 Linux\u7cfb\u7edf\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5e38\u7528\u7684\u547d\u4ee4\uff0c\u5982echo\u3001cat\u3001dd\u7b49\uff0c\u53ef\u4ee5\u7528\u6765\u53d1\u9001\u6570\u636e\u3002<\/p>\n
echo\u547d\u4ee4\u662fLinux\u7cfb\u7edf\u4e2d\u6700\u5e38\u7528\u7684\u547d\u4ee4\u4e4b\u4e00\uff0c\u53ef\u4ee5\u7528\u6765\u5411\u6307\u5b9a\u7684\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u3002 \u4f7f\u7528echo\u547d\u4ee4\u53d1\u9001\u6570\u636e\u7684\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n
echo \"data\" > \/dev\/ttyS0 <\/code><\/pre>\n \u5176\u4e2d\uff0c\u201cdata\u201d\u662f\u8981\u53d1\u9001\u7684\u6570\u636e\uff0c\/dev\/ttyS0\u662f\u6307\u5b9a\u7684\u4e32\u53e3RX\u8bbe\u5907\u3002<\/p>\n
cat\u547d\u4ee4<\/h3>\n
cat\u547d\u4ee4\u4e5f\u53ef\u4ee5\u7528\u6765\u5411\u6307\u5b9a\u7684\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u3002 \u4f7f\u7528cat\u547d\u4ee4\u53d1\u9001\u6570\u636e\u7684\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n
cat \"data\" > \/dev\/ttyS0 <\/code><\/pre>\n \u5176\u4e2d\uff0c\u201cdata\u201d\u662f\u8981\u53d1\u9001\u7684\u6570\u636e\uff0c\/dev\/ttyS0\u662f\u6307\u5b9a\u7684\u4e32\u53e3RX\u8bbe\u5907\u3002<\/p>\n
dd\u547d\u4ee4<\/h3>\n
dd\u547d\u4ee4\u4e5f\u53ef\u4ee5\u7528\u6765\u5411\u6307\u5b9a\u7684\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u3002 \u4f7f\u7528dd\u547d\u4ee4\u53d1\u9001\u6570\u636e\u7684\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n
dd if=\"data\" of=\/dev\/ttyS0 <\/code><\/pre>\n \u5176\u4e2d\uff0c\u201cdata\u201d\u662f\u8981\u53d1\u9001\u7684\u6570\u636e\uff0c\/dev\/ttyS0\u662f\u6307\u5b9a\u7684\u4e32\u53e3RX\u8bbe\u5907\u3002<\/p>\n
\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/h2>\n
\u4f7f\u7528Linux\u7cfb\u7edf\u53d1\u9001\u6570\u636e\u547d\u4ee4\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n
\u68c0\u67e5\u4e32\u53e3RX\u8bbe\u5907<\/h3>\n
\u5982\u679c\u53d1\u9001\u6570\u636e\u65f6\u51fa\u73b0\u9519\u8bef\uff0c\u53ef\u4ee5\u4f7f\u7528ls\u547d\u4ee4\u68c0\u67e5\u4e32\u53e3RX\u8bbe\u5907\u662f\u5426\u5b58\u5728\uff0c\u4ee5\u786e\u4fdd\u6307\u5b9a\u7684\u8bbe\u5907\u662f\u53ef\u7528\u7684\u3002<\/p>\n
\u68c0\u67e5\u4e32\u53e3RX\u8bbe\u5907\u6743\u9650<\/h3>\n
\u5982\u679c\u53d1\u9001\u6570\u636e\u65f6\u51fa\u73b0\u6743\u9650\u9519\u8bef\uff0c\u53ef\u4ee5\u4f7f\u7528chmod\u547d\u4ee4\u68c0\u67e5\u4e32\u53e3RX\u8bbe\u5907\u7684\u6743\u9650\uff0c\u4ee5\u786e\u4fdd\u5f53\u524d\u7528\u6237\u5177\u6709\u8bbf\u95ee\u8be5\u8bbe\u5907\u7684\u6743\u9650\u3002<\/p>\n
\u68c0\u67e5\u53d1\u9001\u7684\u6570\u636e<\/h3>\n
\u5982\u679c\u53d1\u9001\u6570\u636e\u65f6\u51fa\u73b0\u683c\u5f0f\u9519\u8bef\uff0c\u53ef\u4ee5\u4f7f\u7528hexdump\u547d\u4ee4\u68c0\u67e5\u53d1\u9001\u7684\u6570\u636e\uff0c\u4ee5\u786e\u4fdd\u6570\u636e\u683c\u5f0f\u6b63\u786e\u3002<\/p>\n
\u603b\u7ed3<\/h2>\n
\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Linux\u7cfb\u7edf\u4e2d\u7684\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u547d\u4ee4\uff0c\u4ee5\u53ca\u5982\u4f55\u89e3\u51b3\u4e00\u4e9b\u5e38\u89c1\u7684\u95ee\u9898\u3002<\/strong>\u4f7f\u7528Linux\u7cfb\u7edf\u7684\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u547d\u4ee4\u53ef\u4ee5\u8282\u7701\u65f6\u95f4\uff0c\u63d0\u9ad8\u6548\u7387\uff0c\u662f\u4e00\u79cd\u975e\u5e38\u6709\u6548\u7684\u63a7\u5236\u5916\u90e8\u8bbe\u5907\u7684\u65b9\u5f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u4f7f\u7528\u4e32\u53e3RX\u53d1\u9001\u6570\u636e\u547d\u4ee4\u662f\u4e00\u79cd\u7b80\u5355\u800c\u6709\u6548\u7684\u65b9\u5f0f\u6765\u63a7\u5236\u5916\u56f4\u8bbe\u5907\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Linux\u7cfb\u7edf\u4e2d\u7684\u4e32\u53e3RX\u6765\u53d1\u9001\u6570\u636e\u547d\u4ee4\uff0c\u4ee5\u53ca\u5982\u4f55\u89e3\u51b3\u4e00\u4e9b\u5e38<\/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-40110","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\/40110","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=40110"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/40110\/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=40110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=40110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=40110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}