{"id":62871,"date":"2023-10-29T07:27:16","date_gmt":"2023-10-28T23:27:16","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=62871"},"modified":"2023-10-29T07:27:16","modified_gmt":"2023-10-28T23:27:16","slug":"sylckfssjml","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/62871.html","title":{"rendered":"\u4f7f\u7528Linux\u4e32\u53e3\u53d1\u9001\u6570\u636e\u547d\u4ee4"},"content":{"rendered":"
Linux\u4e32\u53e3\u662f\u4e00\u79cd\u901a\u8fc7\u4e32\u884c\u7aef\u53e3\u53d1\u9001\u548c\u63a5\u6536\u4fe1\u606f\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u7528\u6765\u5904\u7406\u548c\u63a7\u5236\u5916\u90e8\u8bbe\u5907\uff0c\u6bd4\u5982\u4e32\u53e3\u6253\u5370\u673a\u3001\u6570\u636e\u91c7\u96c6\u5668\u3001GPS\u6a21\u5757\u7b49\u3002\u672c\u6587\u5c06\u4ecb\u7ecdLinux\u4e0b\u5982\u4f55\u4f7f\u7528\u4e32\u53e3\u53d1\u9001\u6570\u636e\u547d\u4ee4\uff0c\u4ee5\u53ca\u5982\u4f55\u89e3\u6790\u8fd4\u56de\u7684\u6570\u636e\u3002<\/p>\n
\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u901a\u8fc7Linux\u7cfb\u7edf\u7684\u7ec8\u7aef\u6765\u6253\u5f00\u4e32\u53e3\u7aef\u53e3\uff0c\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n
“`<\/p>\n
sudo stty -F \/dev\/ttyS0 9600<\/p>\n
“`<\/p>\n
\u5176\u4e2d\uff0c\/dev\/ttyS0\u8868\u793a\u4e32\u53e3\u7aef\u53e3\uff0c9600\u8868\u793a\u6ce2\u7279\u7387\u3002<\/p>\n
\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u6765\u53d1\u9001\u6570\u636e\u547d\u4ee4\uff1a<\/p>\n
“`<\/p>\n
echo -e “command” > \/dev\/ttyS0<\/p>\n
“`<\/p>\n
\u5176\u4e2d\uff0ccommand\u8868\u793a\u8981\u53d1\u9001\u7684\u6570\u636e\u547d\u4ee4\uff0c\/dev\/ttyS0\u8868\u793a\u4e32\u53e3\u7aef\u53e3\u3002<\/p>\n
\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u6765\u63a5\u6536\u8fd4\u56de\u7684\u6570\u636e\uff1a<\/p>\n
“`<\/p>\n
cat \/dev\/ttyS0<\/p>\n
“`<\/p>\n
\u4ee5\u4e0a\u5c31\u662fLinux\u4e0b\u4f7f\u7528\u4e32\u53e3\u53d1\u9001\u6570\u636e\u547d\u4ee4\u7684\u4e00\u822c\u6b65\u9aa4\u3002\u8981\u4f7f\u7528\u4e32\u53e3\u53d1\u9001\u6570\u636e\u547d\u4ee4\uff0c\u9996\u5148\u9700\u8981\u6253\u5f00\u4e32\u53e3\u7aef\u53e3\uff0c\u7136\u540e\u4f7f\u7528echo\u547d\u4ee4\u53d1\u9001\u6570\u636e\u547d\u4ee4\uff0c\u6700\u540e\u4f7f\u7528cat\u547d\u4ee4\u63a5\u6536\u8fd4\u56de\u7684\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
Linux\u4e32\u53e3\u662f\u4e00\u79cd\u901a\u8fc7\u4e32\u884c\u7aef\u53e3\u53d1\u9001\u548c\u63a5\u6536\u4fe1\u606f\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u7528\u6765\u5904\u7406\u548c\u63a7\u5236\u5916\u90e8\u8bbe\u5907\uff0c\u6bd4\u5982\u4e32\u53e3\u6253\u5370\u673a\u3001\u6570\u636e\u91c7\u96c6\u5668\u3001GPS\u6a21\u5757\u7b49\u3002\u672c\u6587\u5c06\u4ecb\u7ecdLinux\u4e0b\u5982\u4f55\u4f7f\u7528\u4e32\u53e3\u53d1\u9001<\/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-62871","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\/62871","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=62871"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/62871\/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=62871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=62871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=62871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}