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: Latency, watchdog HW reset and TX buffers

Part Number: WL1837MOD


Tool/software: Linux

Hi!

We are currently developing an automotive custom board that integrates your WiFi module WL1837MOD. We are experiencing several issues with it, these usually result in connection/messages losses, thus, making our application untrustworthy. The following are some of the main characteristics of our system:

- Processor: i.MX6Q

- Build System: Yocto (last stable version)

- Linux Kernel: v4.4.113 (Distro: Poky)

- WiFi related SW: hostapd v2.6, dnsmasq v2.78 (AP side) and wpa_supplicant v2.6 (client side, when communicating 2/+ of our boards) from OpenEmbedded layers (NOT wl18xx ones) with minimal configuration. The configuraiton files of these is attached to this post.

- wlcore FW version: 183x or 180x, PG 2.2 (ROM 0x11), PHY Rev 8.2.0.0.237, booted Rev 8.9.0.0.70

Issues we are facing:

1) When trying to connect 2 of our boards via WiFi, usually, it takes a really long time to establish the connection; wpa_supplicant performs lots of authentication tries (send auth to xx:xx:xx:xx:xx:xx (try 1/3), send auth to xx:xx:xx:xx:xx:xx (try 2/3), send auth to xx:xx:xx:xx:xx:xx (try 3/3)  and repeat...) then the same with association tries (associate with xx:xx:xx:xx:xx:xx (try 1/3), associate with xx:xx:xx:xx:xx:xx (try 2/3), associate with xx:xx:xx:xx:xx:xx (try 3/3)...) and when finally it succeeds in its task, sometimes, it just suddenly performs a deauthentication  (with either reason code 2: PREV_AUTH_NOT_VALID or 3: 3=DEAUTH_LEAVING, although the credentials are the good ones and i am not deauthenticating on prupose). And the process starts again until the connection, eventually, gets established.

2) When the connection is established and working, randomly (maybe a couple or 10s of minutes), we get the error: "ERROR SW watchdog interrupt received! starting recovery" that resets the WiFi module, thus, breaking the connection and forcing a reconnection that can take even few minutes (sometimes the AP seems like not let the client to connect for a long time )...

3) During the whole process, establishing or established, we also get the following warning several times: "WARNING Unable to flush all TX buffers, timed out (timeout 500 ms".

NOTE: The load we are testing the connection with is quite low (~500B/s), we have tried it either with and without antenna (2.4GHz).

Thank you in advance!

Best regards,

Daniel Rodríguez

FILES

hostapd.conf, dnsmasq.conf and wpa_supplicant.conf respectively

#General settings
interface=wlan2
hw_mode=g
channel=7
macaddr_acl=0

# Use WPA
auth_algs=1
wpa=1
wpa_key_mgmt=WPA-PSK

# This is the name of the network
ssid=BOARD-AP
# The network passphrase
wpa_passphrase=Net1234


interface=wlan2
dhcp-range=192.168.5.15,192.168.5.20,255.255.255.0,12h


ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 update_config=1 #(and here comes the output of wpa_supplicant autogen net conf)

  • Hi,
    FYI - WiLink™ 8Q is automotive grade - WiLink™ 8 is used in industrial, non-automotive solutions. We fixed some watchdog recoveries in latest firmware. I suggest you upgrade to latest firmware and re-test . git.ti.com/.../wl18xx_fw version 8.9.0.0.78

    Thanks
    Saurabh
  • Hi Saurabh,

    Thank you for the information, we'll check the suggested solution and try it out. I'll make you know the results!

    FYI: I forgot to mention that the latency we're getting through the connection is very unstable (ranging from as low as 9 ms to a couple of seconds!) and doesn't follow a known pattern.

    Best Regards,
    Daniel

  • Hi Daniel,
    I am not sure what version of wilink8 driver you have on your system - you may upgrade to latest R8.7_SP3 : processors.wiki.ti.com/.../WL18xx_System_Build_Scripts
    Also, latency could be due to other variables such as supplicant etc. and not necessarily the driver

    Thanks
    Saurabh
  • Hi Saurabh,

    We have just updated to the last FW, the validation team will test it as soon as possible.

    The wl18xx drivers are bundled with the linux Kernel (>3.10), right? How can I check the current version of the driver since it has not been built using the Build Scripts?

    Perhaps I'm misunderstanding you but, since we are building our system under Yocto, why should we build the drivers "manually" with the Build Scripts (thus recompiling our actual kernel outside Yocto)? Is there no option to build them with Yocto (for ease of integration with the whole system pruposes)?

    Thank you again!

    Best Regards

    Daniel

  • Hi Daniel,
    Yes, kernel will have in-tree WiLink8 drivers but the version could be an old one. As far as i remember starting kernel 4.1, WiLink8 driver was available in mainline linux. Since then we have made more releases of WiLink8 driver. In case you need to update to latest WiLink8 driver version - like in your case on kernel 4.4.x , you will need to run build scripts.

    Thanks
    Saurabh
  • Hi Saurabh,

    Understood, thank you.

    BTW, since we are using Yocto for managing and building all the sources, I'm not sure about the values that must be set for variables of setup-env file (/build-utilities/setup-env):

    TOOLCHAIN_PATH -- Target toolchain? Host toolchain? (Or is it just a path to download a toolchain? "if DEFAULT toolchain path is set toolchain will be downloaded to ./toolchain.")

    KERNEL_PATH -- Kernel sources?

    I guess the rest can remain unchanged.

    #                            \\\//
    #                           -(o o)-
    #========================oOO==(_)==OOo=======================
    # This file contains the exports needed for automating the
    # build process of WLAN components.
    # Place this file in the same directory with wl18xx_build.sh
    # build scripts. No need to run 'source setup-env', the build
    # scripts will perfom it internaly.
    #===========================================================
    # User specific environment settings - use full PATH
    
    # if DEFAULT toolchain path is set toolchain will be downloaded to ./toolchain.
    export TOOLCHAIN_PATH=DEFAULT
    # if DEAFULT path to root filesystem is set ./fs folder will be used.
    export ROOTFS=DEFAULT
    #if DEFAULT kernel path is set - kernel will be downloaded (set branch to match kernel version)
    export KERNEL_PATH=DEFAULT
    
    # 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
    
    export CROSS_COMPILE=arm-linux-gnueabihf-
    export ARCH=arm
    [ "$TOOLCHAIN_PATH" != "DEFAULT" ] && export PATH=$TOOLCHAIN_PATH:$PATH

    EDIT: The build script fails when TOOLCHAIN=DEFAULT is set. It returns 404 ERROR when trying to download the toolchain...

    Best regards,

    Daniel

  • Daniel,
    KERNEL_PATH should point to your kernel source path
    TOOLCHAIN_PATH should point to your cross compiler you use to compile the binaries
    ROOTFS should point to the your file system path . If it is set to DEFAULT, build binaries will be in ./fs folder

    wiki and setup-env should has explanation of these parameters

    Since you are still in the process of updating WiLink8 drivers and it might take you a while before you can get the logs , I suggest you open a new thread with updated logs etc. when they are available . We will continue to support you .

    Thanks
    Saurabh