[BPI-R2] internal Wifi/BT (MT6625L) - Kernel

anybody tried it?

i try to find the kernel-oops (currently for the missing conf-file)

it happens while calling “wmt_plat_deinit();” in drivers/misc/mediatek/connectivity/common/conn_soc/mt7623/wmt_plat_alps.c

[  +0.000006] DEBUG: Passed wmt_plat_deinit 362 now calling wake lock destroy -1057754704
[  +0.000004] DEBUG: Passed wmt_plat_deinit 364 now wmtWakeLock:-1057754704
[  +0.000004] DEBUG: Passed wmt_plat_deinit 365 now wmtWakeLock->ws: -1057754704
[  +0.000013] Unable to handle kernel NULL pointer dereference at virtual address 00000000

as you see both adresses are the same:

created the messages like this way:

INT32 wmt_plat_deinit(VOID)
{
    INT32 iret = 0;
    /* 2. unreg to cmb_stub */
    iret = mtk_wcn_cmb_stub_unreg();
    printk(KERN_ALERT "DEBUG: Passed %s %d now calling wmt wakelock deinit\n",__FUNCTION__,__LINE__);
    /*3. wmt wakelock deinit */
#ifdef CFG_WMT_WAKELOCK_SUPPORT
#ifdef CONFIG_PM_WAKELOCKS
    printk(KERN_ALERT "DEBUG: Passed %s %d now calling wakeup_source_trash\n",__FUNCTION__,__LINE__);
    wakeup_source_trash(&wmtWakeLock);
#else
    printk(KERN_ALERT "DEBUG: Passed %s %d now calling wake lock destroy %d\n",__FUNCTION__,__LINE__,(int)&wmtWakeLock);
    //destroy in wakelock.h calls wakeup_source_trash (include/linux/pm_wakeup.h) with &lock->ws
    printk(KERN_ALERT "DEBUG: Passed %s %d now wmtWakeLock:%d\n",__FUNCTION__,__LINE__,(int)&wmtWakeLock);
    printk(KERN_ALERT "DEBUG: Passed %s %d now wmtWakeLock->ws: %d\n",__FUNCTION__,__LINE__,(int)&(wmtWakeLock.ws));
    wake_lock_destroy(&wmtWakeLock);
...

any idea how to fix this? wmtWakeLock and its member ws is a struct and not dynamic allocated as i’ve found out, so i assume that there have no memory freed manually.

(drivers/misc/mediatek/connectivity/common/combo seems not be used, deleted from git after try to build without it)

back to AP-function itself…i can create the AP, see it in handy, but hostapd does nothing if i try to connect…any idea here?

hostapd-output:

root@bpi-r2:~# hostapd -dd /etc/hostapd/hostapd.conf                                                                                                      
random: Trying to read entropy from /dev/random                                                                                                           
Configuration file: /etc/hostapd/hostapd.conf                                                                                                             
rfkill: Cannot open RFKILL control device                                                                                                                 
nl80211: RFKILL status not available                                                                                                                      
nl80211: Supported cipher 00-0f-ac:1                                                                                                                      
nl80211: Supported cipher 00-0f-ac:5                                                                                                                      
nl80211: Supported cipher 00-0f-ac:2                                                                                                                      
nl80211: Supported cipher 00-0f-ac:4                                                                                                                      
nl80211: Supported cipher 00-0f-ac:6                                                                                                                      
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=1                                                                                              
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=6                                                                                              
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected                                                                    
nl80211: interface ap0 in phy phy1                                                                                                                        
nl80211: Set mode ifindex 10 iftype 3 (AP)                                                                                                                
nl80211: Setup AP(ap0) - device_ap_sme=1 use_monitor=0                                                                                                    
nl80211: Subscribe to mgmt frames with AP handle 0x91898 (device SME)                                                                                     
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x91898 match=                                                                         
nl80211: Enable Probe Request reporting nl_preq=0x91528                                                                                                   
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x91528 match=                                                                      
nl80211: Add own interface ifindex 10                                                                                                                     
nl80211: if_indices[16]: 10                                                                                                                               
phy: phy1                                                                                                                                                 
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)                                                                                                        
nl80211: Regulatory information - country=00                                                                                                              
nl80211: 2402-2472 @ 40 MHz 20 mBm                                                                                                                        
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)                                                                                                                
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)                                                                                                      
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)                                                                                                                
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)                                                                                                          
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)                                                                                                         
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)                                                                                                                
nl80211: 57240-63720 @ 2160 MHz 0 mBm                                                                                                                     
nl80211: Added 802.11b mode based on 802.11g information                                                                                                  
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=20 dBm                                                                                        
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm                                                                                          
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm                                                                                         
Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm                                                                                         
Completing interface initialization                                                                                                                       
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz                                                                                                       
DFS 0 channels required radar detection                                                                                                                   
nl80211: Set freq 2437 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2437 MHz, cf2=0 MHz)                                                           
  * freq=2437                                                                                                                                             
  * vht_enabled=0                                                                                                                                         
  * ht_enabled=0                                                                                                                                          
RATE[0] rate=10 flags=0x1                                                                                                                                 
RATE[1] rate=20 flags=0x1                                                                                                                                 
RATE[2] rate=55 flags=0x1                                                                                                                                 
RATE[3] rate=110 flags=0x1                                                                                                                                
RATE[4] rate=60 flags=0x0                                                                                                                                 
RATE[5] rate=90 flags=0x0                                                                                                                                 
RATE[6] rate=120 flags=0x0                                                                                                                                
RATE[7] rate=180 flags=0x0                                                                                                                                
RATE[8] rate=240 flags=0x0                                                                                                                                
RATE[9] rate=360 flags=0x0                                                                                                                                
RATE[10] rate=480 flags=0x0                                                                                                                               
RATE[11] rate=540 flags=0x0                                                                                                                               
hostapd_setup_bss(hapd=0x90e60 (ap0), first=1)                                                                                                            
ap0: Flushing old station entries                                                                                                                         
nl80211: flush -> DEL_STATION ap0 (all)                                                                                                                   
ap0: Deauthenticate all stations                                                                                                                          
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)                                                                                  
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0                                                      
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0                                                      
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0                                                      
wpa_driver_nl80211_set_key: ifindex=10 (ap0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0                                                      
Using interface ap0 with hwaddr 02:08:22:e2:02:fd and ssid "test"                                                                                         
nl80211: Set beacon (beacon_set=0)                                                                                                                        
nl80211: Beacon head - hexdump(len=55): 80 00 00 00 ff ff ff ff ff ff 02 08 22 e2 02 fd 02 08 22 e2 02 fd 00 00 00 00 00 00 00 00 00 00 64 00 01 04 00 04 
74 65 73 74 01 08 82 84 8b 96 0c 12 18 24 03 01 06                                                                                                        
nl80211: Beacon tail - hexdump(len=9): 2a 01 04 32 04 30 48 60 6c                                                                                         
nl80211: ifindex=10                                                                                                                                       
nl80211: beacon_int=100                                                                                                                                   
nl80211: dtim_period=2                                                                                                                                    
nl80211: ssid - hexdump_ascii(len=4):                                                                                                                     
     74 65 73 74                                       test                                                                                               
  * beacon_int=100                                                                                                                                        
nl80211: hidden SSID not in use                                                                                                                           
nl80211: privacy=0                                                                                                                                        
nl80211: auth_algs=0x1                                                                                                                                    
nl80211: wpa_version=0x0                                                                                                                                  
nl80211: key_mgmt_suites=0x4                                                                                                                              
nl80211: pairwise_ciphers=0x0                                                                                                                             
nl80211: group_cipher=0x1                                                                                                                                 
nl80211: SMPS mode - off                                                                                                                                  
nl80211: Set ap0 operstate 0->1 (UP)                                                                                                                      
netlink: Operstate: ifindex=10 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)                                                                          
Failed to set TX queue parameters for queue 0.                                                                                                            
Failed to set TX queue parameters for queue 1.                                                                                                            
Failed to set TX queue parameters for queue 2.                                                                                                            
Failed to set TX queue parameters for queue 3.                                                                                                            
ap0: interface state UNINITIALIZED->ENABLED                                                                                                               
ap0: AP-ENABLED                                                                                                                                           
ap0: Setup of interface done.                                                                                                                             
ctrl_iface not configured!                                                                                                                                
random: Got 20/20 bytes from /dev/random                                                                                                                  
RTM_NEWLINK: ifi_index=10 ifname=ap0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])                                               
nl80211: Set IF_OPER_UP again based on ifi_flags and expected operstate                                                                                   
netlink: Operstate: ifindex=10 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)                                                                          
RTM_NEWLINK: ifi_index=10 ifname=ap0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])    

dmesg (from stp-launcher and following):

[  +0.001906] [WMT-IC][W]mtk_wcn_soc_ver_check:0x7623: read hw_ver (hw version) (0x8a00)
[  +0.000895] [WMT-IC][W]mtk_wcn_soc_ver_check:0x7623: read fw_ver (rom version) (0x8a00)
[  +0.000011] [WMT-IC][W]mtk_wcn_soc_ver_check:0x7623: ic info: SOC_CONSYS.E1 (0x8a00/0x8a00, WMTHWVER:0, patch_ext:_e1)
[  +0.098973] [WMT-IC][W]mtk_wcn_soc_patch_dwn:wmt_core: patch dwn:0 frag(51, 268) ok
[  +0.128768] [WMT-IC][W]mtk_wcn_soc_patch_dwn:wmt_core: patch dwn:0 frag(114, 52) ok
[  +0.328089] [WMT-IC][W]mtk_wcn_soc_sw_init:co-clock disabled.
[  +0.000315] [STP] mtk_wcn_stp_psm_enable:[W] STP Not Ready, Dont do Sleep/Wakeup
[  +0.000015] [WMT-CORE][W]wmt_core_dump_func_state:[AF FUNC ON]status(b:0 f:0 g:0 w:0 lpbk:2 coredump:0 wmt:2 stp:0)
[  +0.000069] [WMT-EXP][W]mtk_wcn_wmt_func_ctrl:OPID(3) type(9) ok
[Dec17 16:55] [MTK-WIFI] WIFI_open: WIFI_open: major 153 minor 0 (pid 1336)
[  +0.000059] [MTK-WIFI] WIFI_write: WIFI_write A

[  +0.039709] [WMT-FUNC][W]wmt_func_wifi_on:WMT-FUNC: wmt wlan func on before wlan probe
[  +0.003212] kalFirmwareImageMapping firmware size 225840
[  +1.157852] [MTK-WIFI] register_set_p2p_mode_handler: (pid 1348) register set p2p mode handler c05067e0
[  +0.000025] [WMT-FUNC][W]wmt_func_wifi_on:WMT-FUNC: wmt call wlan probe ok
[  +0.000011] [WMT-CORE][W]wmt_core_dump_func_state:[AF FUNC ON]status(b:0 f:0 g:0 w:2 lpbk:2 coredump:0 wmt:2 stp:0)
[  +0.000083] [WMT-EXP][W]mtk_wcn_wmt_func_ctrl:OPID(3) type(3) ok
[  +0.000009] [MTK-WIFI] WIFI_write: WMT turn on WIFI success!
[  +0.001100] [MTK-WIFI] WIFI_write: Set wlan mode 0 --> 1
[  +0.000046] [MTK-WIFI] WIFI_close: WIFI_close: major 153 minor 0 (pid 1336)

have the same issue with 4.4 Kernel…maybe its any config-option in my debian stretch…

after closing hostapd the first time and starting it again, the AP is no more visible

used same kernel (4.4.107) on debian jessie works, can connect to the AP with same steps…now trying the same with 4.14

with 4.14 AP also works in jessie too :slight_smile: no idea, why it does not work in stretch…

but also on close hostapd and restart, ap is no more visible

ap0: AP-STA-CONNECTED b4:9d:0b:5f:22:e9
ap0: STA b4:9d:0b:5f:22:e9 RADIUS: starting accounting session 425F6BE3-00000000

included wifi-driver in main-branch…please do some tests

issues (same in 4.4.x):

  • kernel-oops if /system/etc/firmware/WMT_SOC.cfg not existing
  • hostapd is working the first-time, after killing it and restart, AP is not visible on clients (no error-Message on hostapd). tested on debian jessie (after upgrade to stretch it have same behavior after killing hostapd) => see https://github.com/frank-w/BPI-R2-4.14/issues/4

bluetooth is not working yet

currently i try to port the wifi-driver to 4.16

having problems to change

init_timer(timer);

to

timer_setup(timer,(void *)pTimer->timeoutHandler,0);

in drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/osal.c because with 4.15 init_timer is no more available and i have no idea where to put the timer->data, because “timer_list” does not have the data member anymore

any idea how to port that?

edit: here data is used before and from_timer function is used to get the pointer…but where is it set? https://patchwork.kernel.org/patch/9986119/

I’ve found an article on lwn https://lwn.net/Articles/735887/ the data seems to be no more needed because the parameter of callback also changed

dear frank-w a few days trying to activate the internal wifi on the forum manuals, but nothing happened.

Therefore, if possible, please, instead of kilometers of logs and patches, put a normally understood instruction or ready firmware with a working wifi.

as a basis I took your firmware bpi-r2_debian_stretch_4.14.13.img from 21.01.18 in it I tried different versions of the kernel

Steps are the same as with Kernel 4.4…

http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:wlan#internal

  1. wmt_loader
  2. stp_uart_launcher -p /etc/firmware &
  3. echo A >/dev/wmtWifi (activate AP-Mode)

if you have done this you should see an ap0-device in “ip a”. My image has no wpa-supplicant installed so you can skip this point in my wiki

Also a script is linked on that page to do the steps and if you modify last lines it can set ip-address and launch dnsmasq and hostapd

Hi. Just the quick success story report.

So I am using Frank’s image deb_stretch_4.14.13.img.gz from https://drive.google.com/drive/folders/1oP7jy1KrrIOifvImo2nQ59wx3_9hHkgk with manually updated kernel 4.14.27-bpi-r2-main (both compile on arm and cross-compile on pc seems to work) from Frank’s github.

For the moment the list of features I could get to work with it.

  • working Ethernet - both lan and wan
  • working intrenal wifi ap (g-mode, single ssid for now), hostapd restarting fine
  • working routing and nat (yet have not bothered to check if it is hardware or cpu-based)
  • working site to site ipsec (other sbc devices on opposite side e.g. opi prime/win, bpi r1 and even Cisco routers)
  • working dhcp server
  • working dns server
  • could move the image to emmc

My goals left for this hardware:

  • see if it is possible to actually make multi-ssid ap working
  • wifi faster than g mode
  • see if nat is performed with cpu and find if it might be performed with hardware
  • investigate gpio f-ty of this hardware, for one of my side-project

Strange questions left:

  • what is the purpose of the switch above sd card slot (at least on my hardware revision v1.2). It says emmc-sd but seems to influence nothing.
  • what is the difference between wlan0 and ap0 interfaces. If one is virtual bounded to another why do it for single ssid?
  • have anyone managed to use mini PCI-E interface? I’ve tried to insert 1u-n01 usb3.0 card into it but it seems not to see it (no output in dmesg, no leds on card or power on port).

Huge thanks to Frank W for his work and answers and to sinovoip for hardware.

You have wlan0 and ap0? wlan0 is for client-mode, ap0 for ap-mode

Pcie works with my kernel (i have mt7612-card running) but you need to include drivers for your card…

dear renard.

Can you post this image? I can not activate the wifi and enable the access point.

The image is linked to his post. You need to do same steps as with Kernel 4.4. Maybe i have the wifi.sh included to make the steps. Else you can use it from here: https://github.com/frank-w/BPI-R2-4.14/tree/main/utils/scripts

dear renard. Can you post this image? I can not activate the wifi and enable the access point.

Yes. Just be sure that you copy this script (wifi.sh) or write your own (which I did before have noticed this one), enable it (with systemctl or init.d) and make it the prerequisite for hostapd service. You may use the image straight from the link in my post (I updated the kernel because I needed some iptables and ipsec related modules, wifi worked with the included 4.14.13 kernel).

You have wlan0 and ap0? wlan0 is for client-mode, ap0 for ap-mode

Understood. Looks logical. Thanks.

Pcie works with my kernel (i have mt7612-card running) but you need to include drivers for your card…

Maybe my mPCIe to USB3.0 card is not working - I have nowhere else to test it. Yet it should be at least seen in dmesg if it is working and provide 5v on usb. Anyway - no big deal about it.

make sure you make not “echo 1” before “echo A”…echo 1 creates wlan0 for client-mode and “echo A” creates ap0 for ap-mode…please only one of these echoes :slight_smile:

No luck with multiple ssid. Seems that internal adapter does not support this mode. Tried both repository hostapd 2.4 and 2.6 compiled from sources.

nl80211: Create interface iftype 3 (AP)
Failed to create interface ap0_0: -95 (Operation not supported)
Failed to add BSS (BSSID=02:08:22:ac:b6:01)
hostapd.conf
interface=ap0
bssid=02:08:22:ac:b6:00
driver=nl80211
hw_mode=g
channel=2
#ignore_broadcast_ssid=1
#ssid for real root interface seems to be required
ssid=root-ssid

bss=ap0_0
ssid=ssid00
bridge=br0
wmm_enabled=1
wpa=2
preamble=1
wpa_passphrase=pass0000
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

bss=ap0_1
ssid=ssid01
wmm_enabled=1
wpa=2
preamble=1
wpa_passphrase=pass0001
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
full log
mxbpir201 hostapd # hostapd -dd /etc/hostapd/hostapd_ap0.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd_ap0.conf
ctrl_interface_group=0
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=1
nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=6
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface ap0 in phy phy1
nl80211: Set mode ifindex 12 iftype 3 (AP)
nl80211: Setup AP(ap0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x4e5740 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x4e5740 match=
nl80211: Enable Probe Request reporting nl_preq=0x4e56f8
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x4e56f8 match=
nl80211: QCA vendor test command returned -95 (Operation not supported)
nl80211: Interface ap0 is in bridge br0
nl80211: Add own interface ifindex 8
nl80211: if_indices[16]: 8
nl80211: Add own interface ifindex 12
nl80211: if_indices[16]: 8 12
phy: phy1
BSS count 3, BSSID mask ff:ff:ff:ff:ff:fc (2 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=20 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=12 freq=2467 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=13 freq=2472 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 2  Frequency: 2417 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2417 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2417 MHz, cf2=0 MHz)
  * freq=2417
  * vht_enabled=0
  * ht_enabled=0
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x4e29e0 (ap0), first=1)
ap0: Flushing old station entries
nl80211: flush -> DEL_STATION ap0 (all)
ap0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface ap0 with hwaddr 02:08:22:ac:b6:00 and ssid "root-ssid"
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=60): 80 00 00 00 ff ff ff ff ff ff 02 08 22 ac b6 00 02 08 22 ac b6 00 00 00 00 00 00 00 00 00 00 00 64 00 21 04 00 09 72 6f 6f 74 2d 73 73 69 64 01 08 82 84 8b 96 0c 12 18 24 03 01 02
nl80211: Beacon tail - hexdump(len=15): 2a 01 00 32 04 30 48 60 6c 7f 04 00 00 00 02
nl80211: ifindex=12
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=9):
     72 6f 6f 74 2d 73 73 69 64                        root-ssid       
  * beacon_int=100
nl80211: hidden SSID not in use
nl80211: privacy=0
nl80211: auth_algs=0x3
nl80211: wpa_version=0x0
nl80211: key_mgmt_suites=0x4
nl80211: pairwise_ciphers=0x1
nl80211: group_cipher=0x1
nl80211: beacon_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: proberesp_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: assocresp_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: Set ap0 operstate 0->1 (UP)
netlink: Operstate: ifindex=12 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
hostapd_setup_bss(hapd=0x4e3040 (ap0_0), first=0)
nl80211: Create interface iftype 3 (AP)
Failed to create interface ap0_0: -95 (Operation not supported)
Failed to add BSS (BSSID=02:08:22:ac:b6:01)
ap0: Flushing old station entries
nl80211: flush -> DEL_STATION ap0 (all)
ap0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wpa_driver_nl80211_set_key: ifindex=0 (ap0_0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-19 No such device)
Failed to clear default encryption keys (ifname=ap0_0 keyidx=0)
wpa_driver_nl80211_set_key: ifindex=0 (ap0_0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-19 No such device)
Failed to clear default encryption keys (ifname=ap0_0 keyidx=1)
wpa_driver_nl80211_set_key: ifindex=0 (ap0_0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-19 No such device)
Failed to clear default encryption keys (ifname=ap0_0 keyidx=2)
wpa_driver_nl80211_set_key: ifindex=0 (ap0_0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-19 No such device)
Failed to clear default encryption keys (ifname=ap0_0 keyidx=3)
hostapd_free_hapd_data(ap0_0)
ap0: Flushing old station entries
nl80211: flush -> DEL_STATION ap0 (all)
ap0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
hostapd_free_hapd_data(ap0)
Interface initialization failed
ap0: interface state UNINITIALIZED->DISABLED
ap0: AP-DISABLED 
ap0: Unable to setup interface.
hostapd_interface_deinit_free(0x4e1cd8)
hostapd_interface_deinit_free: num_bss=3 conf->num_bss=3
hostapd_interface_deinit(0x4e1cd8)
ap0: interface state DISABLED->DISABLED
hostapd_bss_deinit: deinit bss ap0_1
ap0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)
ap0: AP-DISABLED 
hostapd_cleanup(hapd=0x4e5d28 (ap0_1))
hostapd_free_hapd_data: Interface ap0_1 wasn't started
hostapd_bss_deinit: deinit bss ap0_0
ap0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)
ap0: AP-DISABLED 
hostapd_cleanup(hapd=0x4e3040 (ap0_0))
hostapd_free_hapd_data: Interface ap0_0 wasn't started
hostapd_bss_deinit: deinit bss ap0
ap0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION ap0 ff:ff:ff:ff:ff:ff --> 0 (Success)
ap0: AP-DISABLED 
hostapd_cleanup(hapd=0x4e29e0 (ap0))
hostapd_free_hapd_data: Interface ap0 wasn't started
hostapd_interface_deinit_free: driver=0x4df5e0 drv_priv=0x4e38e8 -> hapd_deinit
nl80211: deinit ifname=ap0 disabled_11b_rates=0
nl80211: Disable Probe Request reporting nl_preq=0x88c6de71
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=12)
netlink: Operstate: ifindex=12 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Unsubscribe mgmt frames handle 0x88c6dfc9 (deinit)
hostapd_interface_free(0x4e1cd8)
hostapd_interface_free: free hapd 0x4e29e0
hostapd_interface_free: free hapd 0x4e3040
hostapd_interface_free: free hapd 0x4e5d28
hostapd_cleanup_iface(0x4e1cd8)
hostapd_cleanup_iface_partial(0x4e1cd8)
hostapd_cleanup_iface: free iface=0x4e1cd8

Frank, do you have mt7612 like this? (yes, already found on your wiki)

Does it work in ac/n mode and are you happy with stability and coverage?

Does it support multi ssid? According to this wiki it seems that iw list | grep 'interface combinations'should answer. With our internal I get interface combinations are not supported.

At least can it work together with internal providing 2 ssid’s (e.g. 2 hostapd processes)?

this card works for 5ghz (my Intention to use in combination with internal) or 2.4 ghz. No dual ap. I have not tried stability yet

I’m currently not @ home…tomorrow evening i give you the output of iwlist

Could you please give the output of

iw list | grep 'interface combinations'

for mt7612.

I am ready to buy it, but want to buy one that is capable of holding several ssid. Thanks in advance.

I’ve found that iw- log created before: Need help porting mt76-driver to R2-Kernel

valid interface combinations:
	 * #{ IBSS } <= 1, #{ managed, AP } <= 8,
	   total <= 8, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

Maybe this helps, else you have to wait till today evening (cest)

1 Like

Yep. Thanks again. According to guide it should hold up to 8 ssid’s.

But this does not mean that it can work in both bands (2.4+5 ghz) simultanously

I’ve found the information, that it should be impossible. Moreover you even can not bind different ssid’s to different channels.