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: Calibrator not working

Part Number: WL1837MOD

Tool/software: Linux

I am trying to use the calibrator tool, and getting the following error message:

# calibrator --debug wlan0 plt power_mode on
-- Debug: Received Message:
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 68
.type = 2 <ERROR>
.flags = 0 <>
.seq = 13174
.port = 264241396
[ERRORMSG] 20 octets
.error = -95 "Operation not supported"
[ORIGINAL MESSAGE] 16 octets
.nlmsg_len = 16
.type = 21 <0x15>
.flags = 5 <REQUEST,ACK>
.seq = 13174
.port = 264241396
--------------------------- END NETLINK MESSAGE ---------------------------
command failed: Operation not supported (-95)

I've followed the steps described at this link: http://processors.wiki.ti.com/index.php/WL18xx_System_Build_Scripts#Build_Guide 

  • Raessa,

    We have assigned your post to the relevant engineer and will get back to you shortly.
  • UPDATE: I have cloned the repository 18xx-ti-utils which contains the calibrator tool. I'm not sure if these tools are included properly when I build the project. It's in the same folder as wl8-build (where the build scripts were downloaded), which is a subfolder under buildroot/build (where the makefile is stored). Here is the relevant part of the directory tree:

    build
    ├── build
    ├── host
    ├── images
    ├── Makefile
    ├── staging
    ├── target
    └── wl8-build

    ├── 18xx-ti-utils
    └── build-utilites

  • Please, build kernel with 'NL80211_TESTMODE' enabled for it to work..

    Thanks
  • I already did. I set: "CONFIG_NL80211_TESTMODE=y", then ran:
    ./build_wl18xx.sh kernel_modules
    ./build_wl18xx.sh firmware

    Then rebooted the board. My issue is still not resolved. Just a note that I have already tried setting "ifconfig wlan0 down" before sending calibrator commands, and that has not resolved my issue either.

    I think the problem may be that the module is running calibrator version 0.72, when it should be running 0.80. However, I cannot figure out how to update the version, and make sure that it is integrated properly with the board. From what I have gathered online, I should checkout the most recent branch from the git repo, and then just copy the wfconf folder to the board. But I can't get this to work.

    Thanks
  • Humm.. Can, you try the following with TEST MODE enable kernel/modules -
    a) Load wlan driver with '/usr/share/wl18xx/load_wlcore.sh'
    b) Disable with "#ifconfig wlan0 down
    c) Now put the device to PLT mode
    #calibrator wlan0 plt power_mode on
  • So I think the problem is there are no files in my directory '/usr/share/wl18xx/'. I'm assuming there is something wrong in the script built_wl18xx.sh which is not creating any files in here. Do you know what the problem here would be?
  • If, you are using a TI AM processor, why not take stock TI SDK i.e with file system and kernel binaries. TISDK has all the needed dependencies takes care of..
    I am not sure, if the wlcore load/unload scripts in TISDK file system are pushed from build utils Or separately..

    root@am335x-evm:/usr/share/wl18xx# cat load_wlcore.sh
    #!/bin/sh

    if ! mount | grep debugfs > /dev/null; then
    echo "Mount debugfs"
    mount -t debugfs none /sys/kernel/debug
    fi

    modprobe wl18xx
    modprobe wlcore_sdio

    root@am335x-evm:/usr/share/wl18xx#
    root@am335x-evm:/usr/share/wl18xx# cat unload_wlcore.sh
    #!/bin/sh

    rmmod wlcore_sdio
    rmmod wl18xx
    rmmod wl12xx
    rmmod wlcore
    rmmod mac80211
    rmmod cfg80211
    rmmod compat

    killall wpa_supplicant
    killall hostapd
    root@am335x-evm:/usr/share/wl18xx#
  • I am not using a TI AM processor, I am using imx6. Could you find out which files are needed for the calibrator functionality, and how these files are pushed?
  • Hari Nagalla said:
    Humm.. Can, you try the following with TEST MODE enable kernel/modules -
    a) Load wlan driver with '/usr/share/wl18xx/load_wlcore.sh'
    b) Disable with "#ifconfig wlan0 down
    c) Now put the device to PLT mode
    #calibratorwlan0 plt power_mode on

    I have found these scripts (you have to run ./build_wl18xx.sh clean), and followed the above steps. I have also updated the calibrator version to 0.80. I am continuing to get the same error, can you think of any other possible cause?

    # ifconfig wlan0 down
    wlcore: down
    # calibrator wlan0 plt power_mode on
    command failed: Operation not supported (-95)

  • That is strange. Do, you have other tools - iw, wpa_supplicant working on your platform? Is, your file system also built independently? I believe, you are missing some nl80211 related library..

    Thanks
  • Yes, the other tools were working, and yes the file system is built independently. How do I check whether I have the necessary libraries?

  • I have noticed that "libnl" is not an available option. Maybe the library is not installed properly? If so, how would I fix this?

    # libnl
    -sh: libnl: not found

    Also, I don't see the "compat" module being loaded.

    # lsmod
    Module Size Used by Not tainted
    wlcore_sdio 6648 0
    wl18xx 79093 0
    wlcore 176730 1 wl18xx
    mac80211 337061 2 wl18xx,wlcore
    cfg80211 235520 3 wl18xx,wlcore,mac80211
    cdc_acm 16566 0
    rndis_host 6533 0
    usb_f_acm 5200 0
    libcomposite 45279 1 usb_f_acm
    configfs 23913 3 usb_f_acm,libcomposite
    u_serial 9716 1 usb_f_acm

    I hope that helps diagnose the problem. Thanks.

  • libnl is not an executable, so you can't check from console, typing it.. You may want to try with 'strace' to find which system calls and libraries are being called..

    Thanks
  • Do you mean libraries called at boot up? I'm not able to run strace on my board. I have also tried ldconfig. Here are the results, in case this is useful information:

    ldconfig: uClibc version
    /lib:
    libgcc_s.so.1 => libgcc_s.so.1
    libuuid.so.1 => libuuid.so.1.3.0
    libmount.so.1 => libmount.so.1.1.0
    libatomic.so.1 => libatomic.so.1.2.0
    libblkid.so.1 => libblkid.so.1.1.0
    ld-uClibc.so.1 => ld-uClibc-1.0.26.so
    libc.so.0 => libuClibc-1.0.26.so
    /usr/lib:
    ldconfig: /usr/lib/libstdc++.so.6.0.22-gdb.py is not a shared library, skipping
    libpanel.so.6 => libpanel.so.6.0
    libgobject-2.0.so.0 => libgobject-2.0.so.0.5200.2
    libnl-idiag-3.so.200 => libnl-idiag-3.so.200.25.0
    libstdc++.so.6 => libstdc++.so.6.0.22
    libexpat.so.1 => libexpat.so.1.6.6
    libdbus-1.so.3 => libdbus-1.so.3.14.13
    libnl-xfrm-3.so.200 => libnl-xfrm-3.so.200.25.0
    libiptc.so.0 => libiptc.so.0.0.0
    libffi.so.6 => libffi.so.6.0.4
    libnl-nf-3.so.200 => libnl-nf-3.so.200.25.0
    libreg.so => libreg.so
    libcheck.so.0 => libcheck.so.0.0.0
    libicalss.so.1 => libicalss.so.1.0.1
    libical.so.1 => libical.so.1.0.1
    libpcrecpp.so.0 => libpcrecpp.so.0.0.1
    libnl-3.so.200 => libnl-3.so.200.25.0
    libpython2.7.so.1.0 => libpython2.7.so.1.0
    libz.so.1 => libz.so.1.2.11
    libip6tc.so.0 => libip6tc.so.0.1.0
    libdbus-glib-1.so.2 => libdbus-glib-1.so.2.3.3
    libicalvcal.so.1 => libicalvcal.so.1.0.1
    libcurl.so.4 => libcurl.so.4.4.0
    libcharset.so.1 => libcharset.so.1.0.0
    libbluetooth.so.3 => libbluetooth.so.3.13.0
    libgthread-2.0.so.0 => libgthread-2.0.so.0.5200.2
    libxtables.so.12 => libxtables.so.12.0.0
    libform.so.6 => libform.so.6.0
    libnl-route-3.so.200 => libnl-route-3.so.200.25.0
    libnl-genl-3.so.200 => libnl-genl-3.so.200.25.0
    libglib-2.0.so.0 => libglib-2.0.so.0.5200.2
    libmenu.so.6 => libmenu.so.6.0
    libiconv.so.2 => libiconv.so.2.6.0
    libcrypto.so.1.0.0 => libcrypto.so.1.0.0
    libgio-2.0.so.0 => libgio-2.0.so.0.5200.2
    libpcreposix.so.0 => libpcreposix.so.0.0.5
    libhistory.so.7 => libhistory.so.7.0
    libssl.so.1.0.0 => libssl.so.1.0.0
    libcollectdclient.so.1 => libcollectdclient.so.1.0.0
    libgmodule-2.0.so.0 => libgmodule-2.0.so.0.5200.2
    libncurses.so.6 => libncurses.so.6.0
    libip4tc.so.0 => libip4tc.so.0.1.0
    libreadline.so.7 => libreadline.so.7.0
    libnl-cli-3.so.200 => libnl-cli-3.so.200.25.0
    libgcrypt.so.20 => libgcrypt.so.20.1.9
    libgpg-error.so.0 => libgpg-error.so.0.22.0
    libsensors.so.4 => libsensors.so.4.4.0
    libasound.so.2 => libasound.so.2.0.0
    libpcre.so.1 => libpcre.so.1.2.9
    /usr/X11R6/lib:
    ldconfig: skipping /usr/X11R6/lib: No such file or directory


    Could there be an issue with wlconf? I was checking this thread https://e2e.ti.com/support/wireless_connectivity/wilink_wifi_bluetooth/f/307/t/317415

    but the wiki links to a page which no longer exists. Maybe there's another step I need to follow?

  • It is likely your target file system does not have 'strace' utility.. TISDK build have 'strace'.
    Can, you also verify that the NL80211_TESTMODE is set in your system.. From target console do the following to check -
    # zcat /proc/config.gz | grep NL80211_TESTMODE

    Thanks
  • You're right, it's not enabled. I'm using kernel version 4.1.15. I set 'CONFIG_NL80211_TESTMODE=y' in the file: build-utilites/configuration/kernel_4.1.config. Which file should I be making the changes in?
  • You need to make sure this flag is set in ".config "file, when you are building kernel and modules.
  • I have set this in the file which is copied to .config by the build script, but for some reason, the changes are not set upon booting.
  • Are you using TISDK build system or your own ?
    Please check the sdk build script. They are probably copying a ready made defconfig file from one of their directories in the sdk overiding your changes before starting the build.
    You need to edit this file.

    Thanks