Dear TI Expert!
I want to config Multi_Role for WL183x : wlan0 as station connected to internet and wlan1 as AP and permit the device connected to wlan1 AP can internet access but I facing the problem below:
Scenario1: I followed this link: http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_NLCP_Multi_Role_Configuration, scenario "Surf the Web",
I can access to internet from device connected to wlan1 but in the short time the system warning error and auto reset, please see the log below:
root@am335x-evm:/home# wlan1: STA d0:57:85:6a:2b:db IEEE 802.11: authenticated
wlan1: STA d0:57:85:6a:2b:db IEEE 802.11: associated (aid 1)
wlan1: AP-STA-CONNECTED d0:57:85:6a:2b:db
[ 438.877210] wlcore: WARNING no fw rx ba on tid 3
[ 439.941697] wlcore: WARNING no fw rx ba on tid 3
[ 440.064152] wlcore: WARNING no fw rx ba on tid 3
[ 440.087166] wlcore: WARNING no fw rx ba on tid 3
[ 440.202606] wlcore: WARNING no fw rx ba on tid 3
[ 440.310551] wlcore: WARNING no fw rx ba on tid 3
Scenario2: I followed this link:http://processors.wiki.ti.com/index.php/WiLink8_WLAN_Demo:_Linux#AP_.28create_AP_with_no_security.29, but I cannot
access to internet from device which connected to wlan1.
Scenario3: I splitted 2 difference scripts for enable Station and AP: when I run wifi Station script first then I cannot enable wlan1 by script. Please see
the log below:
root@am335x-evm:/home# ./wifi_AP.sh
Enabling wifi AP
root@am335x-evm:/home# Configuration file: /etc/hostapd.conf
[ 3303.561571] wlcore: down
[ 3303.620553] cfg80211: Calling CRDA for country: US
[ 3303.675857] cfg80211: Current regulatory domain intersected:
[ 3303.681890] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 3303.690472] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 3303.698251] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 1700 mBm)
[ 3303.706024] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
wpa_driver_nl80211_set_country: failed
Failed to set country code
wlan1: Unable to setup interface.
[ 3306.662913] wlcore: down
If I run the script enable AP first, wlan1 active and permit device connected to it but after that it often error as log below:
root@am335x-evm:/home# ./wifi_AP.sh
Enabling wifi AP
[ 102.398585] wlcore: PHY firmware version: Rev 8.2.0.0.195
[ 102.495272] wlcore: firmware booted (Rev 8.8.0.0.13)
Configuration file: /etc/hostapd.conf
root@am335x-evm:/home# [ 102.581909] wlcore: down
[ 103.029914] wlcore: PHY firmware version: Rev 8.2.0.0.195
[ 103.126314] wlcore: firmware booted (Rev 8.8.0.0.13)
[ 103.143780] cfg80211: Calling CRDA for country: US
[ 103.261817] cfg80211: Regulatory domain changed to country: US
[ 103.267968] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 103.276580] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 103.284721] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[ 103.292855] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 103.300982] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 103.309121] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 103.317256] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[ 103.325393] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
Using interface wlan1 with hwaddr 84:dd:20:69:de:97 and ssid "Multirole_Demo"
wlan1: STA d0:57:85:6a:2b:db IEEE 802.11: authenticated
wlan1: STA d0:57:85:6a:2b:db IEEE 802.11: associated (aid 1)
wlan1: AP-STA-CONNECTED d0:57:85:6a:2b:db
wlan1: STA d8:5d:4c:be:c7:83 IEEE 802.11: authenticated
wlan1: STA d8:5d:4c:be:c7:83 IEEE 802.11: associated (aid 2)
wlan1: AP-STA-CONNECTED d8:5d:4c:be:c7:83
wlan1: STA 7c:61:93:07:da:5c IEEE 802.11: authenticated
wlan1: STA 7c:61:93:07:da:5c IEEE 802.11: associated (aid 3)
wlan1: AP-STA-CONNECTED 7c:61:93:07:da:5c
wlan1: AP-STA-DISCONNECTED 7c:61:93:07:da:5c
wlan1: AP-STA-DISCONNECTED d8:5d:4c:be:c7:83
wlan1: AP-STA-DISCONNECTED d0:57:85:6a:2b:db
[ 292.863139] wlcore: down
[ 294.220157] wlcore: PHY firmware version: Rev 8.2.0.0.195
[ 294.395386] wlcore: firmware booted (Rev 8.8.0.0.13)
Below are Station and AP enable script:
Station:
#!/bin/bash
ifconfig wlan0 up
wpa_supplicant -d -Dnl80211 -c/etc/wpa_supplicant.conf -iwlan0 -B
wpa_cli -iwlan0 disconnect
for i in `wpa_cli -iwlan0 list_networks | grep ^[0-9] | cut -f1`;
do wpa_cli -iwlan0 remove_network $i;
done
wpa_cli -iwlan0 add_network
wpa_cli -iwlan0 set_network 0 auth_alg OPEN
wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK
wpa_cli -iwlan0 set_network 0 psk '"xxxx"'
wpa_cli -iwlan0 set_network 0 proto RSN
wpa_cli -iwlan0 set_network 0 mode 0
wpa_cli -iwlan0 set_network 0 ssid '"TOSY_RD"'
wpa_cli -iwlan0 select_network 0
wpa_cli -iwlan0 enable_network 0
wpa_cli -iwlan0 reassociate
wpa_cli -iwlan0 status
iw wlan0 link
udhcpc -i wlan0
AP:
#!/bin/bash
echo Enabling wifi AP
iw phy0 interface add wlan1 type managed
ifconfig wlan1 10.4.30.34 netmask 255.255.255.0 up
hostapd /etc/hostapd.conf &
udhcpd /etc/udhcpd.conf
iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
Please advise us to resolve this problem!
Thank and Best Regards,
Tri.