Jump to content

Orange Pi Zero Plus 2 & Nano Pi Neo Air: AP6212A Wifi+BT


rlsten

Recommended Posts

It seems that the latest Nano Pi Neo Air Boards and the relatively new Orange Pi Zero Plus 2 both use a modified version of the AP6212 WiFi+Bluetooth module, which is physically labelled as AP6212A. This new module apparently requires different drivers to operate. From my own experience, I was unable to get the internal WiFi module to work on a Nano Pi Neo Air (with AP6212A) using any of the Armbian distributions. However, I was able to get WiFi to work on that board with the Friendly Arm distribution at  from https://www.mediafire.com/folder/sr5d0qpz774cs/NanoPi-NEO_Air#oc15bwqbuxgxe.

 

I just received a second Nano Pi Neo Air from a different vendor, and this one was apparently one of the older boards because it came without a wifi antenna, and the WiFi module was labeled AP6212. The internal WiFi on this board worked perfectly with the legacy Armbian distribution for the Nano Pi Neo Air. 

 

I've seen elsewhere that there has been some trouble getting WiFi to work with the Orange Pi Zero Plus 2, and I suspect it is because of the change in the WiFi module. 

 

I personally know nothing of how to change or compile WiFi drivers, but would comparing the drivers in the Friendly Arm distribution help?

 

 

Link to comment
Share on other sites

2 minutes ago, rlsten said:

I personally know nothing of how to change or compile WiFi drivers, but would comparing the drivers in the Friendly Arm distribution help?

 

No, issue is already solved. Two firmware files were missing but they're now part of the distro: https://github.com/armbian/build/commit/042c25aaef2ae81b9117201aae0aa0da6c214354

 

So in case in /lib/firmware/ap6212/ both fw_bcm43438a1.bin and fw_bcm43438a1_apsta.bin are missing you should try to (apt) upgrade and if that doesn't help maybe grab the files from github and put it in the directory. Wi-Fi works without any driver changes (confirmed) it's just the different firmware.

Link to comment
Share on other sites

19 hours ago, rlsten said:

I was unable to get the internal WiFi module to work on a Nano Pi Neo Air (with AP6212A) using any of the Armbian distributions.

 

Exactly the same situation here. NanoPi Neo Air board with AP6212A and Armbian_5.27.170428 nightly.

The fw_bcm43438a1_apsta.bin and fw_bcm43438a1.bin in /lib/firmware/ap6212/ are present

Bootlog:
[FAILED] Failed to start LSB: Patch firmware for ap6212 adapter.
See 'systemctl status ap6212-bluetooth.service' for details.

Link to comment
Share on other sites

Unfortunately I can't get it to work at all.

 

root@nanopiair:~# ifup wlan0 
Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Cannot find device "wlan0"
Error getting hardware address for "wlan0": No such device

 

Link to comment
Share on other sites

Like Sn0wblind, I too can't get my NanoPi Neo Air with AP6212A to work with the nightly build. The fw_bcm43438a1_apsta.bin and fw_bcm43438a1.bin in /lib/firmware/ap6212/ are present but when I run nmtui, it shows nothing to activate. iwconfig shows no wifi. 

 

I even tried substituting the firmware files from the Friendly Arm distribution, which includes some additional files, but no good.

Link to comment
Share on other sites

4 hours ago, tkaiser said:

 

The mainline kernel variant searches in another place but we at Armbian prefer to ignore that :)

 

https://github.com/armbian/build/commit/1b34744c637992eeb9b2bca05379c02c252ced24#commitcomment-21775928

Does this mean I should put the firmware in a different location, i.e., /lib/firmware/brcm? I really don't know how to get WiFi working!:(

Link to comment
Share on other sites

3 hours ago, martinayotte said:

AP6212 WiFi still not working on any Mainline (OPiZeroPlus*/OPiPrime/OPiWin), we still investigate ...

The only one working is Legacy OPiZeroPlus-H3.

 

OK. At least now I know I'm not completely crazy! I know you'll figure it out.

Thanks!

Link to comment
Share on other sites

4 hours ago, martinayotte said:

AP6212 WiFi still not working on any Mainline (OPiZeroPlus*/OPiPrime/OPiWin), we still investigate ...

 

Nothing changed on NanoPi Air except AP6212 vs AP6212A --> adjustment of firmware paths is all that's needed.

Link to comment
Share on other sites

2 hours ago, sn0wblind said:

Adding the fw_bcm43438a1_apsta.bin and fw_bcm43438a1.bin from

https://github.com/BPI-SINOVOIP/BPI-files/tree/master/others/brcm/lib/firmware/ap6212

in /lib/firmware/ap6212/ works for me on Legacy 5.25.

For everyone else reading this: This shouldn't be necessary since we added those files for legacy kernel already and they should come to your installations through 'apt upgrade'.

 

With mainline situation is different since there's another driver used looking for firmware files in another location. You could check output of

modinfo brcmfmac | awk -F" " '/firmware/ {print $2}' | grep bin

and then start to help the driver find its firmware. Or brute-force approach:

modprobe -r brcmfmac
cd /lib/firmware/
cp -p brcm/brcmfmac43430-sdio.bin brcm/brcmfmac43430-sdio.bin.bak
cat ap6212/fw_bcm43438a1.bin >brcm/brcmfmac43430-sdio.bin
modprobe -v brcmfmac

 

Link to comment
Share on other sites

@tkaiser, unfortunately, on both my OPiZeroPlus-H5 and OPiPrime, your brute-force approach didn't work.

As I said in some development thread, it doesn't even reach the point where the firmware is loaded, even brcmfmac isn't probed during DT parsing.

And the mmc-sdio, although loaded on OPiPrime, it isn't even loaded on OPiZeroPlus and OPiWin.

 

So, that's why I've said "AP6212 WiFi still not working on any Mainline (OPiZeroPlus*/OPiPrime/OPiWin), we still investigate" ...

 

EDIT: BTW, since I don't own a NanoPiNeoAir, could you share you booting log so I can compare the sequence with my OPis ?

Link to comment
Share on other sites

12 minutes ago, martinayotte said:

unfortunately, on both my OPiZeroPlus-H5 and OPiPrime, your brute-force approach didn't work

 

I know and that's why I'm asking a NanoPi Air owner for help ;)

 

Unfortunately I can't help with Air right now since I don't find those little guys (too small ;) ). But I remembered that we could convince FriendlyELEC to drop partially Allwinner's BSP stuff so maybe we find the necessary bits over there: https://github.com/friendlyarm/linux/commits/sunxi-4.11.y (funnily the redesigned NanoPi NEO Plus 2 to avoid XR819 there and replace it with AP6212A)

Link to comment
Share on other sites

@tkaiser, yes, I've already took a look at this link, since you provided it in another thread.

Unfortunately, I couldn't find any discrepancy with my latest commits.

Since I've received a NanoPi M1 Plus this week, I will check with our Armbian build if the AP6212 is working there.

If not, I will grab their branch to figure out ...

 

Link to comment
Share on other sites

4 hours ago, tkaiser said:

For everyone else reading this: This shouldn't be necessary since we added those files for legacy kernel already and they should come to your installations through 'apt upgrade'.

Well, no apt upgrade without WLAN on the NanoPi Air :lol:

 

@martinayotte, I'll post my boot log tomorrow.

 

Link to comment
Share on other sites

8 minutes ago, sn0wblind said:

no apt upgrade without WLAN on the NanoPi Air

 

Sorry, I always forget that not everyone ordered a bunch of these to attach one of those to get network immediately :)

 

(and IIRC this won't help with mainline yet since OTG is not ready on H3 boards with the kernel branch Armbian currently relies on)

Link to comment
Share on other sites

5 hours ago, tkaiser said:

 

Sorry, I always forget that not everyone ordered a bunch of these to attach one of those to get network immediately :)

 

(and IIRC this won't help with mainline yet since OTG is not ready on H3 boards with the kernel branch Armbian currently relies on)

 

Well, OTG may not work yet, but I got ethernet anyway with this :)

 

 

 

 

adapter.jpg

Link to comment
Share on other sites

Method, proposed by Thomas, worked for me on Zero 2+ H3. I assume it must be the same on all other boards with this chip.

rmmod brcmfmac # we load module by default so removing is a key
cd /lib/firmware
cat ap6212/fw_bcm43438a1.bin >brcm/brcmfmac43430-sdio.bin
modprobe brcmfmac

What do we loose if we add this to our overlay?

wlan0     IEEE 802.11  ESSID:"xxxxxxxxxx"  
          Mode:Managed  Frequency:2.452 GHz  Access Point: D4:CA:6D:83:52:D1   
          Bit Rate=72.2 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-10 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

http://sprunge.us/ibHB

Link to comment
Share on other sites

36 minutes ago, Igor said:

What do we loose if we add this to our overlay?

 

I would prefer that someone tests whether this firmware variant is sufficient for both AP6212A and older AP6212. Since then we could just throw the older variants away and replace them with the new firmware.

Link to comment
Share on other sites

It doesn't work on older non A chips. Is it possible to define module configuration with setting firmware path? That would be one of workarounds if it works?

Link to comment
Share on other sites

27 minutes ago, zador.blood.stained said:

At least on mainline file names are defined here and are selected based on detected chip revision:

 

Then the following should be sufficient after restoring brcm/brcmfmac43430-sdio.bin for both chip revisions?

cat ap6212/fw_bcm43438a1.bin >brcm/brcmfmac43241b0-sdio.bin
cp -p brcm/brcmfmac43430-sdio.txt brcm/brcmfmac43241b0-sdio.txt

 

Link to comment
Share on other sites

I'm glad that some of you got it working on ZeroPlus-H3 !

Now, seeing the advance, I retried it on my side too and it is now working.

Last time I did on H3 was 2 weeks ago, when we didn't knew about the firmware workaround.

Those recent days, when I was pulling my hairs, it was all on A64 or H5 boards, and the workaround didn't work there.

Also, yesterday, my trials was on BPiM2Plus, but this one is effectively a Non-A version.

 

Link to comment
Share on other sites

12 minutes ago, martinayotte said:

I retried it on my side too and it is now working.

Nice, but let's focus on finally solving the issue. Overwriting brcm/brcmfmac43430-sdio.bin is wrong so what about testing/confirming (on H3 boards!) what I proposed above? We need to be able to deal with both chip revisions. And we should think about why Banana folks pushed not one but two files to their repo back then (fw_bcm43438a1.bin and fw_bcm43438a1_apsta.bin -- what's this '_apsta' doing?)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines