I’m looking for decision to start WiFi AP on hotplug WiFi USB adapter.
Main problem is to add wlan interface to existing bridge when USB adapter plugged.
I’ve configuration of wlan interface in ifcfg-wlan0 file (the name of interface is changed by udev rule, it’s ok)
After reboot (wicked mode) the br0 is misconfigured (the IP is not set) and consist [FONT=monospace][FONT=monospace][FONT=monospace][FONT=monospace][FONT=monospace][FONT=monospace]eth_GRAY interface only. I think the adding wlan0 to br0 ending with an error.[/FONT][/FONT]
[/FONT][/FONT][/FONT][/FONT]
[FONT=monospace][FONT=monospace][FONT=monospace]brctl show[/FONT][/FONT][/FONT]
[FONT=monospace][FONT=monospace][FONT=monospace]bridge name bridge id STP enabled interfaces
br0 8000.5adeebd60847 no eth_GRAY [/FONT][/FONT][/FONT]
[FONT=monospace][FONT=monospace]
I know, to add wifi interface to bridge it must be configured by a command:[/FONT][/FONT]
iw dev wlan0 set 4addr on
How this command can be added to automatic configuration?
Next, I’ve plan to start wpa_supplicant for AP mode.
Well, is it wrong way? Do you know more simple decision?
You got it backwards. First you must create AP mode interface which then can be added to bridge.
I know, to add wifi interface to bridge it must be configured by a command:
iw dev wlan0 set 4addr on
This is only if you want to do WDS (i.e. forward packets between different AP). AP by definition forwards packets between WiFi and Ethernet so does not need any special settings for this. See
While setting 4addr on client side allows it to be added to bridge, it will not work unless your AP also supports it.
Do you know more simple decision?
Usually AP mode is managed by hostapd which can be configured either in bidged or in NAT mode and adds interface to bridge itself. NetworkManager can create AP, you may be interested in this thread
[FONT=monospace]
After reboot the WLAN interface is not added to bridge:
[/FONT]
**root@BELKA:/etc/sysconfig/network# **brctl show
bridge name bridge id STP enabled interfaces
br0 8000.5adeebd60847 no eth_GRAY
But I can add it to bridge:
[FONT=monospace]**root@BELKA:~# **brctl addif br0 wlan_nick0
can't add wlan_nick0 to bridge br0: Operation not supported
**root@BELKA:~# **iw dev wlan_nick0 set 4addr on
**root@BELKA:~# **brctl addif br0 wlan_nick0
**root@BELKA:~# **brctl show
bridge name bridge id STP enabled interfaces
br0 8000.5adeebd60847 no eth_GRAY
wlan_nick0
**root@BELKA:~# **
[/FONT]
I think, ‘[FONT=monospace]iw dev wlan_nick0 set 4addr on’ is necessary. Else, how it possible to add wifi interface to bridge? [/FONT]