Banana Pi PRO & M1Plus no Wifi / Armbian 4.5


Lemonzest
 Share

2 2

Recommended Posts

Hiya, I'm attempting to use Wifi on the Banana Pi M1Plus board, supposed to be a Banana Pro clone from SinoVoip, but I cannot get the wifi module working with the latest Armbian 4.5, Jessie kernel 3.4.109. I have already linked script.bin to the /boot/bin/bananapro.bin file I try loading the ap6210 module and it gives errors.

 

root@bananapi:~# modprobe ap6210
<3>[ap6210] parse wifi_used failed in script.fex.
<3>[ap6210] bluetooth is disable in script.fex.
<3>[ap6210] [dhd_module_init] get wl_host_wake gpio failed
modprobe: ERROR: could not insert 'ap6210': Operation not permitted
 

 

Thankyou for any help

 

Lemonzest

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

Please see the footnote for the M1+ here: http://linux-sunxi.org/Banana_Pi#Variants

 

There do differences exist and if you ever realized how bizarre the M1+'s manufacturer creates hardware descriptions (be it fex files or .dts) then you won't expect that anything works. I tried hard to get one M1+ a while ago but SinoVoip's european distributor was not able to help me (they offered me the Banana Pro which they don't distribute or the M2 or the M1 and so I gave up)

 

Since the schematics of both boards are available (see the link above and http://www.lemaker.org/thread-14686-1-1.html) you might search for different pin mappings and correct them yourself (Igor ships both the needed bin2fex and fex2bin binaries)

Link to post
Share on other sites

I actually changed the driver in last build and it was only tested on Cubietruck which has almost the same chip.

 

Now, I am using http://linux-sunxi.org/Cubietruck/AP6210

 

If you are running latest image, than try with installing this kernel:

apt-get install linux-image-banana

If this will work without any other interventions (I assume you have the proper bananapro.bin) than I need to investigate why it's not working with this new driver. The problem is that I am also lack of this hardware :( ... to test.

Link to post
Share on other sites

[PROBLEM]:

U-BOOT does not load .dtb file for Banana Pi M1 Plus, but it loads file for Banana Pi M1 (without Plus)

 

[FIX]:

1. Edit (e.g. with nano) /boot/boot.cmd, change the 11th line:

ext4load mmc 0 0x49000000 /boot/dtb/${fdtfile} || fatload mmc 0 0x49000000 /dtb/${fdtfile}

to this:

ext4load mmc 0 0x49000000 /boot/dtb/sun7i-a20-bananapi-m1-plus.dtb || fatload mmc 0 0x49000000 /dtb/sun7i-a20-bananapi-m1-plus.dtb

2. Recompile it:

mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

3. Reboot

4. Check  it with this command:

cat /proc/device-tree/model | grep "Plus"

for this output

Binary file (standard input) matches

5. Enjoy working wifi !

Link to post
Share on other sites

Since you are talking about using mainline kernel and all the posts above deal with kernel 3.4 it was a rather bad idea to hijack especially this thread!

 

[PROBLEM]:

U-BOOT does not load .dtb file for Banana Pi M1 Plus, but it loads file for Banana Pi M1 (without Plus)

 

The following is similar inelegant as your approach but works the same way:

cat /boot/dtb/sun7i-a20-bananapi-m1-plus.dtb >/boot/dtb/sun7i-a20-bananapi-m1.dtb

(you hardcoded a different path to read the .dtb from into /boot/boot.scr, I simply exchanged the contents of the file being read by default :) )

Link to post
Share on other sites

I actually changed the driver in last build and it was only tested on Cubietruck which has almost the same chip.

 

Now, I am using http://linux-sunxi.org/Cubietruck/AP6210

 

If you are running latest image, than try with installing this kernel:







apt-get install linux-image-banana

If this will work without any other interventions (I assume you have the proper bananapro.bin) than I need to investigate why it's not working with this new driver. The problem is that I am also lack of this hardware :( ... to test.

 

 

 

Excellent!!! Thank you!!!

This is working.

My device:

Banana Pro (black board with yellow ports).

Image:

Legacy Debian jessie (3.4.109) from Bananapipro page.

My step by step for load the ap6210 module:

1. rm /boot/script.bin

2. ln -s /boot/bin/bananapipro.bin /boot/script.bin

3. echo ap6210 >> /etc/modules

4. apt-get install linux-image-banana

5. rm /boot/zImage

6. ln -s /boot/bin/vmlinuz-3.4.109-banana /boot/zImage

7. reboot

8. modprobe ap6210

No errors. OK.

iwconfig

wlan0 IEEE 802.11 ESSID:"mySSID"

Mode:Managed Frequency:2.442 GHz Access Point: xx:xx:xx:xx:xx:xx

Bit Rate=65 Mb/s Tx-Power:32 dBm

Retry min limit:7 RTS thr:off Fragment thr:off

Power Managementmode:All packets received

 

ifconfig

wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx

inet addr:192.168.1.xxx Bcast:192.168.1.255 Mask:255.255.255.0

inet6 addr: xxxx::xxxx:xxxx:xxxx:xxxx/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:571 errors:0 dropped:0 overruns:0 frame:0

TX packets:144 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:69539 (67.9 KiB) TX bytes:17576 (17.1 KiB)

 

But I had a question.

I download the image of BananaPi Pro. Why it does not work by default?

Why it is necessary to do: apt-get install linux-image-banana?

You can rebuild an image for BananaPi Pro?

So that worked by default.

 

Sorry for my english.

Link to post
Share on other sites

Device : Banana Pi M1+ (blue board with A20 chip mounted on top)

 

Started with download from Bananapipro page of legacy Debian jessie (3.4.109) image

  1. Changed script.bin to link to bananapipro.bin
  2. Started the ap6210 by installing linux-image-banana
  3. Reboot
     
# uname -a
Linux bananapi 3.4.109-banana #5 SMP PREEMPT Wed Sep 30 14:20:25 CEST 2015 armv7l GNU/Linux
# dmesg | grep ap6210
[    4.958907] [ap6210] --->The Drive has been modified for BananaPro by LeMaker team<---
[    4.961800] [ap6210] select wifi ap6210
[    4.965211] [ap6210] Initializing ap6210.
[    4.971162] [ap6210] Succeed to set the gpio ap6210_wl_vdd_en to 0
[    4.981458] [ap6210] Succeed to set the gpio ap6210_wl_regon to 1
[    5.427706] [ap6210] WLAN placed in POWER ON
[    5.695817] [ap6210] Linux Kernel SDIO/MMC Driver
[    5.778868] [ap6210] Broadcom Dongle Host Driver: register interface [wlan0] MAC: 00:90:4c:11:22:33
[    5.794622] [ap6210] Succeed to set the gpio ap6210_wl_regon to 0
[    6.456474] bcmdhd: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[    6.481176] bcmdhd: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[    6.538372] [ap6210] WLAN placed in RESET
[    6.574426] bcm4330: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[    6.581401] bcm4330: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[   18.852216] [ap6210] Dongle Host Driver, version 1.28.23.3 (r).
[   18.859357] [ap6210] Compiled in drivers/net/wireless/ap6210 on Sep 30 2015 at 14:15:34.
[   18.864464] [ap6210] Succeed to set the gpio ap6210_wl_regon to 1
[   19.093726] [ap6210] WLAN going back to live
[   19.337933] [ap6210] dhd_bus_devreset: WLAN ON
[   19.344195] [ap6210] Final fw_path=/lib/firmware/ap6210/fw_bcm40181a2.bin
[   19.349949] [ap6210] Final nv_path=/lib/firmware/ap6210/nvram_ap6210.txt
[   19.356874] [ap6210] download firmware /lib/firmware/ap6210/fw_bcm40181a2.bin
[   19.659971] [ap6210] Dongle ready, protocol version 4
[   19.665435] [ap6210] Dongle ready, protocol version 4
[   19.676595] [ap6210] Firmware up: op_mode=0x0001, Broadcom Dongle Host Driver mac=98:3b:16:c8:1a:0a
[   19.697670] [ap6210] Firmware version = wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
[   19.700755] [ap6210] Chip: a962 Rev 1 Pkg 9

I then executed the Armbian upgrade script

# wget -q -O - http://upgrade.armbian.com | bash

Selected Bananapi & Legacy
After reboot

# uname -a
Linux bananapi 3.4.110-sun7i #2 SMP PREEMPT Sat Nov 28 19:53:25 CET 2015 armv7l GNU/Linux
# dmesg | grep ap6210
[    5.606675] [ap6210] parse wifi_used failed in script.fex.
[    5.610975] [ap6210] bluetooth is disable in script.fex.
[    5.616566] [ap6210] No wifi type selected, please check your config.
[    5.747040] [ap6210] WLAN placed in POWER ON
[    7.746484] [ap6210] failed to power up wifi chip, retry again (4 left) **
[    7.752029] [ap6210] No wifi type selected, please check your config.
[    7.755455] [ap6210] WLAN placed in POWER OFF
[    7.761001] [ap6210] No wifi type selected, please check your config.
[    7.897894] [ap6210] WLAN placed in POWER ON
[    9.896606] [ap6210] failed to power up wifi chip, retry again (3 left) **
[    9.902324] [ap6210] No wifi type selected, please check your config.
[    9.905777] [ap6210] WLAN placed in POWER OFF
[    9.911389] [ap6210] No wifi type selected, please check your config.
[   10.048149] [ap6210] WLAN placed in POWER ON
[   12.046553] [ap6210] failed to power up wifi chip, retry again (2 left) **
[   12.052149] [ap6210] No wifi type selected, please check your config.
[   12.055657] [ap6210] WLAN placed in POWER OFF
[   12.061304] [ap6210] No wifi type selected, please check your config.
[   12.170011] [ap6210] WLAN placed in POWER ON
[   14.166421] [ap6210] failed to power up wifi chip, retry again (1 left) **
[   14.171934] [ap6210] No wifi type selected, please check your config.
[   14.175303] [ap6210] WLAN placed in POWER OFF
[   14.181724] [ap6210] failed to power up wifi chip, max retry reached, exits **

Changed the link for script.bin to bananapipro.bin
Rebooted, but still no ap6210

# apt-get install linux-image-banana

Rebooted

# uname -a
Linux bananapi 3.4.109-banana #5 SMP PREEMPT Wed Sep 30 14:20:25 CEST 2015 armv7l GNU/Linux

(But wireless working again)

 

 

EDIT : I've just read about the issues with the upgrade script and seen that the Board selection is to be included in the next version.
 

Link to post
Share on other sites

On vmlinuz-3.4.110-sun7i not working WiFi ap6210 of bananapipro.

 

 

Still not working on Banana Pi M1+

 

I've also found that my USB audio is no longer working with MPD and doesn't show in the available soundcards in alsamixer anymore, only the sunxi-CODEC, so my MPD Server service is useless at the moment.

 

I've relinked /boot/zImage to 3.4.109-banana

# ls -al /boot
total 16988
drwxr-xr-x  3 root root    4096 Dec 30 22:27 .
drwxr-xr-x 25 root root    4096 Dec 21 17:02 ..
drwxr-xr-x  2 root root    4096 Dec 30 12:00 bin
-rw-r--r--  1 root root    6944 Oct 12 15:52 boot.bmp
-rw-r--r--  1 root root    1698 Dec 30 22:14 boot.cmd
-rw-r--r--  1 root root    1698 Dec 30 22:14 boot.cmd.backup
-rw-r--r--  1 root root    1770 Dec 30 22:14 boot.scr
-rw-r--r--  1 root root   96350 Dec 28 17:49 config-3.4.110-sun7i
-rw-r--r--  1 root root 4032124 Dec 30 12:00 initrd.img-3.4.110-sun7i
lrwxrwxrwx  1 root root      25 Dec  7 19:11 script.bin -> /boot/bin/bananapipro.bin
-rw-r--r--  1 root root 2006492 Dec 28 17:49 System.map-3.4.110-sun7i
-rwxr-xr-x  1 root root 5607544 Sep 30 19:21 vmlinuz-3.4.109-banana
-rwxr-xr-x  1 root root 5607856 Dec 28 17:49 vmlinuz-3.4.110-sun7i
lrwxrwxrwx  1 root root      28 Dec 30 22:27 zImage -> /boot/vmlinuz-3.4.109-banana

After a reboot, my WiFi was not been restored.

[   30.051564] [ap6210] Succeed to set the gpio ap6210_wl_regon to 0
[   30.280245] [ap6210] WLAN placed in RESET
[   30.284019] [ap6210] dhd_open: failed with code -5
[   98.313775] [ap6210] Dongle Host Driver, version 1.28.23.3 (r).
[   98.345840] [ap6210] Compiled in drivers/net/wireless/ap6210 on Sep 30 2015 at 14:15:34.
[   98.393991] [ap6210] Succeed to set the gpio ap6210_wl_regon to 1
[   99.264185] [ap6210] WLAN going back to live
[   99.542319] [ap6210] dhd_bus_devreset: WLAN ON
[   99.555648] [ap6210] Final fw_path=/lib/firmware/ap6210/fw_bcm40181a2.bin
[   99.562273] [ap6210] Final nv_path=/lib/firmware/ap6210/nvram_ap6210.txt
[   99.570399] [ap6210] download firmware /lib/firmware/ap6210/fw_bcm40181a2.bin
[   99.872092] [ap6210] bcmsdh_set_irq Flag = 1
[   99.883177] [ap6210] dhd_bus_devreset: WLAN ON DONE
[  101.904228] [ap6210] dhdcdc_query_ioctl: dhdcdc_msg failed w/status -5
[  101.910619] [ap6210] dhd_preinit_ioctls: can't get MAC address , error=-5
[  103.930875] [ap6210] dhdcdc_set_ioctl: dhdcdc_msg failed w/status -110
[  103.937925] [ap6210] dhd_check_hang: Event HANG send up due to  re=0 te=2 e=-110 s=2
[  103.955334] [ap6210] bcmsdh_set_irq Flag = 0
[  103.972734] [ap6210] dhd_bus_devreset: WLAN OFF DONE
[  103.990423] [ap6210] Succeed to set the gpio ap6210_wl_regon to 0
[  104.371258] [ap6210] WLAN placed in RESET
[  104.375668] [ap6210] dhd_open: failed with code -14
[  104.395402] [ap6210] In : chip crash eventing
[  104.455132] Modules linked in: cpufreq_userspace wifi_gpio snd_usb_audio sg snd_hwdep snd_usbmidi_lib snd_rawmidi snd_seq_device nbd spidev ap6210 a20_tp 8021q garp stp llc sunxi_ir hidp rfcomm hci_uart bluetooth ppdev lp parport
[  104.649135] [<c06f2848>] (cfg80211_disconnected+0xc0/0xc4) from [<bf105200>] (wl_cfg80211_hang+0x44/0x7c [ap6210])
[  104.723126] [<bf105200>] (wl_cfg80211_hang+0x44/0x7c [ap6210]) from [<c004d18c>] (process_one_work+0x12c/0x3b0)
[  105.214911] [ap6210] reg_notifier for intiator:0 not supported

After a  2nd reboot though the WiFi came up fine even though no other devices had been connected or disconnected.

[    6.138454] [ap6210] Succeed to set the gpio ap6210_wl_regon to 0
[    6.951165] [ap6210] WLAN placed in RESET
[    7.032236] bcmdhd: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[    7.052995] bcmdhd: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[    7.102658] bcm4330: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[    7.110036] bcm4330: exports duplicate symbol bcmsdh_probe (owned by ap6210)
[   26.081445] [ap6210] dhd_device_event: bus not ready, exit
[   26.095983] [ap6210] Dongle Host Driver, version 1.28.23.3 (r).
[   26.103103] [ap6210] Compiled in drivers/net/wireless/ap6210 on Sep 30 2015 at 14:15:34.
[   26.108188] [ap6210] Succeed to set the gpio ap6210_wl_regon to 1
[   26.331527] [ap6210] WLAN going back to live
[   26.572343] [ap6210] dhd_bus_devreset: WLAN ON
[   26.578394] [ap6210] Final fw_path=/lib/firmware/ap6210/fw_bcm40181a2.bin
[   26.584075] [ap6210] Final nv_path=/lib/firmware/ap6210/nvram_ap6210.txt
[   26.590678] [ap6210] download firmware /lib/firmware/ap6210/fw_bcm40181a2.bin
[   26.874086] [ap6210] Dongle ready, protocol version 4
[   26.878999] [ap6210] Dongle ready, protocol version 4
[   26.891192] [ap6210] Firmware up: op_mode=0x0002, Broadcom Dongle Host Driver mac=02:1a:11:f3:10:44
[   26.907026] [ap6210] Firmware version = wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
[   26.910023] [ap6210] Chip: a962 Rev 1 Pkg 9
[   41.064538] [ap6210] netdev_ifidx(5), chan_type(1) target channel(5)
[   41.556113] [ap6210] No WPSIE in beacon
[   41.559026] [ap6210] No WPSIE in beacon

Another reboot without the USB Soundcard installed brought up the WiFi once again, and I then plugged in the Soundcard, but there's a problem in that it's no longer recognised in the way it was before starting the upgrade process.

 

I copied the backup of /boot/bin/bananapipro.bin that I had and rebooted yet again, but the soundcard is no longer working as before. I've tried disconnecting and reconnecting it to no avail.

[  212.112649] cannot create card instance 0
[  212.117789] snd-usb-audio: probe of 4-1:1.0 failed with error -5
[  212.132955] input: USB PnP Sound Device as /devices/platform/sw-ohci.2/usb4/4-1/4-1:1.3/input/input3
[  212.144592] generic-usb 0003:0D8C:013C.0002: input,hidraw0: USB HID v1.00 Device [USB PnP Sound Device] on usb-sw-ohci-1/input3
[  396.897950] usb 4-1: USB disconnect, device number 4
[  396.903161] ehci_irq: port change detect
[  397.033202] ehci_irq: port change detect
[  397.322679] usb 4-1: new full-speed USB device number 5 using sw-ohci
[  397.514219] usb 4-1: can't set config #1, error -62
[  397.519555] usb 4-1: USB disconnect, device number 5
[  399.682993] ehci_irq: port change detect
[  399.856737] ehci_irq: port change detect
[  399.911759] The port change to OHCI now!
[  400.196220] usb 4-1: new full-speed USB device number 6 using sw-ohci
[  400.396483] cannot find the slot for index 0 (range 0-0), error: -16
[  400.399532] cannot create card instance 0
[  400.404574] snd-usb-audio: probe of 4-1:1.0 failed with error -5
[  400.419881] input: USB PnP Sound Device as /devices/platform/sw-ohci.2/usb4/4-1/4-1:1.3/input/input4
[  400.431924] generic-usb 0003:0D8C:013C.0003: input,hidraw0: USB HID v1.00 Device [USB PnP Sound Device] on usb-sw-ohci-1/input3

(Not the best of days!)

 

 

EDIT 31/12 : Sound to USB Soundcard eventually restored after reinstalling sunxi-tools and fex2bin the older /boot/bananapupro.fex that I'd created to disable the onboard sound output.

Link to post
Share on other sites

Hi tkaiser, thanks for replying!'

Yes, I have a feeling that I'm travellin in time to 2015. ^_^
Before connecting I need to load ap6210 driver.

I tried using a few instructions but all of them seem to be obsolete and making ariver from sources fails.

Another approck was to put the 'original' sunxi kernel into Arbian, but I feel that I may not have enough skills for doing that.

Link to post
Share on other sites

Please feel free to waste your time with whatever you like. The last time I tested Wi-Fi on my Banana Pro I did a 'sudo nmtui' and were in. If this fails for you and you think you need help with that please look into my signature for the information anyone would need to help (at least 'I tried everything but it does not work' is not sufficient)

Link to post
Share on other sites

Same here. 

Now I'm using the last OMV image from @tkaiser and running "sudo nmtui" from the Terminal works perfectly.

But I think it workd like a laptop out ot the box. I mean you can have Ethernet or Wi-Fi but not both. Of course you can configure to have both working or using "bonding" networks but not out of the box.

Link to post
Share on other sites

26 minutes ago, manuti said:

Now I'm using the last OMV image from @tkaiser and running "sudo nmtui" from the Terminal works perfectly.

'OMV image' is nothing special, that's just a Debian Jessie Armbian image with mainline kernel and 'OpenMediaVault' installed by default. But 'sudo nmtui' should work on every board with onboard Wi-Fi that is listed as fully supported (potential exception: Tinkerboard but here I don't know why this board has status 'supported' and not still 'WiP')

 

Wrt default behaviour: on most boards we use a default config where eth0 is configured the 'old way' (interfaces file) so Wi-Fi is handled by network manager. This ensures that the forum is not flooded with 99 percent 'There is no interfaces file! Armbian is broken! WTF?!' threads but allows for easy Wi-Fi setup (nmtui). To get 'laptop behaviour' (use Ethernet if available and do a fallback to Wi-Fi if possible otherwise) eth0 should be removed from interfaces file (impossible since it will take another decade until at least 50 percent of Linux users accept that Network Manager is not entirely evil) and a lot of users run into troubles when connecting eth0 and wlan0 to the same network (the 'Ethernet only works when Wi-Fi is connected' drama).

Link to post
Share on other sites

Allright, now wifi it works after running

 apt-get install linux-u-boot-bananapipro-next linux-image-dev-sunxi linux-headers-dev-sunxi  linux-dtb-next-sunxi linux-jessie-root-bananapipro armbian-firmware-full -y


 

Link to post
Share on other sites

  • Igor unpinned this topic
Guest
This topic is now closed to further replies.
 Share

2 2