can't bring wlan0 up

Hi,

I’m trying to bring wlan0 up on R32.1. I run ifconfig as a root and it ends with an error:

# ifconfig wlan0 up
SIOCSIFFLAGS: Operation not permitted

dmesg shows:

[   99.183488]

               Dongle Host Driver, version 1.201.82 (r)
               Compiled from
[   99.183504] wl_android_wifi_on in
[   99.183510] wifi_platform_set_power = 1
[   99.389726] vdd-1v8: voltage operation not allowed
[   99.394569] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[   99.413755] vdd-1v8: voltage operation not allowed
[   99.418574] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[   99.437555] vdd-1v8: voltage operation not allowed
[   99.442376] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[   99.454730] vdd-1v8: voltage operation not allowed
[   99.459561] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[   99.569217] vdd-1v8: voltage operation not allowed
[   99.574045] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[   99.581602] vdd-1v8: voltage operation not allowed
[   99.586419] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[   99.594615] vdd-1v8: voltage operation not allowed
[   99.599432] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[   99.606084] sdhci-tegra 3440000.sdhci: Tuning done, restoring the best tap value : 99
[   99.606672] firmware path not found
[   99.606854] F1 signature read @0x18000000=0x17214354
[   99.613907] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
[   99.614896] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[  111.622594] dhd_bus_init: enable 0x06, ready 0x02 (waited 3000023us)
[  111.622890] gpio tegra-gpio-aon wake69 for gpio=59(FF:3)
[  111.622951] gpio tegra-gpio-aon wake69 for gpio=59(FF:3)
[  111.622953] Enabling wake69
[  111.623042] dhd_prot_ioctl : bus is down. we have nothing to do
[  111.623051] dhd_check_hang: Event HANG send up due to  re=0 te=0 e=-1 s=0
[  111.623067] dhd_open : wl_android_wifi_on failed (-14)
[  111.623077] dhd_prot_ioctl : bus is down. we have nothing to do
[  111.623083] CFGP2P-ERROR) wl_cfgp2p_bss_isup :
[  111.623085] 'cfg bss -C 0' failed: -1
[  111.623087] CFGP2P-ERROR) wl_cfgp2p_bss_isup :
[  111.623089] NOTE: this ioctl error is normal when the BSS has not been created yet.
[  111.628557] wl_android_wifi_off in
[  111.628571] dhd_prot_ioctl : bus is down. we have nothing to do
[  111.628633] gpio tegra-gpio-aon wake69 for gpio=59(FF:3)
[  111.628635] Disabling wake69
[  111.628746] sdhci-tegra 3440000.sdhci: Tuning done, restoring the best tap value : 99
[  111.631561] wifi_platform_set_power = 0
[  111.833608]  wl_cfg80211_hang :
[  111.833611] In : chip crash eventing

Could you please give me some hint how to solve it?

Thank you.

David

# cat /var/run/nvbcm
BCMCHIP=0x4354
# systemctl status nvwifibt.service
● nvwifibt.service - NVIDIA bluetooth/wifi init script
   Loaded: loaded (/etc/systemd/system/nvwifibt.service; static; vendor preset: enabled)
   Active: active (running) since Thu 1970-01-01 00:15:29 UTC; 42s ago
  Process: 738 ExecStartPre=/etc/systemd/nvwifibt-pre.sh (code=exited, status=0/SUCCESS)
 Main PID: 739 (brcm_patchram_p)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/nvwifibt.service
           └─739 /usr/sbin/brcm_patchram_plus --enable_hci --use_baudrate_for_download --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 3000000 --patchram /lib/firmware/bcm4354.hcd --no2bytes --enable_lpm --tosleep=50000 /dev/ttyTHS3

Jan 01 00:15:29 buildroot systemd[1]: Starting NVIDIA bluetooth/wifi init script...
Jan 01 00:15:29 buildroot systemd[1]: Started NVIDIA bluetooth/wifi init script.

[ 99.606672] firmware path not found

Are you using the rootfs from jetpack?

Yes, rootfs from jetpack.

Do you have only one tx2 to test? I think it is like a hardware issue (if it is rootfs from jetpack).
If you have other TX2, please check the same configuration can work or not (it should work).

3 boards, all the same.

Could you share the full boot up log with us? Is it on devkit?

The correct log would be like

Dongle Host Driver, version 1.201.82 (r)
               Compiled from 
[ 2675.456427] wl_android_wifi_on in
[ 2675.456441] wifi_platform_set_power = 1
[ 2675.666814] vdd-1v8: voltage operation not allowed
[ 2675.671882] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[ 2675.702607] vdd-1v8: voltage operation not allowed
[ 2675.707814] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[ 2675.735680] vdd-1v8: voltage operation not allowed
[ 2675.740831] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[ 2675.750957] vdd-1v8: voltage operation not allowed
[ 2675.755887] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[ 2675.880928] vdd-1v8: voltage operation not allowed
[ 2675.886042] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[ 2675.894929] vdd-1v8: voltage operation not allowed
[ 2675.899993] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[ 2675.908993] vdd-1v8: voltage operation not allowed
[ 2675.913917] sdhci-tegra 3440000.sdhci: could not set regulator OCR (-1)
[ 2675.920764] sdhci-tegra 3440000.sdhci: Tuning done, restoring the best tap value : 58
[ 2675.921576] F1 signature read @0x18000000=0x17214354
[ 2675.926548] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
[ 2675.927282] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[ 2676.157544] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 2676.203182] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 2676.204349] gpio tegra-gpio-aon wake69 for gpio=59(FF:3)
[ 2676.204433] gpio tegra-gpio-aon wake69 for gpio=59(FF:3)
[ 2676.204449] Enabling wake69
[ 2676.208187] wifi_platform_get_mac_addr
[ 2676.212182] Firmware up: op_mode=0x0005, MAC=00:04:4b:8c:78:01
[ 2676.221652] clm path from default:/lib/firmware/brcm/bcmdhd.clm_blob
[ 2676.221760] Skipping the clm download. len:0 memblk:          (null)
[ 2676.230540] dhd_preinit_ioctls pspretend_threshold for HostAPD failed  -23
[ 2676.242533] Firmware version = wl0: May 17 2019 16:59:40 version 7.35.349.79 (r714996 CY) FWID 01-e527e2ad
[ 2676.248454] dhd_interworking_enable: failed to set WNM info, ret=-23
[ 2676.294426] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Apparently, your firmware seems gone. Please share the content in /lib/firmware/brcm

# ls -la /lib/firmware/brcm/
total 16216
drwxr-xr-x 2 root root   4096 Jan  1 19:43 .
drwxr-xr-x 7 root root   4096 Oct  8  2019 ..
-rw-r--r-- 1 root root 269595 Jan  1 19:43 bcm4329-fullmac-4.bin
-rw-r--r-- 1 root root  96224 Jan  1 19:43 bcm43xx-0.fw
-rw-r--r-- 1 root root    180 Jan  1 19:43 bcm43xx_hdr-0.fw
-rw-r--r-- 1 root root 385067 Jan  1 19:43 brcmfmac43143-sdio.bin
-rw-r--r-- 1 root root 397312 Jan  1 19:43 brcmfmac43143.bin
-rw-r--r-- 1 root root 348160 Jan  1 19:43 brcmfmac43236b.bin
-rw-r--r-- 1 root root 455745 Jan  1 19:43 brcmfmac43241b0-sdio.bin
-rw-r--r-- 1 root root 403855 Jan  1 19:43 brcmfmac43241b4-sdio.bin
-rw-r--r-- 1 root root 408682 Jan  1 19:43 brcmfmac43241b5-sdio.bin
-rw-r--r-- 1 root root 479232 Jan  1 19:43 brcmfmac43242a.bin
-rw-r--r-- 1 root root 253748 Jan  1 19:43 brcmfmac4329-sdio.bin
-rw-r--r-- 1 root root 222126 Jan  1 19:43 brcmfmac4330-sdio.bin
-rw-r--r-- 1 root root 451566 Jan  1 19:43 brcmfmac4334-sdio.bin
-rw-r--r-- 1 root root 402210 Jan  1 19:43 brcmfmac43340-sdio.bin
-rw-r--r-- 1 root root 569291 Jan  1 19:43 brcmfmac4335-sdio.bin
-rw-r--r-- 1 root root 219557 Jan  1 19:43 brcmfmac43362-sdio.bin
-rw-r--r-- 1 root root 562183 Jan  1 19:43 brcmfmac4339-sdio.bin
-rw-r--r-- 1 root root 369577 Jan  1 19:43 brcmfmac43430-sdio.bin
-rw-r--r-- 1 root root 382455 Jan  1 19:43 brcmfmac43430a0-sdio.bin
-rw-r--r-- 1 root root 488193 Jan  1 19:43 brcmfmac43455-sdio.bin
-rw-r--r-- 1 root root 626140 Jan  1 19:43 brcmfmac4350-pcie.bin
-rw-r--r-- 1 root root 623304 Jan  1 19:43 brcmfmac4350c2-pcie.bin
-rw-r--r-- 1 root root 626589 Jan  1 19:43 brcmfmac4354-sdio.bin
-rw-r--r-- 1 root root 661999 Jan  1 19:43 brcmfmac4356-pcie.bin
-rw-r--r-- 1 root root 526383 Jan  1 19:43 brcmfmac4356-sdio.bin
-rw-r--r-- 1 root root 557056 Jan  1 19:43 brcmfmac43569.bin
-rw-r--r-- 1 root root 550333 Jan  1 19:43 brcmfmac43570-pcie.bin
-rw-r--r-- 1 root root 633817 Jan  1 19:43 brcmfmac4358-pcie.bin
-rw-r--r-- 1 root root 595472 Jan  1 19:43 brcmfmac43602-pcie.ap.bin
-rw-r--r-- 1 root root 635449 Jan  1 19:43 brcmfmac43602-pcie.bin
-rw-r--r-- 1 root root 989401 Jan  1 19:43 brcmfmac4366b-pcie.bin
-rw-r--r-- 1 root root 623448 Jan  1 19:43 brcmfmac4371-pcie.bin
-rw-r--r-- 1 root root 457994 Jan  1 19:43 brcmfmac4373-sdio.bin
-rw-r--r-- 1 root root 479232 Jan  1 19:43 brcmfmac4373.bin
-rw-r--r-- 1 root root 635977 Oct  1  2019 fw_bcmdhd.bin
-rw-r--r-- 1 root root   2983 Oct  1  2019 nvram.txt

dmesg.txt (64.9 KB)

Are you using the kernel from jetpack or your customized kernel?

We are using kernel from jetpack (building from source) but your question directed us to check the kernel configuration. We probably accidentally removed configurations for firmware paths. Kernel has different defaults than jetpack. This was the problem:

< CONFIG_BCMDHD_FW_PATH="/lib/firmware/brcm/fw_bcmdhd.bin"
< CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/brcm/nvram.txt"
> CONFIG_BCMDHD_FW_PATH="/system/vendor/firmware/fw_bcmdhd.bin"
> CONFIG_BCMDHD_NVRAM_PATH="/system/etc/wifi/bcmdhd.cal"
< CONFIG_BCMDHD_PCIE_FW_PATH="/lib/firmware/brcm/fw_bcmdhd_4356.bin"
< CONFIG_BCMDHD_PCIE_NVRAM_PATH="/lib/firmware/brcm/nvram_4356.txt"
> CONFIG_BCMDHD_PCIE_FW_PATH="/lib/firmware/brcm/fw_bcmdhd.bin"
> CONFIG_BCMDHD_PCIE_NVRAM_PATH="/lib/firmware/brcm/nvram.txt"

Now it works. Thank you.

Glad it works.

hello.i dont underestsnt your solution.con you help me please?