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: Station can be associated with AP, but ping is not working, iwconfig to select channel and set txpower is also not working.

Part Number: WL1837MOD
Other Parts Discussed in Thread: WL1271,

Tool/software: Linux

Dear Sir,

My problem is after enable wifi by "connmanctl enable wifi", I can use other connmanctl commands to connect to AP, and also get correct IP address. But after that, the device can not ping to any other machine in the same network, even the gateway. I also can not ping it from my other host. 

When I try to different iw or iwconfig command to set txpower or select channel, these command also not work. For example:

$ iw dev wlan0 set txpower fixed 18

command failed: Operation not supported (-95)

$ iwconfig wlan0 txpower 22

Error for wireless request "Set Tx Power" (8B26) :
SET failed on device wlan0 ; Invalid argument.

$ iwconfig wlan0 channel 2 

Error for wireless request "Set Frequency" (8B04) :
SET failed on device wlan0 ; Invalid argument.

In my environment, we use:

Our linux is: Embedded Linux BSPs featuring the Yocto Project compatible Ångström distribution.

Kernel version: 3.14.52. Source from: Linux kernel: git.toradex.com/.../

CPU: iMX6 (current problem should not be caused by CPU).

I don't sure which component is missed in our environment. It also seems the code in drivers/net/wireless/ti/ folder is very old, seems old the the Wilink8 version 8.7, 8.6, 8.5 and 8.5. Can you give me some advice what I need to do next? Whether we just missed something or we need to integrate the new Wilink8 stuff into our code?

If possible, please tell us the possible technical support from Toronto of Canada side. My phone is: 1-306-203-6629.

Thanks,

Richard

  • Hi ,
    Your query has been assigned to WiFi expert. We will get back to you shortly.

    Thanks
    Saurabh
  • Hi,

    First of all, you should not use the in-tree drivers that are part of the 3.14 kernel. Your firmware is also old.

    You need to use our build scripts for integrating a latest version (R8.7_SP1) with your kernel using backports.

    See the following wiki:

    in addition iwconfig is not really supported for a while now...

    You need to use iw or even better wpa_supplicant commands.

    See:

    Best Regards,

    Eyal

  • Hi Eyal,

    Thanks for your information, currently I am following the above Wi18xx system build scripts, to see what will happen.

    Can you give us your contact information or set up a phone call with us?

    Currently, in our product, enable wifi is the most critical feature we need to support.

    Thanks,

    Richard

  • Today, when I try to follow the instruction of WL18xx System Build Scripts, but I always failed after many try. Here is the setup-env, I used:

    # if DEFAULT toolchain path is set toolchain will be downloaded to ./toolchain.
    export TOOLCHAIN_PATH=/home/xlc/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi

    # if DEFAULT path to root filesystem is set ./fs folder will be used.
    #xlc--changed
    #export ROOTFS=DEFAULT
    #export ROOTFS=~/w18-build/fs
    export ROOTFS=~/oe-core/build/out-glibc/sysroots/colibri-imx6-gryphon

    #if DEFAULT kernel path is set - kernel will be downloaded (set branch to match kernel version)
    #xlc
    #export KERNEL_PATH=DEFAULT
    export KERNEL_PATH=/home/xlc/oe-core/build/out-glibc/work-shared/colibri-imx6-gryphon/kernel-source

    # if KERNEL_VARIANT below is set the build script will look for kernel specific
    # patches under the patches directory:
    # - patches under the pathces/driver_patches/$KERNEL_VARIANT directory would be
    # applied during "modules" build.
    # - patches under the patches/kernel_patches/$/$KERNEL_VARIANT directory would
    # be applied to the kernel pointed by KERNEL_PATH in case the "patch_kernel"
    # command is used.
    # Note: the kernel is not built automatically after the patches are applied
    export KERNEL_VARIANT=DEFAULT

    #xlc
    #export CROSS_COMPILE=arm-linux-gnueabihf-
    export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
    export ARCH=arm
    [ "$TOOLCHAIN_PATH" != "DEFAULT" ] && export PATH=$TOOLCHAIN_PATH:$PATH




    In our environment, we use YOCTO to build the linux and generated the final image. Some clear bug in the build_wl18xx.sh (and configuration.sh) is when running "./build_wl18xx.sh init", with my above setting (I think with other setting it will also got this error), it will report releases.linaro.org/.../gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf.tar.xz can not be accessed (yes, this page are not existed). But even I comment out this line, during I run "./build_wl18xx.sh update R8.7_SP1", all different error still happen.
  • Hi,

    You can try commenting out the TOOLCHAIN_PATH settings and set CROSS_COMPILE completely to point to your host compiler.
    Such as:
    export CROSS_COMPILE=/home/xlc/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi-

    the "-" is important. make sure that the "arm-angsto,-linux-gnueabi-gcc" exe, etc are really located there...

    BR,
    Eyal
  • Hi Eyal,

    Now I can run "./build_wl18xx.sh modules" successfully. But I can not build other modules such as openssl, when run "./build_wl18xx.sh openssl", I  will got following erro:

    /home/xlc/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -fomit-frame-pointer -Wall -c -o cryptlib.o cryptlib.c
    In file included from cryptlib.c:117:0:
    cryptlib.h:62:21: fatal error: stdlib.h: No such file or directory
    compilation terminated.
    <builtin>: recipe for target 'cryptlib.o' failed

    After some investigation, I guess "--sysroot" gcc option maybe not set correctly. Otherwise, gcc shoudl find it in its header files search path. But I don't know how to change that.

    In setup-env, I have set: export ROOTFS=/home/xlc/oe-core/build/out-glibc/sysroots/colibri-imx6-gryphon.   I think somewhere in the script should pass this information down to the compiler.

    Thanks,

    Richard

     

  • I have found a way to build wilink 8 package. But after I following the steps as following to merge the generated file into device / folder, everything seems mess up.

    cd /
    tar -xvf fs_skeleton.tbz2
    sync
    reboot

    Before I don't that, I can sure SDIO layer is working. But after I don't that, seems SDIO driver is broken also, it report:
    [ 3215.714251] wl1271_sdio mmc2:0001:2: legacy platform data not found, trying device tree
    [ 3215.724462] wlcore: ERROR configuration binary file size is wrong, expected 1221 got 1229

    In fact, in our current code, it already support device tree. For me, seems about merge will mess up our current setting and the change made from wilink 8. So we now don't sure which is the correct way for us to do the integration now.

    Thanks,
    Richard
  • Not device tree stuff is broken. But seems the driver still expect the binary file is 1221, but current configuration tool generated a 1229 size binary file for above message.
  • Hi Eyal,

    After trid for about 8 days, I can not make WL1837MOD working with our current linux kernel (3.14.52, from Toradex BSP), now our plan is upgrading our system to Toradex release v2.7 (besides wifi, also for other reasons), which has linux kernel 4.1.39.   We hope wifi module will work well with that BSP.

    But from WiLink8_Linux_Getting_Started_Guide (http://processors.wiki.ti.com/index.php/WiLink8_Linux_Getting_Started_Guide), 

    ". 

    Can you tell me from which detailed version of Linux 4.1+ that WiLink 8 R8.5 has been integrated to mainline kernel?

    Thanks,

    Richard

  • Hi Richard,

    R8.5 is not a version you should use anyway. It is too old and a lot of issues has been fixed since.
    R8.7_SP1 is the version you need to use when building with your new BSP (4.1.39 based).
    R8.7_SP1 is based on a 4.4.6 kernel but you can use our build scripts for building with your BSP.
    If you use latest mainline (4.9 and up) then you can basically use the in-tree drivers as our latest patches have been sent up satream but for 4.1 you need to build using backports and our build script is using this method.

    BR,
    Eyal