在AP模式下,熱點會不斷定期地發送Beacon幀來宣告自己存在,告知設備可以加入網絡;
Probe Response幀是用於應答Probe Request幀,Probe Request幀是移動工作站用於掃描周圍是否有網絡所用
hostapd的配置文件hostapd.conf里的vendor_elements這一項,允許用戶(廠商)在Beacon幀和Probe幀里增加自定義的數據:
# Additional vendor specfic elements for Beacon and Probe Response frames # This parameter can be used to add additional vendor specific element(s) into # the end of the Beacon and Probe Response frames. The format for these # element(s) is a hexdump of the raw information elements (id+len+payload for # one or more elements) #vendor_elements=dd0411223301
需要把自己的要增加的數據轉換為二進制,賦值給vendor_elements即可。
利用 iw dev wlan0 scan 命令來進行查看接收到的beacon和probe response時,必須帶着“-u”參數,否則 "Vendor specific:" 部分顯示不出來。
掃描時還有一個參數 -b,用來打印掃描到的beacon幀中的相關信息。
若不加-b參數,只會打印接收到的 probe response幀 的信息,加入-b參數后,后面會追加beacon幀信息。