Jump to content

Bridged AP does not work on BananaPiPro (Armbian_community_26.8.0-trunk.170_Bananapipro_trixie_current_6.18.35_minimal)


Recommended Posts

Posted

I tried to build an bridged AP so that I can reach the Internet from a WiFi net spawned from the BananaPiPro. By this I followed the procedure from armbian-config (config.network.sh).

 

After install the AP is shown in the login screen:

 

WiFi AP:      SSID: (BPi), channel 7 (2442 MHz), width: 20 MHz, center1: 2442 MHz

 

When I try to connect from my mobile phone it either says "connecting without Internet".

The output in syslog is then:

 

026-07-06T12:35:02.645970+02:00 bananapipro hostapd: wlan0: STA 22:50:7b:ac:e3:2e IEEE 802.11: associated
2026-07-06T12:35:02.690671+02:00 bananapipro hostapd: wlan0: STA 22:50:7b:ac:e3:2e RADIUS: starting accounting session 500A81EDD1715454
2026-07-06T12:35:02.691497+02:00 bananapipro hostapd: wlan0: STA 22:50:7b:ac:e3:2e WPA: pairwise key handshake completed (RSN)

 

Ort otherwise the phone just says "cannot connect".

 

My netplan file is as follows:

 

network:
  version: 2
  renderer: networkd
  ethernets:
    end0:
      dhcp4: false
      dhcp6: false
      macaddress: "02:cd:08:83:3c:f3"
    wlan0:
      dhcp4: false
      dhcp6: false
  bridges:
    br0:
      addresses:
      - "192.168.178.29/24"
      nameservers:
        addresses:
        - 9.9.9.9
        - 1.1.1.1
      interfaces:
      - wlan0
      - end0
      routes:
      - metric: 200
        to: default
        via: "192.168.178.1"

 

The hostapd.conf is:

 

interface=wlan0
driver=nl80211
ssid=BPi
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=secret
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

ieee80211n=1
ht_capab=[DSSS_CK-40][HT20+]

preamble=1

bridge=br0

 

The output of network list is:

 

root@bananapipro:/etc/hostapd# networkctl list
IDX LINK  TYPE     OPERATIONAL SETUP     
  1 lo    loopback carrier     unmanaged
  2 end0  ether    enslaved    configured
  3 br0   bridge   routable    configured
  4 wlan0 wlan     enslaved    failed   

 

Does anybody have an idea where to look further for a solution? As I have an AP running on my other BananaPiPro (Bookworm CLI / Networkmanager, manual config, not bridged) it cannot be a complete HW limitation, I think.

Posted (edited)

I had a quick look at the script, but it is too complex for me to see what could be wrong. Also there is netplan layer in between that I am not familiar with anymore. Maybe you can look at what is generated in terms of systemd-networkd files (e.g. in /etc/systemd/network/ ). And also use commands like ip route etc to see the actual state.

 

Edited by eselarm
Posted

Well, netplan is the advertised / provided solution for Armbian. So when you look into /etc/systemd/network you find a readme from armbian pointing you to /etc/netplan. I think what netplan does is generating the following files for systemd-networkd under /run/systemd/network:

 

10-netplan-end0.network:

[Match]
Name=end0

[Link]
MACAddress=02:cd:08:83:3c:f3

[Network]
LinkLocalAddressing=no
Bridge=br0

 

10-netplan-wlan0.network

[Match]
Name=wlan0

[Network]
LinkLocalAddressing=no
Bridge=br0

 

10-netplan-br0.network 

[Match]
Name=br0

[Network]
LinkLocalAddressing=ipv6
Address=192.168.178.29/24
DNS=9.9.9.9
DNS=1.1.1.1
ConfigureWithoutCarrier=yes

[Route]
Destination=0.0.0.0/0
Gateway=192.168.178.1
Metric=200

 

10-netplan-br0.netdev 

[NetDev]
Name=br0
Kind=bridge

 

And this is the ip output:

 

ip route:

default via 192.168.178.1 dev br0 proto static metric 200 
192.168.178.0/24 dev br0 proto kernel scope link src 192.168.178.29 

ip link:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 02:cd:08:83:3c:f3 brd ff:ff:ff:ff:ff:ff
    altname enx02cd08833cf3
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether a2:67:ed:53:cb:f1 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
    link/ether e0:76:d0:03:53:bc brd ff:ff:ff:ff:ff:ff
    altname wlxe076d00353bc

 

 

Posted (edited)

I made a comparable setup on a raspberrypi3b+ and I see in the journal:

Jul 07 17:37:01 raspi7 systemd-networkd[292]: wlan0: Configuring with /etc/systemd/network/10-wlan0.network.
Jul 07 17:37:01 raspi7 systemd-networkd[292]: wlan0: Failed to set master interface: Device does not allow enslaving to a bridge. Operation not supported
Jul 07 17:37:01 raspi7 systemd-networkd[292]: wlan0: Failed

It worked many years ago when it was buster or bullseye and using ifupdown interfaces network setup. Also ported that to NetworkManager before Bookworm and that works, also in Trixie.

 

This is my first manual setup, as it is Debian Trixie based, I can avoid the use of netplan.io. I remember I have seen this issue somewhere, It might be a newer release systemd issue. But have not searched internet now, will see later why this is.

Edited by eselarm
Posted

Problem seems to be that the wlan0 somehow must have a carrier, else it cannot be added to the bridge. A quick hack in a running system, done via serial terminal is:

root@raspi7:/etc/systemd/network# systemctl stop systemd-networkd ; systemctl restart hostapd ; systemctl start systemd-networkd

Then:
root@raspi7:/etc/systemd/network# networkctl  
IDX LINK  TYPE     OPERATIONAL SETUP      
 1 lo    loopback carrier     unmanaged
 2 eth0  ether    enslaved    configured
 3 br0   bridge   routable    configured
 4 wlan0 wlan     enslaved    configured

I did some more testing and also with wlan0 stated as fail, I could browse the internet on my smarthone via the AP.

 

Note that in the meantime, I also simplified the 10-* files a bit, added a MACAddress same as eth0 for br0, so my routers issues same IP address when DHCP, but that is not fundamental to this issue I think, i more how I do it also via NM and how it was automatically in old Linuxes.

 

Google/Gemini suggests to add Before=systemd-networkd.service to hostapd.service, maybe I try, but I find that a dirty hack, it should be already in the OS, although Trixie is not the latest Linux.

Posted
52 minutes ago, eselarm said:

Google/Gemini suggests to add Before=systemd-networkd.service to hostapd.service, maybe I try, but I find that a dirty hack, it should be already in the OS, although Trixie is not the latest Linux.

This is no success, it id wrong implementation, it is AI, from concept/principel it seems OK, but implementation is NOK

 

So I think I stop experimenting and will use NM if bridged WiPi AP is needed, I have several optional working in Debian Trixie and other distro. For wired lines, systemd-networkd with brideges and VLANs work OK.

 

As said already, Debian has netplan optional, so in Armbain Trixie I simply do apt purge --autoremove netplan.io (and install NM via apt install network-manager).

Then via nmtui it is easy to setup a bridged WiFi AP, no hostapd needed.

 

By the way, you have several errors w.r.t. your SD-card, might be a sunxi kernel issue, but also you brad SD-card or so.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines