Enable Wi-Fi on Apalis iMX8QM

Hi all,

I’m working with the following configuration:

Apalis iMX8QM 4GB WB IT V1.1B (I also have many V1.1C)
Ixora Carrier Board V 1.2A
BSP 5.

I have a working system but i would like to improve it enabling Wifi Connection.
I think all the configuration in kernel are correct but obviously they aren’t since I can’t see wlan0 interface we I run ifconfig, and if I try to run connmanctl enable wifi I get the following error:

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

After that, trying to find a solution I alsa watched to the dmesg with the following result:

root@localhost:~# dmesg | grep wifi
[    0.519861] usbcore: registered new interface driver mwifiex_usb
[    1.298887] mwifiex_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[    1.299031] mwifiex_pcie: PCI memory map Virt0: 00000000b17fab52 PCI memory map Virt2: 000000006c3172a7
[    1.299578] mwifiex_pcie 0000:01:00.0: Direct firmware load for mrvl/pcieusb8997_combo_v4.bin failed with error -2
[    1.299591] mwifiex_pcie 0000:01:00.0: Failed to get firmware mrvl/pcieusb8997_combo_v4.bin
[    1.299597] mwifiex_pcie 0000:01:00.0: info: _mwifiex_fw_dpc: unregister device
[    1.299685] mwifiex_pcie 0000:01:00.0: performing cancel_work_sync()...
[    1.299695] mwifiex_pcie 0000:01:00.0: cancel_work_sync() done

Can someone help me with this issue, pls ?

Merlin

Hi @Merlin , how are you?

Before we could help you solve your issue, I’d like to ask you a few questions:

  1. Did you change something on your Yocto recipes/layers? If yes, what are the modifications done?
  2. Did you try a standard Toradex image to check if the wifi is working? For example, with the Multimedia Reference Image.
  3. Did you change anything on the Device Tree that is linked with PCI?

Thanks a lot!

Best regards,
Guilherme

Hi @gclaudino.tx !
Thank for your answer.
Here below you can find my consideration about your question:

  1. I created my own meta-layer and the recipes for my image: I put it in the attachments,
    chelt.bb (4.6 KB)

  2. Being honest I didn’t try with a Standard Toradex image but I don’t think the problem is related to the SOM since I get the same error on two different SOMs. I guess Wi-Fi would work on both SOMs if I install Multimedia Reference Image.
    Furthermore I guess the problem is not in the image but in the kernel/device tree (am I wrong?).

  3. I need to drive a dual channel lvds FULL-HD display so I did some changes to the device tree but honestly I think nothing concerning the pci. Here my patch
    lvds_patch.patch (5.3 KB)

As you can see I did only simple edit and none of them is related to the pci (I think).

Also my kernel configuration sould beh correct since I activate Marvell wifi stuff, wireless connection , networking etc…
config (199.1 KB)

I have some other patch in my meta-layer but I don’t think they are related to the issue: for example I have a patch that edit fstab file, a patch that edit boot parameters etc.

Do you need some other information?

Merlin

Dear @Merlin , thanks for the reply!

I’m checking the files you sent me to see if I can find any problem on the recipe or in the kernel that could lead to the lack of wifi on your module.

In the meantime, I’d like to kindly ask you to test the Wifi Connection with one of our default images like the Multimedia Reference Image so that we can clearly exclude any Hardware issues even though they seem to be a bit less likely.

Best regards,
Guilherme

Hi @gclaudino.tx !

I switched to Toradex Multimedia Reference.
Running ifconfig I can see two interfaces I didn’t see before:

mlan0 Link encap:Ethernet HWaddr 48:E7:DA:78:3D:87
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

uap0 Link encap:Ethernet HWaddr 48:E7:DA:78:3F:87
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I’m having some trouble connecting to an AP since the result of connmanctl scan wifi is blank:

root@apalis-imx8-07013985:~# connmanctl scan wifi  
Scan completed for wifi
root@apalis-imx8-07013985:~# connmanctl services

root@apalis-imx8-07013985:~#

But maybe, in this case, the problem is different.

One other question: does the wifi module also work without additional antenna, right?

Merlin

*EDIT
With standard image I can also connect to wifi network.

I’m still having problem, it’s really difficult for me to understand why.
Using dct command to convert .dtb → .dts, my device tree and the toradex multimedia image are identical except from the part which regards lvds.
All the rest is the same.

.config file are quite similar as well.

Merlin

Hi @gclaudino.tx , how are you?

Do you have some new suggestion about my issue?

I tried to put my own dtb on Toradex Multimedia image and wifi is working so I guess the problem is to be investigate in Kernel configuration and .bb recipe.
It sounds strange to me 'cause comparing configuration file they are very very similar.
In my .config I have more stuff than Multimedia Image file.

Merlin

Hi @Merlin ,

It does work, the reception you get without attaching the dedicated antennas is neither good nor recommended.

Since Wifi is working now, what exactly is the issue you’re facing now?

Best Regards
Kevin

Hi @kevin.tx
I apologize, I created some confusion in my various responses to the thread.
The situation is this:
As first thing I made an image starting from my chelt.bb recipe(which you find attached to my second message) and the Wi-Fi doesn’t work, I get the errors I showed above.

To verify that it was not a hardware problem @gclaudino.tx suggested me to try to compile the Toradex Multimedia Image and see if the Wi-Fi worked.
At first it seemed to me that even that image didn’t work, actually by getting very close to the Wi-Fi router, the system works. So with Toradex Multimedia Image I am able to use Wi-Fi, connect to an AP of my choice, and browse the web (ping, download files, etc.).
Initially it didn’t work because I’m testing without an additional antenna and I was too far away from the Wi-Fi source.

So my problem now is that the Wi-Fi doesn’t work with my image (chelt.bb), while with the Toradex Multimedia Image it works.
I can’t understand why on Multimedia Image the Wi-Fi works while on my system it doesn’t, the Kernel configurations seem to me superimposable and I haven’t made substantial changes to the device tree that could affect the Wi-Fi (I think).

Quickly said: I’m still stuck on the initial problem, my *EDIT to the message was only about Toradex Multimedia Image, on my Image (chelt.bb) I keep having problems.

Merlin

Translated with DeepL Translate: The world's most accurate translator (free version)

Hi @Merlin,

all right. Could you then please send your image to us?

You can use share.toradex.com to upload it.

Best Regards
Kevin

Hi @kevin.tx ,
I’ll send you my image in few minutes.
I would also add the package containing my custom application (built in Cranksoftware) but it is a bit “confidential” (my boss is a bit worry about it).
Does exist a way to send the image on a private channel that only Toradex support can see?

Merlin

Hi @Merlin , hope you’re doing well.

In order to share your file privately, you can send us either a mail to support.eu@toradex.com or support@toradex.com. In addition, you can send a private message here in the community.

Remember to use the share.toradex.com link that @kevin.tx shared to send your file to us.

Best regards,
Guilherme

Hi @gclaudino.tx ,

Thanks for your precious support, I sent my images to Kevin few minutes ago, I’m pretty sure we are close to the solution :innocent:.

Merlin

Hi @Merlin !

I am currently building your chelt.bb image recipe to see what I get. I had to remove the dependencies that I don’t have (like your application), but I don’t think that it will invalidate my attempt to reproduce the issue.

I will get back to you as soon as I have some results to share.

Best regards,

Hi @henrique.tx
Thanks for helping me, I also think my applicantion dependencies won’t invalidate nothing.
If you need I can provide you my application.
Maybe I misunderstood your request and I sent you the entire compiled image ready to be flashed (yesterday).

If you need other stuff, just ask me.

Really thanks,

Merlin

Hi @Merlin !

You didn’t misunderstand.
Since it is possible for me to face some difficult building your image, it is good to also have a compiled one at hand :wink:

By building your image as well, I have more data to investigate.

Best regards,

Hi @henrique.tx ,
Did you complete the building of my image?

I’m working on conquering the world and internet connection is essential XD

Merlin

Hi @Merlin ,

We were indeed able to build your image using Yocto after removing just a few dependencies that were missing.

We’ll come back to you soon.

Best regards,
Guilherme

1 Like

Hi @Merlin ,

We seem to have found the origin of your problem. If you type:

connmanctl technologies

On our Multimedia-Reference-Image you can see 3 interfaces: Bluetooth, wifi and Ethernet.

On your Chelt image we only get ethernet:

# connmanctl technologies
/net/connman/technology/ethernet
  Name = Wired
  Type = ethernet
  Powered = True
  Connected = False
  Tethering = False

Therefore, it seems that your module is not finding the wifi technology and then, connmanctl will not be able to set its property.

In addition, I couldn’t find the mwifiex_pcie driver when doing

ls /sys/bus/pci/drivers

Looking at our bb files for our reference images, we saw somethings missing that could have led to this problem. Can you please test the following changes on your chelt.bb?

On backports-wifi, please add:

    linux-firmware-nxp89xx   \
    linux-firmware-rtl8188 \

These are two wi-fi related firmware.

In the same part, please remove:

backports \

On Image_Install_append, you mention twice connman and connman-client. You should be able to remove the first appearance and still compile your image.

After these changes, our new result on your image now is:

# connmanctl technologies
/net/connman/technology/bluetooth
  Name = Bluetooth
  Type = bluetooth
  Powered = False
  Connected = False
  Tethering = False
/net/connman/technology/wifi
  Name = WiFi
  Type = wifi
  Powered = False
  Connected = False
  Tethering = False
/net/connman/technology/ethernet
  Name = Wired
  Type = ethernet
  Powered = True
  Connected = False
  Tethering = False

And:

# connmanctl enable wifi
Enabled wifi

Please tell me if this helps.

Best regards,
Guilherme

Hi @gclaudino.tx Thanks for your answer,
trying to apply your suggestion I got this error:

ERROR: Nothing RPROVIDES 'linux-firmware-nxp89xx' (but /home/user/oe-core_5.0/build/../layers/meta-mectronic/recipes-images/images/chelt.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'linux-firmware-nxp89xx' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['linux-firmware-nxp89xx']
ERROR: Required build target 'chelt' has no buildable providers.
Missing or unbuildable dependency chain was: ['chelt', 'linux-firmware-nxp89xx']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Now I’m going to compile without linux-firmware-nxp89xx to see if the system works or not.

How can I solve this dependencies problem?

Merlin