{"id":1599,"date":"2018-04-10T08:12:21","date_gmt":"2018-04-09T23:12:21","guid":{"rendered":"https:\/\/rfsec.ddns.net\/db\/?p=1599"},"modified":"2018-04-10T08:12:21","modified_gmt":"2018-04-09T23:12:21","slug":"%e7%84%a1%e7%b7%9a%e3%81%a7airgap%e3%82%92%e8%b6%85%e3%81%88%e3%82%8b%e5%ae%9f%e9%a8%93%ef%bc%88%e3%81%9d%e3%81%ae%ef%bc%92%e3%80%80windows10%e3%80%80rs-232c%e3%83%9d%e3%83%bc%e3%83%88%e3%81%aeon-off","status":"publish","type":"post","link":"https:\/\/rfsec.ddns.net\/db\/?p=1599","title":{"rendered":"\u7121\u7dda\u3067AirGap\u3092\u8d85\u3048\u308b\u5b9f\u9a13\uff08\u305d\u306e\uff12\u3000Windows10\u3000RS-232C\u30dd\u30fc\u30c8\u306eON\/OFF\uff09"},"content":{"rendered":"<p>PC\u306b\u306f\u3001Raspberry Pi\u3068\u9055\u3063\u3066GPIO\u306e\u3088\u3046\u306a\u7269\u7406\u7684\u306b\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u30c7\u30d0\u30a4\u30b9\u306f\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u3002\u305d\u3053\u3067\u3001\u6700\u8fd1\u306ePC\u306e\u6a19\u6e96\u88c5\u5099\u304b\u3089\u306f\u307b\u3068\u3093\u3069\u59ff\u3092\u6d88\u3057\u305f\u3082\u306e\u306e\u3001RS232C\uff08\u7279\u306b\u6cd5\u4eba\u5411\u3051\u306ePC\u306b\u306f\u3001\u6570\u5e74\u524d\u307e\u3067\u3001\u6a19\u6e96\u88c5\u5099\u3055\u308c\u3066\u3044\u305f\u3088\u3046\u306b\u8a18\u61b6\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3001\u3001\uff1f\uff09\u30dd\u30fc\u30c8\u306b\u306f\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306b\u3088\u308b\u30d5\u30ed\u30fc\u5236\u5fa1\u306b\u5229\u7528\u53ef\u80fd\u306aRTS\u7aef\u5b50\u304c\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/rfsec.ddns.net\/blog2\/files\/RS232C.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/rfsec.ddns.net\/blog2\/files\/RS232C.png\" width=\"178\" height=\"240\" alt=\"\"><\/a><br \/>\n\u3053\u306e\u7aef\u5b50\u3092\u3001\u9ad8\u901f\u3067ON\/OFF\u3059\u308b\u3053\u3068\u3067\u3001\u96fb\u6ce2\u3068\u3057\u3066\u653e\u5c04\u3067\u304d\u306a\u3044\u304b\u3001\u5b9f\u9a13\u3092\u3057\u3066\u307f\u305f\u3002RTS\u7aef\u5b50\u3092\u30aa\u30b7\u30ed\u3067\u89b3\u6e2c\u3057\u305f\u69d8\u5b50\u3002\uff14\uff16KH\uff5a\u7a0b\u5ea6\u3067\u3001\u5468\u671f\u304c\u304b\u306a\u308a\u5909\u52d5\u3057\u3066\u3044\u308b\u3002<br \/>\n<a href=\"https:\/\/rfsec.ddns.net\/blog2\/files\/RTS&#45;On&#45;Off.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/rfsec.ddns.net\/blog2\/files\/RTS&#45;On&#45;Off.png\" width=\"320\" height=\"190\" alt=\"\"><\/a><br \/>\n<a href=\"https:\/\/youtu.be\/YtIuUOOOiLs\" target=\"_blank\" rel=\"noopener\">\u96fb\u6ce2\u306e\u30b9\u30da\u30af\u30c8\u30e9\u30e0\u3092\u89b3\u6e2c\u3057\u305f\u69d8\u5b50\u306eyoutube\u52d5\u753b\u306f\u3053\u3061\u3089\u3000https:\/\/youtu.be\/YtIuUOOOiLs<\/a><br \/>\n\u52d5\u753b\u306e\u5de6\u5074\u306f\u3001Raspberry Pi3\u306eGPIO\u7aef\u5b50\u3092\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2\u3067On\/Off\u3057\u305f\u6642\u306e\u30b9\u30da\u30af\u30c8\u30e9\u30e0\u6ce2\u5f62\u3002\u53f3\u5074\u304cPC\u306eRS&#45;232C\u7aef\u5b50\u3092On\/Off\u3057\u305f\u969b\u306e\u3001\u30b9\u30da\u30af\u30c8\u30e9\u30e0\u6ce2\u5f62\u3002Windows\u3067\u306fOn\/Off\u5468\u671f\u306e\u5909\u52d5\u304c\u5927\u304d\u304f\u3001\u30b9\u30da\u30af\u30c8\u30e9\u30e0\u304c\u5927\u304d\u304f\u5e83\u304c\u3063\u3066\u3044\u308b\u3002<br \/>\n<a href=\"https:\/\/rfsec.ddns.net\/blog2\/files\/On&#45;Off.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/rfsec.ddns.net\/blog2\/files\/On&#45;Off.png\" width=\"320\" height=\"180\" alt=\"\"><\/a><br \/>\n<B>\u30d7\u30ed\u30b0\u30e9\u30e0\u4f8b<\/B><br \/>\n<PRE><br \/>\n#include <windows.h><br \/>\n#include<stdio.h><br \/>\nint main()<br \/>\n{<br \/>\nHANDLE hComm;<br \/>\nint Status;<br \/>\nint n;<br \/>\nunsigned clockDivisor = 0;<br \/>\nhComm = CreateFile(&#8220;COM1&#8221;,                \/\/port name<br \/>\nGENERIC_READ | GENERIC_WRITE, \/\/Read\/Write<br \/>\n0,                            \/\/ No Sharing<br \/>\nNULL,                         \/\/ No Security<br \/>\nOPEN_EXISTING,\/\/ Open existing port only<br \/>\n0,            \/\/ Non Overlapped I\/O<br \/>\nNULL);        \/\/ Null for Comm Devices<br \/>\nif (hComm == INVALID_HANDLE_VALUE)<br \/>\nprintf(&#8220;Error in opening serial port&#8221;);<br \/>\nelse {<br \/>\nprintf(&#8220;opening serial port successful&#8221;);<br \/>\nfor(n=0;n<100000;n++){                        \u3000\/\/ \u3053\u3053\u306e\u30eb\u30fc\u30d7\u3067RF\u4fe1\u53f7\u3092\u653e\u5c04\nStatus = EscapeCommFunction(hComm, SETRTS);  \/\/ RTS ON\nStatus = EscapeCommFunction(hComm, CLRRTS);  \/\/ RTS OFF\n}\nprintf(\"Done...\\n\");\nuSleep(5000000);\n}\nCloseHandle(hComm);\/\/Closing the Serial Port\nreturn 0;\n}\n<\/PRE><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PC\u306b\u306f\u3001Raspberry Pi\u3068\u9055\u3063\u3066GPIO\u306e\u3088\u3046\u306a\u7269\u7406\u7684\u306b\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u30c7\u30d0\u30a4\u30b9\u306f\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u3002\u305d\u3053\u3067\u3001\u6700\u8fd1\u306ePC\u306e\u6a19\u6e96\u88c5\u5099\u304b\u3089\u306f\u307b\u3068\u3093\u3069\u59ff\u3092\u6d88\u3057\u305f\u3082\u306e\u306e\u3001RS232C\uff08\u7279\u306b\u6cd5\u4eba\u5411\u3051\u306ePC\u306b\u306f\u3001\u6570\u5e74\u524d\u307e\u3067\u3001\u6a19 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-1599","post","type-post","status-publish","format-standard","hentry","category-airgap"],"featured_image_src":null,"author_info":{"display_name":"Keiichi Horiai","author_link":"https:\/\/rfsec.ddns.net\/db\/?author=2"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/1599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1599"}],"version-history":[{"count":1,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/1599\/revisions"}],"predecessor-version":[{"id":1974,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/1599\/revisions\/1974"}],"wp:attachment":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}