17

I've seen a lot online for a solution to make raspberry Pi 3 into a wireless bridge. But many are old articles to suit the Pi 1 and 2.

This is the last article I have seen, and tried: http://blog.slor.net/2013/09/turning-your-raspberri-pi-into-wireless.html

I use RASPBIAN JESSIE, Kernel version: 4.4.

I want the Pi to connect to a wireless router with the built-in wireless device (wlan0) to provide access to device(s)that are connected to the built-in Ethernet connector (eth0).

I want the router (192.168.1.1) to provide IP's to devices connected to RPi3, making it possible for the PC to communicate with devices connected to RPi3.

The problem is when I try to follow the article linked above is that when I run this command:

sudo brctl addif br0 wlan0 eth0

I get this error message:

can't add wlan0 to bridge br0: Operation not supported...

enter image description here

Does anyone have any idea how to solve this?

enter image description here

privateFunction
  • 171
  • 1
  • 1
  • 5
  • 1
    Have you created `br0` before that? `brctl addbr br0`. – ott-- Jul 10 '16 at 20:58
  • Yes I've tried that, but get still the error message: can't add wlan0 to bridge br0: Operation not supported – privateFunction Jul 10 '16 at 21:07
  • Do other commands work like `brctl show`? Maybe a.module is missing. – ott-- Jul 10 '16 at 21:25
  • Screenshot here: [link](http://i.imgur.com/jqUHnVD.png) – privateFunction Jul 10 '16 at 21:45
  • Ok, I think you can add only one interface with each command. You have to serialize it. `brctl addif br0 wlan0` and then `brctl addif br0 eth0`, – ott-- Jul 10 '16 at 22:09
  • With the first command `brctl addif br0 wlan0` i still get: "can't add wlan0 to bridge br0: Operation not supported". But the last command `brctl addif br0 eth0` works. – privateFunction Jul 10 '16 at 22:29
  • 1
    Ok, learning something new every day. Bridging wireless isn't possible (yet) it seems: http://serverfault.com/questions/152363/bridging-wlan0-to-eth0 – ott-- Jul 10 '16 at 23:08
  • hmm Strange ... it seems to work on older models (according to the article), but not the new RPi3. – privateFunction Jul 10 '16 at 23:32
  • 3
    @ott That post and the LKM thread it links to **are 6+ years old**, so anyone seriously interested in the issue may want to dig a little bit further. [This answer](http://unix.stackexchange.com/a/151200/25985) implies it may be simpler to just forward and masquerade rather than trying to use a legit [layer 2](https://en.wikipedia.org/wiki/Data_link_layer) bridge. – goldilocks Jul 11 '16 at 11:30
  • @3kbest does a `iw dev wlan0 set 4addr on` before `brctl addif br0 wlan0 eth0` help? for my pi2 I had this setting in /etc/network/interfaces but it should be the same for the pi3: `auto lo iface lo inet loopback iface eth0 inet manual auto wlan0 iface wlan0 inet manual auto br0 iface br0 inet dhcp bridge_ports wlan0 eth0 bridge_stp off bridge_maxwait 5 wpa-iface wlan0 wpa-bridge br0 wpa-driver wext wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf` hope it is still readable due missing linebreaks, google this and you will find a formated interfaces snipplet – Joe Platano Jul 16 '16 at 03:57
  • 1
    Check out [this guide](https://www.raspberrypi.org/forums/viewtopic.php?t=204361).
    There seems to be a solution, with help of OpenVPN.
    – iTake Jun 03 '19 at 11:29
  • Just seen this link below. Yet to try. Wanna give it a go?. https://rbnrpi.wordpress.com/project-list/wifi-to-ethernet-adapter-for-an-ethernet-ready-tv-new-version/ – Robert Arokiasamy Oct 27 '16 at 10:17
  • Here's an [article](http://blog.ithasu.org/2016/10/using-a-raspberry-pi-3-as-a-wifi-access-point-and-bridge/) describing exactly what you'd like to do. I'm not sure why Dmitry Grigoryev seems to think else wise. I've currently got a pi3 in the ceiling of my office bridged to a switch and distributing wired internet all over my office. It's just linking two interfaces. The only frustrating part is that I do have to assign a static IP to the the Ethernet port on the pi. – Cfoote7 May 04 '17 at 18:08

2 Answers2

9

This is not currently possible. Wireless bridges require 802.11 frames to store 4 addresses (sender, receiver, destination and source), and standard 802.11 frames only store 3 addresses. While there are implementations of 4-address mode called WDS, they are vendor-specific and only supported on router hardware (meaning you should use hardware from the same vendor for this to work). On routers, the command to enable WDS (and allow bridging of Wlan interfaces) mode is

iw dev wlan0 set 4addr on

You can try it, but AFAIK it won't work on the RPi 3, at least not with built-in NIC. You may have some luck with USB adapters based on Atheros wireless chipsets. Until it does, you'll have to stick to NAT if you want to connect networks via RPi, as described here. You can also try Wlan kabel, but that's not real bridging either.

PS. I know the negative answer is not that useful, but we have lots of duplicate questions about bridging, and they can't be closed properly unless one of them is answered.

Dmitry Grigoryev
  • 26,688
  • 4
  • 44
  • 133
3

So as not to confuse readers :- Dmitry Grigoryev is correct he stated you need WDS and you do to create the infrastructure shown above.

Do not confuse Ethernet:wifi -> Wifi:Ethernet with wifi:ethernet - > ethernet:wifi

One just requires a Bridge between the access Point and Lan the other requires WDS to control the link.

As above, the article mentioned covers a wireless Access Point not Wireless Distribution System (WDS)