This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/WL1837MOD: 5GHz AP

Part Number: WL1837MOD

Tool/software: Linux

Hello,

I'm using a custom board with NXP SOC i.MX 7Dual and the WL1837MOD unit.

I'm unable to establish a 5GHz access point.

I'm using hostap, compiled from git://git.ti.com/wilink8-wlan/hostap.git, tag R8.7_SP3.

configuration file:

interface=wlan0
hw_mode=a
channel=0
ieee80211d=1
country_code=US
ieee80211n=1
#ieee80211ac=1
wmm_enabled=1

ssid=SitaraAP
auth_algs=1
wpa=3
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=12345678

The following error messages are generated:

Configuration file: /etc/hostapd/hostapd.conf
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection wlcore: down
started, this may take a bit    
wlan0: interface state COUNTRY_UPwlcore: down
DATE->ACS
wlan0: ACS-STARTED
wlcore: down
wlcore: down
wlcore: down
wlcore: down
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed
wlan0: interface state ACS->DISABLED
wlan0: AP-DISABLED
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: interface state DISABLED->DISABLED
wlan0: interface state DISABLED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started

Thanks,

Uri

  • Hi,

    I suggest you check out example target scripts that are located here:
    git.ti.com/.../ap

    Look at ap_start.sh

    It uses our example hostapd.conf that is located here:
    git.ti.com/.../hostapd.conf

    Best Regards,
    Eyal
  • Hi Eyal,

    The following error messages are generated with the provided configuration file:

    Configuration file: /usr/share/wl18xx/hostapd.conf
    wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
    Using interface wlan0 with hwaddr 74:e1:82:2b:b8:2b and ssid "SitaraAP"
    Segmentation fault

    Thanks,

    Uri

  • seems like your hostapd exeutable is crashing?
    Which version Are they using? (v2.7?)
    Could be a compilation issue with the tool chain used for building it.

    BR,
    Eyal
  • Any update? Can I close this thread?
  • Hi Eyal,

    Sorry for the delay, I didn't get an Email with your last response.

    The hostapd was compiled in the target from git://git.ti.com/wilink8-wlan/hostap.git, tag R8.7_SP3.

    Thanks,
    Uri
  • Hi Uri,

    The git location is correct for R8.7_SP3
    As you are getting "Segmentation fault" when running the exe file it seems like it is related to the tool chain that you have used for building it.
    I suggest you check that you are using the latest/correct one.

    Alternatively you can also try building the latest hostapd available in mainline (v2.7/v2.8) using the same tool chain and see if this one works for you.

    BR,
    Eyal
  • Hi Eyal,

    The "Segmentation fault" problem was resolved by upgrading to version 2.7.

    The configuration option ap_channel_sync is not supported in version 2.7, is there an alternative configuration?

    The following error message is generated with the provided configuration file, without ap_channel_sync:, channel=0, hw_mode=a:

    Configuration file: /etc/hostapd/hostapd.conf
    wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
    ACS: Automatic channel selection started, this may take a bit
    wlan0: interface state COUNTRY_UPDATE->ACS
    wlan0: ACS-STARTED
    ACS: Unable to collect survey data
    ACS: All study options have failed
    Interface initialization failed
    wlan0: interface state ACS->DISABLED
    wlan0: AP-DISABLED
    ACS: Possibly channel configuration is invalid, please report this along with your config file.
    ACS: Failed to start
    wlan0: AP-DISABLED
    hostapd_free_hapd_data: Interface wlan0 wasn't started
    nl80211: deinit ifname=wlan0 disabled_11b_rates=0
    wlan0: interface state DISABLED->DISABLED
    wlan0: interface state DISABLED->DISABLED
    wlan0: AP-DISABLED
    wlan0: CTRL-EVENT-TERMINATING
    hostapd_free_hapd_data: Interface wlan0 wasn't started

    Thanks,
    Uri
  • https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/968/0001_2D00_acs_2D00_Porting_2D00_legacy_2D00_ACS_2D00_solution_2D00_ACS.patch

    Hi Uri,

    For using ACS with wilink8 on a mainline hostapd you are missing the attached patch which is not upstream.

    Please apply it and build your hoatapd with CONFIG_ACS disabled.

    Also ap_channel_sync can be removed from your hostapd.conf file.

    I have tested it now with latest hostapd (currently v2.8-devel) and it is working:

    root@am335x-evm:/usr/share/wl18xx#
    root@am335x-evm:/usr/share/wl18xx# ./ap_start.sh
    Configuration file: /usr/share/wl18xx/hostapd.conf
    [ 1384.571347] wlcore: down
    wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE

    root@am335x-evm:/usr/share/wl18xx# CONFIG_ACS was not set. use custom ACS
    20/40 MHz operation not permitted on channel pri=3 sec=3 based on overlapping BSSes
    Using interface wlan1 with hwaddr 84:dd:20:93:4a:ac and ssid "SitaraAP"
    wlan1: interface state COUNTRY_UPDATE->ENABLED
    wlan1: AP-ENABLED

    root@am335x-evm:/usr/share/wl18xx# hostapd -v
    hostapd v2.8-devel-hostap_2_7-681-gefa701d+
    User space daemon for IEEE 802.11 AP management,
    IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
    Copyright (c) 2002-2019, Jouni Malinen <j@w1.fi> and contributors
    root@am335x-evm:/usr/share/wl18xx#

    Best Regards,

    Eyal

  • Hi Eyal,

    The patch is not compatible to hostapd version 2.7.
    Can you send a link to v2.8-devel?

    Thank you for your help,
    Uri
  • The git I am using for latest mainline is:
    git://w1.fi/hostap.git

    Checkout this commit:
    commit 1211031a606fad0dc97491068cf5fe25499d8375
    Author: Jouni Malinen <jouni@codeaurora.org>
    Date: Wed Mar 27 04:04:16 2019 +0200

    tests: WPA2-FT-SAE AP and PMKSA caching for initial MD association

    Signed-off-by: Jouni Malinen <jouni@codeaurora.org>


    The patch I sent you is re based on this commit.
    but you can probably also manually apply it also to your current hostap with some adjustments.

    BR,
    Eyal
  • Hi Eyal,

    I'm using 1211031a606fad0dc97491068cf5fe25499d8375 + 0001-acs-Porting-legacy-ACS-solution-ACS.patch

    The messages that was provided, in the April 3rd message, is generated for hw_mode=g.
    Channel 3 is not a valid channel for IEEE 802.11a.

    The following messages are generated for hw_mode=a, channel=0 :

    wlcore: down
    wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
    CONFIG_ACS was not set. use custom ACS
    20/40 MHz operation not permitted on channel pri=52 sec=52 based on overlapping BSSes
    wlan0: interface state COUNTRY_UPDATE->DFS
    wlan0: DFS-CAC-START freq=5260 chan=52 sec_chan=0, width=0, seg0=0, seg1=0, cac_time=60s
    DFS start_dfs_cac() failed, -1
    Interface initialization failed
    wlan0: interface state DFS->DISABLED
    wlan0: AP-DISABLED
    wlan0: interface state DISABLED->DISABLED
    wlan0: AP-DISABLED
    wlan0: CTRL-EVENT-TERMINATING
    hostapd_free_hapd_data: Interface wlan0 wasn't started
    nl80211: deinit ifname=wlan0 disabled_11b_rates=0
    wlcore: down

    Thank you for your help,
    Uri
  • Verifying with R&D, the ACS mechanism for wilink8 was not submitted upstream, so additional patches may be missing for 11a channels to work as well in the mainline version.
    If you have to use ACS the safest would be to stay with the R8.7_SP3 version of hostapd, otherwise you will have to manually cherry pick all the ACS related patches from the R8.7_SP3 version.

    Best Regards,
    Eyal
  • Hi Eyal,

    Compilation of R8.7_SP3 with alternative cross compiler solved the segmentation fault problem.
    The compilation was made with CONFIG_ACS disabled.
    Is there a patch that should be applied on top of R8.7_SP3?

    Generated error messages:
    # ./hostapd /etc/hostapd/hostapd.conf
    Configuration file: /etc/hostapd/hostapd.conf
    wlcore: down
    wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
    CONFIG_ACS was not set. use custom ACS
    wlan0: interface state COUNTRY_UPDATE->DFS
    wlan0: DFS-CAC-START freq=5260 chan=52 sec_chan=0, width=0, seg0=0, seg1=0, cac_time=60s
    DFS start_dfs_cac() failed, -1
    Interface initialization failed
    wlan0: interface state DFS->DISABLED
    wlan0: AP-DISABLED
    wlan0: interface state DISABLED->DISABLED
    wlan0: AP-DISABLED
    hostapd_free_hapd_data: Interface wlan0 wasn't started
    nl80211: deinit ifname=wlan0 disabled_11b_rates=0
    wlcore: down
    # ./hostapd -v
    hostapd v2.6-devel-R8.7_SP3
    User space daemon for IEEE 802.11 AP management,
    IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
    Copyright (c) 2002-2016, Jouni Malinen <j@w1.fi> and contributors

    Thanks,
    Uri
  • Hi Uri,

    You may be seeing the same issue as described here:
    www.spinics.net/.../msg03704.html

    BR,
    Eyal
  • Hi Eyal,

    I'm using the configuration file that was provided, by you, in the Mar 19 message.
    In the configuration file:
    vht_capab is not included
    ht_capab=[SHORT-GI-20][GF]

    Can you provide a tested configuration file for R8.7_SP3 with IEEE 802.11a?

    Thanks,
    Uri
  • Hi Eyal,

    I found the problem.

    CONFIG_IEEE80211AC should be set in the .config file

    Thank you for your help,
    Uri