Enable Wi-Fi on Apalis iMX8QM

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

Hi @Merlin ,

Can you check if you have any layer activated that has in the kernel recipes something like you can see here:

/path/layers$ rg nxp89xx 
meta-toradex-nxp/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
PACKAGES =+ " ${PN}-nxp89xx"
FILES_${PN}-nxp89xx = " \

This seems to be the recipe that adds the nxp89xx as a possible target. If you have a document with this, you should check if the layer is activated in the bblayers.conf of your Yocto Build.

Best regards,
Guilherme

Hi @gclaudino.tx !
rg nxp89xx
did not provide any result.
Is it possible to create a .bbappend recipes in my meta adding nxp89xx as possible target?

How is it possible that I can’t find nxp89xx in my /layer folder?

Merlin

Hi @Merlin ,

Can you please check the recipes-kernel on our meta-toradex-nxp repository recipes-kernel - meta-toradex-nxp.git - Toradex BSP layer, recipes for NXP based modules ? There you can find how we made it and so that you can adapt it to your recipe.

This repository is usually downloaded when you do the first repo sync following this article: Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center .

Please tell me if this helps you.

Best regards,
Guilherme

Hi @gclaudino.tx !
As you can see in the attached image I don’t have linux-firmware in the folder.
I followed the instruction in the article you sent me but it’s been a long time i did it.
Do you think I have to update my meta?
I’m a bit afraid of lose my job XD.
Maybe I can back-up my environment and the I can try to update my meta.

Merlin

Hi @Merlin ,

You can download the new files from the link I just sent and add them to your recipes-kernel folder. Adding the linux-firmware folder shall be enough. Please do it and try again :slight_smile: .

Remember to check on your bblayers.conf that meta-toradex-nxp is listed.

Best regards,
Guilherme

Hi @gclaudino.tx ,

I thought it was bettere to sync on your HEAD revision, in this way my environment and yours are identical.
I did the bitbake of my image but I still can’t see Wifi (and bluetooth) when I run
connmanctl technologies

Running
ls /sys/bus/pci/drivers
now I can see mwifiex_pcie .

Is it possible for you to send me the chelt.bb file you used and let you use the wifi interface please?

I think everything is ok in kernel .config so the problem should be in the .bb file

The error I get is always the same:

root@localhost:~# dmesg | grep wifi
[    1.289681] mwifiex_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[    1.289797] mwifiex_pcie: PCI memory map Virt0: 000000001b02f1b5 PCI memory map Virt2: 0000000022b9d5b0
[    1.290314] mwifiex_pcie 0000:01:00.0: Direct firmware load for mrvl/pcieusb8997_combo_v4.bin failed with error -2
[    1.290323] mwifiex_pcie 0000:01:00.0: Failed to get firmware mrvl/pcieusb8997_combo_v4.bin
[    1.290328] mwifiex_pcie 0000:01:00.0: info: _mwifiex_fw_dpc: unregister device
[    1.290408] mwifiex_pcie 0000:01:00.0: performing cancel_work_sync()...
[    1.290417] mwifiex_pcie 0000:01:00.0: cancel_work_sync() done

Merlin

Hi guys,

I compared the .config got from Toradex Multimedia Image with mine.
In my configuration I moved some option from ‘y’ to ‘m’ as your .config (I swear this is the only change I did), I compiled the kernel and flash it to my system.

Now the wifi works!

I am a bit confused honestly, but it seems we reached the target XD

Thank for your support.

Merlin

Hi @Merlin ,

I’m glad the wifi works for you now. Can you please mark the post as solved then? I’ll just add a few comments about the things you said.

Indeed it would be better to sync it using git commands such as clone to get the most updated version from our branch and check it time by time using git status.

Do you think you’d still need it? I didn’t sent it to you as I had just added those few lines and had to remove the ones from your application.

Indeed this could be giving additional problems.

If there is anything else that we can do for you don’t hesitate in contacting us.

Best regards,
Guilherme

1 Like