{"id":41860,"date":"2023-09-29T09:06:43","date_gmt":"2023-09-29T01:06:43","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=41860"},"modified":"2023-09-29T09:06:43","modified_gmt":"2023-09-29T01:06:43","slug":"rhsylljck","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/41860.html","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Linux\u8fde\u63a5\u4e32\u53e3"},"content":{"rendered":"
Linux\u662f\u4e00\u6b3e\u975e\u5e38\u6d41\u884c\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u670d\u52a1\u5668\u3001\u5de5\u4f5c\u7ad9\u3001\u5d4c\u5165\u5f0f\u7cfb\u7edf\u7b49\u7b49\u3002\u5b83\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u4f7f\u5f97\u5b83\u53ef\u4ee5\u652f\u6301\u5404\u79cd\u5916\u90e8\u8bbe\u5907\uff0c\u5305\u62ec\u4e32\u53e3\u8bbe\u5907\uff0c\u4ece\u800c\u4f7f\u5f97Linux\u53ef\u4ee5\u5b9e\u73b0\u4e0e\u4e32\u53e3\u8bbe\u5907\u7684\u901a\u4fe1\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Linux\u8fde\u63a5\u4e32\u53e3\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528Linux\u7f16\u7a0b\u5b9e\u73b0\u4e32\u53e3\u7684\u8bfb\u5199\u64cd\u4f5c\u3002<\/p>\n
Linux\u652f\u6301\u591a\u79cd\u4e32\u53e3\u63a5\u53e3\uff0c\u5176\u4e2d\u5305\u62ecRS-232\u3001RS-422\u3001RS-485\u7b49\u7b49\uff0c\u5b83\u4eec\u7684\u7279\u70b9\u5206\u522b\u5982\u4e0b\uff1a<\/p>\n
RS-232\u662f\u4e00\u79cd\u6700\u5e38\u89c1\u7684\u4e32\u53e3\u63a5\u53e3\uff0c\u5b83\u53ef\u4ee5\u652f\u6301\u4f20\u8f93\u901f\u7387\u6700\u9ad8\u8fbe115200bps\uff0c\u9002\u7528\u4e8e\u8ddd\u79bb\u4e0d\u8d85\u8fc750\u7c73\u7684\u77ed\u8ddd\u79bb\u4f20\u8f93\u3002<\/p>\n
RS-422\u662f\u53e6\u4e00\u79cd\u5e38\u89c1\u7684\u4e32\u53e3\u63a5\u53e3\uff0c\u5b83\u53ef\u4ee5\u652f\u6301\u4f20\u8f93\u901f\u7387\u6700\u9ad8\u8fbe1Mbps\uff0c\u9002\u7528\u4e8e\u8ddd\u79bb\u4e0d\u8d85\u8fc71200\u7c73\u7684\u957f\u8ddd\u79bb\u4f20\u8f93\u3002<\/p>\n
RS-485\u662f\u53e6\u4e00\u79cd\u5e38\u89c1\u7684\u4e32\u53e3\u63a5\u53e3\uff0c\u5b83\u53ef\u4ee5\u652f\u6301\u4f20\u8f93\u901f\u7387\u6700\u9ad8\u8fbe10Mbps\uff0c\u9002\u7528\u4e8e\u8ddd\u79bb\u4e0d\u8d85\u8fc71200\u7c73\u7684\u957f\u8ddd\u79bb\u4f20\u8f93\u3002<\/p>\n
Linux\u652f\u6301\u591a\u79cd\u4e32\u53e3\u9a71\u52a8\uff0c\u6700\u5e38\u89c1\u7684\u6709\u4e24\u79cd\uff1a<\/p>\n
TTY\u9a71\u52a8\u662fLinux\u5185\u6838\u81ea\u5e26\u7684\u4e32\u53e3\u9a71\u52a8\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u4e32\u53e3\u7684\u8bfb\u5199\u64cd\u4f5c\uff0c\u4f46\u662f\u5b83\u7684\u529f\u80fd\u6709\u9650\uff0c\u4e0d\u80fd\u652f\u6301\u9ad8\u7ea7\u529f\u80fd\uff0c\u5982\u591a\u4e32\u53e3\u901a\u4fe1\u3001\u591a\u7ebf\u7a0b\u8bfb\u5199\u7b49\u7b49\u3002<\/p>\n
USB\u9a71\u52a8\u662f\u4e00\u79cd\u6bd4\u8f83\u65b0\u7684\u4e32\u53e3\u9a71\u52a8\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u66f4\u591a\u7684\u529f\u80fd\uff0c\u6bd4\u5982\u591a\u4e32\u53e3\u901a\u4fe1\u3001\u591a\u7ebf\u7a0b\u8bfb\u5199\u7b49\u7b49\uff0c\u4f46\u662f\u5b83\u7684\u5b89\u88c5\u6bd4\u8f83\u590d\u6742\uff0c\u9700\u8981\u5b89\u88c5\u989d\u5916\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n
Linux\u4e32\u53e3\u7f16\u7a0b\u4e3b\u8981\u4f7f\u7528C\u8bed\u8a00\u5b9e\u73b0\uff0c\u5b83\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n
\u9996\u5148\uff0c\u9700\u8981\u4f7f\u7528open\u51fd\u6570\u6253\u5f00\u4e32\u53e3\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u8fdb\u884c\u8bfb\u5199\u64cd\u4f5c\u3002<\/p>\n
\u5176\u6b21\uff0c\u9700\u8981\u4f7f\u7528ioctl\u51fd\u6570\u8bbe\u7f6e\u4e32\u53e3\u53c2\u6570\uff0c\u6bd4\u5982\u6ce2\u7279\u7387\u3001\u6821\u9a8c\u4f4d\u7b49\u7b49\u3002<\/p>\n
\u6700\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528read\/write\u51fd\u6570\u8bfb\u5199\u4e32\u53e3\u6570\u636e\uff0c\u4ee5\u5b9e\u73b0\u4e32\u53e3\u901a\u4fe1\u3002<\/p>\n
\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Linux\u8fde\u63a5\u4e32\u53e3\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528Linux\u7f16\u7a0b\u5b9e\u73b0\u4e32\u53e3\u7684\u8bfb\u5199\u64cd\u4f5c\u3002<\/strong>Linux\u652f\u6301\u591a\u79cd\u4e32\u53e3\u63a5\u53e3\uff0c\u5305\u62ecRS-232\u3001RS-422\u3001RS-485\u7b49\u7b49\uff0c\u800c\u4e14\u8fd8\u652f\u6301\u591a\u79cd\u4e32\u53e3\u9a71\u52a8\uff0c\u6bd4\u5982TTY\u9a71\u52a8\u548cUSB\u9a71\u52a8\u7b49\u7b49\u3002\u6700\u540e\uff0cLinux\u4e32\u53e3\u7f16\u7a0b\u4e3b\u8981\u4f7f\u7528C\u8bed\u8a00\u5b9e\u73b0\uff0c\u9700\u8981\u4f7f\u7528open\u3001ioctl\u3001read\/write\u51fd\u6570\u7b49\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" Linux\u662f\u4e00\u6b3e\u975e\u5e38\u6d41\u884c\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u670d\u52a1\u5668\u3001\u5de5\u4f5c\u7ad9\u3001\u5d4c\u5165\u5f0f\u7cfb\u7edf\u7b49\u7b49\u3002\u5b83\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u4f7f\u5f97\u5b83\u53ef\u4ee5\u652f\u6301\u5404\u79cd\u5916\u90e8\u8bbe\u5907\uff0c\u5305\u62ec\u4e32\u53e3\u8bbe\u5907\uff0c\u4ece\u800c\u4f7f\u5f97Linux\u53ef\u4ee5\u5b9e\u73b0\u4e0e\u4e32\u53e3\u8bbe<\/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-41860","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\/41860","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=41860"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41860\/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=41860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=41860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=41860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}