{"id":14,"date":"2018-04-09T22:00:59","date_gmt":"2018-04-09T13:00:59","guid":{"rendered":"http:\/\/ps2.ddns.net\/press\/?p=5"},"modified":"2021-04-09T10:26:37","modified_gmt":"2021-04-09T01:26:37","slug":"airgap2","status":"publish","type":"post","link":"https:\/\/rfsec.ddns.net\/db\/?p=14","title":{"rendered":"\u7121\u7dda\u3067AirGap\u3092\u8d85\u3048\u308b"},"content":{"rendered":"\n<p><strong>\uff08\u305d\u306e\uff12\u3000Windows10\u3000RS-232C\u30dd\u30fc\u30c8\u306eON\/OFF\uff09<\/strong><\/p>\n\n\n\n<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<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/ps2.ddns.net\/blog2\/files\/RS232C.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\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<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/ps2.ddns.net\/blog2\/files\/RTS-On-Off.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\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-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<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/ps2.ddns.net\/blog2\/files\/On-Off.png\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>\u30d7\u30ed\u30b0\u30e9\u30e0\u4f8b\n\n\n#include &lt;windows.h&gt;\n#include&lt;stdio.h&gt;\nint main()\n{\n  HANDLE hComm;\n  int Status;\n  int n;\n  unsigned clockDivisor = 0;\n  hComm = CreateFile(\"COM1\",                \/\/port name\n                      GENERIC_READ | GENERIC_WRITE, \/\/Read\/Write\n                      0,                            \/\/ No Sharing\n                      NULL,                         \/\/ No Security\n                      OPEN_EXISTING,\/\/ Open existing port only\n                      0,            \/\/ Non Overlapped I\/O\n                      NULL);        \/\/ Null for Comm Devices\n  if (hComm == INVALID_HANDLE_VALUE)\n      printf(\"Error in opening serial port\");\n  else {\n      printf(\"opening serial port successful\");\n      for(n=0;n&lt;100000;n++){                        \u3000\/\/ \u3053\u3053\u306e\u30eb\u30fc\u30d7\u3067RF\u4fe1\u53f7\u3092\u653e\u5c04\n     \tStatus = EscapeCommFunction(hComm, SETRTS);  \/\/ RTS ON\n      \tStatus = EscapeCommFunction(hComm, CLRRTS);  \/\/ RTS OFF\n      }\n      printf(\"Done...\\n\");\n      uSleep(5000000);\n      }\n  CloseHandle(hComm);\/\/Closing the Serial Port\n  return 0;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uff08\u305d\u306e\uff12\u3000Windows10\u3000RS-232C\u30dd\u30fc\u30c8\u306eON\/OFF\uff09 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,3,5],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-security","category-network","category-radio"],"featured_image_src":null,"author_info":{"display_name":"mars","author_link":"https:\/\/rfsec.ddns.net\/db\/?author=1"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/14","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":1,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rfsec.ddns.net\/db\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}