Opening a discussion that originally started in a private thread so that more folks can contribute and so that the final answer is visible to others.
We received a note from @bluesky that they could not get a signal when testing WiFi on their RevPi Connect 4 using balenaOS (v5.3.3). They mentioned there might be a specific module that Kunbus / RevPi created for the device, but that this was the error message they were seeing:
[ 9.525753] usbcore: registered new interface driver brcmfmac
[ 9.526005] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.kunbus,revpi-connect4.bin failed with error -2
[ 9.765150] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
One of balenaās engineers suggested the following, which didnāt help, but is worth mentioning itās been tested:
Depending on the wifi hotspot, we had to use dtparam=ant2 to the config.txt . The case was causing some sort of interference, and selecting the external antenna option like this seemed to fix it, even with no external antenna connected.
Some internal balena folks setup two other RevPi Connect 4ās and the WiFi is working on both, so @bluesky, the team had a few more questions for you:
is there a visible wifi network to connect to (try running nmcli dev wifi)?
can we confirm that the network was correctly configured on the device (is there a connection profile to connect to the local hotspot, no auth errors or typos, etc)?
what is seen in the network manager logs?
what is the actual behaviour seen on the device that indicates there is āno signalā on the WiFi?
is the internal or an external antenna being used (or have both been tested)?
Also of note, the message you shared with us @bluesky is visible on our working devices, so itās not necessarily indicative of failing WiFi on its own, if that helps.
Iāll be sharing this link with my balena colleagues so they can reply here as well once you respond.
Great to know that the wifi is working on you device despite the error message.
running ānmcli dev wifiā shows me no network, even if there are several networks to connect nearby. Also one router that is right next to the device.
When i configure a network over balena or direct on the command line, it gives back network not found or not visible. On my other devices it is visible, also i tried to add āinvisibleā to the command.
Could you share me your setup, so i can test if it would work with that one? If it works, i can try to find the differences to my code.
In the network manager logs is no error appart from the one i shared. Also all commands show that the wifi is up and running (no energy safe mode or not disconnected).
I just donāt see any networks, that indicates me something is wrong.
Over a command from a Kunbus library i activated the external antenna. So i think I tried both. Is there another way to do it? How is it running on your devices?
Does your device have built in wifi? The store page and datasheet show that some some revisions donāt seem to have it built in.
If you run ifconfig from the host OS, do you see a wlan0 interface?
On the devices Iāve interacted with, Iāve not had to do anything specific to get the wifi working, other than in some cases adding dtparam=ant2 to config.txt .
Maybe thereās a channel issue? If you run iwlist wlan0 channel (provided wlan0 exists) do you see the channel that your wifi AP is using?
Hello
Yes, my device has built in wifi.
With the command ifconfig I see wlan0:
wlan0 Link encap:Ethernet
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)
@bluesky I didnāt want you to think weād forgotten; Iāve reached out to our team for suggestions on next steps and also reached out to RevPi in case they have some ideas. Weāll get back to you soon.
Despite the already mentioned use of the external antenna (some 2.4 GHz devices are kinda picky when it comes to the PCB antenna of CM4) you should check if the wifi is masked by rfkill which blocks the radio. It would be also interesting if this issue persists if you flash a official RevPi (or even Raspberry) image? With this we can rule out any hardware issues.
Hi, I found out something in my configuration. The wifi is working now:
I added dtparam=ant2 to config.txt like it was suggested. I just added the line to my config.txt and when I had a look to the file over the balena console, this line was missing.
I found out, that after rebooting, the config.txt file was overwritten with some old file.
Now I installed the image completely new from balena and added the line. This way it is working!
Thanks for all the support.
Glad to hear its working! I have to say, when you first mentioned it, I was sure the external antenna hack was going to fix it - in fact Iām pretty sure it was Nicolai who helped us figure that out in the first place (Thanks again Nicolai!)
@bluesky thatās great to hear, thanks for letting us know!
@nicolaiB@floion I wonder if thereās someplace we can document (other than this thread) that would be more discoverable. Maybe we can chat about it sometime soon.
Even better idea: Letās have a chat how we can make this configurable from the cloud interface. Iāve seen that there are certain other configuration options, thus I think this should be doable?
@nicolaiB just a heads-up that in the short term, weāre making the external antenna the default (see GitHub PR 1189). But letās definitely chat more about future configurability.