I’d like to enable connman persistent tethering in /etc/connman/main.conf. But 9 out of 10 times or more frequently WiFi card driver crashes soon after reboot. If I disable persistent tethering and start tethering by connmanctl, then chances to enable tethering increase. But if I disable it using connmanctl, then 100% of reenable attemps fail.
It is not possible to restart driver, Linux just hangs without message. I tried to unbind SDIO like this, no way
echo “2190000.usdhc” > /sys/devices/soc0/soc/2100000.aips-bus/2190000.usdhc/driver/unbind
Not sure however which out of two, 2190000 or 2194000 is for WiFi.
I could live with some kind of card or interface reset, but not with reboot. Is there better known driver for W8997? Google isn’t very helpful with this.
We looked into this issue.
There are some updates in the mwifiex driver in the kernel version 5.2 which you can try to cherry pick and add them in the kernel 4.14.
I successfully used similar in the past to clone 4.4 and 4.14 kernels, but always used yellow tags from git www interface for -b argument. Perhaps I’m doing something stupid, but green toradex_5.2.y tag doesn’t work. I see this for response and nothing more:
not as good as I thought. Yesterday I tried just from NFS and it worked. Booting from NAND things aren’t better than they were with old driver. I retested with old driver and there’s the same difference, NFS for some reason is good for this WiFi driver and NAND is bad… Most of the times I boot from NAND and enable tether I get this
and few seconds later a lot of other messages ending with unregister device.
Things on NFS aren’t 100% perfect as well. SDIO unbind is fine, SDIO rebind ends with the same messages like in boot from NAND case. These bind/rebind commands are for WiFi interface:
Could you share a complete dmesg log?
By the way, I have seen, that not all the new fixes from new kernel are in the toradex 5.2 kernel branch.
You can try to take the newest kernel from here, cross compile and run it on Colibri-iMX6ULL.
I figured why I saw difference between NFS vs NAND boot. I’ve enabled connman service even for NFS boot. Of course connman on NFS doesn’t see ethernet connection, the only option to tether is to tether WiFi via WiFi. So, enabling WiFi tether while WiFi client is connected works. It turns out that following sequence seems working too:
booting from NAND
with pulled out ethernet cable or pulling it later to establish WiFi client connection
enabling WiFi tether
connect ethernet cable
disconnect WiFi client connection
So enabling WiFi tether seems requiring established WiFi client connection, which is showstopper. What is it? Why? Issues with antenna management? Are there special tools to dedicate specific antenna for special purpose?
See attached typical dmesg when driver fails enabling WiFi tether. dmesg
Regarding kernel sources from kernel.org. I already tried 5.2 sources from git.toradex.com. Kernel doesn’t boot. I don’t want to waste a day on sources from kernel.org. Are you sure it will boot?