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/WILINK-SW: After using new wl1271 firmware for solving KRACK, it seems the calibrator cannot work normally.

Part Number: WILINK-SW
Other Parts Discussed in Thread: WL1271

Tool/software: Linux

Hi TI experts,

I followed the instruction of applying patches for KRACK(both wpa_supplicant and firmware binary files).  The KRACK has definitely been fixed. But another issue appeared:

When do calibration like before:

calibrator plt autocalibrate wlan0 /system/lib/modules/wl12xx_sdio.ko /device/TQS_S_2.6.ini /data/misc/wifi/wl1271-nvs.bin 00:00:00:00:00:00

it will fail. The message and dmesg are as following:

1) message:

Fail to tune channel
Calibration not complete. Removing half-baked nvs

2) dmesg:

<6>Compat-wireless backport release: ol_R5.SP7.01
<6>Backport based on wl12xx.git ol_R5.SP7.01
<6>cfg80211: Calling CRDA to update world regulatory domain
<6>wl12xx: driver version: ol_R5.SP7.01
<6>wl12xx: compilation time: Wed Mar 15 12:47:54 2017
<6>wl12xx: Beacon threshold set to 12
<6>wl12xx: BSS timeout set to 400
<6>add wake up source irq 107
<6>wl12xx: loaded
<6>wl12xx: power up
<6>wl12xx: firmware booted in PLT mode (Rev 6.3.10.0.142)
<3>wl12xx: ERROR command execute failure 2
<4>------------[ cut here ]------------
<4>WARNING: at /home/dingdong/workDir/projects/dpc3xx/android/boundary_device_jb/hardware/imx/wlan/wl12xx/compat-wireless/drivers/net/wireless/wl12xx/main.c:1445 wl12xx_queue_recovery_work+0x2c/0x94 [wl12xx]()
<4>Modules linked in: wl12xx_sdio wl12xx mac80211 cfg80211 compat [last unloaded: compat]
<4>[<c004aa04>] (unwind_backtrace+0x0/0x138) from [<c0082cb4>] (warn_slowpath_common+0x4c/0x64)
<4>[<c0082cb4>] (warn_slowpath_common+0x4c/0x64) from [<c0082ce8>] (warn_slowpath_null+0x1c/0x24)
<4>[<c0082ce8>] (warn_slowpath_null+0x1c/0x24) from [<bf325b9c>] (wl12xx_queue_recovery_work+0x2c/0x94 [wl12xx])
<4>[<bf325b9c>] (wl12xx_queue_recovery_work+0x2c/0x94 [wl12xx]) from [<bf328d08>] (wl1271_cmd_send+0x8c/0x53c [wl12xx])
<4>[<bf328d08>] (wl1271_cmd_send+0x8c/0x53c [wl12xx]) from [<bf329fd8>] (wl1271_cmd_test+0x48/0x98 [wl12xx])
<4>[<bf329fd8>] (wl1271_cmd_test+0x48/0x98 [wl12xx]) from [<bf33d368>] (wl1271_tm_cmd+0x2f0/0x4f8 [wl12xx])
<4>[<bf33d368>] (wl1271_tm_cmd+0x2f0/0x4f8 [wl12xx]) from [<bf2b4ad4>] (ieee80211_testmode_cmd+0x24/0x40 [mac80211])
<4>[<bf2b4ad4>] (ieee80211_testmode_cmd+0x24/0x40 [mac80211]) from [<bf2677fc>] (nl80211_testmode_do+0x50/0x64 [cfg80211])
<4>[<bf2677fc>] (nl80211_testmode_do+0x50/0x64 [cfg80211]) from [<c04ac11c>] (genl_rcv_msg+0x1bc/0x1f0)
<4>[<c04ac11c>] (genl_rcv_msg+0x1bc/0x1f0) from [<c04ab644>] (netlink_rcv_skb+0xbc/0xd8)
<4>[<c04ab644>] (netlink_rcv_skb+0xbc/0xd8) from [<c04abf58>] (genl_rcv+0x1c/0x24)
<4>[<c04abf58>] (genl_rcv+0x1c/0x24) from [<c04aafc4>] (netlink_unicast+0x2a0/0x2fc)
<4>[<c04aafc4>] (netlink_unicast+0x2a0/0x2fc) from [<c04ab348>] (netlink_sendmsg+0x288/0x300)
<4>[<c04ab348>] (netlink_sendmsg+0x288/0x300) from [<c0471698>] (sock_sendmsg+0x9c/0xbc)
<4>[<c0471698>] (sock_sendmsg+0x9c/0xbc) from [<c0472c3c>] (__sys_sendmsg+0x2bc/0x2d4)
<4>[<c0472c3c>] (__sys_sendmsg+0x2bc/0x2d4) from [<c04736f8>] (sys_sendmsg+0x3c/0x68)
<4>[<c04736f8>] (sys_sendmsg+0x3c/0x68) from [<c0043900>] (ret_fast_syscall+0x0/0x30)
<4>---[ end trace ab9d1ebb5867a8de ]---
<4>wl12xx: WARNING TEST command failed
<4>wl12xx: WARNING testmode cmd test failed: -5
<6>wl12xx: power down
<6>remove wake up source irq 107

--------------------------------------------------------------------------------------------

All I have done are:

1) applay KRACK patch for wpa_supplicant.

2) replace 3 binary file: wl127x-fw-4-plt.bin, wl127x-fw-4-mr.bin, wl127x-fw-4-sr.bin.

If I only change the "wl127x-fw-4-plt.bin" back to the before revision, calibrator still can work normally. Paste the log here for your refrence:

1) the message:

Using nvs version 2.1
Calibrate /data/misc/wifi/wl1271-nvs.bin
Writing calibration data to /data/misc/wifi/wl1271-nvs.bin
Writing mac address 00:00:00:00:00:00 to file /data/misc/wifi/wl1271-nvs.bin
Calibration done. FEM1 has 1 bands. AutoFEM is off. Resulting nvs is /data/misc/wifi/wl1271-nvs.bin

2) the dmesg:

<6>wl12xx: driver version: ol_R5.SP7.01
<6>wl12xx: compilation time: Wed Mar 15 12:47:54 2017
<6>wl12xx: Beacon threshold set to 12
<6>wl12xx: BSS timeout set to 400
<6>add wake up source irq 107
<6>wl12xx: loaded
<6>wl12xx: power up
<6>wl12xx: firmware booted in PLT mode (PLT 6.3.10.0.137)
<6>wl12xx: power down
<6>remove wake up source irq 107

======================

My environment is:

1) Freescale i.MX6

2) Android4.3, wl1271(TiWi-BLE)

=======================

Could you help me to see where I am wrong? I believe your firmware should be compatible with the calibrator. I didn't see any change on the source code of the calibrator and TQS_S_2.6.ini.

Thanks and regards,

Vito Kang

 

  • Or can I use old wl127x-fw-4-plt.bin for calibrator, and use new wl127x-fw-4-mr.bin, wl127x-fw-4-sr.bin for KRACK fix?

  • Hi Vito,

    As you are using a claibrator from an older release, perhaps it would be better if you build the latest calibrator and try again:

    git.ti.com/.../ol_R5.SP9.01

    Best Regards,
    Eyal
  • Thank you Eyal. Yes, I am using an old calibrator binary, because I didn't see any change of the calibrator code. Maybe I was wrong. In any case, I will build it as you said. I will tell you the result.

    Thanks again!

    Best Regards,

    Vito

  • Hi Eyal, I checked out the latest code to build calibrator. The binary file "calibrator" compiled is totally same.The testing result is also same.

    I checked the commit log again, there is definitely no any other commit since Feb 25 2015, except the 6 firmware .bin files committed this time for KRACK.

    Maybe something else?

    Thanks & best regards,

    Vito

  • Hi Vito,

    We are going to look into why the PLT firmware from version 142 is not working as expected.
    However, there has been no change which is relevant to PLT mode between FW137 and FW142 so for now you can continue using the PLT firmware from PLT 6.3.10.0.137.

    Best Regards,
    Eyal
  • Hi Vito,

    Can you try the attached new PLT firmware files for version 142 and see if they are working for you?

    wl128x-fw-5-plt.bin

    Or:

    wl127x-fw-5-plt.bin

    You may need to rename them to the name used by your kernel (wl127x-fw-4-plt.bin)

    BR,

    Eyal

  • Hi Eyal,

    Thanks for your help. I have tested these 2 new PLT firmware files, the result:

    =========================================================================
    (1) wl128x-fw-5-plt.bin: can not work.

    -- calibrator message:

    Fail to set PLT power mode on
    Calibration not complete. Removing half-baked nvs

    -- dmesg:

    <6>Compat-wireless backport release: ol_R5.SP7.01
    <6>Backport based on wl12xx.git ol_R5.SP7.01
    <6>cfg80211: Calling CRDA to update world regulatory domain
    <6>wl12xx: driver version: ol_R5.SP7.01
    <6>wl12xx: compilation time: Wed Mar 15 12:47:54 2017
    <6>wl12xx: Beacon threshold set to 12
    <6>wl12xx: BSS timeout set to 400
    <6>add wake up source irq 107
    <6>wl12xx: loaded
    <6>wl12xx: power up
    <3>wl12xx: ERROR timeout waiting for the hardware to complete initialization
    <3>wl12xx: ERROR timeout waiting for the hardware to complete initialization
    <3>wl12xx: ERROR timeout waiting for the hardware to complete initialization
    <3>wl12xx: ERROR firmware boot in PLT mode failed despite 3 retries
    <6>remove wake up source irq 107
    <6>request_suspend_state: wakeup (3->0) at 19449639337 (1970-01-02 00:00:03.433916667 UTC)
    <6>mma enable setting active
    <3>lcc600 2-005f: PMBus status register not found
    <6>i2c i2c-2: new_device: Instantiated device lcc600 at 0x5f
    <6>Compat-wireless backport release: ol_R5.SP7.01
    <6>Backport based on wl12xx.git ol_R5.SP7.01
    <6>cfg80211: Calling CRDA to update world regulatory domain
    <6>wl12xx: driver version: ol_R5.SP7.01
    <6>wl12xx: compilation time: Wed Mar 15 12:47:54 2017
    <6>wl12xx: Beacon threshold set to 12
    <6>wl12xx: BSS timeout set to 400
    <6>add wake up source irq 107
    <6>acc_open
    <6>acc_release
    <3>wl12xx: ERROR could not get nvs file ti-connectivity/wl1271-nvs.bin: -2
    <6>wl12xx: loaded
    <6>wl12xx: state: 0
    <3>wl12xx: ERROR could not get nvs file ti-connectivity/wl1271-nvs.bin: -2
    <3>wl12xx: ERROR could not get nvs file ti-connectivity/wl1271-nvs.bin: -2
    <3>wl12xx: ERROR could not get nvs file ti-connectivity/wl1271-nvs.bin: -2
    <3>wl12xx: ERROR firmware boot failed despite 3 retries


    (2) wl127x-fw-5-plt.bin: can work.

    -- calibrator message:

    Using nvs version 2.1
    Calibrate /data/misc/wifi/wl1271-nvs.bin
    Fail to calibrate ith radio status (-45)
    Writing mac address 00:00:00:00:00:00 to file /data/misc/wifi/wl1271-nvs.bin
    Calibration done. FEM1 has 1 bands. AutoFEM is off. Resulting nvs is /data/misc/wifi/wl1271-nvs.bin

    -- dmesg:

    <6>wl12xx: driver version: ol_R5.SP7.01
    <6>wl12xx: compilation time: Wed Mar 15 12:47:54 2017
    <6>wl12xx: Beacon threshold set to 12
    <6>wl12xx: BSS timeout set to 400
    <6>add wake up source irq 107
    <6>wl12xx: loaded
    <6>wl12xx: power up
    <6>wl12xx: firmware booted in PLT mode (PLT 6.3.10.0.142)
    <6>wl12xx: power down
    <6>remove wake up source irq 107
    <3>lcc600 2-005f: PMBus status register not found
    <6>i2c i2c-2: new_device: Instantiated device lcc600 at 0x5f
    <6>request_suspend_state: wakeup (3->0) at 19242282673 (1970-01-02 00:01:04.533450670 UTC)
    <6>mma enable setting active
    <6>acc_open
    <6>acc_release
    <7>ehci_fsl_bus_resume begins, Host 1
    <7>ehci_fsl_bus_resume ends, Host 1
    <7>ehci_fsl_bus_resume begins, DR
    <6>(hci_tty): inside hci_tty_open (d442d288, d557a9e0)
    <6>(stc): chnl_id list empty :4
    <6>(stk) : st_kim_start
    <6>(stk) :ldisc_install = 1
    <6>(stc): st_tty_open
    <6>(stk) :line discipline installed
    <6>(stk) :TIInit_7.6.15.bts
    <4>(stk) :change remote baud rate command in firmware
    <4>(stk) :skipping the wait event of change remote baud
    <6>(stc): add_channel_to_table: id 4
    <6>(stc): add_channel_to_table: id 2
    <6>(stc): add_channel_to_table: id 3
    <7>ehci_fsl_bus_suspend begins, Host 1
    <7>ehci_fsl_bus_suspend ends, Host 1
    <6>Compat-wireless backport release: ol_R5.SP7.01
    <6>Backport based on wl12xx.git ol_R5.SP7.01
    <6>cfg80211: Calling CRDA to update world regulatory domain
    <6>wl12xx: driver version: ol_R5.SP7.01
    <6>wl12xx: compilation time: Wed Mar 15 12:47:54 2017
    <6>wl12xx: Beacon threshold set to 12
    <6>wl12xx: BSS timeout set to 400
    <6>add wake up source irq 107
    <6>wl12xx: loaded
    <6>wl12xx: state: 0
    <6>wl12xx: firmware booted (Rev 6.3.10.0.142)
    <6>ADDRCONF(NETDEV_UP): wlan0: link is not ready

    =========================================================================

    btw, I found that the prefixes of PLT versions are a bit different. The prefix of the version that can work is always "PLT", like PLT 6.3.10.0.137, PLT 6.3.10.0.142. The prefix of the version that cannot work is "Rev", like Rev 6.3.10.0.142. Don't know if this can help you.:)

    Best Regards,
    Vito
  • Hi Vito,

    Good this is expected. wl128x-fw-5-plt.bin is for wilink7 and you are using wilink6.

    We will also update the git with the correct firmware for plt mode.

    Best Regards,

    Eyal

  • Hi Eyal,
    Good! After your official release, I will also test it again.:)
    Thanks a lot!

    Best Regards,
    Vito