{"id":261,"date":"2025-11-26T16:10:30","date_gmt":"2025-11-26T07:10:30","guid":{"rendered":"https:\/\/ik1-221-80670.vs.sakura.ne.jp\/wordpress\/archives\/261"},"modified":"2026-06-20T15:52:42","modified_gmt":"2026-06-20T06:52:42","slug":"%e3%83%93%e3%83%bc%e3%82%b3%e3%83%b3%ef%bc%88wi-fi-bluetooth%ef%bc%89%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%be%e3%81%a8%e3%82%81","status":"publish","type":"post","link":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/261","title":{"rendered":"\u30d3\u30fc\u30b3\u30f3\u30b3\u30de\u30f3\u30c9\u307e\u3068\u3081"},"content":{"rendered":"<h2>\ud83d\udce1 \u30d3\u30fc\u30b3\u30f3\uff08Wi-Fi\/Bluetooth\uff09\u30b3\u30de\u30f3\u30c9\u307e\u3068\u3081<\/h2>\n<p>Linux\u3067\u306f\u3001Wi-Fi\u3084Bluetooth\u306e\u30d3\u30fc\u30b3\u30f3\uff08Beacon\uff09\u3092\u9001\u53d7\u4fe1\u30fb\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001Wi-Fi\u30d3\u30fc\u30b3\u30f3\u3068BLE\u30d3\u30fc\u30b3\u30f3\u306e\u4e21\u65b9\u306b\u3064\u3044\u3066\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>\ud83d\udd39 Wi-Fi\u30d3\u30fc\u30b3\u30f3\uff08\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u4fe1\u53f7\uff09<\/h2>\n<p>Wi-Fi\u306e\u30d3\u30fc\u30b3\u30f3\u306f\u3001\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\uff08AP\uff09\u304cSSID\u3084\u30c1\u30e3\u30cd\u30eb\u306a\u3069\u306e\u60c5\u5831\u3092\u5468\u56f2\u306b\u767a\u4fe1\u3059\u308b\u4fe1\u53f7\u3067\u3059\u3002Linux\u3067\u306f <code>hostapd<\/code> \u3092\u4f7f\u3063\u3066\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<hr \/>\n<h3>\ud83e\udded \u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\uff08\u30d3\u30fc\u30b3\u30f3\uff09\u3092\u7acb\u3066\u308b<\/h3>\n<h4>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4f8b <code>\/etc\/hostapd\/hostapd.conf<\/code><\/h4>\n<pre><code class=\"language-bash\">interface=wlan0\ndriver=nl80211\nssid=MyBeacon\nhw_mode=g\nchannel=6\nauth_algs=1\nignore_broadcast_ssid=0\n<\/code><\/pre>\n<h4>\u8d77\u52d5\u30b3\u30de\u30f3\u30c9<\/h4>\n<pre><code class=\"language-bash\">sudo hostapd \/etc\/hostapd\/hostapd.conf\n<\/code><\/pre>\n<p>\u3053\u308c\u3067SSID\u300cMyBeacon\u300d\u3092\u767a\u4fe1\u3059\u308bWi-Fi\u30d3\u30fc\u30b3\u30f3\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<hr \/>\n<h3>\ud83d\udef0\ufe0f \u30d3\u30fc\u30b3\u30f3\u60c5\u5831\u3092\u78ba\u8a8d\uff08\u30b9\u30ad\u30e3\u30f3\uff09<\/h3>\n<pre><code class=\"language-bash\">sudo iw dev wlan0 scan | grep SSID\n<\/code><\/pre>\n<p>\u307e\u305f\u306f\u8a73\u7d30\u8868\u793a\uff1a<\/p>\n<pre><code class=\"language-bash\">sudo iw dev wlan0 scan\n<\/code><\/pre>\n<hr \/>\n<h2>\ud83d\udd39 Bluetooth\u30d3\u30fc\u30b3\u30f3\uff08BLE Beacon\uff09<\/h2>\n<p>Bluetooth Low Energy\uff08BLE\uff09\u30d3\u30fc\u30b3\u30f3\u306f\u3001UUID\u306a\u3069\u306e\u30c7\u30fc\u30bf\u3092\u5468\u671f\u7684\u306b\u767a\u4fe1\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002iBeacon\u3084Eddystone\u306a\u3069\u306e\u5f62\u5f0f\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<hr \/>\n<h3>\ud83d\udce1 BLE\u30d3\u30fc\u30b3\u30f3\u3092\u30b9\u30ad\u30e3\u30f3\uff08\u53d7\u4fe1\uff09<\/h3>\n<pre><code class=\"language-bash\">sudo hcitool lescan\n<\/code><\/pre>\n<p>\u2192 \u8fd1\u304f\u306eBLE\u30c7\u30d0\u30a4\u30b9\u3092\u691c\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u8a73\u7d30\u60c5\u5831\u3092\u78ba\u8a8d\uff1a<\/p>\n<pre><code class=\"language-bash\">sudo hcidump --raw\n<\/code><\/pre>\n<hr \/>\n<h3>\ud83d\udd27 BLE\u30d3\u30fc\u30b3\u30f3\u3092\u9001\u4fe1\uff08\u767a\u4fe1\uff09<\/h3>\n<h4>\u65b9\u6cd5\u2460\uff1a<code>hcitool<\/code>\uff08\u65e7\u5f0f\uff09<\/h4>\n<pre><code class=\"language-bash\">sudo hciconfig hci0 up\nsudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 06 1A FF 4C 00 02 15 &lt;UUID&gt; &lt;MAJOR&gt; &lt;MINOR&gt; &lt;TXPOWER&gt;\nsudo hciconfig hci0 leadv 3\n<\/code><\/pre>\n<p>\u203b <code>&lt;UUID&gt;<\/code> \u3084 <code>&lt;MAJOR&gt;<\/code> <code>&lt;MINOR&gt;<\/code> \u3092iBeacon\u5f62\u5f0f\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h4>\u65b9\u6cd5\u2461\uff1a<code>btmgmt<\/code>\uff08\u63a8\u5968\uff09<\/h4>\n<pre><code class=\"language-bash\">sudo btmgmt -i hci0 power on\nsudo btmgmt add-adv -d 0 -t 3 -l 100 --name \"MyBeacon\"\n<\/code><\/pre>\n<p>\u3053\u308c\u3067Bluetooth\u30a2\u30c0\u30d7\u30bf\u304c\u5468\u671f\u7684\u306b\u30d3\u30fc\u30b3\u30f3\u4fe1\u53f7\u3092\u767a\u4fe1\u3057\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>\u2705 \u307e\u3068\u3081\u8868<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u76ee\u7684<\/th>\n<th>\u7a2e\u985e<\/th>\n<th>\u4e3b\u306a\u30b3\u30de\u30f3\u30c9<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Wi-Fi\u30d3\u30fc\u30b3\u30f3\u9001\u4fe1<\/td>\n<td>Wi-Fi AP\u30e2\u30fc\u30c9<\/td>\n<td><code>hostapd<\/code><\/td>\n<td>\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066SSID\u3092\u767a\u4fe1<\/td>\n<\/tr>\n<tr>\n<td>Wi-Fi\u30d3\u30fc\u30b3\u30f3\u78ba\u8a8d<\/td>\n<td>Wi-Fi\u30b9\u30ad\u30e3\u30f3<\/td>\n<td><code>iw dev wlan0 scan<\/code><\/td>\n<td>\u5468\u56f2\u306e\u30d3\u30fc\u30b3\u30f3\u3092\u691c\u51fa<\/td>\n<\/tr>\n<tr>\n<td>BLE\u30d3\u30fc\u30b3\u30f3\u9001\u4fe1<\/td>\n<td>Bluetooth<\/td>\n<td><code>btmgmt add-adv<\/code> \/ <code>hcitool cmd<\/code><\/td>\n<td>iBeacon\/Eddystone\u767a\u4fe1<\/td>\n<\/tr>\n<tr>\n<td>BLE\u30d3\u30fc\u30b3\u30f3\u53d7\u4fe1<\/td>\n<td>Bluetooth<\/td>\n<td><code>hcitool lescan<\/code> \/ <code>bluetoothctl scan on<\/code><\/td>\n<td>\u8fd1\u304f\u306eBLE\u30d3\u30fc\u30b3\u30f3\u691c\u51fa<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>\ud83d\udca1 \u88dc\u8db3<\/h2>\n<ul>\n<li>Wi-Fi\u30d3\u30fc\u30b3\u30f3\u306f <strong>\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u30e2\u30fc\u30c9<\/strong> \u3067\u306e\u307f\u767a\u4fe1\u53ef\u80fd\u3002<\/li>\n<li>BLE\u30d3\u30fc\u30b3\u30f3\u306f <strong>Bluetooth 4.0+ \u30a2\u30c0\u30d7\u30bf<\/strong> \u3067\u9001\u4fe1\u53ef\u80fd\uff08Raspberry Pi\u306a\u3069\uff09\u3002<\/li>\n<li><code>btmgmt<\/code> \u306f <code>hcitool<\/code> \u306e\u5f8c\u7d99\u3067\u3001\u3088\u308a\u5b89\u5b9a\u3057\u305f\u30d3\u30fc\u30b3\u30f3\u5236\u5fa1\u304c\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<\/ul>\n<hr \/>\n<p>Wi-Fi\u3068Bluetooth\u306e\u30d3\u30fc\u30b3\u30f3\u30b3\u30de\u30f3\u30c9\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u7121\u7dda\u901a\u4fe1\u306e\u767a\u4fe1\u30fb\u691c\u51fa\u30fb\u30c7\u30d0\u30c3\u30b0\u3092\u67d4\u8edf\u306b\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udce1 \u30d3\u30fc\u30b3\u30f3\uff08Wi-Fi\/Bluetooth\uff09\u30b3\u30de\u30f3\u30c9\u307e\u3068\u3081 Linux\u3067\u306f\u3001Wi-Fi\u3084Bluetooth\u306e\u30d3\u30fc\u30b3\u30f3\uff08Beacon\uff09\u3092\u9001\u53d7\u4fe1\u30fb\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001Wi-Fi\u30d3\u30fc\u30b3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-261","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":1,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":385,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/261\/revisions\/385"}],"wp:attachment":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}