No wifi device on bpi r2

Hello.

So I can’t see the wireless interface on my device(I would like to connect to a wireless network and share it through the 4 wired ports)

# iwconfig

lan1      no wireless extensions.

lo        no wireless extensions.

wan       no wireless extensions.

lan3.60   no wireless extensions.

eth1      no wireless extensions.

br0       no wireless extensions.

lan3      no wireless extensions.

lan2      no wireless extensions.

lan0      no wireless extensions.

eth0      no wireless extensions.

I’m currently using Debian Stretch latest image(with all packages upgraded): deb_stretch_4.14.80_SD.img.gz Found here: https://drive.google.com/drive/folders/1oP7jy1KrrIOifvImo2nQ59wx3_9hHkgk

# uname -a
Linux bpi-r2 4.14.80-bpi-r2-main #177 SMP Sun Nov 11 10:03:58 CET 2018 armv7l GNU/Linux

# lsmod
Module                  Size  Used by

bnep                   20480  2

bridge                151552  0

mtk_thermal            16384  0

thermal_sys            61440  1 mtk_thermal

mt6577_auxadc          16384  0

spi_mt65xx             20480  0

pwm_mediatek           16384  0

rtc_mt6397             16384  1

nvmem_mtk_efuse        16384  0

mtk_pmic_keys          16384  0

ip_tables              24576  0

x_tables               28672  1 ip_tables

ipv6                  409600  23 bridge

I’ve found the tutorial and a few mentions that I need to use some script to create/start the device (also found this kinda mentioned here: http://fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:wlan#internal)

And when I run the script (I suppose it’s the wmt_loader) I get the following: # wmt_loader

init combo device

Opened combo device

get device id : 30243

set device id : 30243

do module init: 30243

failed to init module

/var/log/messages also has something to say:
Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515831] set current consys chipid (0x7623)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515885] ------------[ cut here ]------------

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515903] WARNING: CPU: 2 PID: 1519 at lib/list_debug.c:25 __list_add_valid+0x64/0xc8

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515910] list_add corruption. next->prev should be prev (c1179ca8), but was   (null). (next=c1244c8c).

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515913] Modules linked in: bnep bridge mtk_thermal thermal_sys mt6577_auxadc spi_mt65xx pwm_mediatek rtc_mt6397 nvmem_mtk_efuse mtk_pmic_keys ip_tables x_tables ipv6

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515950] CPU: 2 PID: 1519 Comm: wmt_loader Tainted: G        W       4.14.80-bpi-r2-main #177

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515952] Hardware name: Mediatek Cortex-A7 (Device Tree)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515978] [<c0113358>] (unwind_backtrace) from [<c010d580>] (show_stack+0x20/0x24)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.515992] [<c010d580>] (show_stack) from [<c0aa70f8>] (dump_stack+0x94/0xa8)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516006] [<c0aa70f8>] (dump_stack) from [<c0125f40>] (__warn+0xf8/0x110)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516018] [<c0125f40>] (__warn) from [<c0125fa0>] (warn_slowpath_fmt+0x48/0x50)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516029] [<c0125fa0>] (warn_slowpath_fmt) from [<c048daec>] (__list_add_valid+0x64/0xc8)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516043] [<c048daec>] (__list_add_valid) from [<c05b3dec>] (wakeup_source_add+0x8c/0xd4)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516057] [<c05b3dec>] (wakeup_source_add) from [<c05e80bc>] (osal_wake_lock_init+0x2c/0x3c)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516069] [<c05e80bc>] (osal_wake_lock_init) from [<c05e20f4>] (stp_psm_init+0x11c/0x8d4)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516078] [<c05e20f4>] (stp_psm_init) from [<c05e399c>] (mtk_wcn_stp_init+0xbc/0x16c)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516089] [<c05e399c>] (mtk_wcn_stp_init) from [<c05ef8d0>] (stp_drv_init+0x58/0x70)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516100] [<c05ef8d0>] (stp_drv_init) from [<c05f3480>] (mtk_wcn_soc_common_drv_init+0x84/0x348)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516111] [<c05f3480>] (mtk_wcn_soc_common_drv_init) from [<c05faa34>] (do_common_drv_init+0x78/0x1bc)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516121] [<c05faa34>] (do_common_drv_init) from [<c05fa88c>] (do_connectivity_driver_init+0x1c/0x14c)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516129] [<c05fa88c>] (do_connectivity_driver_init) from [<c05f9d68>] (wmt_detect_unlocked_ioctl+0x158/0x1c8)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516141] [<c05f9d68>] (wmt_detect_unlocked_ioctl) from [<c02b30fc>] (do_vfs_ioctl+0xb0/0x8d0)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516151] [<c02b30fc>] (do_vfs_ioctl) from [<c02b3960>] (SyS_ioctl+0x44/0x68)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516164] [<c02b3960>] (SyS_ioctl) from [<c0108c80>] (ret_fast_syscall+0x0/0x54)

Aug  8 15:43:47 bpi-r2 kernel: [ 3273.516169] ---[ end trace b367c80dcfbee3eb ]---

If there is a need to recompile the kernel and apply patches, I’m open to changing to something else(raspbian, centos, ubuntu(eww)) that has out of the box working of ethernet, wifi(5g as a client, no ap needed), hdmi(preferably) and the ability to run linux software (squid, dnsmasq, etc).

Thanks in advance.

Just tested a few more distributions: ubuntu 18.04 mate desktop demo with kernel 4.4, the wifi is working (ui is very slow but who needs DM?) debian buster image with kernel 4.19, wmt_loader gives the same error and no wifi interface.

Reading documentation is always nice, http://wiki.banana-pi.org/Getting_Started_with_R2#WiFi_and_Ap_mode_on_R2_Openwrt

Got it working on Debian Buster, just by ignoring the errors and continuing to the guide…

what have you changed in my debian buster image to get it working?

have not seen this warning (lib/list_debug.c:25) before in dmesg

[  204.506327] kalFirmwareImageMapping firmware size 225840                                                                                                     
[  205.704422] [MTK-WIFI] register_set_p2p_mode_handler: (pid 319) register set p2p mode handler b9f22d6e                                                       
[  205.720421] [MTK-WIFI] WIFI_write: WMT turn on WIFI success!                                                                                                 
[  205.734518] [MTK-WIFI] WIFI_write: Set wlan mode 0 --> 1                                                                                                     
[  205.747654] [MTK-WIFI] WIFI_close: WIFI_close: major 155 minor 0 (pid 327)                                                                                   
root@bpi-r2:~# cat /etc/issue                                                                                                                                   
Debian GNU/Linux 10 \n \l                                                                                                                                       
                                                                                                                                                                
root@bpi-r2:~# ip link show ap0                                                                                                                                 
10: ap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000                                                              
    link/ether 02:08:22:c8:8e:fe brd ff:ff:ff:ff:ff:ff                                                                                                          
root@bpi-r2:~# uname -a                                                                                                                                         
Linux bpi-r2 4.19.62-bpi-r2-main #303 SMP Tue Jul 30 12:01:05 CEST 2019 armv7l GNU/Linux                                                                        
root@bpi-r2:~#

Nothing, just ignored the errors and did the rest of the commands:

wmt_loader

stp_uart_launcher -p /etc/firmware &

echo 1 >/dev/wmtWifi

ip link set wlan0 up

wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Ah ok you have wpa-supplicant installed,this is known as breaking wifi…