添加自己的vendor IE, 方法如下

添加自己的vendor IE, 方法如下,这里是示范方法,dd0800a0400000020023 这个值需要换你们自己的
Vendor IEs updating from wpa_supplicant side for SAP mode
ap_vendor_elements will be updated to beacon and probe response.
ap_assocresp_elements will be updated to assoc/re-assoc response frame.

setting from config file
a) add ap_assocresp_elements and ap_vendor_elements in the wpa_supplicant.sap.conf like this:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

ap_assocresp_elements=dd0800a0400000020023
ap_vendor_elements=dd0800a0400000020023
network={
ssid="123"
mode=2
key_mgmt=NONE
frequency=2437
}

b) start sap from wpa_supplicant: wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.sap.conf &

setting from wpa_cli

wpa_cli -i wlan0 > SET ap_vendor_elements dd0800a0400000020023

wpa_cli -i wlan0 > SET ap_vendor_elements dd0800a0400000020023

wpa_cli -i wlan0 > UPDATE_BEACON

vendor IEs updating from hostapd side for SAP mode
vendor_elements will be updated to beacon and probe response.
assocresp_elements will be updated to assoc/re-assoc response frame.

setting from hostapd.conf
a) add vendor_elements and assocresp_elements to hostapd.conf like this:

interface=wlan0
driver=nl80211

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

ssid=test123
hw_mode=a
channel=149

country_code=US
beacon_int=100

macaddr_acl=0
wpa=2
wpa_passphrase=1234567890
wpa_pairwise=CCMP

ieee80211n=1
ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40]

ieee80211ac=1
vht_capab=[SHORT-GI-80]
vht_oper_chwidth=1
eap_server=1

require_vht=1
ieee80211ax=1
he_bss_color=63
he_su_beamformer=1
he_su_beamformee=1
he_mu_beamformer=1
he_default_pe_duration=4
he_twt_required=1
he_rts_threshold=16

he_oper_chwidth=1

wps_state=2
ap_setup_locked=1

vendor_elements=dd0800a0400000020023
assocresp_elements=dd0800a0400000020023

setting from hostapd_cli

hostapd_cli -i wlan0 > SET vendor_elements dd0800a0400000020021

hostapd_cli -i wlan0 > SET assocresp_elements dd0800a0400000020021

hostapd_cli -i wlan0 > update_beacon

无论是做STA 或者 AP , 可以抓空口包确认,比如beacon & probe response 等等

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值