Objective: I am trying to use my raspberry pi as an access point. More precisely, what I am trying to achieve is to use wlan1 as the access point and either usb0 or wlan0 as the "sources" of the internet connection.

Context: use usb0 as the main internet connection and in case it doesn't work use my iPhone hotspot as a secondary backup option. The raspberry would connect to my iPhone through wlan0 and the devices connected to the raspberry would seamessly connect to the iPhone hotspot.

I have successfully managed to create br0 that bridged usb0 with wlan0 using the this guide

The problem: I cannot add wlan0. If I issue the command brctl addif br0 wlan0 I get the following error: can't add wlan0 to bridge br0: Operation not supported.

  • As usual: an interface can be set as bridge port only if it's an Access Point. While wlan1 is an access point (and is probably automatically handled by hostapd), from your description, wlan0 is not. This is a restriction from the default Wifi mode used (by the other access point): 3 addresses mode. If you can't add wlan1 then it's wlan1 which is not an access point. There appears to be a discrepancy in the description about which is an AP and which is a STAtion client: "I cannot add wlan1" vs "can't add wlan0 to bridge br0: Operation not supported"
    – A.B
    Jan 16 at 18:06
  • @A.B thank you for the reply. I have edited the question, there was a major mistake (I wrote wlan1 in place of wlan0). Just to clarify: wlan1 is the access point, wlan0 is connected to my iPhone hotspot.
    – giovi321
    Jan 16 at 19:05
  • So what I wrote before still stands: you can't use wlan0 in a bridge because it's a Wifi limitation (it's not about Linux, it's about using the default 3 addresses mode of Wifi, eg: the only one provided by your access point: the iPhone). You should search for tutorials about routing+NAT instead. Now if usb0 is connected directly to the iPhone, then it's a standard Ethernet interface and you can set this interface as bridge port instead. usb0 has the role of eth0 in your tutorial.
    – A.B
    Jan 16 at 19:42
  • So if I understand correctly: I cannot replace eth0 with wlan0 from the tutorial I posted?
    – giovi321
    Jan 16 at 19:50
  • No: Wifi is not Ethernet. Especially if you don't have complete control of the other AP. With complete control (eg: two RPis) other options exist, such as switching both sides to 4 addresses mode. Like in this Q/A where I made an answer: unix.stackexchange.com/questions/554331/… (and no: you won't be able to switch the iPhone to 4 addresses mode).
    – A.B
    Jan 16 at 19:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.