I have an oscilloscope that I want to access from my laptop. The scope only has a LAN connection, and my laptop is connected to my wifi. I can't connect the scope to my wifi router because I want the scope to be mobile. A direct LAN connection between laptop and scope is possible, but also not desired because it would make my laptop less mobile.

The scope is a Rigol DS1054Z, with a browser interface and LXI interface (I'll probably use python-vxi11). The following setup works (I can access the scope's internal server when I enter its IP in a browser running on the laptop), but the scope isn't mobile but tied to the router:


And this is what I get when I enter the scope's IP in the browser: enter image description here

To make the scope mobile, I want to connect it to a raspberry pi and have a wireless interface for the scope. The network would look like this:

Router - (Wifi)---Laptop
              |--- [wlan0 RPi eth0] --- scope

To sum up my overall goal:

  • connect the scope to the raspberry pi using a normal LAN cable
  • configure the pi to act as a bridge between its eth0 and wlan0 interfaces
  • let my wifi router (DHCP) assign an IP address to the scope (this might be optional
  • connect to the scope from my laptop

What I've tried: I installed bridge-utils on the pi, and added /etc/network/interfaces.d/br0 with the following contents:

auto br0
iface br0 inet dhcp
    pre-up ifup wlan0
    bridge_ports eth0 wlan0
    bridge_fd 5
    bridge_stp no

As far as I understand it (and my understanding of networking is only very very very basic), this should glob up wlan0 and eth0 and magically make the scope appear in the network.

Once I restart the pi, I can see the br0 is indeed up:

$ ifconfig
br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:86:3c:ee  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:86:3c:ee  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2  bytes 78 (78.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 78 (78.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        ether b8:27:eb:d3:69:bb  txqueuelen 1000  (Ethernet)
        RX packets 70  bytes 9163 (8.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 57  bytes 9372 (9.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I can't see the scope appear in my router's list of devices. I guess it's just not enough yet. Is the bridge approach suitable in the first place?

  • 1
    You cannot bridge a wireless interface which is in station mode. You can, however, route through it.
    – Torin
    Dec 16, 2018 at 2:30

4 Answers 4


Edited my answer to make it more useful.

I don't think the bridge will work (you're device will not know how to use the bridge interface).

A few google searches however led to the following (they all seem to be suggesting the same set-up):

1: make sure you revert your changes.

2: Install dnsmask

sudo apt-get install dnsmasq

3: Make sure your wifi on your pi automatically connects by editing wpa_supplicant.conf:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Replace the ssid and password to match your network:


4: Configure the "bridge"

sudo nano /etc/dhcpcd.conf

Make sure you're using correct interface names, you can find yours by invoking ifconfig. Assuming your routers network is not

note: the source mentions eth0, while providing an example with wlan0!

Within this file we need to add the following lines, make sure you replace eth0 with the correct interface of your ethernet.

interface wlan0
static ip_address=
static routers=

5: restart

sudo service dhcpcd restart

6: Make sure the wired connection is routed through the wireless adapter

sudo nano --backup /etc/dnsmasq.conf

The --backup ensures we create a backup of the original file (dnsmasq.conf~)

interface=eth0       # Use interface eth0  
listen-address=   # Specify the address to listen on  
bind-interfaces      # Bind to the interface
server=       # Use Google DNS  
domain-needed        # Don't forward short names  
bogus-priv           # Drop the non-routed address spaces.  
dhcp-range=,,12h # IP range and lease time

7: Make sure the traffic is forwarded:

sudo nano /etc/sysctl.conf

Uncomment the line


In order to get


Enable the changes without reboot:

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

8: Add firewall rules to forward eth0 traffic to wlan0

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE  
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT  

Make the changes permanent:

sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"

9: Load rules after a (re)boot:

sudo nano /etc/rc.local

Insert before exit 0

iptables-restore < /etc/iptables.ipv4.nat

10: start dnsmasq:

sudo service dnsmasq start

11: reboot

sudo reboot

These steps are copied from https://pimylifeup.com/raspberry-pi-wifi-bridge/amp/

  • I followed the steps above, but service dnsmasq start showed an error: Couldn't assign requested adress. Then I changed the interface in dhcpcd.conf to eth0 (because wlan0 gets an IP from the router's DHCP server) and the error disappeared. I could then ping the scope from my pi, but not from my laptop.
    – Christoph
    Dec 16, 2018 at 19:13
  • "Assuming your routers network is not" - this sentence is confusing to me. Is the following written on the assumption that my router's network is not (so it's safe to use that IP for other purposes) or are you assuming that the router's network is different, and I should adapt the following to suit my router's network?
    – Christoph
    Dec 16, 2018 at 19:21
  • It assumes your router is on a different network, so it is safe to use this internal network on the wlan0 interface. It is perdectly fine to have multiple IP addresses assigned to a single interface. In this case it is the way to internally forward traffic from eth0 to wlan0. Therefore you should not change interfaces.
    – Kasper Agg
    Dec 16, 2018 at 19:23
  • My conclusion then is that I should change the IP to be in the router's IP range? That'd be 192.168.178.xxx, as shown in the screenshot I edited into my question.
    – Christoph
    Dec 16, 2018 at 19:26
  • No, this other range is intentional not be confused with the destination network.
    – Kasper Agg
    Dec 16, 2018 at 19:27

You need NAT instead of bridge. I don't think bridging to a Wifi station interface works (as Carey said).


Router - (Wifi)---Laptop
             |--- [wlan0 RPi eth0] --- scope

After setting up your connection like that, you need to setup NAT network between Pi and scope.

To setup NAT network, allow me to introduce a script linux-router. It's designed to make things(dnsmasq, iptables, forwarding) easier for human, so we don't have to manually do it. (Agg's answer has already provide the way to manually do it)

Run one command on Pi to setup a NAT network:

# lnxrouter -i eth0

the script will do all the stuff needed to setup a NAT network between Pi and scope. The Pi's eth0 IP is

You can see the scope's IP 192.168.18.x from that script's output after scope automatically bootstrap.


To access scope from laptop, you have to log into your wifi router and edit routing table.

Route network through Pi's wlan0 IP (it should be 192.168.178.x according to the image you post).

(If you can't or don't want to log into wifi router, setting routing table of laptop also works. Linux and Mac allow users to customize routing table, not sure about Windows.)


If you just need to access the scope's "web interface and LXI interface", you can setup reverse proxy on Pi, so no need to edit routing table.

There should be port 80 for web and another port for LXI open on scope. Set two ports open on Pi to reverse-proxy the traffic to the ports on scope. So your laptop can access scope by entering Pi's wlan0 IP and ports.

If scope support setting IP manually (or IPv6 link-local fe80:: address), no need to set DHCP or forwarding on Pi.

Reverse proxy is like:

laptop-->--(Port A)Pi-->--(web)scope
laptop-->--(Port B)Pi-->--(LXI)scope
  • I guess both answers are converging towards more or less the same solution, just from a different perspective and level of detail? I can set an IP for my scope manually. I could even give a pi a fixed manually set IP in the wifi network, if that makes things easier.
    – Christoph
    Dec 17, 2018 at 9:21
  • @Christoph If so, I believe reverse proxy is the easist (though I didn't set one before)
    – garywill
    Dec 17, 2018 at 11:01

This solution was suggested by a friend and it worked without much hassle.


enter image description here

Raspberry Pi setup

  • I started with a fresh download of raspbian stretch lite 2018-11-13
  • enable ssh (place a file called ssh in the boot partition)
  • set up wifi (place an appropriate wpa_supplicant.conf in the boot partition)
  • set a static IP for eth0 in /etc/dhcpcd.conf:

    interface eth0
    static ip_address=
    static routers=

    and restart dhcpcd:

    sudo service dhcpcd restart
  • in /etc/sysctl.conf, enable IPv4 forwarding by uncommenting the line


    to get



    sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
  • I also rebooted after this step, I'm not 100% sure if that's strictly necessary.

Oscilloscope setup

The scope gets a static IP in the new subnet. This can be configured with the scope's utility menu, as described in the manual.

enter image description here

Router setup

How these steps are done depends on your router:

  • Router's DHCP is configured to always give the RPi's wlan0 the same address. In this case Alternative assign a static IP to the RPi's wlan0.
  • Add a route to, subnet mask, via's wlan0).

Laptop setup

Nothing to do regarding the network, as long as it's in the wifi router's wifi.

I used https://pypi.org/project/ds1054z/ to take the following


enter image description here


I don't have the perfect answer for you but I can help lead you to it...

Some answers suggest what you want to do is not possible. That's wrong, it is very much possible. I have done this before using directions similar to the links at the bottom.

In short, you need additional tools to handle the network protocols.
parprouted dhcp-helper and avahi-daemon

I am currently working on this so I will improve this answer once I understand the purpose of those 3 tools.

Edit: I found that searching for "raspberry pi Wi-Fi Internet share" or similar gives better results (omitting the word "bridge" entirely, because technically you're not creating a bridge in the usual sense).

Edit2: Additional Links and moving the original link to below here...





You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .