Hello everyone,
I'm sharing my experience bringing-up a TI Wilink Module (WL18xx) on iMX6 Linux 3.10.53
You can find a lot of information here: WL18xx - Texas Instruments Wiki
And iMX6 instructions here- WL18xx First Time Getting Started Guide (IMX6) - Texas Instruments Wiki
Hardware setup -- iMX6 communicates with WL18xx over SDIO (WiFI) and UART (Bluetooth).
On iMX6, the tricky part is correct connection of the UART lines, especially the RTS/CTS lines.
In DCE mode (default) the signals should be connected as follows:
WL18xx Module iMX6 Port
[Out] Pad 50 (BT_HCI_RTS) ----> UART_RTS
[In ] Pad 51 (BT_HCI_CTS) <---- UART_CTS
[Out] Pad 52 (BT_HCI_TX) ----> UART_RX
[In ] Pad 53 (BT_HCI_RX) <---- UART_TX
If the RTS/CTS lines are connected incorrectly, the BT driver won't be able to load.
Software setup-
You should have Linux 3.10.53 and a Root file-system ready.
(Make sure you don't have any uncommitted changes)
To build the WiFi drivers, follow the steps in WL18xx System Build Scripts - Texas Instruments Wiki
In the setup-env file :
TOOLCHAIN_PATH -- Either use your iMX6 toolchain, or leave as default (it worked for me).
ROOTFS -- Point to your root filesystem
KERNEL_PATH -- Point to you Linux kernel sources
KERNEL_VARIANT -- Set to 'imx-3.10.53' (This will apply patches to your kernel !)
Steps to build the WL18xx software:
git clone git://git.ti.com/wilink8-wlan/build-utilites.git
cd build-utilites/
cp setup-env.sample setup-env
<edit setup-env>
./build_wl18xx.sh init (This will take a long time)
./build_wl18xx.sh patch_kernel
The last step applies several patch to your kernel. The patches include updates to the sources files, configuration files, and device tree files.
If you use a different kernel configuration than imx_v7_defconfig, make sure to make the same kernel changes to your configuration.
Also, update your device tree files according to the patches.
In your device tree, make sure to setup the BT_EN_SOC, WLAN_EN_SOC, and WL_IRQ GPIOs correctly, and provide them in the correct nodes in the device tree.
Here's an example -
// BT and WiFI Enable [OUT]
MX6QDL_PAD_EIM_D16__GPIO3_IO16 0x13059 // BT_EN_SOC
MX6QDL_PAD_EIM_D17__GPIO3_IO17 0x13059 // WLAN_EN_SOC
MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x13059 // WL_IRQ
wlan_en_reg: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
/* WLAN_EN GPIO for this board – Bank4, pin7 */
gpio = <&gpio3 17 0>;
/* WLAN card specific delay */
startup-delay-us = <70000>;
enable-active-high;
};
kim {
compatible = "kim";
nshutdown_gpio = <80>; /* GPIO3_IO16 */
dev_name = "/dev/ttymxc2";
flow_cntrl = <1>;
baud_rate = <3000000>;
};
btwilink {
compatible = "btwilink";
};
&usdhc3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc3>;
no-1-8-v;
keep-power-in-suspend;
enable-sdio-wakeup;
vmmc-supply = <&wlan_en_reg>;
non-removable; /* non-removable is not a variable, the fact it is */
/* listed is all that is used by driver */
cap-power-off-card;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@0 {
compatible = "ti,wlcore";
reg = <2>;
interrupt-parent = <&gpio7>;
interrupts = <1 0>;
platform-quirks = <1>;
};
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
status = "okay";
/* enable rts/cts usage on uart3 */
fsl,uart-has-rtscts;
};
Now -- build you kernel -
make -j4 uImage modules dtbs
Install the modules in your root filesystem
make modules_install INSTALL_MOD_PATH=<rootfs path>
Now, run the last step in the Wilink build script:
./sudo_build_wl18xx.sh update R8.5
This will build and install the Wilink drivers and software in the root filesystem.
That's it! -- it should work. The wifi modules should load automatically when the kernel boots.
How to test?
WIFI -
> ifconfig wlan0 up
> iw wlan0 scan
(This should display a list of access points).
Bluetooth -
> hciconfig hci0 up
> hcitool scan
(This should scan for bluetooth devices).
Additional comments-
1. You can also use Linux 3.14.28, but you'll have to apply the patches manually.
2. If you have an issue with RTS/CTS, you can disable it. :
(a) Change flow_cntrl to <0> in kim.
(b) Change the baud rate to 115200 in kim.
(c) Remove fsl,uart-has-rtscts; in the uart node.
(d) Remove the CTS and RTS in the IOMUX
(e) Comment out line 208 in src/uim/uim.c (in the build-utilites folder)
ti.c_cflag |= CRTSCTS;
NOTE 1: Without RTS/CTS you must bring up the Bluetooth driver first
NOTE 2: You really should use RTS/CTS -- otherwise expect problems due to sync lost between host and module.
Good luck!
This link is invalid, could you tell me the content of this link or the new link?
WL18xx First Time Getting Started Guide (IMX6) - Texas Instruments Wiki
Thanks,
Partrick
Hi,
./build_wl18xx.sh update R8.7_SP3 produces the following linker error:
arm-linux-gnueabihf-gcc -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/include -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/include -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/lib -O2 -fpic -std=gnu99 -Wall -pedantic -Wall -g -DUSE_OPENSSL -DPUBKEY_DIR=\"/etc/wireless-regdb/pubkeys\" `pkg-config --cflags openssl` -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -L ./ -o crda crda.o -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/lib -lnl-genl-3 -lnl-3 `pkg-config --libs libnl-3.0` -lreg -ldl -lpthread -lm `pkg-config --libs openssl`
arm-linux-gnueabihf-gcc -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/include -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/include -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/lib -O2 -fpic -std=gnu99 -Wall -pedantic -Wall -g -DUSE_OPENSSL -DPUBKEY_DIR=\"/etc/wireless-regdb/pubkeys\" `pkg-config --cflags openssl` -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -L ./ -o intersect intersect.o -lreg -ldl -lpthread -lm `pkg-config --libs openssl`
arm-linux-gnueabihf-gcc -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/include -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/include -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/lib -O2 -fpic -std=gnu99 -Wall -pedantic -Wall -g -DUSE_OPENSSL -DPUBKEY_DIR=\"/etc/wireless-regdb/pubkeys\" `pkg-config --cflags openssl` -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -L ./ -o regdbdump regdbdump.o -lreg -ldl -lpthread -lm `pkg-config --libs openssl`
arm-linux-gnueabihf-gcc -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/include -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/include -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/lib -O2 -fpic -std=gnu99 -Wall -pedantic -Wall -g -DUSE_OPENSSL -DPUBKEY_DIR=\"/etc/wireless-regdb/pubkeys\" `pkg-config --cflags openssl` -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -L ./ -o db2rd db2rd.o -lreg -ldl -lpthread -lm `pkg-config --libs openssl`
arm-linux-gnueabihf-gcc -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/include -I/home/dave/rlx/tmp/sysroots/ccimx6sbc/include -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib -L/home/dave/rlx/tmp/sysroots/ccimx6sbc/lib -O2 -fpic -std=gnu99 -Wall -pedantic -Wall -g -DUSE_OPENSSL -DPUBKEY_DIR=\"/etc/wireless-regdb/pubkeys\" `pkg-config --cflags openssl` -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -L ./ -o optimize optimize.o -lreg -ldl -lpthread -lm `pkg-config --libs openssl`
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x8): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x12): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x1a): undefined reference to `dlclose'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x222): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x29c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x2f6): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x368): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x3ac): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x3e8): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x40a): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x468): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x49c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x4d8): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [intersect] Error 1
make: *** Waiting for unfinished jobs....
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x8): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x12): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x1a): undefined reference to `dlclose'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x222): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x29c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x2f6): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x368): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x3ac): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x3e8): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x40a): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x468): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x49c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x4d8): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [optimize] Error 1
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x8): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x12): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x1a): undefined reference to `dlclose'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x222): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x29c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x2f6): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x368): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x3ac): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x3e8): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x40a): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x468): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x49c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x4d8): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [regdbdump] Error 1
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x8): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x12): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x1a): undefined reference to `dlclose'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x222): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x29c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x2f6): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x368): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x3ac): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x3e8): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x40a): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x468): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x49c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x4d8): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [db2rd] Error 1
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x8): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x12): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x1a): undefined reference to `dlclose'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x222): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x29c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x2f6): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x368): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x3ac): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x3e8): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x40a): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x468): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x49c): undefined reference to `dlerror'
/home/dave/rlx/tmp/sysroots/ccimx6sbc/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x4d8): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [crda] Error 1
****** ERROR 0 *******
Any advice would be aappreciated.
Thank you.
Hi Dave
I have brief experience to build the WiFi drivers for wl1837 for my Linux kernel 3.13.9
Maybe it will be useful
There is a link: https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/819135
best regards
I believe this is for WiLink7 right? Is there any device tree instruction for WiLink8? Thanks.
Is there support for later versions of the kernel for this? I'm on 4.1.15 and don't see a patch directory for it.
I can’t figure out what to map the BT_EN_SOC, WLAN_EN_SOC, and WL_IRQ GPIOS to for the i.MX6 Solo X. Any
help would be greatly appreciated!
Hello Khang Bui
You have to reserve this pins in the device tree like this at first:
MX6QDL_PAD_EIM_D16__GPIO3_IO16 0x13059 // BT_EN_SOC
MX6QDL_PAD_EIM_D17__GPIO3_IO17 0x13059 // WLAN_EN_SOC
MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x13059 // WL_IRQ
BT_EN_SOC is used in "kim" node, it is "nshutdown_gpio = <80>; /* GPIO3_IO16 */"
(3-1)*32 + 16 = 80 - it is an order number of gpio3_16 pin.
WLAN_EN_SOC is used in "wlan_en_reg: fixedregulator" node, it is "gpio = <&gpio3 17 0>;"
<&gpio3 17 0> is "gpio bank 3", "gpio3 pin 17", "ENABLE_ACTIVE_HIGH (0)"
WL_IRQ is used in the "wlcore: wlcore@0" node, it is
"interrupt-parent = <&gpio7>;
interrupts = <1 0>;"
You can read about interrupts in the Documentation/devicetree directory.
Best regards,
Ivan
Ivan,
Do you have an example of implementing the device tree for the Solo X? It looks like the quad uses uart4, I'm assuming the SoloX uses uart5 correct? An example would help me out a lot in figuring out the differences between that the quad device tree and the solox device tree for this TI driver. Thanks!
Devicetrees of quad and solo differs, by and large, only in #include "imx6q.dtsi" string. For solo it will be #include "imx6sl.dtsi".
As of the UART's: see "aliases" node in your .dts or .dtsi file. UART5 is the /dev/ ttymxc4 device in the Linux, because Linux devices starts from 0, not the 1.
Ivan, Thanks that's really helpful! Is this the case for the solox as well? I only ask because there's a seperate dts/dtsi file for it seperate from the solo.
I guess that for SoloX you have to use imx6sx.dtsi and for SoloLite imx6sl.dtsi instead.
Hi Erez!
Thank you very much for you comprehensive guide!
I did everything as you wrote.
The command
./sudo_build_wl18xx.sh
took a long time and finised with
Verifying filesystem skeleton...
Database signature verification failed.
Please update your public key used to verify the DB
Wifi Package Build Successful
I see this modules in my rootfs
/lib/modules/3.10.53-g560ad3d-dirty/updates/compat/compat.ko
/lib/modules/3.10.53-g560ad3d-dirty/updates/drivers/net/wireless/ti/wlcore/wlcore.ko
/lib/modules/3.10.53-g560ad3d-dirty/updates/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko
/lib/modules/3.10.53-g560ad3d-dirty/updates/drivers/net/wireless/ti/wl18xx/wl18xx.ko
/lib/modules/3.10.53-g560ad3d-dirty/updates/net/wireless/cfg80211.ko
/lib/modules/3.10.53-g560ad3d-dirty/updates/net/mac80211/mac80211.ko
But I get this messages while booting:
UIM SYSFS Node Found at /sys/./devices/soc0/regulators.19/kim.25/install
Starting uim-sysfs daemon.
uim:@ main
uim:Path to sysfs node too long
(stk) :ldisc installation timeout
(stk) :ldisc_install = 0
(stk) :timed out waiting for ldisc to be un-installed
(stk) :ldisc_install = 1
Loading modules backported from Linux version R8.6-0-g3f5b34f /* compat.ko module loaded */
Backport generated by backports.git R8.6-0-g4677dc3
wl1271_sdio: probe of mmc2:0001:2 failed with error -12 /* why 1271??? */
(stk) :ldisc installation timeout
(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed
(stk) :ldisc_install = 1(stk) :ldisc installation timeout
(stk) :ldisc_install = 0(stk) : timed out waiting for ldisc to be un-installed
(stk) :ldisc_install = 1Sending discover...
(stk) :ldisc installation timeout
(stk) :ldisc_install = 0(stk) : timed out waiting for ldisc to be un-installed
(stk) :ldisc_install = 1(stk) :ldisc installation timeout
(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed
Bluetooth: st_register failed -22
When I do "lsmod" I see a compat and wlcore_sdio modules loaded.
I successfully load a missing modules cfg80211, mac80211, wlcore and wl18xx and nothing happened.
ifconfig wlan0 up
ifconfig: SIOCGIFFLAGS: No such device
/usr/sbin/wlconf script changes nothing.
BT_EN pin also low and hciconfig falling with timeout.
Have you encountered such problems?
Best Regards,
Ivan.
Hi All,
I am using Jorjin WG7831D0 Wi-BT combo module and trying to support on i.Mx6 with linux kernel 3.10.53.
I have referred above post to backport the wl18xx driver to linux 3.10.53
We have configured WLAN_EN, BT_EN and WL_IRQ as per the link. I am able to build successfully.
But during boot,
But We are getting following messages while booting:
(stk) : timed out waiting for ldisc to be un-installed
(stk) :ldisc_install = 1UIM SYSFS Node Found at /sys/./devices/soc0/kim.21/install
Starting udev
udevd[183]: starting version 182
(stk) :ldisc installation timeout
(stk) :ldisc_install = 0Loading modules backported from Linux version R8.5-0-gcb51164
Backport generated by backports.git R8.4-0-g0d46f43
wl1271_sdio: probe of mmc0:0001:2 failed with error -12
wl1271_sdio: probe of mmc0:0001:2 failed with error -110
(stc): chnl_id list empty :4
(stk) : st_kim_start(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installedBluetooth: st_register failed -22
Can't init device hci0: Input/output error (5)
Checked lsmod and only compat.ko and wlcore_sdio.ko getting loaded. We tried to manually insert wlcore,cfg80211,mac80211 and wl188x drivers.
But wlan0 is not listing in iwconfig.
If I try rfkill list, only hci0 is listing.
even bluetooth init is failing
root@imx6dlsabresd:~# hciconfig hci0 up
(stc): chnl_id list empty :4
(stk) : st_kim_start(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installed(stk) :ldisc_install = 1
(stk) :ldisc installation timeout(stk) :ldisc_install = 0
(stk) : timed out waiting for ldisc to be un-installedBluetooth: st_register failed -22
Can't init device hci0: Input/output error (5)
Let me know if I am missing anything. I saw that Similar error message faced by Ivan too. How it is resolved?
Thanks and Regards
Krishna
Hi Ivan,
It would be helpful if you can also send the relevant parts in the device tree.
I'm running with Linux 3.14.28, so maybe there are some differences in the output.
First -- UIM is for Bluetooth.
On my port, the SYSFS Node is /sys/./devices/soc0/kim.15/install
Not sure why kim appears under the regulator node in your case (Suggest you check the device tree).
Also, when I build I issue the command:
./sudo_build_wl18xx.sh update R8.5
R8.6 is a new release -- See details WiLink8 Release Notes/R8.6 - Texas Instruments Wiki
Seems to be only for Linux 3.14.26+ ...
Try R8.5
Erez
Hi Erez!
I cleaned "wl8-build" directory and did as you advised, ./sudo_build_wl18xx.sh update R8.5
All compiled successfuly, but I got this message when modules were compiling:
Apply patches ...
Failed to apply changes from backport-adjustments/flow_dissector.patch
> patching file compat/net-core-flow_dissector.c
> Hunk #1 FAILED at 177.
> 1 out of 1 hunk FAILED -- saving rejects to file compat/net-core-flow_dissector.c.rej
Failed to apply changes from collateral-evolutions/network/85-hid_ll_driver/net_bluetooth_hidp_core.patch
> patching file net/bluetooth/hidp/core.c
> Hunk #1 succeeded at 268 with fuzz 1 (offset 45 lines).
> Hunk #2 succeeded at 353 with fuzz 2 (offset 45 lines).
> Hunk #3 FAILED at 396.
> Hunk #4 succeeded at 474 with fuzz 2 (offset 65 lines).
> Hunk #5 FAILED at 739.
> 2 out of 5 hunks FAILED -- saving rejects to file net/bluetooth/hidp/core.c.rej
Failed to apply changes from collateral-evolutions/network/86-qdisc_tx_busylock/ieee802154.patch
> patching file net/ieee802154/6lowpan.c
> Hunk #1 FAILED at 530.
> Hunk #2 FAILED at 545.
> 2 out of 2 hunks FAILED -- saving rejects to file net/ieee802154/6lowpan.c.rej
However, alll modules loaded successful.
But when I tried to test wlan, I got:
root@~# ifconfig wlan0 up
ifconfig: SIOCSIFFLAGS: Operation not possible due to RF-kill
root@~# rfkill unblock all
root@~# wlcore: ERROR timeout waiting for the hardware to complete initialization
wlcore: ERROR timeout waiting for the hardware to complete initialization
wlcore: ERROR timeout waiting for the hardware to complete initialization
wlcore: ERROR firmware boot failed despite 3 retries
Can you suggest what causes it?
Best Regards, Ivan
Hi Everyone!
Wi-Fi works after the following manipulations:
1. Delete all firmware from /lib/firmware/ti-connectivity at your target
2. ./sudo_build_wl18xx.sh update R8.5
After that you will get two files in /lib/firmware/ti-connectivity: wl1271-nvs.bin and wl18xx-fw-4.bin
At this step I had my WiFi working, but I got this messages while booting:
wl18xx_driver wl18xx.0.auto: Direct firmware load failed with error -2
wl18xx_driver wl18xx.0.auto: Falling back to user helper
wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
3. Copy wl18xx-conf-default.bin from /usr/sbin/wlconf to the /lib/firmware/ti-connectivity and rename it as wl18xx-conf.bin
4. I have WL1837 module, so I downloaded WL1837MOD_INI_FCC_CE file from .INI/wlconf Overview - Texas Instruments Wiki.
I copied the contents of this file in /usr/sbin/wlconf/official-inis/WL1835MOD_INI.ini (additionally I had to remove blank lines), but You just can copy WL1837MOD_INI_FCC_CE anywhere at the target.
5. Now You have to go /usr/sbin/wlconf and do this:
/usr/sbin/wlconf# ./wlconf -o /lib/firmware/ti-connectivity/wl18xx-conf.bin -I /path/to/ini/WL1835MOD_INI.ini
Best Regards, Ivan
Hi all,
Platform : IMX6SL
Bluedroid on Android kitkat 4.4.3
I have another 2 issues one while data transfer, the other while enabling via GUI.
1) After enabling bluetooth, while transferring file from third party mobile to IMX_6SL board, file is getting transferred(TX), but vice versa (RX) is not happening, it is giving the error message :
File not Received
File : sample.jpg
Reason : Storage issue
2) And presently I am inserting my driver via GUI, I am getting an error message while enabling bluetooth via GUI ie Operation not permitted while loading .ko (driver)Please suggest me what to do?? whether I need to install my driver at boot by adding in init.rc?? if I do it always on boot bt will be in ON State only?? OR Do i need to build my driver along with android source code???
Please suggest me how to proceed further???
Thanks and Regards,
Mutyala Rao.
Please move you question to a new discussion.
Hi Ivan,
The error you get are because the patches cannot be applied again (they were already applied before). Ignore it -- doesn't make a difference.
I suggest you double-check the SDIO interface IOMUX and declaration in the device tree. Also, check the WIFI Enable GPIO and IRQ.
Use an oscilloscope to see whether the WLAN_ENABLE signal toggles.
Have you tried Bluetooth?
hciconfig hci0 up
hcitool scan
Regards
Erez