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/WL1837MODCOM8I: Unable to set the time synchronization period for WiFi WiLink8 module

Part Number: WL1837MODCOM8I
Other Parts Discussed in Thread: WL1271

Tool/software: Linux

Hi All, 

   for whatever reason I'm unable to set the time synchronization period, usingthe procedure described here: 

When I execute the command:

echo 100 > /sys/kernel/debug/ieee80211/phy0/wlcore/wl18xx/time_sync 

I get an error: "Permission denied" and there is no "time_sync" file present under this path. 

Any suggestions?

Regards, 

Karol

  • karol,
    I believe time sync patch was removed from the driver : git.ti.com/.../13c25bca8d5229c8d5cf5776a13647b020e29588

    This seems to be the reason why you are unable to use time sync feature. We will update the wiki to reflect the same

    Saurabh
  • Hi Saurabh,

       I'm confused :( I've just bought 2 Sitara EVMs & WiLink8 modules to create a setup based on the time sync feature because it was clearly advertised by TI as fully operational. And now from what you are saying the support for this feature has been removed? What was the reason to remove it? Is there any way to get it back in the driver? I'm worried that my company just spent 2k$ on a setup that doesn't support they key feature that we need :(

    Thanks in advance for your help.

    Regards,

    Karol

  • Karol,
    I am assuming this was done to avoid issues on default Sitara EVMs since to run this feature you need to connect GPIO b/w Sitara Host and WiLink8. This GPIO is not connected by default . You may apply the patch :
    git.ti.com/.../4a10364537b4798fde51afc7f28026d58a017e71

    Saurabh
  • Hi Saurabh,
    thanks for clarification. Any idea on how to connect this specific GPIO line between Sitara CPU & WiLink8 module? I have TI's AM335x Sitara EVM board and a dedicted WiLink8 module - do I need to perform some HW rework on the board or is it doable with some switches on the EVM board?
    Another question: it seems that the patch pointed by you is related only to the driver. What about the WiLink8 FW - is the feature still enabled there or was it also removed and I need to apply another patch to re-enable it in the FW?
    Thanks in advance for your help.

    Regards,

    Karol
  • Hi Karol
    "Any idea on how to connect this specific GPIO line between Sitara CPU & WiLink8 module? "
    As stated on the wiki, GPIO11 of WL18xxMOD is connected to Sitara GPIO. GPIO11 does get populated on pin96 of WL18xxMOD COM8 card. You need to check Sitara EVM schematics if it is routed to the Host GPIO or if you need to blue wire it

    "What about the WiLink8 FW - is the feature still enabled there or was it also removed and I need to apply another patch to re-enable it in the FW? "
    I believe you won't need to modify firmware for this

    Thanks
    Saurabh
  • Hi Saurabh,
    it seems that I need to blue wire this connection since the HW setup I have on hand is the Sitara AM335x EVM & a compatible WL1837MODCOM8I board. Unfortunatelly, the pin 96 is not connected anywhere on the EVM's connector side :(
    One last thing that bothers me is that in the time sync feature documentation I've found this netry:

    "...
    5. Integration
    To integrate the software, the following modules will be needed:
    • Kernel DTB modification, to set the AM335x GPIO as output, and allocate it for the WiLink Driver.
    ..."

    Is this what the commit pointed out by you does? Or is this something different?

    Thanks in advance.

    Regards,

    Karol
  • Hi Saurabh,
    what is the procedure for applying this patch on top of my Processor SDK Linux?
    Thanks in advance for your help.

    Regards,

    Karol
  • In addition to what I've written in my previous post I'm also unable to manually apply the commit pointed out by you :( I get error message that the patch could not be applied - probably because the code base has moved over these 2 years.

    Any suggestions?

    Regards,

    Karol
  • Karol,
    This is expected since code has changed since then. You will have to check the mods for each file in the patch and apply it manually by editing each source/header files individually

    Saurabh
  • Hi Saurabh,
    while I'll give it a try could you answer my other questions:
    1. How to set the AM335x GPIO as output, and allocate it for the WiLink Driver?
    2. What function/command should I use to get the synchronized timestamp at the specific moment in my code?

    Thanks in advance.

    Regards,

    Karol
  • Hi Karol,
    Please refer to the patch that I already provided you :git.ti.com/.../4a10364537b4798fde51afc7f28026d58a017e71
    It has code that demonstrates how driver acquires the gpio
    "/* time sync */
    wl->time_sync.gpio = 66;
    ret = gpio_request_one(wl->time_sync.gpio, GPIOF_DIR_OUT, "time_sync");
    if (ret < 0) {
    wl1271_error("error requesting time_sync gpio");
    goto err_buffer_32;
    }"

    You will need add code to pass timestamp info from kernel to user space .

    Saurabh
  • Hi Saurabh,
    I've manually applied the changes from the commit (git.ti.com/.../4a10364537b4798fde51afc7f28026d58a017e71) into my version of the source code. I was able to build the driver. However, I don't see any effect of that change, i.e. I'm still unable to set the time synchronization period.

    root@am335x-evm:/usr/share/wl18xx# echo 100 > /sys/kernel/debug/ieee80211/phy1/wlcore/wl18xx/time_sync
    -sh: /sys/kernel/debug/ieee80211/phy1/wlcore/wl18xx/time_sync: Permission denied

    Any ideas on what else could be wrong? Is there any way I can verify that the feature is actually enabled? Any log that I can inspect?

    Also, the documentation mentions "phy0", while on my system there is only "phy1" - does it matter in my case?

    Regards,

    Karol
  • Hi,
    Can you list the variables under ?
    /sys/kernel/debug/ieee80211/phy1/wlcore/wl18xx

    Saurabh
  • Hi Saurabh,

        it's probably a silly question but I'm new to Linux - how do I list the variables under "/sys/kernel/debug/ieee80211/phy1/wlcore/wl18xx"?

    Regards, 

    Karol

  • The command is:

    cat /sys/kernel/debug/ieee80211/phy1/wlcore/wl18xx/....

    BR,
    Eyal