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.

WL183X: not running on 5GHz

Other Parts Discussed in Thread: WL1837

Hello!
Firmware configuration:

~ # wlconf -b /usr/share/wlconf/struct.bin -i /lib/firmware/ti-connectivity/wl18xx-conf.bin -g
...........
wl18xx.ht.mode = 0x01
wl18xx.phy.phy_standalone = 0x00
wl18xx.phy.spare0 = 0x08
wl18xx.phy.enable_clpc = 0x00
wl18xx.phy.enable_tx_low_pwr_on_siso_rdl = 0x00
wl18xx.phy.auto_detect = 0x00
wl18xx.phy.dedicated_fem = 0x00
wl18xx.phy.low_band_component = 0x02
wl18xx.phy.low_band_component_type = 0x04
wl18xx.phy.high_band_component = 0x01
wl18xx.phy.high_band_component_type = 0x09
wl18xx.phy.number_of_assembled_ant2_4 = 0x01
wl18xx.phy.number_of_assembled_ant5 = 0x01
wl18xx.phy.pin_muxing_platform_options = 0x00, 0x00

Access point information:

~ # iw dev wlan0 info
Interface wlan0
        ifindex 3
        wdev 0x1
        addr 54:4a:16:12:d0:64
        type AP
        wiphy 0

~ # cat /etc/hostapd.conf
interface=wlan0
driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
country_code=UK
hw_mode=a
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
ieee80211n=1
ieee80211ac=1
eapol_version=1
wpa=3
wpa_key_mgmt=WPA-PSK WPA-EAP
wpa_pairwise=TKIP CCMP
bridge=br0
ssid=STC-MT_TestWLAN
channel=36
wpa_passphrase=RnD777777

Information about system:

~ # dmesg
.............
[  240.675376] Bus freq set to 24000000 start...
[  240.675601] Bus freq set to 24000000 done! cpu=0
[  249.988512] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ9)
[  250.002084] Bus freq set to 528000000 start...
[  250.002509] Bus freq set to 528000000 done! cpu=0
[  250.454619] wlcore: PHY firmware version: Rev 8.2.0.0.236
[  250.559217] wlcore: firmware booted (Rev 8.9.0.0.69)

~ # cat /proc/version
Linux version 4.1.15+ (root@33677a8f7cbc) (gcc version 5.2.0 (GCC) )

Why I can't create 5GHz access point if firmware support 2.4GHz and 5GHz antenas and hostapd configured on create 5GHz?

With 2.4GHz I haven't this problem:

~ # iw dev wlan0 info
Interface wlan0
        ifindex 3
        wdev 0x1
        addr 54:4a:16:12:d0:64
        ssid STC-MT_TestWLAN
        type AP
        wiphy 0
        channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz

~ # cat /etc/hostapd.conf
interface=wlan0
driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
country_code=RU
hw_mode=g
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
ieee80211n=1
ieee80211ac=1
eapol_version=1
wpa=3
wpa_key_mgmt=WPA-PSK WPA-EAP
wpa_pairwise=TKIP CCMP
bridge=br0
ssid=STC-MT_TestWLAN
channel=11
wpa_passphrase=RnD777777

But I havn't double channel with if I add ht_capab=[HT40-] to hostapd.conf

Thank you and excuse my bad english.





  • hi , pls do the following and let us know the output
    cd /usr/share/wl18xx
    ./ap_start.sh
    ( this script uses /usr/share/wl18xx/hostapd.conf by default )

    Saurabh
  • Hello!

    Unfortunately I can't found ap_start.sh, I build all components from source.

    Follow hostapd debug output:

    ~ # /etc/init.d/network.sh start
    [  111.278549] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:07, irq=-1)
    [  111.744708] wlcore: PHY firmware version: Rev 8.2.0.0.236
    [  111.849291] wlcore: firmware booted (Rev 8.9.0.0.69)
    [  111.875881] device eth0 entered promiscuous mode
    [  111.884781] device wlan0 entered promiscuous mode
    random: Trying to read entropy from /dev/random
    Configuration file: /etc/hostapd.conf
    [ 111.914351] wlcore: down ctrl_interface_group=0 eapol_version=1 nl80211: Supported cipher 00-0f-ac:1 nl80211: Supported cipher 00-0f-ac:5 nl80211: Supported cipher 00-0f-ac:2 nl80211: Supported cipher 00-0f-ac:4 nl80211: Supported cipher 00-14-72:1 nl80211: Supports Probe Response offload in AP mode nl80211: Using driver-based off-channel TX nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 04 00 00 00 00 00 00 40 nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 04 00 00 00 00 00 00 40 nl80211: Supported vendor command: vendor_id=0x80028 subcmd=0 nl80211: Supported vendor command: vendor_id=0x80028 subcmd=1 nl80211: Supported vendor command: vendor_id=0x80028 subcmd=2 nl80211: Supported vendor event: vendor_id=0x80028 subcmd=0 nl80211: Supported vendor event: vendor_id=0x80028 subcmd=1 nl80211: Use separate P2P group interface (driver advertised support) nl80211: Enable multi-channel concurrent (driver advertised support) nl80211: interface wlan0 in phy phy0 nl80211: Set mode ifindex 3 iftype 3 (AP) nl80211: Setup AP(wlan0) - device_ap_sme=0 use_monitor=0 nl80211: Subscribe to mgmt frames with AP handle 0x5343b8 nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x5343b8 match= nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x5343b8 match= nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x5343b8 match= nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x5343b8 match= nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x5343b8 match= nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x5343b8 match= nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=04 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=0501 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=0504 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=06 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=08 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=09 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=0a nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=11 nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5343b8 match=7f rfkill: Cannot open RFKILL control device nl80211: RFKILL status not available nl80211: Interface wlan0 is in bridge br0 nl80211: Add own interface ifindex 5 (ifidx_reason 3) nl80211: if_indices[16]: 5(3) nl80211: Add own interface ifindex 3 (ifidx_reason -1) nl80211: if_indices[16]: 5(3) 3(-1) phy: phy0 BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits) wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE Previous country code 00, new country code RU Continue interface setup after channel list update ctrl_iface not configured! ~ # [ 117.019115] wlcore: down [ 117.023573] br0: port 2(wlan0) entered disabled state [ 118.476059] wlcore: PHY firmware version: Rev 8.2.0.0.236 [ 118.579309] wlcore: firmware booted (Rev 8.9.0.0.69)

    I found post with same problem ( http://e2e.ti.com/support/wireless_connectivity/wilink_wifi_bluetooth/f/307/t/556341 ) , may be I also salve my problem if I install crda?

    ~ # iw reg get
    global
    country 00: DFS-UNSET
            (2402 - 2472 @ 40), (6, 20), (N/A)
            (2457 - 2482 @ 40), (6, 20), (N/A), PASSIVE-SCAN
            (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
            (5170 - 5250 @ 160), (6, 20), (N/A), PASSIVE-SCAN
            (5250 - 5330 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
            (5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
            (5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN
            (57240 - 63720 @ 2160), (N/A, 0), (N/A)

  • Yes, this is probably the same issue.
    Try typing:
    COUNTRY=RU crda

    and see if you get an error.
    In case you do, you are probably missing the crda/regulatory.bin components in your file system.

    BR,
    Eyal
  • Hello, Eyal!

    I build CRDA from source, I clone sources from git, unfortunately CRDA always exit with error -1

    ~ # iw reg get
    global
    country 00: DFS-UNSET
            (2402 - 2472 @ 40), (6, 20), (N/A)
            (2457 - 2482 @ 40), (6, 20), (N/A), PASSIVE-SCAN
            (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
            (5170 - 5250 @ 160), (6, 20), (N/A), PASSIVE-SCAN
            (5250 - 5330 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
            (5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
            (5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN
            (57240 - 63720 @ 2160), (N/A, 0), (N/A)
    
    ~ # COUNTRY=US crda
    Failed to set regulatory domain: -7

    According with crda.c this error possible if programm not get answer from nerlink.

    nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, reg_handler, NULL);
     nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, wait_handler, &finished);
     nl_cb_err(cb, NL_CB_CUSTOM, error_handler, NULL);
    
     if (!finished) {
         r = nl_wait_for_ack(nlstate.nl_sock);
         if (r < 0) {
             fprintf(stderr, "Failed to set regulatory domain: "
                      "%d\n", r);
             goto cb_out;
         }
    }

    Why I get this error and can I solve this?
    Thank you.



  • Did you follow tge rest of the procedure?:

    TI E2E Community

    WiLink™ WiFi + Bluetooth

    WiLink™ WiFi + Bluetooth Forum

    More

    Sign In to Post

    Answered

    Configuration wl1837 module into 5GHz as soft AP.

    siva ch61 siva ch61

    Hi All,

    I am trying to configure the Wlink Wl1873 module into AP mode using the 5GHz band.

    Here when I try to start the hostapd with the below configuration into 5GHz band. Its creating the error to start AP functionality.

    hw_mode=a

    channel=36,

    ht_capab=[HT40+]

    country_code=US

    Error log saying that the hardware does not support to operate into 5Hz. I am copied the error log of hostapd with debug enabled for your reference.

    Please check and suggest me how do I can configure the module into 5Hz.

    ##################### hostapd log ########################

    root@am437x-evm:/usr/share/wl18xx# root@am437x-evm:/usr/share/wl18xx# vi hostapd.conf[J root@am437x-evm:/usr/share/wl18xx# hostapd -ddd hostapd.conf[J

    random: Trying to read entropy from /dev/random

    Configuration file: hostapd.conf

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

    nl80211: Supported cipher 00-0f-ac:1

    nl80211: Supported cipher 00-0f-ac:5

    nl80211: Supported cipher 00-0f-ac:2

    nl80211: Supported cipher 00-0f-ac:4

    nl80211: Supported cipher 00-14-72:1

    nl80211: Supports Probe Response offload in AP mode

    nl80211: Using driver-based off-channel TX

    nl80211: Supported vendor command: vendor_id=0x80028 subcmd=0

    nl80211: Supported vendor command: vendor_id=0x80028 subcmd=1

    nl80211: Supported vendor command: vendor_id=0x80028 subcmd=2

    nl80211: Supported vendor event: vendor_id=0x80028 subcmd=0

    nl80211: Supported vendor event: vendor_id=0x80028 subcmd=1

    nl80211: Use separate P2P group interface (driver advertised support)

    nl80211: Enable multi-channel concurrent (driver advertised support)

    nl80211: use P2P_DEVICE support

    nl80211: interface wlan1 in phy phy0

    nl80211: Set mode ifindex 6 iftype 3 (AP)

    nl80211: Setup AP(wlan1) - device_ap_sme=0 use_monitor=0

    nl80211: Subscribe to mgmt frames with AP handle 0x17c968

    nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x17c968 match=

    nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x17c968 match=

    nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x17c968 match=

    nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x17c968 match=

    nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x17c968 match=

    nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x17c968 match=

    nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x17c968 match=

    nl80211: Add own interface ifindex 6

    nl80211: if_indices[16]: 6

    phy: phy0

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

    wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE

    Previous country code 00, new country code US

    Continue interface setup after channel list update

    ctrl_iface not configured!

    random: Got 9/20 bytes from /dev/random

    Channel list update timeout - try to continue anyway

    nl80211: Regulatory information - country=00

    nl80211: 2402-2472 @ 40 MHz 20 mBm

    nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)

    nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)

    nl80211: 5170-5250 @ 160 MHz 20 mBm (no IR)

    nl80211: 5250-5330 @ 160 MHz 20 mBm (DFS) (no IR)

    nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)

    nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)

    nl80211: 57240-63720 @ 2160 MHz 0 mBm

    nl80211: Added 802.11b mode based on 802.11g information

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

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

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

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

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

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

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

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

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

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

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

    Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=20 dBm (DFS state = usable)

    Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=20 dBm (DFS state = usable)

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

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

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

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

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

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

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

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

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

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

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

    Syncing AP channel

    nl80211: Get shared AP freq for PHY phy0

    nl80211: AP shared freq 0

    wlan1: IEEE 802.11 Configured channel (40) not found from the channel list of current mode (1) IEEE 802.11g

    wlan1: IEEE 802.11 Hardware does not support configured channel

    Could not select hw_mode and channel. (-3)

    wlan1: interface state COUNTRY_UPDATE->DISABLED

    wlan1: AP-DISABLED

    hostapd_interface_deinit_free(0x17b148)

    hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1

    hostapd_interface_deinit(0x17b148)

    wlan1: interface state DISABLED->DISABLED

    hostapd_bss_deinit: deinit bss wlan1

    wlan1: Deauthenticate all stations

    nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3

    nl80211: send_mlme -> send_frame

    nl80211: send_frame - Use bss->freq=0

    nl80211: send_frame -> send_frame_cmd

    nl80211: CMD_FRAME freq=0 wait=0 no_cck=0 no_ack=0 offchanok=0

    CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 7c ec 79 fe a7 35 7c ec 79 fe a7 35 00 00 03 00

    nl80211: Frame command failed: ret=-22 (Invalid argument) (freq=0 wait=0)

    wlan1: AP-DISABLED

    hostapd_cleanup(hapd=0x17bea0 (wlan1))

    hostapd_free_hapd_data: Interface wlan1 wasn't started

    hostapd_interface_deinit_free: driver=0x12b25c drv_priv=0x17c840 -> hapd_deinit

    nl80211: deinit ifname=wlan1 disabled_11b_rates=0

    nl80211: Remove monitor interface: refcount=0

    nl80211: Remove beacon (ifindex=6)

    netlink: Operstate: ifindex=6 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)

    nl80211: Unsubscribe mgmt frames handle 0x889f41e1 (deinit)

    hostapd_interface_free(0x17b148)

    hostapd_interface_free: free hapd 0x17bea0

    hostapd_cleanup_iface(0x17b148)

    hostapd_cleanup_iface_partial(0x17b148)

    hostapd_cleanup_iface: free iface=0x17b148

    Thanks & Regards

    Ch. Siva

    siva ch61 siva ch61

    Nov 21, 2016 9:12 AM

    Reply

    All Responses

    Answers Only

    Eyal Reizer Eyal Reizer

    Nov 21, 2016 1:00 PM

    Hi,

    Seems like your regulatory seetings are not right. Do you have crda installed and working correcly?

    What is the output of:

    iw wlan0 reg get

    iw wlan0 res set US

    BR,

    Eyal

    Reply

    siva ch61 siva ch61

    Nov 21, 2016 2:49 PM

    In reply to Eyal Reizer:

    Hi Eyal,

    Thanks for your quick response.

    I tried the above commands to change regulatory domain and it's not success at our side.

    I have started crda monitor "udevadm monitor --environment kernel" to debug this. From this log I have observed that domain is not configuring. I am attaching the log for your reference.

    Please have a look and provide us the inputs to avoid this issue.

    root@am437x-evm:/usr/share/wl18xx#

    root@am437x-evm:/usr/share/wl18xx# iw reg get

    country 00: DFS-UNSET

    (2402 - 2472 @ 40), (6, 20), (N/A)

    (2457 - 2482 @ 40), (6, 20), (N/A), PASSIVE-SCAN

    (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN

    (5170 - 5250 @ 160), (6, 20), (N/A), PASSIVE-SCAN

    (5250 - 5330 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN

    (5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN

    (5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN

    (57240 - 63720 @ 2160), (N/A, 0), (N/A)

    root@am437x-evm:/usr/share/wl18xx#

    root@am437x-evm:/usr/share/wl18xx#

    root@am437x-evm:/usr/share/wl18xx#

    root@am437x-evm:/usr/share/wl18xx#

    root@am437x-evm:/usr/share/wl18xx#

    root@am437x-evm:/usr/share/wl18xx#

    root@am437x-evm:/usr/share/wl18xx# iw reg get[J

    root@am437x-evm:/usr/share/wl18xx# udevadm monitor --environment kernel &

    root@am437x-evm:/usr/share/wl18xx# iw reg set US

    root@am437x-evm:/usr/share/wl18xx#

    UDEV [1726.524941] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=US

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1337

    SUBSYSTEM=platform

    UDEV [1726.528035] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=US

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1337

    SUBSYSTEM=platform

    USEC_INITIALIZED=1726527198

    KERNEL[1729.670405] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1338

    SUBSYSTEM=platform

    UDEV [1729.673386] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1338

    SUBSYSTEM=platform

    USEC_INITIALIZED=1729672711

    KERNEL[1732.820415] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1339

    SUBSYSTEM=platform

    UDEV [1732.823476] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1339

    SUBSYSTEM=platform

    USEC_INITIALIZED=1732822793

    KERNEL[1735.970369] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1340

    SUBSYSTEM=platform

    UDEV [1735.973368] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1340

    SUBSYSTEM=platform

    USEC_INITIALIZED=1735972687

    KERNEL[1739.120387] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1341

    SUBSYSTEM=platform

    UDEV [1739.123426] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1341

    SUBSYSTEM=platform

    USEC_INITIALIZED=1739122741

    KERNEL[1742.270358] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1342

    SUBSYSTEM=platform

    UDEV [1742.273340] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1342

    SUBSYSTEM=platform

    USEC_INITIALIZED=1742272671

    KERNEL[1745.420428] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1343

    SUBSYSTEM=platform

    UDEV [1745.423506] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1343

    SUBSYSTEM=platform

    USEC_INITIALIZED=1745422825

    KERNEL[1748.570414] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1344

    SUBSYSTEM=platform

    UDEV [1748.573465] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1344

    SUBSYSTEM=platform

    USEC_INITIALIZED=1748572786

    KERNEL[1751.720430] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1345

    SUBSYSTEM=platform

    UDEV [1751.723480] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1345

    SUBSYSTEM=platform

    USEC_INITIALIZED=1751722803

    KERNEL[1754.870438] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1346

    SUBSYSTEM=platform

    UDEV [1754.873550] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1346

    SUBSYSTEM=platform

    USEC_INITIALIZED=1754872793

    KERNEL[1758.020388] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1347

    SUBSYSTEM=platform

    UDEV [1758.023531] change /devices/platform/regulatory.0 (platform)

    ACTION=change

    COUNTRY=00

    DEVPATH=/devices/platform/regulatory.0

    MODALIAS=platform:regulatory

    SEQNUM=1347

    SUBSYSTEM=platform

    USEC_INITIALIZED=1758022777

    I appreciate your prompt response on this issue.

    Thanks in advance.

    Thanks & Regards

    Ch. Siva

    Reply

    Eyal Reizer Eyal Reizer

    Nov 21, 2016 2:55 PM

    In reply to siva ch61:

    Seems like you don't have crda installed and country remains 00 (world).

    This is why the AP is failing for you.

    If it was working you should have seen something like:

    [ 18.075302] cfg80211: Calling CRDA for country: US

    [ 18.151509] cfg80211: Regulatory domain changed to country: US

    [ 18.161460] cfg80211: DFS Master region: FCC

    [ 18.165822] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)

    [ 18.183540] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)

    [ 18.195667] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 1700 mBm), (N/A)

    [ 18.209284] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)

    [ 18.222889] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)

    [ 18.234918] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)

    What do you get if you type?:

    COUNTRY=US crda

    BR,

    Eyal

    Reply

    siva ch61 siva ch61

    Nov 24, 2016 10:52 AM

    In reply to Eyal Reizer:

    Hi Eyal,

    I would like to understand, Do I need to install CRDA explicitly?

    Here I am using the wlbuild utils to generate the TI wireless drivers modules along with MAC and CFG80211.

    As per my understanding CRDA is part of CFG80211 module and no need to install separately.

    Is there any configurations need to be done in the CFG80211 to enable CRDA functionality support?

    Please help me to resolve this issue.

    Thanks & Regards

    Ch. Siva

    Reply

    Eyal Reizer Eyal Reizer

    Nov 24, 2016 11:22 AM

    In reply to siva ch61:

    Hi Siva,

    CRDA is a user space agent that needs to be built/installed separately.

    See:

    drvbp1.linux-foundation.org/.../

    Had you used our build script:

    processors.wiki.ti.com/.../WL18xx_System_Build_Scripts

    crda is one of the components that are built when using it alongside libnl, wpa_supplicant, hostapd etc.:

    processors.wiki.ti.com/.../WL18xx_System_Build_Scripts

    BR,

    Eyal

    Reply

    siva ch61 siva ch61

    Nov 24, 2016 12:28 PM

    In reply to Eyal Reizer:

    Hi Eyal,

    Thank you for the inputs.

    When I run the command "COUNTRY=US crda" I am getting below error.

    "failed to open db file: No such file or directory"

    It would help me, if you provide us the procedure to enable CRDA on TI platform.

    I appreciate your support on this.

    Thanks & Regards

    Ch. Siva

    Reply

    Eyal Reizer Eyal Reizer

    Nov 24, 2016 2:03 PM

    In reply to siva ch61:

    Hi,

    You are probably missing the regulatory.bin database in your file system:

    wireless.wiki.kernel.org/.../wireless-regdb

    This is a generic mechanism for regulatory domain in linux and is not related at all to TI platform or any other platform.

    You can try getting it manually from the git described in the link above and install it into your target fileystem.

    Again. if you would have used the build script for building crda, it would have installed it all for you.

    processors.wiki.ti.com/.../WL18xx_System_Build_Scripts

    BR,

    Eyal

    Reply

    siva ch61 siva ch61

    Nov 26, 2016 2:14 PM

    In reply to Eyal Reizer:

    Hi Eyal,

    Thanks for your inputs.

    I have copied all the required binaries and libraries and able to configure into 5GHz mode on target platform.

    The below are the procedure to configure WL18xx modules into 5GHz operating mode. It would help people how are facing difficultly in change of band.

    1. Create file "regulatory.rules" under "/etc/udev/rules.d/" add the below content to interact CRDA with kernel spcace to change regulatory domain.

    KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"

    2. Copy the crda binaries which is generated part of WL18xx_System_Build into "/sbin" of target system.

    $cp crda /sbin/

    $cp libcrda.so /usr/lib/

    3. copy the Public certificates into "/etc/wireless-regdb/pubkeys"

    3. copy the regulatory domain binary file into "/usr/lib/crda/regulatory.bin"

    4. run the commands to set regulatory domain

    iw reg get

    iw reg set US

    iw reg get

  • Hello Eyal!
    Yes, I make all steps except udev because all drivers embedded in linux, I use mdev instead udev.

  • Ok, I think I solve this problem after copy db.txt to linux/net/wireless/db.txt and enable CONFIG_CFG80211_INTERNAL_REGDB

  • INTERNAL_REGDB is not really recommanded as it works without crda and doesnt allow to to chane regulatory regions without rebuilding the kernel.

    Anyway it is your decision.

    BR
    Eyal
  • Yes, you right, but I can't now solve problem with crda.