Q1183110600

AR1021X使用hostapd配置AP热点注意事项

0
阅读(1355)

在应用AR1021X模块化集成时,一些应用需要用模块来做soft ap使用,这就牵涉到hostapd配置问题,如果配置不好,是没有SSID热点出来!模块有支持双频的,有只支持单频的,具体要认真阅读模块规格书,所以配置的时候要留意!

一般根据对应的Kernel内核版本提供的驱动包,保障物理连接正常,供电稳定,正常编译驱动后,就能加载成功,并正常使用!

以下案例现象:使用hostapd配置AP热点,ap热点出不来!


log信息如下:



ostapd -dd -e /dev/urandom /etc/hostapd.conf &

# random: Invalid entropy file /dev/urandom

random: TryinADDRCONF(NETDEV_UP): wlan0: link is not ready

g to read entropy from /dev/random

Get randomness: len=20 entropy=0

random: Updated entropy file /dev/urandom (own_pool_ready=0)

Configuration file: /etc/hostapd.conf

nl80211: interface wlan0 in phy phy0

rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0

nl80211: Supports Probe Response offload in AP mode

nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected

nl80211: Add own interface ifindex 4

nl80211: Set mode ifindex 4 iftype 3 (AP)

nl80211: Setup AP - device_ap_sme=1 use_monitor=0

nl80211: Subscribe to mgmt frames with AP handle 0x102ee00 (device SME)

nl80211: Register frame type=0xd0 nl_handle=0x102ee00

nl80211: Register frame match - hexdump(len=0): [NULL]

nl80211: Enable Probe Request reporting nl_preq=0x102ed98

nl80211: Register frame type=0x40 nl_handle=0x102ed98

nl80211: Register frame match - hexdump(len=0): [NULL]


BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)

nl80211: Regulatory information - country=US

nl80211: 2402-2472 @ 40 MHz

nl80211: 5170-5250 @ 40 MHz

nl80211: 5250-5330 @ 40 MHz

nl80211: 5490-5730 @ 40 MHz

nl80211: 5735-5835 @ 40 MHz


nl80211: Added 802.11b mode based on 802.11g information

Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=30 dBm

Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=30 dBm

Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=30 dBm

Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=30 dBm


wlan0: Flushing old station entries

wlan0: Deauthenticate all stations

wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0



hostapd.conf配置如下:


interface=wlan0

driver=nl80211

ssid=ar1021_wifi

channel=6

hw_mode=g

ignore_broadcast_ssid=0

auth_algs=1

wpa=3

wpa_passphrase=88888888

wpa_key_mgmt=WPA-PSK

wpa_pairwise=TKIP

rsn_pairwise=CCMP



iwconfig:


# iwconfig

lo no wireless extensions.

eth0 no wireless extensions.

sit0 no wireless extensions.

wlan0 IEEE 802.11abgn Mode:Master Frequency:2.437 GHz Tx-Power=17 dBm

Retry long limit:7 RTS thr:off Fragment thr:off

Power Management:off

p2p0 IEEE 802.11abgn ESSID:off/any

Mode:Managed Access Point: Not-Associated Tx-Power=17 dBm

Retry long limit:7 RTS thr:off Fragment thr:off

Encryption key:off

Power Management:off



以上信息很明显,是针对只能支持ISM5.8G频段的模块,hostapd.conf配置成了ISM2.4G,只要进行重新配置就可以了!同时提醒,双频是分时双频,也就是工作时候只能支持一种,但是有两种频供选!或者理解成双频供选择,实际选用一种!

针对AR1021X系列WiFi模块(TTIT-1021XMV25、TTIT-1021XP5、SR6225UE、SR6224UE、SR6221UE、SR6235UE、SR5223UD),编译加载的问题,可以提供Log信息,配合有效分析!


以上观点由纳拓科技分享!请勿随意复制、编辑转用!


Baidu
map