{"id":488,"date":"2025-12-23T20:50:09","date_gmt":"2025-12-23T12:50:09","guid":{"rendered":"https:\/\/www.garfield-blog.top\/?p=488"},"modified":"2026-01-05T14:35:44","modified_gmt":"2026-01-05T06:35:44","slug":"%e3%80%90%e5%b7%a5%e5%85%b7%e4%bd%bf%e7%94%a8%e3%80%91hostapd%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4%e5%8f%8a%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.garfield-blog.top\/?p=488","title":{"rendered":"\u3010\u5de5\u5177\u4f7f\u7528\u3011hostapd\u5e38\u7528\u547d\u4ee4\u53ca\u914d\u7f6e"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u6982\u8ff0<\/h2>\n\n\n\n<p>\u5728<code>hostapd<\/code>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u4f1a\u751f\u6210\u4e00\u4e2a<code>hostapd_cli<\/code>\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<code>hostapd_cli<\/code>\u662f\u4e00\u6b3e\u7528\u4f5c\u65e0\u7ebf<code>AP<\/code>\u529f\u80fd\u7684\u5ba2\u6237\u7aef\u7a0b\u5e8f\u3002\u5b83\u9700\u8981\u4e0e<code>hostapd<\/code>\u4e3b\u7a0b\u5e8f\u914d\u7f6e\u4f7f\u7528\uff0c\u4f7f\u7528<code>hostapd_cli -h<\/code>\u547d\u4ee4\u53ef\u4ee5\u770b\u5230\u652f\u6301\u7684\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pi@pi:~\/code\/hostapd-2.9\/hostapd $ .\/hostapd_cli -h\nhostapd_cli v2.9\nCopyright (c) 2004-2019, Jouni Malinen &lt;j@w1.fi&gt; and contributors\n\nusage: hostapd_cli &#91;-p&lt;path&gt;] &#91;-i&lt;ifname&gt;] &#91;-hvB] &#91;-a&lt;path&gt;] \\\n                   &#91;-P&lt;pid file&gt;] &#91;-G&lt;ping interval&gt;] &#91;command..]\n\nOptions:\n   -h           help (show this usage text)\n   -v           shown version information\n   -p&lt;path&gt;     path to find control sockets (default: \/var\/run\/hostapd)\n   -s&lt;dir_path&gt; dir path to open client sockets (default: \/var\/run\/hostapd)\n   -a&lt;file&gt;     run in daemon mode executing the action file based on events\n                from hostapd\n   -B           run a daemon in the background\n   -i&lt;ifname&gt;   Interface to listen on (default: first interface found in the\n                socket path)\n\ncommands:\n  ping = pings hostapd\n  mib = get MIB variables (dot1x, dot11, radius)\n  relog = reload\/truncate debug log output file\n  status = show interface status info\n  sta &lt;addr&gt; = get MIB variables for one station\n  all_sta = get MIB variables for all stations\n  list_sta = list all stations\n  new_sta &lt;addr&gt; = add a new station\n  deauthenticate &lt;addr&gt; = deauthenticate a station\n  disassociate &lt;addr&gt; = disassociate a station\n  sa_query &lt;addr&gt; = send SA Query to a station\n  disassoc_imminent = send Disassociation Imminent notification\n  ess_disassoc = send ESS Dissassociation Imminent notification\n  bss_tm_req = send BSS Transition Management Request\n  get_config = show current configuration\n  help = show this usage help\n  interface &#91;ifname] = show interfaces\/select interface\n  raw &lt;params..&gt; = send unprocessed command\n  level &lt;debug level&gt; = change debug level\n  license = show full hostapd_cli license\n  quit = exit hostapd_cli\n  set &lt;name&gt; &lt;value&gt; = set runtime variables\n  get &lt;name&gt; = get runtime info\n  set_qos_map_set &lt;arg,arg,...&gt; = set QoS Map set element\n  send_qos_map_conf &lt;addr&gt; = send QoS Map Configure frame\n  chan_switch &lt;cs_count&gt; &lt;freq&gt; &#91;sec_channel_offset=] &#91;center_freq1=]\n    &#91;center_freq2=] &#91;bandwidth=] &#91;blocktx] &#91;ht|vht]\n    = initiate channel switch announcement\n  hs20_wnm_notif &lt;addr&gt; &lt;url&gt;\n    = send WNM-Notification Subscription Remediation Request\n  hs20_deauth_req &lt;addr&gt; &lt;code (0\/1)&gt; &lt;Re-auth-Delay(sec)&gt; &#91;url]\n    = send WNM-Notification imminent deauthentication indication\n  vendor &lt;vendor id&gt; &lt;sub command id&gt; &#91;&lt;hex formatted data&gt;]\n    = send vendor driver command\n  enable = enable hostapd on current interface\n  reload = reload configuration for current interface\n  disable = disable hostapd on current interface\n  update_beacon = update Beacon frame contents\n  erp_flush = drop all ERP keys\n  log_level &#91;level] = show\/change log verbosity level\n  pmksa  = show PMKSA cache entries\n  pmksa_flush  = flush PMKSA cache\n  set_neighbor &lt;addr&gt; &lt;ssid=&gt; &lt;nr=&gt; &#91;lci=] &#91;civic=] &#91;stat]\n    = add AP to neighbor database\n  remove_neighbor &lt;addr&gt; &lt;ssid=&gt; = remove AP from neighbor database\n  req_lci &lt;addr&gt; = send LCI request to a station\n  req_range  = send FTM range request\n  driver_flags  = show supported driver flags\n  accept_acl =Add\/Delete\/Show\/Clear accept MAC ACL\n  deny_acl =Add\/Delete\/Show\/Clear deny MAC ACL\n  poll_sta &lt;addr&gt; = poll a STA to check connectivity with a QoS null frame\n  req_beacon &lt;addr&gt; &#91;req_mode=] &lt;measurement request hexdump&gt;  = send a Beacon report request to a station\n  reload_wpa_psk = reload wpa_psk_file only<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">1. hostapd_cli ping<\/h2>\n\n\n\n<p>\u5f53\u4f60\u6267\u884c<code>hostapd_cli ping<\/code>\u547d\u4ee4\u65f6\uff0c\u5b83\u5c06\u5411 hostapd \u53d1\u9001\u4e00\u4e2a\u7b80\u5355\u7684\u8bf7\u6c42\uff0c<code>hostapd<\/code>\u4f1a\u8fd4\u56de\u4e00\u4e2a\u54cd\u5e94\u3002\u8fd9\u4e2a\u547d\u4ee4\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5<code>hostapd<\/code>\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\uff0c\u5e76\u68c0\u67e5\u4e0e<code>hostapd<\/code>\u7684\u8fde\u63a5\u662f\u5426\u901a\u7545<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-ping.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"84\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-ping.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-495\"  sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. hostapd_cli mib<\/h2>\n\n\n\n<p>\u663e\u793a<code>MIB<\/code>(\u7ba1\u7406\u4fe1\u606f\u5e93)\u53d8\u91cf\uff0c\u5982<code>dot1x\/dot11\/radius<\/code>\u72b6\u6001\u4fe1\u606f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. hostapd_cli relog<\/h2>\n\n\n\n<p><code>relog<\/code>\u547d\u4ee4\u4f1a\u5f3a\u5236<code>hostapd<\/code>\u91cd\u65b0\u52a0\u8f7d\u5176\u65e5\u5fd7\u914d\u7f6e\uff0c\u901a\u5e38\u7528\u4e8e\u66f4\u65b0\u6216\u66f4\u6539\u65e5\u5fd7\u8bbe\u7f6e\u540e\uff0c\u786e\u4fdd\u65b0\u7684\u65e5\u5fd7\u914d\u7f6e\u7acb\u5373\u751f\u6548\uff0c\u5f53\u4fee\u6539\u4e86<code>hostapd<\/code>\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u65e5\u5fd7\u7ea7\u522b(<code>logger_stdout_leve<\/code>\u3001<code>logger_syslog_level<\/code>\u7b49) \u65f6\uff0c\u6267\u884c<code>hostapd_cli relog<\/code>\u547d\u4ee4\u53ef\u4ee5\u5e94\u7528\u8fd9\u4e9b\u66f4\u6539<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. hostapd_cli status<\/h2>\n\n\n\n<p>\u901a\u8fc7<code>status<\/code>\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u83b7\u53d6<code>hostapd<\/code>\u7684\u5f53\u524d\u8fd0\u884c\u72b6\u6001\uff0c\u67e5\u770b\u65e0\u7ebf\u7f51\u7edc\u63a5\u53e3\u7684\u914d\u7f6e\u4fe1\u606f\u3001\u63a5\u5165\u70b9\u72b6\u6001\u3001\u6d3b\u52a8\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u72b6\u6001\u7b49<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-status.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"604\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-status.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-494\"  sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">5. hostapd_cli all_sta<\/h2>\n\n\n\n<p>\u8bfb\u53d6<code>ap<\/code>\u6240\u6709\u7684\u4e0b\u6302<code>sta<\/code>\u5177\u4f53\u4fe1\u606f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-all_sta.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"700\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-all_sta.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-493\"  sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">6. hostapd_cli sta [sta_MAC]<\/h2>\n\n\n\n<p>\u8bfb\u53d6<code>ap<\/code>\u7684\u6307\u5b9a<code>mac<\/code>\u7684\u4e0b\u6302<code>sta<\/code>\u5177\u4f53\u4fe1\u606f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-sta-sta_MAC.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"775\" height=\"361\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-sta-sta_MAC.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-492\"  sizes=\"auto, (max-width: 775px) 100vw, 775px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">7. hostapd_cli list_sta<\/h2>\n\n\n\n<p>\u5217\u51fa\u6240\u6709\u5df2\u8fde\u63a5\u5230\u5f53\u524d<code>AP<\/code>\u7684\u8bbe\u5907<code>MAC<\/code>\u5730\u5740<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-list_sta.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"80\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-list_sta.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-491\"  sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">8. hostapd_cli new_sta [sta_MAC]<\/h2>\n\n\n\n<p>\u5411<code>hostapd<\/code>\u7684\u5185\u90e8\u72b6\u6001\u8868\u4e2d\u624b\u52a8\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684<code>STA<\/code>\uff0c\u591a\u7528\u4e8e\u8c03\u8bd5<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9. hostapd_cli deauthenticate [sta_MAC]<\/h2>\n\n\n\n<p><code>hostapd_cli deauthenticate<\/code>\u547d\u4ee4\u901a\u8fc7\u53bb\u8ba4\u8bc1(<code>deauthentication<\/code>)\u64cd\u4f5c\u65ad\u5f00\u67d0\u4e2a\u5ba2\u6237\u7aef\u4e0e\u63a5\u5165\u70b9\u7684\u8fde\u63a5\uff0c\u9002\u7528\u4e8e\u65e0\u7ebf\u7f51\u7edc\u7ba1\u7406\u4e2d\u9700\u8981\u63a7\u5236\u5ba2\u6237\u7aef\u8fde\u63a5\u7684\u573a\u666f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. hostapd_cli disassociate [sta_MAC]<\/h2>\n\n\n\n<p>\u53d1\u9001\u4e00\u4e2a\u65ad\u5f00\u5173\u8054(<code>disassociation<\/code>)\u6d88\u606f\u5230\u5ba2\u6237\u7aef\uff0c\u5f3a\u5236\u5b83\u65ad\u5f00\u4e0e\u63a5\u5165\u70b9\u7684\u8fde\u63a5\u3002\u4e0e<code>deauthenticate<\/code>\u4e0d\u540c\uff0c<code>disassociate<\/code>\u4e3b\u8981\u7528\u4e8e\u56e0\u67d0\u4e9b\u539f\u56e0\u800c\u4f7f\u5ba2\u6237\u7aef\u79bb\u5f00\u65e0\u7ebf\u7f51\u7edc\uff0c\u800c\u4e0d\u4e00\u5b9a\u662f\u7531\u4e8e\u8eab\u4efd\u9a8c\u8bc1\u6216\u5b89\u5168\u95ee\u9898<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">11. hostapd_cli signature [sta_MAC]<\/h2>\n\n\n\n<p><code>signature<\/code>\u547d\u4ee4\u7528\u4e8e\u83b7\u53d6\u7279\u5b9a\u5df2\u8fde\u63a5<code>STA<\/code>\u7684<strong>\u6307\u7eb9\u7279\u5f81\u5b57\u7b26\u4e32<\/strong>\u3002\u8fd9\u4e2a\u5b57\u7b26\u4e32\u57fa\u4e8e\u8be5\u8bbe\u5907\u5728\u8fde\u63a5\u8fc7\u7a0b\u4e2d\u53d1\u9001\u7684<code>IEEE 802.11<\/code>\u5e27(\u5982<code>Probe Request<\/code>\u6216<code>Association Request<\/code>)\u4e2d\u7684\u4fe1\u606f\u5143\u7d20(<code>Information Elements, IEs<\/code>)\u751f\u6210<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">12. hostapd_cli WPS\u76f8\u5173\u529f\u80fd<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u7b14\u8005\u6ce8\uff1a<strong>\u7531\u4e8e\u65e0\u8bbe\u5907\u9a8c\u8bc1\u8fd9\u91cc\u4ec5\u5217\u51fa\u529f\u80fd\u4f5c\u7528\uff0c\u6ca1\u6709\u8fd0\u884c\u7ed3\u679c\u622a\u56fe<\/strong><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">12.1 hostapd_cli wps_pin<\/h3>\n\n\n\n<p>\u5728<code>hostapd_cli<\/code>\u4e2d\uff0c<code>wps_pin<\/code>\u547d\u4ee4\u7528\u4e8e\u542f\u52a8 <strong>WPS PIN \u7801\u8ba4\u8bc1\u6a21\u5f0f<\/strong>\uff0c\u5141\u8bb8\u5ba2\u6237\u7aef(Enrollee)\u901a\u8fc7\u8f93\u5165\u7279\u5b9a\u7684 8 \u4f4d\u6570\u5b57 PIN \u7801\u8fde\u63a5\u5230\u65e0\u7ebf\u70ed\u70b9<\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli wps_pin &lt;UUID|any&gt; &lt;PIN&gt; &#91;timeout] &#91;MAC\u5730\u5740]<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u6570\u683c\u5f0f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>UUID|any<\/strong>\uff1a\u6307\u5b9a\u5141\u8bb8\u8fde\u63a5\u7684\u5ba2\u6237\u7aef<code>UUID<\/code><\/li>\n\n\n\n<li>\u5982\u679c\u4e0d\u786e\u5b9a\u8bbe\u5907\u7684<code>UUID<\/code>\uff0c\u901a\u5e38\u4f7f\u7528 <strong><code>any<\/code><\/strong>\uff0c\u8868\u793a\u5141\u8bb8\u4efb\u4f55<code>UUID<\/code>\u7684\u8bbe\u5907\u5c1d\u8bd5\u4f7f\u7528\u8be5 PIN \u7801\u8fde\u63a5<\/li>\n\n\n\n<li><strong>PIN<\/strong>\uff1a\u8bbe\u5b9a\u7684<code>8<\/code>\u4f4d\u6570\u5b57<code>PIN<\/code>\u7801(\u4f8b\u5982<code>12345670<\/code>)<\/li>\n\n\n\n<li><strong>timeout<\/strong>(\u53ef\u9009)\uff1a\u8be5<code>PIN<\/code>\u7801\u7684\u6709\u6548\u671f(\u79d2)\u3002\u9ed8\u8ba4\u4e3a<code>0<\/code>(\u6c38\u4e0d\u8fc7\u671f)\uff0c\u5efa\u8bae\u8bbe\u7f6e\u4e00\u4e2a\u5408\u7406\u7684\u65f6\u95f4(\u5982<code>300<\/code>\u79d2)\u4ee5\u589e\u5f3a\u5b89\u5168\u6027<\/li>\n\n\n\n<li><strong>MAC\u5730\u5740<\/strong>(\u53ef\u9009)\uff1a\u9650\u5b9a\u53ea\u6709\u8be5<code>MAC<\/code>\u5730\u5740\u7684\u8bbe\u5907\u624d\u80fd\u4f7f\u7528\u6b64<code>PIN<\/code>\u7801\u8fde\u63a5<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">12.2 hostapd_cli wps_check_pin [pin]<\/h3>\n\n\n\n<p>\u7528\u4e8e\u9884\u9a8c\u8bc1<code>WPS PIN<\/code>\u7801\u683c\u5f0f\u548c\u6821\u9a8c\u548c<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.3 hostapd_cli wps_pbc<\/h3>\n\n\n\n<p><code>wps_pbc<\/code>\u547d\u4ee4\u7528\u4e8e\u89e6\u53d1<code>WPS<\/code>\u6309\u94ae\u914d\u7f6e\u6a21\u5f0f(<code>Push Button Configuration<\/code>)\uff0c\u8fd9\u662f\u76ee\u524d\u6700\u5e38\u7528\u7684\u65e0\u7ebf\u914d\u7f51\u65b9\u5f0f\uff0c\u6a21\u62df\u4e86\u7269\u7406\u8def\u7531\u5668\u4e0a\u7684<code>WPS<\/code>\u6309\u94ae<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.4 hostapd_cli wps_cancel<\/h3>\n\n\n\n<p><code>wps_cancel<\/code>\u547d\u4ee4\u7528\u4e8e\u7acb\u5373\u7ec8\u6b62\u5f53\u524d\u6b63\u5728\u8fdb\u884c\u7684<code>WPS<\/code>\u6d41\u7a0b<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.5 hostapd_cli wps_nfc_tag_read<\/h3>\n\n\n\n<p><code>wps_nfc_tag_tag<\/code>\u547d\u4ee4\u7528\u4e8e\u901a\u8fc7<code>NFC<\/code>(\u8fd1\u573a\u901a\u4fe1)\u6807\u7b7e\u83b7\u53d6\u7684\u8bbe\u5907\u6570\u636e\u6765\u6388\u6743\u6216\u914d\u7f6e\u4e00\u4e2a\u7ad9\u70b9<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.6 hostapd_cli wps_nfc_config_token<\/h3>\n\n\n\n<p><code>wps_nfc_config_token<\/code>\u547d\u4ee4\u7528\u4e8e\u751f\u6210\u4e00\u4e2a\u5305\u542b\u5f53\u524d\u65e0\u7ebf\u70ed\u70b9(<code>AP<\/code>)\u914d\u7f6e\u4fe1\u606f\u7684\u6570\u636e\u5305\u3002\u8fd9\u4e2a\u6570\u636e\u5305\u901a\u5e38\u4f1a\u88ab\u5199\u5165\u4e00\u4e2a<code>NFC<\/code>\u6807\u7b7e\uff0c\u8ba9\u5916\u90e8\u8bbe\u5907\u901a\u8fc7\u201c\u78b0\u4e00\u78b0\u201d\u7684\u65b9\u5f0f\u83b7\u53d6<code>Wi-Fi<\/code>\u51ed\u636e\u5e76\u81ea\u52a8\u8fde\u63a5<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.7 hostapd_cli wps_nfc_token<\/h3>\n\n\n\n<p><code>wps_nfc_token<\/code>\u547d\u4ee4\u7528\u4e8e\u751f\u6210\u4e00\u4e2a\u7279\u5b9a\u4e8e\u5f53\u524d<code>AP<\/code>\u7684<code>WPS<\/code>\u5bc6\u7801\u4ee4\u724c(<code>Password Token<\/code>)\u4e0e\u4e4b\u524d\u7684<code>wps_nfc_config_token<\/code>\u76f4\u63a5\u63d0\u4f9b<code>Wi-Fi<\/code>\u5bc6\u7801\u4e0d\u540c\uff0c\u8fd9\u4e2a\u547d\u4ee4\u751f\u6210\u7684\u4ee4\u724c\u901a\u5e38\u7528\u4e8e\u5e26\u5916(<code>Out-of-Band, OOB<\/code>)\u8eab\u4efd\u9a8c\u8bc1\u6d41\u7a0b\uff0c\u63d0\u4f9b\u66f4\u9ad8\u7ea7\u522b\u7684\u5b89\u5168\u6027<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.8 hostapd_cli wps_ap_pin<\/h3>\n\n\n\n<p>\u6b64\u547d\u4ee4\u751f\u6210\u4e00\u4e2a\u7528\u4e8e<code>WPS<\/code>\u914d\u7f6e\u7684<code>PIN<\/code>\uff0c\u8be5<code>PIN<\/code>\u53ef\u4ee5\u7528\u4e8e\u4e0e\u8bbe\u5907\u8fdb\u884c\u914d\u5bf9\u3002\u5f53\u8bbe\u5907\u652f\u6301<code>WPS PIN<\/code>\u914d\u7f6e\u65f6\uff0c\u53ef\u4ee5\u8f93\u5165\u8be5<code>PIN<\/code>\u6765\u5b8c\u6210<code>Wi-Fi<\/code>\u7f51\u7edc\u7684\u8fde\u63a5<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.9 hostapd_cli wps_config<\/h3>\n\n\n\n<p>\u67e5\u770b<code>WPS<\/code>\u914d\u7f6e\uff1a\u901a\u8fc7\u8fd0\u884c\u6b64\u547d\u4ee4\uff0c\u53ef\u4ee5\u67e5\u770b\u5f53\u524d<code>hostapd<\/code>\u914d\u7f6e\u4e2d\u7684<code>WPS<\/code>\u8bbe\u7f6e\uff0c\u786e\u4fdd\u63a5\u5165\u70b9\u652f\u6301<code>WPS<\/code>\u529f\u80fd\u5e76\u5df2\u6b63\u786e\u914d\u7f6e<\/p>\n\n\n\n<p>\u914d\u7f6e<code>WPS<\/code>\uff1a\u901a\u8fc7\u4fee\u6539<code>hostapd<\/code>\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684<code>WPS<\/code>\u8bbe\u7f6e\uff0c\u63a7\u5236\u63a5\u5165\u70b9\u5982\u4f55\u4e0e\u5ba2\u6237\u7aef\u8fdb\u884c\u914d\u5bf9<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">12.10 hostapd_cli wps_get_status<\/h3>\n\n\n\n<p>\u83b7\u53d6<code>wps<\/code>\u7684\u5f53\u524d\u72b6\u6001\uff0c\u5f00\u542f<code>wps<\/code>\u529f\u80fd\u672a\u89e6\u53d1\u65f6<code>Disabled<\/code>\uff0c<code>wps<\/code>\u89e6\u53d1\u540e\u662f<code>Active<\/code>\uff0c\u8d85\u65f6\u672a\u8fde\u63a5\u65f6\u662f<code>Timed out<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">13. hostapd_cli disassoc_imminent<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli disassoc_imminent &lt;MAC\u5730\u5740&gt; &lt;\u65ad\u5f00\u5012\u8ba1\u65f6(TU)&gt;<\/code><\/pre>\n\n\n\n<p><strong>\u4f5c\u7528<\/strong><\/p>\n\n\n\n<p><code>hostapd_cli disassoc_imminent<\/code>\u547d\u4ee4\u7528\u4e8e\u5411\u67d0\u4e2a\u65e0\u7ebf<code>STA<\/code>\u53d1\u9001<code>Disassociation Imminent<\/code>\u62a5\u6587\u3002\u8be5\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u901a\u77e5\u5ba2\u6237\u7aef\u5373\u5c06\u4e0e<code>AP<\/code>\u65ad\u5f00\u8fde\u63a5\uff0c\u5e76\u544a\u77e5\u5b83\u5373\u5c06\u5931\u53bb\u4e0e\u63a5\u5165\u70b9\u7684\u5173\u8054\u3002\u901a\u5e38\uff0c\u8fd9\u79cd\u547d\u4ee4\u7528\u4e8e\u8b66\u544a\u5ba2\u6237\u7aef\u51c6\u5907\u65ad\u5f00\u8fde\u63a5<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">14. hostapd_cli ess_disassoc<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli ess_disassoc &lt;MAC\u5730\u5740&gt; &lt;\u65ad\u5f00\u5012\u8ba1\u65f6(\u79d2)&gt; &lt;URL&gt;<\/code><\/pre>\n\n\n\n<p><strong>\u4f5c\u7528<\/strong><\/p>\n\n\n\n<p><code>ess_disassoc<\/code>\u662f<code>802.11u<\/code>\u534f\u8bae\u4e2d\u7684\u4e00\u4e2a\u9ad8\u7ea7\u547d\u4ee4\u3002\u5b83\u7528\u4e8e\u901a\u77e5\u5ba2\u6237\u7aef\uff1a\u201c\u4f60\u5c06\u88ab\u65ad\u5f00\u8fde\u63a5\uff0c\u8bf7\u8bbf\u95ee\u4ee5\u4e0b<code>URL<\/code>\u4ee5\u4e86\u89e3\u539f\u56e0\u6216\u5904\u7406\u8d26\u53f7\u95ee\u9898(\u5982\u6b20\u8d39\u3001\u670d\u52a1\u6761\u6b3e\u66f4\u65b0\u7b49)\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">15. hostapd_cli bss_tm_req<\/h2>\n\n\n\n<p><code>hostapd_cli bss_tm_req<\/code>\u547d\u4ee4\u7528\u4e8e\u5411\u65e0\u7ebf\u5ba2\u6237\u7aef\u53d1\u9001<code>BSS<\/code>\u8fc7\u6e21\u7ba1\u7406\u8bf7\u6c42\uff0c\u8981\u6c42\u8bbe\u5907\u5207\u6362\u5230\u5176\u4ed6\u63a5\u5165\u70b9\u3002\u5b83\u901a\u5e38\u7528\u4e8e\u7f51\u7edc\u8d1f\u8f7d\u5747\u8861\u3001\u65e0\u7f1d\u6f2b\u6e38\u548c\u4f18\u5316\u65e0\u7ebf\u8986\u76d6\u7b49\u573a\u666f\u3002\u901a\u8fc7\u5408\u7406\u914d\u7f6e\u548c\u4f7f\u7528\u6b64\u547d\u4ee4\uff0c\u7ba1\u7406\u5458\u53ef\u4ee5\u4f18\u5316\u65e0\u7ebf\u7f51\u7edc\u7684\u6027\u80fd\u548c\u5ba2\u6237\u7aef\u8bbe\u5907\u7684\u8fde\u63a5\u8d28\u91cf<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">16. hostapd_cli get_config<\/h2>\n\n\n\n<p><code>hostapd_cli get_config<\/code>\u547d\u4ee4\u80fd\u67e5\u770b\u5f53\u524d<code>hostapd<\/code>\u7684\u914d\u7f6e\u5185\u5bb9\u3002\u901a\u8fc7\u8be5\u547d\u4ee4\uff0c\u53ef\u4ee5\u8f7b\u677e\u83b7\u53d6\u65e0\u7ebf\u7f51\u7edc\u8bbe\u7f6e\u3001\u52a0\u5bc6\u65b9\u5f0f\u3001\u8fde\u63a5\u6570\u7b49\u4fe1\u606f\uff0c\u5e2e\u52a9\u5728\u8c03\u8bd5\u3001\u7ba1\u7406\u548c\u4f18\u5316\u65e0\u7ebf\u7f51\u7edc\u65f6\uff0c\u83b7\u5f97\u5173\u952e\u7684\u914d\u7f6e\u4fe1\u606f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-get_config.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"79\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-get_config.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-490\"  sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">17. hostapd_cli interface<\/h2>\n\n\n\n<p><code>interface<\/code>\u547d\u4ee4\u7684\u4e3b\u8981\u529f\u80fd\u662f\u663e\u793a\u5f53\u524dhostapd*\u914d\u7f6e\u7684\u6240\u6709\u63a5\u53e3<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-interface.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"81\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-interface.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-489\"  sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">18. hostapd_cli raw<\/h2>\n\n\n\n<p>\u5f00\u53d1\u8005\u8c03\u8bd5\u65b0\u52a0\u7684<code>hostapd<\/code>\u63a7\u5236\u547d\u4ee4<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u811a\u672c\u4e2d\u53d1\u9001\u52a8\u6001\u547d\u4ee4<\/li>\n\n\n\n<li>\u6d4b\u8bd5<code>hostapd<\/code>\u7684\u54cd\u5e94\u884c\u4e3a<\/li>\n\n\n\n<li>\u6267\u884c\u4e0d\u5e38\u7528\u3001\u7248\u672c\u7279\u6709\u7684\u547d<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">19. hostapd_cli level<\/h2>\n\n\n\n<p><code>hostapd_cli level<\/code>\u547d\u4ee4\u7528\u4e8e\u8bbe\u7f6e\u6216\u67e5\u8be2<code>hostapd<\/code>\u65e5\u5fd7\u8bb0\u5f55\u7684\u65e5\u5fd7\u7ea7\u522b\u3002\u8be5\u547d\u4ee4\u5141\u8bb8\u60a8\u63a7\u5236<code>hostapd<\/code>\u6253\u5370\u7684\u65e5\u5fd7\u4fe1\u606f\u7684\u8be6\u7ec6\u7a0b\u5ea6\u3002\u65e5\u5fd7\u7ea7\u522b\u7684\u8bbe\u7f6e\u4f1a\u5f71\u54cd\u5230\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u3001\u65e5\u5fd7\u6587\u4ef6\u4ee5\u53ca\u7cfb\u7edf\u65e5\u5fd7\u4e2d\u7684\u4fe1\u606f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">20. hostapd_cli license<\/h2>\n\n\n\n<p><code>hostapd_cli license<\/code>\u547d\u4ee4\u7684\u610f\u4e49\u5728\u4e8e\u5411\u7528\u6237\u5c55\u793a<code>hostapd<\/code>(<code>Host Access Point Daemon<\/code>)\u7684\u8bb8\u53ef\u4fe1\u606f\u3002<code>hostapd<\/code>\u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u7528\u4e8e\u5728<code>Linux<\/code>\u7cfb\u7edf\u4e0a\u521b\u5efa\u548c\u7ba1\u7406\u65e0\u7ebf\u63a5\u5165\u70b9\u3002\u901a\u8fc7<code>hostapd_cli license<\/code>\u547d\u4ee4\uff0c\u7528\u6237\u53ef\u4ee5\u67e5\u770b<code>hostapd<\/code>\u7684\u8bb8\u53ef\u8bc1\u4fe1\u606f\uff0c\u4ee5\u786e\u4fdd\u4ed6\u4eec\u9075\u5faa\u76f8\u5e94\u7684\u5f00\u6e90\u8bb8\u53ef\u534f\u8bae<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-license.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"715\" height=\"665\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-license.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-496\"  sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">21. hostapd_cli quit<\/h2>\n\n\n\n<p><code>quit<\/code>\u662f\u4e00\u4e2a\u6700\u57fa\u7840\u7684\u63a7\u5236\u547d\u4ee4\uff0c\u7528\u4e8e\u9000\u51fa\u4ea4\u4e92\u6a21\u5f0f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">22. hostapd_cli set<\/h2>\n\n\n\n<p><code>hostapd_cli set<\/code>\u547d\u4ee4\u7528\u4e8e\u8bbe\u7f6e<code>hostapd<\/code>\u7684\u67d0\u4e9b\u914d\u7f6e\u53c2\u6570\u3002\u901a\u8fc7\u8fd9\u4e2a\u547d\u4ee4\uff0c\u60a8\u53ef\u4ee5\u52a8\u6001\u5730\u4fee\u6539\u8fd0\u884c\u4e2d\u7684<code>hostapd<\/code>\u914d\u7f6e\uff0c\u800c\u4e0d\u5fc5\u91cd\u65b0\u542f\u52a8<code>hostapd<\/code>\u670d\u52a1\u3002\u53ef\u4ee5\u4fee\u6539\u7684\u914d\u7f6e\u9879\u5305\u62ec<code>SSID<\/code>\u3001\u52a0\u5bc6\u65b9\u5f0f\u3001\u4fe1\u9053\u7b49<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">23. hostapd_cli get<\/h2>\n\n\n\n<p><code>hostapd_cli get<\/code>\u547d\u4ee4\u7528\u4e8e\u67e5\u8be2\u5f53\u524d<code>hostapd<\/code>\u914d\u7f6e\u4e2d\u7684\u53c2\u6570\u503c\u3002\u5b83\u5141\u8bb8\u60a8\u67e5\u770b\u67d0\u4e9b\u914d\u7f6e\u9879\u7684\u5f53\u524d\u72b6\u6001\u6216\u503c<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">24. hostapd_cli set_qos_map_set<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli set_qos_map_set &lt;DSCP\u8303\u56f4\u53ca\u6620\u5c04\u503c,\u7528\u9017\u53f7\u5206\u9694&gt;<\/code><\/pre>\n\n\n\n<p><code>hostapd_cli set_qos_map_set<\/code>\u547d\u4ee4\u7528\u4e8e\u8bbe\u7f6e<code>QoS<\/code>(<code>Quality of Service<\/code>)\u6620\u5c04\u89c4\u5219\u3002<code>QoS<\/code>\u7528\u4e8e\u5728\u7f51\u7edc\u4e2d\u4f18\u5148\u4f20\u8f93\u67d0\u4e9b\u7c7b\u578b\u7684\u6d41\u91cf\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u5b9e\u65f6\u5e94\u7528\uff0c\u5982\u89c6\u9891\u548c\u8bed\u97f3\u901a\u8bdd\u3002\u8fd9\u4e2a\u547d\u4ee4\u7528\u4e8e\u8bbe\u7f6e<code>QoS<\/code>\u6620\u5c04\u89c4\u5219\uff0c\u5c06\u4e0d\u540c\u7684\u670d\u52a1\u7c7b\u6620\u5c04\u5230\u4e0d\u540c\u7684\u4f18\u5148\u7ea7<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">25. hostapd_cli send_qos_map_conf<\/h2>\n\n\n\n<p><code>hostapd_cli send_qos_map_conf<\/code>\u547d\u4ee4\u7528\u4e8e\u5c06\u4e4b\u524d\u901a\u8fc7<code>set_qos_map_set<\/code>\u8bbe\u7f6e\u7684<code>QoS<\/code>\u6620\u5c04\u89c4\u5219\u5e94\u7528\u5230\u65e0\u7ebf\u7f51\u7edc\u3002\u8fd9\u4e2a\u547d\u4ee4\u662f\u4e00\u4e2a\u89e6\u53d1\u547d\u4ee4\uff0c\u7528\u4e8e\u901a\u77e5<code>hostapd<\/code>\u5411\u65e0\u7ebf\u5ba2\u6237\u7aef\u5e7f\u64ad<code>QoS<\/code>\u6620\u5c04\u89c4\u5219<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">26. hostapd_cli chan_switch<\/h2>\n\n\n\n<p><code>hostapd_cli chan_switch<\/code>\u547d\u4ee4\u7528\u4e8e<code>hostapd<\/code>\u4e2d\u624b\u52a8\u89e6\u53d1\u65e0\u7ebfAP\u5207\u6362\u9891\u9053\u7684\u64cd\u4f5c<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">27. hostapd_cli hs20_wnm_notif<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli hs20_wnm_notif &lt;MAC\u5730\u5740&gt; &lt;URL&gt;<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u6570\u683c\u5f0f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>MAC\u5730\u5740<\/strong>\uff1a\u63a5\u6536\u8be5\u901a\u77e5\u7684\u7279\u5b9a\u5df2\u8fde\u63a5<code>STA<\/code>\u7684<code>MAC<\/code>\u5730\u5740<\/li>\n\n\n\n<li><strong>URL<\/strong>\uff1a\u901a\u77e5\u4e2d\u643a\u5e26\u7684\u7edf\u4e00\u8d44\u6e90\u5b9a\u4f4d\u7b26(<code>URL<\/code>)<\/li>\n<\/ul>\n\n\n\n<p><strong>\u547d\u4ee4\u4f5c\u7528<\/strong><\/p>\n\n\n\n<p>\u547d\u4ee4\u4f5c\u7528\u8be5\u547d\u4ee4\u7528\u4e8e\u5411\u6307\u5b9a\u7684\u5ba2\u6237\u7aef\u53d1\u9001<code>WNM-Notification<\/code>\u6d88\u606f\uff0c\u7279\u522b\u7528\u4e8e<code>Hotspot 2.0<\/code>(<code>HS2.0<\/code>)\u529f\u80fd<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">28. hostapd_cli hs20_deauth_req<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli hs20_deauth_req &lt;MAC\u5730\u5740&gt; &lt;\u4ee3\u7801&gt; &lt;\u91cd\u65b0\u5173\u8054\u5ef6\u8fdf(\u79d2)&gt; &#91;URL]<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u6570\u683c\u5f0f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>MAC\u5730\u5740<\/strong>\uff1a\u76ee\u6807\u8bbe\u5907\u7684 MAC \u5730\u5740\u3002<\/li>\n\n\n\n<li><strong>\u4ee3\u7801<\/strong>\uff1a\u8868\u793a\u65ad\u5f00\u539f\u56e0\u7684\u6574\u6570\u3002<\/li>\n\n\n\n<li><code>0<\/code>: \u4fdd\u7559\u3002<\/li>\n\n\n\n<li><code>1<\/code>: \u8d26\u6237\u9650\u5236(\u5982\u65f6\u957f\u7528\u5c3d)<\/li>\n\n\n\n<li><code>2<\/code>: \u9700\u8981\u91cd\u65b0\u8ba4\u8bc1(\u670d\u52a1\u6761\u6b3e\u66f4\u65b0)<\/li>\n\n\n\n<li><strong>\u91cd\u65b0\u5173\u8054\u5ef6\u8fdf<\/strong>\uff1a\u4ee5\u79d2\u4e3a\u5355\u4f4d\uff0c\u544a\u8bc9\u5ba2\u6237\u7aef\u5728\u8fd9\u4e2a\u65f6\u95f4\u5185\u4e0d\u8981\u5c1d\u8bd5\u91cd\u65b0\u8fde\u63a5\u6b64<code>AP<\/code><\/li>\n\n\n\n<li><strong>URL<\/strong>(\u53ef\u9009)\uff1a\u5f15\u5bfc\u7528\u6237\u5904\u7406\u95ee\u9898\u7684\u5730\u5740(\u5982\u5145\u503c\u9875\u9762)<\/li>\n<\/ul>\n\n\n\n<p><strong>\u547d\u4ee4\u4f5c\u7528<\/strong><\/p>\n\n\n\n<p>\u8be5\u547d\u4ee4\u7528\u4e8e\u53d1\u9001<code>Deauthentication Request<\/code>(\u53bb\u8ba4\u8bc1\u8bf7\u6c42)\u6d88\u606f\u3002\u8be5\u8bf7\u6c42\u662f<code>Hotspot 2.0<\/code>(<code>HS2.0<\/code>)\u76f8\u5173\u529f\u80fd\u7684\u4e00\u90e8\u5206\uff0c\u7528\u4e8e\u5f3a\u5236\u5ba2\u6237\u7aef\u65ad\u5f00\u8fde\u63a5<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">29. hostapd_cli vendor<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli vendor &lt;vendor_id&gt; &lt;subcmd_id&gt; &#91;\u5341\u516d\u8fdb\u5236\u6570\u636e\u53c2\u6570]<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u6570\u683c\u5f0f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>vendor_id\uff1a<\/strong>\u5382\u5546\u7684<code>OUI<\/code>(\u7ec4\u7ec7\u552f\u4e00\u6807\u8bc6\u7b26)\uff0c\u901a\u5e38\u662f\u4e00\u4e2a<code>24<\/code>\u4f4d\u7684\u5341\u516d\u8fdb\u5236\u6570(\u4f8b\u5982<code>Intel<\/code>\u4e3a<code>0x001735<\/code>\uff0c<code>Realtek<\/code>\u4e3a<code>0x00e04c<\/code>)<\/li>\n\n\n\n<li><strong>subcmd_id<\/strong>\uff1a\u5382\u5546\u81ea\u5b9a\u4e49\u7684\u5b50\u547d\u4ee4<code>ID<\/code><\/li>\n\n\n\n<li><strong>\u5341\u516d\u8fdb\u5236\u6570\u636e<\/strong>\uff1a\u968f\u547d\u4ee4\u53d1\u9001\u7684\u7279\u5b9a\u4e8c\u8fdb\u5236\u8d1f\u8f7d(<code>Payload<\/code>)<\/li>\n<\/ul>\n\n\n\n<p><strong>\u547d\u4ee4\u4f5c\u7528<\/strong><\/p>\n\n\n\n<p><code>vendor<\/code>\u547d\u4ee4\u662f\u4e00\u4e2a\u7528\u4e8e<strong>\u5411\u5e95\u5c42\u65e0\u7ebf\u9a71\u52a8\u7a0b\u5e8f\u53d1\u9001\u5382\u5546\u81ea\u5b9a\u4e49\u547d\u4ee4(Vendor-Specific Commands)<\/strong>\u7684\u9ad8\u7ea7\u8c03\u8bd5\u63a5\u53e3\u3002\u5b83\u662f<code>hostapd<\/code>\u4e0e Linux \u5185\u6838<code>nl80211<\/code>\u9a71\u52a8\u6846\u67b6\u4e4b\u95f4\u7684\u4e00\u4e2a\u900f\u4f20\u901a\u9053\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u4e0d\u4fee\u6539<code>hostapd<\/code>\u6e90\u7801\u7684\u60c5\u51b5\u4e0b\uff0c\u76f4\u63a5\u8c03\u7528\u7f51\u5361\u9a71\u52a8\u7279\u6709\u7684\u79c1\u6709\u529f\u80fd<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">30. hostapd_cli enable<\/h2>\n\n\n\n<p><code>hostapd_cli enable<\/code>\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u542f\u7528<code>hostapd<\/code>\u914d\u7f6e\u7684\u65e0\u7ebf\u63a5\u5165\u70b9\u3002\u901a\u8fc7\u8be5\u547d\u4ee4\uff0c\u53ef\u4ee5\u542f\u7528\u6216\u6fc0\u6d3b<code>hostapd<\/code>\u670d\u52a1\uff0c\u4ece\u800c\u8ba9\u65e0\u7ebf\u63a5\u5165\u70b9\u5f00\u59cb\u5e7f\u64ad\u5e76\u4e3a\u5ba2\u6237\u7aef\u63d0\u4f9b\u8fde\u63a5\u670d\u52a1<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">31. hostapd_cli reload<\/h2>\n\n\n\n<p><code>hostapd_cli reload<\/code>\u547d\u4ee4\u7528\u4e8e\u91cd\u65b0\u52a0\u8f7d<code>hostapd<\/code>\u914d\u7f6e\u6587\u4ef6\uff0c\u800c\u4e0d\u9700\u8981\u505c\u6b62<code>hostapd<\/code>\u670d\u52a1\u3002\u8fd9\u5141\u8bb8<code>hostapd<\/code>\u5e94\u7528\u65b0\u7684\u914d\u7f6e\u800c\u4e0d\u4e2d\u65ad\u5f53\u524d\u7684\u65e0\u7ebf\u670d\u52a1\u3002\u6b64\u547d\u4ee4\u901a\u5e38\u5728\u4fee\u6539\u4e86<code>hostapd<\/code>\u914d\u7f6e\u6587\u4ef6(\u5982<code>hostapd.conf<\/code>)\u540e\u4f7f\u7528\uff0c\u53ef\u4ee5\u8ba9\u914d\u7f6e\u751f\u6548<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">32. hostapd_cli disable<\/h2>\n\n\n\n<p><code>hostapd_cli disable<\/code>\u547d\u4ee4\u7528\u4e8e\u7981\u7528<code>hostapd<\/code>\u670d\u52a1\uff0c\u5373\u5173\u95ed\u65e0\u7ebf\u7f51\u7edc\u7684\u5e7f\u64ad\u548c\u670d\u52a1\u3002\u6267\u884c\u8be5\u547d\u4ee4\u540e\uff0c<code>AP<\/code>\u5c06\u4e0d\u518d\u63d0\u4f9b\u65e0\u7ebf\u7f51\u7edc\u8fde\u63a5\uff0c\u8bbe\u5907\u4e5f\u65e0\u6cd5\u8fde\u63a5\u5230\u8be5<code>AP<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">33. hostapd_cli update_beacon<\/h2>\n\n\n\n<p><code>hostapd_cli update_beacon<\/code>\u547d\u4ee4\u7528\u4e8e\u66f4\u65b0\u5f53\u524d<code>hostapd AP<\/code>\u5e7f\u64ad\u7684<code>beacon<\/code>\u5e27\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u8be5\u547d\u4ee4\u5f3a\u5236<code>hostapd<\/code>\u91cd\u65b0\u751f\u6210\u548c\u53d1\u9001<code>beacon<\/code>\u5e27\uff0c\u4ee5\u4fbf\u66f4\u65b0\u5176\u5e7f\u64ad\u7684\u4fe1\u606f\uff0c\u901a\u5e38\u7528\u4e8e\u4fee\u6539\u65e0\u7ebf\u7f51\u7edc\u914d\u7f6e\u540e\uff0c\u7acb\u5373\u66f4\u65b0<code>AP<\/code>\u7684\u5e7f\u64ad\u4fe1\u606f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">34.hostapd_cli erp_flush<\/h2>\n\n\n\n<p><code>hostapd_cli erp_flush<\/code>\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u5237\u65b0<code>Extended Rate Physical (ERP)<\/code>\u76f8\u5173\u7684\u7f13\u5b58\u6216\u8868\u9879\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u5b83\u4f1a\u6e05\u9664<code>hostapd<\/code>\u4e2d\u4e0e<code>ERP<\/code>\u76f8\u5173\u7684\u7f13\u5b58\u4fe1\u606f\uff0c\u8fd9\u4e9b\u4fe1\u606f\u53ef\u80fd\u4f1a\u5f71\u54cd\u5230\u65e0\u7ebf\u7f51\u7edc\u7684\u6027\u80fd\u6216\u8005\u63a5\u5165\u70b9\u7684\u914d\u7f6e<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">35. hostapd_cli log_level<\/h2>\n\n\n\n<p>\u83b7\u53d6\u5f53\u524d\u7684\u65e5\u5fd7\u7b49\u7ea7<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-log_level.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"75\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-log_level.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-497\"  sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">36. hostapd_cli pmksa<\/h2>\n\n\n\n<p><code>hostapd_cli pmksa<\/code>\u547d\u4ee4\u4e3b\u8981\u7528\u4e8e\u7ba1\u7406<code>PMKSA<\/code>\u7f13\u5b58\u6761\u76ee\uff0c\u63d0\u4f9b\u67e5\u770b\u3001\u6dfb\u52a0\u548c\u5220\u9664\u7f13\u5b58\u6761\u76ee\u7684\u529f\u80fd\uff0c\u5e2e\u52a9<code>hostapd<\/code>\u8fdb\u884c\u9ad8\u6548\u7684\u8bbe\u5907\u8ba4\u8bc1<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">37. hostapd_cli pmksa_flush<\/h2>\n\n\n\n<p><code>hostapd_cli pmksa_flush<\/code>\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u6e05\u7a7a<code>PMKSA<\/code>\u7f13\u5b58\uff0c\u5373\u5220\u9664\u6240\u6709\u5b58\u50a8\u7684<code>PMKSA<\/code>(<code>Pairwise Master Key Security Association<\/code>)\u6761\u76ee<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">38. hostapd_cli set_neighbor<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli set_neighbor &lt;bssid&gt; &lt;ssid&gt; &lt;nr&gt; &#91;lci] &#91;civic]<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u6570\u683c\u5f0f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>bssid \uff1a<\/strong>\u90bb\u5c45<code>AP<\/code>\u7684<code>MAC<\/code>\u5730\u5740(\u683c\u5f0f\u5982<code>aa:bb:cc:dd:ee:ff<\/code>)<\/li>\n\n\n\n<li><strong>ssid\uff1a<\/strong> \u90bb\u5c45<code>AP<\/code>\u7684<code>SSID<\/code>(\u9700\u7528\u5341\u516d\u8fdb\u5236\u8868\u793a\uff0c\u4f8b\u5982<code>\"MyWiFi\"<\/code>\u2192<code>4d7957694669<\/code>)<\/li>\n\n\n\n<li><strong>nr\uff1a<\/strong><code>Neighbor Report<\/code>\u5143\u7d20\u7684\u5341\u516d\u8fdb\u5236\u7f16\u7801(\u5305\u542b<code>BSSID<\/code>\u3001\u9891\u6bb5\u3001\u4fe1\u9053\u3001\u80fd\u529b\u7b49)<\/li>\n\n\n\n<li><strong>lci(\u53ef\u9009)\uff1a<\/strong><code>Location Configuration Information<\/code>(<code>LCI<\/code>)\uff0c\u5341\u516d\u8fdb\u5236\u683c\u5f0f<\/li>\n\n\n\n<li><strong>civic(\u53ef\u9009)<\/strong>\uff1a<code>Civic Location<\/code>\uff0c\u5341\u516d\u8fdb\u5236\u683c\u5f0f<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u4e2a\u547d\u4ee4\u7528\u4e8e\u5411 \u90bb\u5c45\u6570\u636e\u5e93\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u90bb\u5c45<code>AP<\/code>\u3002\u901a\u8fc7<code>set_neighbor<\/code>\u547d\u4ee4\uff0c\u60a8\u53ef\u4ee5\u5c06\u53e6\u4e00\u4e2a<code>AP<\/code>\u6dfb\u52a0\u5230\u5f53\u524d<code>AP<\/code>\u7684\u90bb\u5c45\u5217\u8868\u4e2d\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e9b\u989d\u5916\u7684\u4fe1\u606f\uff0c\u5982<code>AP<\/code>\u7684<code>SSID<\/code>\u3001\u4fe1\u9053\u3001\u4f4d\u7f6e\u7b49<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">39. hostapd_cli remove_neighbor<\/h2>\n\n\n\n<p><strong>\u547d\u4ee4\u683c\u5f0f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hostapd_cli remove_neighbor &lt;BSSID&gt;<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u6570\u683c\u5f0f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>BSSID\uff1a<\/strong>\u8981\u5220\u9664\u7684\u90bb\u5c45<code>AP<\/code>\u7684<code>MAC<\/code>\u5730\u5740\uff0c\u683c\u5f0f\u4e3a<code>aa:bb:cc:dd:ee:ff<\/code>(\u652f\u6301\u5e26\u5192\u53f7\u6216\u4e0d\u5e26\u5192\u53f7\uff0c\u4f46\u63a8\u8350\u4f7f\u7528\u6807\u51c6\u5192\u53f7\u683c\u5f0f)<\/li>\n<\/ul>\n\n\n\n<p>\u8be5\u547d\u4ee4\u7528\u4e8e\u4ece\u90bb\u5c45\u6570\u636e\u5e93\u4e2d\u79fb\u9664 \u4e00\u4e2a \u90bb\u5c45<code>AP<\/code>\u3002\u4f7f\u7528\u6b64\u547d\u4ee4\u53ef\u4ee5\u5220\u9664\u4e00\u4e2a\u5df2\u7ecf\u8bb0\u5f55\u7684\u90bb\u5c45<code>AP<\/code>\uff0c\u901a\u5e38\u7528\u4e8e\u52a8\u6001\u66f4\u65b0\u90bb\u5c45\u5217\u8868\uff0c\u6216\u8005\u5f53<code>AP<\/code>\u4e0d\u518d\u53ef\u7528\u65f6\uff0c\u53ca\u65f6\u79fb\u9664\u4e0d\u5fc5\u8981\u7684\u90bb\u5c45<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">40. hostapd_cli req_lci<\/h2>\n\n\n\n<p><code>req_lci<\/code>\u662f\u4e00\u4e2a\u547d\u4ee4\uff0c\u7528\u4e8e\u89e6\u53d1<code>LCI<\/code>(<code>Location Channel Information<\/code>)\u6d4b\u91cf\u8bf7\u6c42\uff0c\u7b26\u5408<code>IEEE 802.11v<\/code>\u6807\u51c6\u3002\u8fd9\u4e2a\u547d\u4ee4\u5141\u8bb8<code>AP<\/code>\u5411<code>STA<\/code>\u8bf7\u6c42\u5176 \u4f4d\u7f6e\u901a\u9053\u4fe1\u606f(<code>LCI<\/code>)\uff0c\u8fd9\u5bf9\u4e8e\u8fdb\u884c\u65e0\u7ebf\u7535\u6d4b\u91cf\u548c \u4f4d\u7f6e\u7ba1\u7406\u81f3\u5173\u91cd\u8981<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">41. hostapd_cli req_range<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8bf7\u6c42\u4fe1\u53f7\u8303\u56f4\u6d4b\u91cf\uff1a<\/strong><code>req_range<\/code>\u5141\u8bb8<code>AP<\/code>\u5411<code>STA<\/code>\u8bf7\u6c42\u5176\u4fe1\u53f7\u8303\u56f4\u6216\u7f51\u7edc\u73af\u5883\u4fe1\u606f\uff0c\u8fd9\u5bf9\u4e8e\u8bc4\u4f30\u5ba2\u6237\u7aef\u4e0e<code>AP<\/code>\u4e4b\u95f4\u7684\u8fde\u63a5\u8d28\u91cf\u975e\u5e38\u6709\u7528<\/li>\n\n\n\n<li><strong>\u589e\u5f3a\u7f51\u7edc\u7ba1\u7406\u4e0e\u4f18\u5316\uff1a<\/strong>\u901a\u8fc7\u6536\u96c6<code>STA<\/code>\u4fe1\u53f7\u8d28\u91cf\u6570\u636e\uff0c<code>AP<\/code>\u53ef\u4ee5\u4f18\u5316\u6f2b\u6e38\u51b3\u7b56\uff0c\u5e2e\u52a9<code>STA<\/code>\u5728\u591a\u4e2a\u63a5\u5165\u70b9\u4e4b\u95f4\u9009\u62e9\u6700\u4f73\u4fe1\u53f7\u3002\u5728\u5927\u89c4\u6a21\u65e0\u7ebf\u7f51\u7edc\u4e2d\uff0c<code>req_range<\/code>\u547d\u4ee4\u53ef\u4ee5\u5e2e\u52a9\u7ba1\u7406\u5458\u8bc4\u4f30\u7f51\u7edc\u7684\u8986\u76d6\u8303\u56f4\u548c\u4fe1\u53f7\u5f3a\u5ea6\u3002<\/li>\n\n\n\n<li><strong>IEEE 802.11k\u6d4b\u91cf\u652f\u6301\uff1a<\/strong><code>802.11k<\/code>\u6807\u51c6\u5b9a\u4e49\u4e86\u591a\u79cd\u6d4b\u91cf\u8bf7\u6c42\u548c\u62a5\u544a\u7c7b\u578b\uff0c\u800c<code>req_range<\/code>\u662f\u5176\u4e2d\u4e4b\u4e00\u3002\u5b83\u7528\u4e8e\u7f51\u7edc\u8d28\u91cf\u7684\u52a8\u6001\u8bc4\u4f30\uff0c\u5e2e\u52a9<code>BSS<\/code>(\u57fa\u672c\u670d\u52a1\u96c6)\u4e2d\u7684\u8bbe\u5907\u66f4\u597d\u5730\u7ba1\u7406\u65e0\u7ebf\u8d44\u6e90<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">42. hostapd_cli driver_flags<\/h2>\n\n\n\n<p>\u67e5\u8be2\u9a71\u52a8\u7a0b\u5e8f\u7684\u5f53\u524d\u6807\u5fd7\uff1a<code>driver_flags<\/code>\u547d\u4ee4\u53ef\u4ee5\u7528\u6765\u67e5\u770b\u5f53\u524d\u65e0\u7ebf\u9a71\u52a8\u7a0b\u5e8f\u7684\u6807\u5fd7\u3002\u4f8b\u5982\uff0c\u5b83\u53ef\u80fd\u4f1a\u663e\u793a\u662f\u5426\u652f\u6301\u67d0\u4e9b\u7279\u6027(\u5982<code>WPS<\/code>\u3001<code>STA<\/code>\u3001<code>AP<\/code>\u6a21\u5f0f\u7b49)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-dirver_flags.jpg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"324\" data-original=\"https:\/\/www.garfield-blog.top\/wp-content\/uploads\/2025\/12\/hostapd_cli-dirver_flags.jpg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-498\"  sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">43. hostapd_cli accept_acl<\/h2>\n\n\n\n<p><code>accept_acl<\/code>\u547d\u4ee4\u7528\u4e8e\u52a8\u6001\u7ba1\u7406\u63a5\u5165\u63a7\u5236\u5217\u8868(<code>ACL<\/code>)\uff0c\u5373\u5b9e\u65f6\u63a7\u5236\u54ea\u4e9b<code>MAC<\/code>\u5730\u5740\u88ab\u5141\u8bb8(<code>Accept<\/code>)\u6216\u7981\u6b62(<code>Deny<\/code>)\u8fde\u63a5\u5230\u70ed\u70b9\uff0c\u8be5\u547d\u4ee4\u7684\u5177\u4f53\u7528\u6cd5\u53d6\u51b3\u4e8e\u4f60\u60f3\u8981\u6267\u884c\u7684\u64cd\u4f5c(\u6dfb\u52a0\u3001\u5220\u9664\u3001\u67e5\u770b\u6216\u5237\u65b0)\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6dfb\u52a0<code>MAC<\/code>\u5730\u5740\u5230\u5141\u8bb8\u5217\u8868\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli accept_acl ADD_ACL &lt;MAC\u5730\u5740&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ece\u5141\u8bb8\u5217\u8868\u4e2d\u5220\u9664<code>MAC<\/code>\u5730\u5740\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli accept_acl DEL_ACL &lt;MAC\u5730\u5740&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u663e\u793a\u5f53\u524d\u5141\u8bb8\u5217\u8868\u4e2d\u7684\u6240\u6709<code>MAC<\/code>\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli accept_acl SHOW<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6e05\u7a7a\u6574\u4e2a\u5141\u8bb8\u5217\u8868\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli accept_acl CLEAR<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">44. hostapd_cli deny_acl<\/h2>\n\n\n\n<p><code>deny_acl<\/code>\u547d\u4ee4\u4e0e<code>accept_acl<\/code>\u76f8\u5bf9\uff0c\u7528\u4e8e\u52a8\u6001\u7ba1\u7406\u9ed1\u540d\u5355(\u7981\u6b62\u63a5\u5165\u5217\u8868)\u3002\u901a\u8fc7\u6b64\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u5b9e\u65f6\u7981\u6b62\u7279\u5b9a\u7684<code>MAC<\/code>\u5730\u5740\u8fde\u63a5\u5230\u4f60\u7684\u65e0\u7ebf\u70ed\u70b9\uff0c\u6216\u8005\u5c06\u5df2\u7ecf\u8fde\u63a5\u7684\u53ef\u7591\u8bbe\u5907\u5f3a\u5236\u65ad\u5f00\u5e76\u5217\u5165\u9ed1\u540d\u5355\uff0c\u800c\u65e0\u9700\u91cd\u542f<code>hostapd<\/code>\u670d\u52a1<\/p>\n\n\n\n<p>\u6839\u636e 2025 \u5e74<code>hostapd<\/code>\u7684\u6807\u51c6\u63a7\u5236\u63a5\u53e3\u534f\u8bae\uff0c\u5176\u5b50\u547d\u4ee4\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6dfb\u52a0\u8bbe\u5907\u5230\u9ed1\u540d\u5355\uff1a<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli deny_acl ADD_ACL &lt;MAC\u5730\u5740&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4ece\u9ed1\u540d\u5355\u4e2d\u79fb\u9664\u8bbe\u5907\uff1a<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli deny_acl DEL_ACL &lt;MAC\u5730\u5740&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u67e5\u770b\u5f53\u524d\u9ed1\u540d\u5355\u5217\u8868\uff1a<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli deny_acl SHOW<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6e05\u7a7a\u6574\u4e2a\u9ed1\u540d\u5355\uff1a<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>  hostapd_cli deny_acl CLEAR<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">45. hostapd_cli poll_sta<\/h2>\n\n\n\n<p><code>hostapd_cli poll_sta<\/code>\u547d\u4ee4\u7528\u4e8e \u8f6e\u8be2\u6307\u5b9a\u7684\u5ba2\u6237\u7aef\u8bbe\u5907\uff0c\u5e76\u83b7\u53d6\u8be5\u8bbe\u5907\u7684\u72b6\u6001\u4fe1\u606f\u6216\u8fdb\u884c\u76f8\u5173\u7684\u64cd\u4f5c\u3002\u901a\u5e38\uff0c<code>poll_sta<\/code>\u662f\u7528\u6765\u68c0\u67e5\u67d0\u4e2a\u8bbe\u5907(<code>STA<\/code>)\u662f\u5426\u4ecd\u7136\u8fde\u63a5\u5230<code>AP<\/code>\u5e76\u83b7\u53d6\u5176\u72b6\u6001\u4fe1\u606f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">46. hostapd_cli req_beacon<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u89e6\u53d1\u5ba2\u6237\u7aef\u626b\u63cf\u5468\u56f4\u7684<code>AP<\/code>(\u90bb\u5c45)\u5e76\u62a5\u544a\u626b\u63cf\u7ed3\u679c\u56de<code>AP<\/code><\/li>\n\n\n\n<li>\u7528\u4e8e\u65e0\u7ebf\u7f51\u7edc\u6f2b\u6e38\u4f18\u5316(\u5982<code>BSS Transition Management<\/code>)<\/li>\n\n\n\n<li>\u8f85\u52a9<code>AP<\/code>\u4e86\u89e3<code>STA<\/code>\u5468\u8fb9\u7684\u65e0\u7ebf\u73af\u5883(\u5305\u62ec\u4fe1\u53f7\u5f3a\u5ea6\u3001\u4fe1\u9053\u4f7f\u7528\u7b49)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">47. hostapd_cli reload_wpa_psk<\/h2>\n\n\n\n<p><code>hostapd_cli reload_wpa_psk<\/code>\u547d\u4ee4\u7528\u4e8e \u91cd\u65b0\u52a0\u8f7d<code>WPA PSK<\/code>(<code>Pre-shared Key<\/code>\uff0c\u9884\u5171\u4eab\u5bc6\u94a5)\u914d\u7f6e\u3002\u5b83\u7684\u4f5c\u7528\u662f\u4f7f<code>Hostapd<\/code>\u91cd\u65b0\u52a0\u8f7d\u6216\u66f4\u65b0\u4e0e<code>WPA<\/code>\u76f8\u5173\u7684\u5bc6\u94a5\u914d\u7f6e\u3002\u8fd9\u901a\u5e38\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u66f4\u65b0\u6216\u4fee\u6539<code>WPA<\/code>\u5bc6\u94a5\uff0c\u800c\u65e0\u9700\u91cd\u65b0\u542f\u52a8<code>Hostapd<\/code>\u670d\u52a1<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u53c2\u8003\u6587\u6863<\/h2>\n\n\n\n<p><a href=\"https:\/\/w1.fi\/releases\/hostapd-2.9.tar.gz\">hostapd-2.9\u6e90\u7801<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/blog.csdn.net\/qq_42206726\/article\/details\/154690664\">\u3010hostapd_cli \u547d\u4ee4\u5168\u96c6\u3011-CSDN\u535a\u5ba2<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0 \u5728hostapd\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u4f1a\u751f\u6210\u4e00\u4e2ahostapd_cli\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002hostapd_cli\u662f\u4e00\u6b3e\u7528 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[12],"tags":[],"class_list":["post-488","post","type-post","status-publish","format-standard","hentry","category-12"],"_links":{"self":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts\/488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=488"}],"version-history":[{"count":1,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts\/488\/revisions"}],"predecessor-version":[{"id":499,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=\/wp\/v2\/posts\/488\/revisions\/499"}],"wp:attachment":[{"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garfield-blog.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}