2.4Ghz and 5.6Ghz Wifi Working fine


(gary) #21

So nice of you! Thanks a lot for your information, I wil try this later.


(Frank W.) #22

Thank you bitmaster. Are you working in master or wifi-debug branch? Line seems to match in master (below declaration of rStationInfo)

is there a module to be enabled? tried to boot kernel (debian jessie) with that line added, called the echo-line but got no ap0-device (ifconfig)

how can i test without using ubuntu-image?


#23

I am actually still on the Wifi_debug_branch and I still run wmt_loader and stp_launcher manually, which are copied from the ubuntu image. Then /dev/wmtWifi appears and I can echo ‘A’ to it. In master the /dev/wmtWifi device is automatically available, right? I have yet to test the latest master on my system.

Can you check if this (or similar) appears in your kernel log when you echo ‘A’:

[ 1015.666910] [MTK-WIFI] WIFI_open: WIFI_open: major 153 minor 0 (pid 8160)
[ 1015.684243] [MTK-WIFI] WIFI_write: WIFI_write A
[ 1015.731654] [WMT-FUNC][W]wmt_func_wifi_on:WMT-FUNC: wmt wlan func on before wlan probe
[ 1016.804540] [MTK-WIFI] register_set_p2p_mode_handler: (pid 8184) register set p2p mode handler c071f534
[ 1016.824227] [WMT-FUNC][W]wmt_func_wifi_on:WMT-FUNC: wmt call wlan probe ok
[ 1016.841654] [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)
[ 1016.864324] [WMT-EXP][W]mtk_wcn_wmt_func_ctrl:OPID(3) type(3) ok
[ 1016.881505] [MTK-WIFI] WIFI_write: WMT turn on WIFI success!
[ 1016.898993] [MTK-WIFI] WIFI_write: Set wlan mode 0 --> 1
[ 1016.914772] [MTK-WIFI] WIFI_close: WIFI_close: major 153 minor 0 (pid 8160)

For the fix in drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c on line 1078: I put it directly after the declaration of rStationInfo.


(Frank W.) #24

can you please upload these 2 applications?

Oct 19 11:35:15 localhost kernel: [    0.000000] [WMT-CONSYS-HW][W]reserve_memory_consys_fn: name: consys-reserve-memory, base: 0xffe00000, size: 0x100000                     
Oct 19 11:35:15 localhost kernel: [    5.098244] [WMT-DETECT][I]wmt_detect_driver_init:driver(major 154) installed success                                                     
Oct 19 11:36:37 bpi-r2 kernel: [    0.000000] [WMT-CONSYS-HW][W]reserve_memory_consys_fn: name: consys-reserve-memory, base: 0xffe00000, size: 0x100000                        
Oct 19 11:36:37 bpi-r2 kernel: [    5.098234] [WMT-DETECT][I]wmt_detect_driver_init:driver(major 154) installed success                                                        

these are the only WMT-Mesages in kern.log (using master branch), if i echo A to the wmt-dev, i have a simple file named that, not a device :wink:


#25

I use these applications:

And (step 5 of) these instructions:


(Frank W.) #26

thank you…seems that master branch does not work…trying out wifi_debug

[12:52] root@bpi-r2:bin# wmt_loader                                                                                                                                            
init combo device                                                                                                                                                              
Opened combo device                                                                                                                                                            
get device id : 30243                                                                                                                                                          
set device id : 30243                                                                                                                                                          
do module init: 30243                                                                                                                                                          
failed to init module

[12:53] root@bpi-r2:bin# stp_uart_launcher -p /etc/firmware &                                                                                                                  
[1] 1001                                                                                                                                                                       
[13:03] root@bpi-r2:bin# open device node succeed.(Node:/dev/stpwmt, fd:3)                                                                                                     
chip id is 0x7623                                                                                                                                                              
chiId:0x7623, setting to property((null))                                                                                                                                      
chiId:0x7623                                                                                                                                                                   
run SOC chip flow                                                                                                                                                              
create pwr on thread ok                                                                                                                                                        
enter power on connsys flowpatch name pre-fix:ROMv2_lm_patch                                                                                                                   
fwVersion:0x8a00                                                                                                                                                               
/etc/firmware/ROMv2_lm_patch_1_0_hdr.bin                                                                                                                                       
fw Ver in patch: 0x8a00                                                                                                                                                        
read patch info:0x22,0x00,0x06,0x00                                                                                                                                            
gpatchnum = [2]                                                                                                                                                                
gdwonseq = [2]                                                                                                                                                                 
/etc/firmware/ROMv2_lm_patch_1_1_hdr.bin                                                                                                                                       
fw Ver in patch: 0x8a00                                                                                                                                                        
read patch info:0x21,0x00,0x0e,0xf0                                                                                                                                            
gdwonseq = [1]                                                                                                                                                                 
cmd(srh_patch) resp(ok)                                                                                                                                                        
                                                                                                                                                                               
[13:03] root@bpi-r2:bin# echo 1 >/dev/wmtWifi                                                                                                                                  
[13:04] root@bpi-r2:bin# ifconfig                                                                                                                                              
eth0      Link encap:Ethernet  HWaddr 08:00:00:00:00:00                                                                                                                        
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0                                                                                                      
          inet6 addr: fe80::a00:ff:fe00:0/64 Scope:Link                                                                                                                        
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                                                                                   
          RX packets:5024 errors:0 dropped:2793 overruns:0 frame:0                                                                                                             
          TX packets:996 errors:0 dropped:0 overruns:0 carrier:0                                                                                                               
          collisions:0 txqueuelen:1000                                                                                                                                         
          RX bytes:1043084 (1018.6 KiB)  TX bytes:97391 (95.1 KiB)                                                                                                             
          Interrupt:70                                                                                                                                                         
                                                                                                                                                                               
eth1      Link encap:Ethernet  HWaddr 08:00:00:00:00:01                                                                                                                        
          inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0                                                                                                     
          inet6 addr: fe80::a00:ff:fe00:1/64 Scope:Link                                                                                                                        
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                                                                                   
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                                                                   
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0                                                                                                                
          collisions:0 txqueuelen:1000                                                                                                                                         
          RX bytes:0 (0.0 B)  TX bytes:1272 (1.2 KiB)                                                                                                                          
          Interrupt:70                                                                                                                                                         
                                                                                                                                                                               
lo        Link encap:Local Loopback                                                                                                                                            
          inet addr:127.0.0.1  Mask:255.0.0.0                                                                                                                                  
          inet6 addr: ::1/128 Scope:Host                                                                                                                                       
          UP LOOPBACK RUNNING  MTU:65536  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:1                                                                                                                                            
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                                                                                               
                                                                                                                                                                               
[13:04] root@bpi-r2:bin# echo A >/dev/wmtWifi                                                                                                                                  
[13:04] root@bpi-r2:bin# ifconfig                                                                                                                                              
eth0      Link encap:Ethernet  HWaddr 08:00:00:00:00:00                                                                                                                        
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0                                                                                                      
          inet6 addr: fe80::a00:ff:fe00:0/64 Scope:Link                                                                                                                        
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                                                                                   
          RX packets:5034 errors:0 dropped:2799 overruns:0 frame:0                                                                                                             
          TX packets:996 errors:0 dropped:0 overruns:0 carrier:0                                                                                                               
          collisions:0 txqueuelen:1000                                                                                                                                         
          RX bytes:1043928 (1019.4 KiB)  TX bytes:97391 (95.1 KiB)                                                                                                             
          Interrupt:70                                                                                                                                                         
                                                                                                                                                                               
eth1      Link encap:Ethernet  HWaddr 08:00:00:00:00:01                                                                                                                        
          inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0                                                                                                     
          inet6 addr: fe80::a00:ff:fe00:1/64 Scope:Link                                                                                                                        
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                                                                                   
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                                                                   
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0                                                                                                                
          collisions:0 txqueuelen:1000                                                                                                                                         
          RX bytes:0 (0.0 B)  TX bytes:1272 (1.2 KiB)                                                                                                                          
          Interrupt:70                                                                                                                                                         
                                                                                                                                                                               
lo        Link encap:Local Loopback                                                                                                                                            
          inet addr:127.0.0.1  Mask:255.0.0.0                                                                                                                                  
          inet6 addr: ::1/128 Scope:Host                                                                                                                                       
          UP LOOPBACK RUNNING  MTU:65536  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:1                                                                                                                                            
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                                                                                               
                                                                                                                                                                               
[13:04] root@bpi-r2:bin#

still no ap-interface…


#27

No, wait, i get that message as well. It might complain about the bluetooth part of the driver. Just ignore it and continue with stp_uart_loader.


(Frank W.) #28
[14:13] root@bpi-r2:~# wmt_loader                                                                                                                                              
init combo device                                                                                                                                                              
Opened combo device                                                                                                                                                            
get device id : 30243                                                                                                                                                          
set device id : 30243                                                                                                                                                          
do module init: 30243                                                                                                                                                          
failed to init module                                                                                                                                                          
[14:14] root@bpi-r2:~# stp_uart_launcher -p /etc/firmware &                                                                                                                    
[1] 726                                                                                                                                                                        
open device node succeed.(Node:/dev/stpwmt, fd:3)                                                                                                                              
chip id is 0x7623                                                                                                                                                              
chiId:0x7623, setting to property((null))                                                                                                                                      
chiId:0x7623                                                                                                                                                                   
run SOC chip flow                                                                                                                                                              
create pwr on thread ok                                                                                                                                                        
[14:14] root@bpi-r2:~# enter power on connsys flowpatch name pre-fix:ROMv2_lm_patch                                                                                            
fwVersion:0x8a00                                                                                                                                                               
/etc/firmware/ROMv2_lm_patch_1_0_hdr.bin                                                                                                                                       
fw Ver in patch: 0x8a00                                                                                                                                                        
read patch info:0x22,0x00,0x06,0x00                                                                                                                                            
gpatchnum = [2]                                                                                                                                                                
gdwonseq = [2]                                                                                                                                                                 
/etc/firmware/ROMv2_lm_patch_1_1_hdr.bin                                                                                                                                       
fw Ver in patch: 0x8a00                                                                                                                                                        
read patch info:0x21,0x00,0x0e,0xf0                                                                                                                                            
gdwonseq = [1]                                                                                                                                                                 
cmd(srh_patch) resp(ok)                                                                                                                                                        
                                                                                                                                                                               
[14:14] root@bpi-r2:~# echo A >/dev/wmtWifi                          
[14:14] root@bpi-r2:~# ifconfig -a|grep Link                                                                                                                                   
ap0       Link encap:Ethernet  HWaddr 02:08:22:68:39:ff                                                                                                                        
bond0     Link encap:Ethernet  HWaddr e2:7c:e0:71:31:c1                                                                                                                        
eth0      Link encap:Ethernet  HWaddr 08:00:00:00:00:00                                                                                                                        
          inet6 addr: fe80::a00:ff:fe00:0/64 Scope:Link                                                                                                                        
eth1      Link encap:Ethernet  HWaddr 08:00:00:00:00:01                                                                                                                        
          inet6 addr: fe80::a00:ff:fe00:1/64 Scope:Link                                                                                                                        
lo        Link encap:Local Loopback                                                                                                                                            
sit0      Link encap:IPv6-in-IPv4                                                                                                                                              
tunl0     Link encap:IPIP Tunnel  HWaddr                                                                                                                                       
wlan1     Link encap:Ethernet  HWaddr 00:08:22:68:39:ff                                                                                                                        
[14:15] root@bpi-r2:~# 

Wifi_debug_branch, so thats the proof not all is merged :slight_smile:


#29

In master you run:

echo 1 >/dev/wmtWifi 
echo A >/dev/wmtWifi 

In Wifi_debug_branch you run only:

echo A >/dev/wmtWifi

Supposing you used echo 1 >/dev/wmtWifi , you have to first run echo 0 >/dev/wmtWifi before echo A >/dev/wmtWifi


#30

Could you please check if the memset fix works for you as well :)?


(Frank W.) #31

using master branch…with echo 1 before, dev ap0 (and wlan1) are listed…next step build a valid hostapd.conf

is somewhere any? else i copy that from my router…which driver is used (nl80211?)

using nmcli-commands above leads in last step to

Error: no device found for connection 'wlanAP'.

first step created that name:

Connection 'wlanAP' (3c9ed669-83f9-4133-b20c-dd34f053fe9f) successfully added.

i’ve added ap0 to /etc/interfaces with static ip:

auto ap0
iface ap0 inet static
#  hwaddress ether 08:00:00:00:00:00
  address 192.168.10.1
  netmask 255.255.255.0
#  gateway 192.168.0.5

and bring it up => works so far

ok…step-by-step:

[15:41] root@bpi-r2:~# wmt_loader                                                                                                                                              
init combo device                                                                                                                                                              
Opened combo device                                                                                                                                                            
get device id : 30243                                                                                                                                                          
set device id : 30243                                                                                                                                                          
do module init: 30243                                                                                                                                                          
failed to init module                                                                                                                                                          
[15:41] root@bpi-r2:~# stp_uart_launcher -p /etc/firmware &                                                                                                                    
[1] 799                                                                                                                                                                        
[15:42] root@bpi-r2:~# open device node succeed.(Node:/dev/stpwmt, fd:3)                                                                                                       
chip id is 0x7623                                                                                                                                                              
chiId:0x7623, setting to property((null))                                                                                                                                      
chiId:0x7623                                                                                                                                                                   
run SOC chip flow                                                                                                                                                              
create pwr on thread ok                                                                                                                                                        
enter power on connsys flowpatch name pre-fix:ROMv2_lm_patch                                                                                                                   
fwVersion:0x8a00                                                                                                                                                               
/etc/firmware/ROMv2_lm_patch_1_0_hdr.bin                                                                                                                                       
fw Ver in patch: 0x8a00                                                                                                                                                        
read patch info:0x22,0x00,0x06,0x00                                                                                                                                            
gpatchnum = [2]                                                                                                                                                                
gdwonseq = [2]                                                                                                                                                                 
/etc/firmware/ROMv2_lm_patch_1_1_hdr.bin                                                                                                                                       
fw Ver in patch: 0x8a00                                                                                                                                                        
read patch info:0x21,0x00,0x0e,0xf0                                                                                                                                            
gdwonseq = [1]                                                                                                                                                                 
cmd(srh_patch) resp(ok)                                                                                                                                                        
                                                                                                                                                                               
[15:42] root@bpi-r2:~# echo 1 >/dev/wmtWifi                                                                                                                                    
[15:42] root@bpi-r2:~# echo A >/dev/wmtWifi                                                                                                                                    
-bash: echo: write error: Input/output error

disabled my ap0-config, hostapd and dnsmasq, but on “echo A” i got the input/output error, also after reboot…

every call adds a new wlan-device to /etc/udev/rules.d/70-persistent-net.rules

cleaned that and make now a powerdown…does the trick…now i got ap0 again

but hostapd comes not up…

ip address add 192.168.10.1/24 dev ap0 ip link set dev ap0 up service dnsmasq start

[16:32] root@bpi-r2:~# hostapd -dd /etc/hostapd/hostapd.conf 
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
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 18 iftype 3 (AP)
nl80211: Setup AP(ap0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x908b8 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x908b8 match=
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Could not configure driver mode
nl80211: deinit ifname=ap0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=18)
netlink: Operstate: ifindex=18 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 18 iftype 2 (STATION)
nl80211: Teardown AP(ap0) - device_ap_sme=1 use_monitor=0
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x8f2d8)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x8f2d8)
ap0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss ap0
ap0: AP-DISABLED

hostapd.conf:

interface=ap0
driver=nl80211
ssid=r2_AP
hw_mode=g
channel=1

ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

(gary) #32

@BitMaster @frank-w

I’ve test the AP mode, find it works fine, please follow my steps to enable it.

Firstly please install Ubuntu 16.04 image, and then:

  1. Remove pkg wpasupplicant(apt-get remove wpa_supplicant) if you’re using Ubuntu 16.04 image

  2. Comment out echo 1 > ${{WIFI_DEV} in /etc/init.d/wifi_enable if you’re using Ubuntu 16.04 image

  3. Reboot

  4. Run command “echo A >/dev/wmtWifi”

  5. Run comand : hostapd -dd -C /etc/hostapd/hostapd.conf

    Below is an example of hostapd.conf:

 hw_mode=g
 interface=ap0
 driver=nl80211
 channel=1
 auth_algs=1
 ssid=test

Also the patch @BitMaster provided is delivered to github. Thanks a lot, BitMaster.


BPI-R2 new image : ubuntu 16.04 V1.2.1 BT and WIFI AP mode are working fine 2017-11-27
BPI-R2 AP Mode Setup on New Ubuntu Image
BPI-R2 New Image Release : Ubuntu 16.04 V1.3 2018-3-30
#33

I think enfide has a good point that you shouldn’t run ‘echo 1’ before ‘echo A’ (at least not without running ‘echo 0’ first). Quite possibly the WiFi driver experiences it as “putting it in reverse while driving 120kmh”.

Also, I didn’t bring ap0 up before starting hostapd (so: leave it down after ‘echo A’). If you then start hostapd and it still fails, you should be able to find more details in the kernel log. After hostapd is started, you can assign an IP address.

Maybe it should work by bringing the device up before starting hostapd, but as a matter of test I suggest you try it like described above.


(Frank W.) #34

seems my problem is the name of wlanx

everytime i try, the wlan-interface gets a new mac-adress and then its added to net-persistent rules.

if the device is named wlan0, “echo A” creates successfully ap0, if the wlan-device is wlan1-x, last step fails

current workaround is to remove entries from /etc/udev/rules.d/70-persistent-net.rules, restart udev (service udev restart) shutdown the driver (echo 0), on (echo 1) and Create AP (echo A)

but the hostapd comes not up…maybe something is different to ubuntu

nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)

driver seems to crash again ;( strange…uname says kernel is compiled today morning (but file in SD-Dir mtime is evening)…make full clean

after that ap0 and wlan0 seems stable, but i got a kernel oops an hostapd still comes not up ;(


(gary) #35

Can you please share us the kernel log with oops information?


#36

shutdown the driver (echo 0), on (echo 1) and Create AP (echo A)

Why are you still executing “echo 1” before “echo A”? “echo A” will create AP and wlan0 interface… I and BitMaster have already pointed out that you don’t have to exec "echo 1"


(Frank W.) #37

you’ve wrote, on master branch with echo 1 and on wifi without…

ok, i try without echo 1, also checking if neccessary modules are loaded (e.g. mac802111)

got it working, have found out, that i had not removed wpasupplicant and removed wpa2-settings in hostapd.conf

[11:14] root@bpi-r2:~# hostapd -dd /etc/hostapd/hostapd.conf 
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
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 8 iftype 3 (AP)
nl80211: Setup AP(ap0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x908d8 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x908d8 match=
nl80211: Enable Probe Request reporting nl_preq=0x904c8
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x904c8 match=
nl80211: Add own interface ifindex 8
nl80211: if_indices[16]: 8
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: 1  Frequency: 2412 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2412 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2412 MHz, cf2=0 MHz)
  * freq=2412
  * 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=0x8fe60 (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=8 (ap0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=8 (ap0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=8 (ap0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=8 (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:1c:ef:fe and ssid "r2_AP"
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=56): 80 00 00 00 ff ff ff ff ff ff 02 08 22 1c ef fe 02 08 22 1c ef fe 00 00 00 00 00 00 00 00 00 00 64 00 01 04 00 05 72 32 5f 41 50 01 08 82 84 8b 96 0c 12 18 24 03 01 01
nl80211: Beacon tail - hexdump(len=9): 2a 01 04 32 04 30 48 60 6c
nl80211: ifindex=8
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=5):
     72 32 5f 41 50                                    r2_AP           
  * 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=8 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=8 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=8 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
RTM_NEWLINK: ifi_index=8 ifname=ap0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])


nl80211: Event message available
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for ap0
nl80211: New station b4:9d:0b:5f:22:e9
nl80211: Assoc Req IEs - hexdump(len=60): 00 05 72 32 5f 41 50 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c 2d 1a 2c 01 03 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 07 00 50 f2 02 00 01 00
ap0: Event ASSOC (0) received
ap0: STA b4:9d:0b:5f:22:e9 IEEE 802.11: associated
STA did not include WPS/RSN/WPA IE in (Re)AssocReq
  New STA
ap_sta_add: register ap_handle_timer timeout for b4:9d:0b:5f:22:e9 (300 seconds - ap_max_inactivity)
nl80211: Set STA flags - ifname=ap0 addr=b4:9d:0b:5f:22:e9 total_flags=0x0 flags_or=0x0 flags_and=0xfffffff1 authorized=0
ap0: AP-STA-CONNECTED b4:9d:0b:5f:22:e9
ap0: STA b4:9d:0b:5f:22:e9 RADIUS: starting accounting session AC8AF284-00000000
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
hostapd_new_assoc_sta: reschedule ap_handle_timer timeout for b4:9d:0b:5f:22:e9 (300 seconds - ap_max_inactivity)
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for ap0
nl80211: Delete station b4:9d:0b:5f:22:e9
ap0: Event DISASSOC (1) received
ap0: STA b4:9d:0b:5f:22:e9 IEEE 802.11: disassociated
ap0: AP-STA-DISCONNECTED b4:9d:0b:5f:22:e9
nl80211: sta_remove -> DEL_STATION ap0 b4:9d:0b:5f:22:e9 --> 0 (Success)
ap_free_sta: cancel ap_handle_timer for b4:9d:0b:5f:22:e9

i see ssid from wlan-client, can connect (to ip-registration)

if i now set ip to ap0 and start dnsmasq, ap is no more visible…but no crash


(gary) #38

Do you mean the AP mode is working fine, but the DHCP can’t work for ap0, right?


(Frank W.) #39

I don’t know,which step removes ssid from Client…have to do more testing. But with restartung hostapd i can’t get it back (also without ip/dnsmasq)

connected to AP, set client IP static, set IP of ap0 => can ping ap0-adress from Client

so static seems to work

started dnsmasq and reconnected with dhcp enabled, got IP and can ping again


(Frank W.) #40

main problem, i have is that the wifi-device has no fixed MAC-address, so after each reboot i got a new entry in /etc/udev/rules.d/70-persistent-net.rules and the wlan-device-number is increasing…can you fix this too?