Kernel option for WIFI and Bluetooh in iMX6ULL

Hi.

Which options do the kernel use to activate WIFI and Bluetooth? I’m using iMX6ULL and toradex_4.9-2.3.x-imx of Kernel. If I use Toradex console Kernel in Easy Installer that you provide, WIFI and Bluetooth work fine. But if I build Kernel, can’t use these modules. Please let me know the options for WIFI and Bluetooth in Kernel.

Please remember that Toradex SOM and Colibri board are work fine. My build Kernel has problem.

Please refer to the followings.

root@colibri-imx6ull:~# connmanctl enable wifi

Error wifi: Method "SetProperty" with signature "sv" on interface "net.connman.Technology" doesn't exist 
root@colibri-imx6ull:~# connmanctl enable bluetooth
 Error bluetooth: Method "SetProperty" with signature "sv" on interface "net.connman.Technology" doesn't exist

I used “colibri-imx6ull_defconfig” for compilation.

HI @HansKim72

For Bsp 2.8 and Kernel 4.9.x, you need to use the backports for the Wifi drivers.

Best regards,
Jaski

How can I compile bluetooth in backports?

I have to use wifi, bluetooth and USB to ethernet. I know how to add USB to ethernet option in Kernel configuration. But there is only the explanation of wifi compilation in backports.

Should I do it like your suggestion? This is very complex. Please let me know easiest way to build both modules. Your release image, colibri-imx6ull_console-image-tezi_2.8b6.184-20190401 support wifi and bluetooth. But this image don’t support USB to ethernet, so I have to compile again. I want to make the image like this.

Dear @HansKim72 ,

If I understand correctly, you already have solutions to implement WiFi and USB-Ethernet functionality. In that case, please kindly refer to the following links:

https://www.toradex.com/community/questions/42918/enable-bluetooth-from-a-custom-image.html

https://www.toradex.com/community/questions/36332/change-backports-configuration-with-menuconfig.html

Please do not hesitate to contact us in case you have further queries.

Thanks and regards,

Janani

Hi Janani,

I am working in New Zealand. If I ask a question, I can take a test the next day. So I’m wasting too much time. Please explain in detail to reduce my waste of time. I ask you two questions below, so please answer them both.

I can use wifi but couldn’t use bluetooth at the moment. You show me two links but I think these links are different with my status.

alt text

I’ll tell you more detailed explanation to build. Please let me know the problem.

1. Build bluetooth and WIFI.
Build kernel with bluetooth using bluetooth link. Please refer to the following pictures for bluetooth options.
alt text
alt text
alt text

I built the kernel and replaced zImage into SD card which has Toradex Easy Installer(Colibri-iMX6ULL_Console-Image-Tezi_2.8b6.184).

make -j3 zImage 2>&1 | tee build.log

I followed a backports link. I used 4.14 for wifi. Because 4.19 don’t have “defconfig-wifi”.

git clone git://git.toradex.com/backports-toradex.git
cd backports-toradex
git checkout -b toradex-4.14 origin/toradex-4.14

export KLIB=~/k/build_wifi2_4.19
export KLIB_BUILD=~/k/linux-toradex

make defconfig-help

make defconfig-wifi
make -j4 modules

make modules_install

Copied wifi module.

scp -r ~/k/build_wifi/lib/modules/4.9.166-00001-g6bd85ff-dirty root@192.168.1.159:/lib/modules/
scp -r SSID-psk.config root@192.168.1.159:/var/lib/connman/

Reboot again and check ifconfig. Send wifi and bluetooth command. WIFI was detected but bluetooth can’t use.

alt text

Please check my booting log. It has bluetooth initialization.

[    0.190416] Advanced Linux Sound Architecture Driver Initialized.
[    0.192065] Bluetooth: Core ver 2.22
[    0.192238] NET: Registered protocol family 31
[    0.192304] Bluetooth: HCI device and connection manager initialized
[    0.192385] Bluetooth: HCI socket layer initialized
[    0.192454] Bluetooth: L2CAP socket layer initialized
[    0.192559] Bluetooth: SCO socket layer initialized
[    0.194091] clocksource: Switched to clocksource mxc_timer1
[    0.194402] VFS: Disk quotas dquot_6.6.0

[    2.315841] Bluetooth: RFCOMM TTY layer initialized
[    2.325077] Bluetooth: RFCOMM socket layer initialized
[    2.334393] Bluetooth: RFCOMM ver 1.11
[    2.342078] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.351295] Bluetooth: BNEP filters: protocol multicast
[    2.360404] Bluetooth: BNEP socket layer initialized
[    2.369156] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.379002] Bluetooth: HIDP socket layer initialized

		 Starting Connection service...
		 Starting Telephony service...

Why bluetooth has a problem? Please let me know the cause.

2. About backports toradex-4.19 .

I want to use 4.19 but there is no wifi option like 4.14. Please let me know how to build wifi.

r@p:~/k/linux-toradex/backports-toradex$ git checkout -b toradex-4.19 origin/toradex-4.19
Branch toradex-4.19 set up to track remote branch toradex-4.19 from origin.
Switched to a new branch 'toradex-4.19'
r@p:~/k/linux-toradex/backports-toradex$ ls
backport-include  include                LICENSES         Makefile.real
compat            kconf                  local-symbols    net
COPYING           Kconfig                MAINTAINERS      scripts
defconfigs        Kconfig.local          Makefile         versions
Documentation     Kconfig.package.hacks  Makefile.build
drivers           Kconfig.sources        Makefile.kernel
r@p:~/k/linux-toradex/backports-toradex$ export KLIB=~/k/build_wifi2_4.19
r@p:~/k/linux-toradex/backports-toradex$ export KLIB_BUILD=~/k/linux-toradex
r@p:~/k/linux-toradex/backports-toradex$ 
r@p:~/k/linux-toradex/backports-toradex$ make defconfig-help
Driver or subsystem configuration targets:
  defconfig-ar5523
  defconfig-ath10k
  defconfig-ath5k
  defconfig-ath6kl
  defconfig-ath9k
  defconfig-ath9k-debug
  defconfig-b43
  defconfig-b43legacy
  defconfig-brcmfmac
  defconfig-brcmsmac
  defconfig-carl9170
  defconfig-cw1200
  defconfig-hwsim
  defconfig-iwlwifi
  defconfig-rtlwifi
  defconfig-wcn36xx
  defconfig-wil6210
  defconfig-wwan

When I used 4.14, I called the following command.

make defconfig-wifi

Hi @HansKim72, I’m based in Japan so I’ll try to help you throughout the same timezone so feel free to tag me from now on.

We got your idea and we are currently checking on this. We will notify you and properly update the documentation with the needed info. Please wait a bit, sorry for the inconvenience.

Hello @HansKim72 ,

We have tried the issue on our side and the following solution works for us:
→ Please change your Git Branch from the current 4.14 to 4.19
→ Follow on with sourcing your environment
→ Then compile this attached config file to your defconfig
→ After this, when you perform menuconfig you can that the options for bluetooth and Wireless have been loaded.

I hope this helps. Thank you and have a great day ahead!

Best Regards,
Janani

Config_bt

Hi alvaro,
I read Janani comment, but I don’t understand. I’m download 4.19 and using this version today. But I already said, which command should I use for “make defconfig-xxxxx”? There is no “wifi” in defconfig.

Why did Janani give me the .config file? His “Config_bt” is not defconfig file. This is .config. I compared this file with other files. It would have been easy if he had given me a defconfig file. Copying his config file to my folder as .config and then compile it, then .config was changed. So I can’t use his file. Please let me know an easy way and perfect way. I’ve been testing for three days now.

Hi @HansKim72 , you can get Janani’s config and port it to your config to make the Bluetooth work, which I believe is your objective. We are currently studying the available defconfigs and why they don’t activate the Bluetooth as expected.

This is .config. I compared this file with other files. It would have been easy if he had given > me a defconfig file. Copying his config file to my folder as .config and then compile it, then
.config was changed. So I can’t use his file.

A .config should work as well, remember to not run any make XXX-defconfig otherwise the file will be overwritten but let me check myself if I can compile with Janani’s config. I will contact you back.

If copy .config and I don’t call make xxx-defconfig, then there are compile errors and compilation is stopped.

Noted, let me further check.

Hi @HansKim72, I tried the attached config from Janani and since it was intended for a 4.19.24 build, while the latest commit is from 4.19.41, it doesn’t give an error but asks for a further option. Once the option is selected, I’ve been able to compile without further issue, with KLIB_BUILD pointing to a toradex_4.9-2.3.x-imx-next kernel. I could confirm that this doesn’t work if KLIB_BUILD points to a toradex_4.14-2.0.x-imx kernel, so for now, let’s go with your first option as we need to further check on updating this to our latest kernel. Sorry for the inconvinience.

I generated my own config for 4.19.41 (for a defconfig it would require some time for cleaning the generated config, sorry) and you should be able to use this in your environment as .config.

I tried this in a clean environment, and as long as I correctly point to a valid KLIB_BUILD it seems to compile even without calling any make defconfig but I haven’t tested the WiFi or BT at this point. I will do so now, but kindly try this and let’s see if we can make some progress.

If you get an error, please let us know the log message.

Regards, Alvaro.

Hi, Did you test bluetooth? I’m generating the kernel for clean environment. But I don’t know how to do without defconfig when compile backport because there is a compile error. So I’m generating the code several times.

Hi @HansKim72 , just to further clarify:

The above is for the backports-toradex repo with the above config, but you need in parallel as well a linux-toradex with the colibri-imx6ull_defconfig.

Are you getting a compile error on the kernel or on the backports? Did you change the kernel branch to toradex_4.9-2.3.x-imx?

I called colibri-imx6ull_defconfig and always use toradex_4.9-2.3.x-imx for kernel branch. The followings are my commands. Please check them. I attached compile error.

r@p:~$ mkdir k_b
r@p:~$ cd k_b
r@p:~/k_b$ git clone -b toradex_4.9-2.3.x-imx git://git.toradex.com/linux-toradex.git 
r@p:~/k_b$ source ~/export_compiler
make colibri-imx6ull_defconfig
r@p:~/k_b/linux-toradex$ make colibri-imx6ull_defconfig
r@p:~/k_b/linux-toradex$ git clone git://git.toradex.com/backports-toradex.git
r@p:~/k_b/linux-toradex$ cd backports-toradex/
r@p:~/k_b/linux-toradex/backports-toradex$ git checkout -b toradex-4.19 origin/toradex-4.19
r@p:~/k_b/linux-toradex/backports-toradex$ export KLIB=~/k_b/build_wifi
r@p:~/k_b/linux-toradex/backports-toradex$ export KLIB_BUILD=~/k_b/linux-toradex
r@p:~/k_b/linux-toradex/backports-toradex$ cp config_bt .config
r@p:~/k_b/linux-toradex/backports-toradex$ make -j4 modules

The following is the log. I selected N when it ask me to use cfg80211. After some seconds, compilation is stopped.

link text

Hi @HansKim72 ,

Thanks for the update. However, please try the config I posted that I updated from my colleague Janani to a 4.19.41 compilation. It shouldn’t have to ask you for these options and should let you compile as is.

Please try this: Config file.

However I’m concerned with the error you are getting, I didn’t get that in any case. Can you try the following after changing the config file above?

  1. Clone and use a backports folder outside the linux-toradex folder (just next to it). Maybe make is confused by launching this inside the kernel folder.
  2. Compile the complete kernel sources, then move to the backports folder.
  3. Make sure that before the environment variables are exported (with echo).

Let us know how it goes.

Alvaro

I used the config you sent me, and as you said, there was no compilation error. Please check the log file I attached. Please check if the last part of the error is normal. I’m working at home and I don’t have Toradex board, so I can’t test now. I should test tomorrow. Did you test the bluetooth in your side?

link text

depmod will prefer updates/ over kernel/ -- OK!
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.dep.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.dep.bin.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.alias.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.alias.bin.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.softdep.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.symbols.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.symbols.bin.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.builtin.bin.tmp, 1101, 644): Permission denied
depmod: ERROR: openat(/lib/modules/4.15.0-70-generic, modules.devname.tmp, 1101, 644): Permission denied

Hi Janani,

I spent whole day with your config file. Now Alvaro also worked with me but we don’t know exactly about your config file. Please let me know your defconfig name. Could you share you defconfig file. Can you share your defconfig instead of .config. Could you read the above?

Hi @HansKim72 , thanks for the update, no, not yet, sorry. I will update the thread when doing so, hopefully in the following hours. Kindly try it as well if possible.

I also got the same error with “make install”, and my thoughts are that it is trying to run depmod over the development machine and it fails (mostly because of no sudo), but that is okay.

Regards,
Alvaro.