See printer across bridging router
by peterg17 from LinuxQuestions.org on (#5P5Z1)
I have a printer that connects to a wifi hotspot running on a raspberry pi. If a laptop also connects to the pi hotspot, the laptop can print.
Normally the laptop connects to the pi via ethernet. However the printer is not visible.
I tried setting up a bridge on the pi, using the following script:
brctl addbr brx
brctl stp brx on
ip addr show
brctl addif brx wlan0 eth0
echo added interfaces
brctl show
sync
sleep 30
brctl delbr brx
However this script does not work. The ethernet interface shuts down, and communications between laptop and pi are lost. The pi does not respond to pings or arp-scan. When the bridge is deleted, communications are restored.
My questions are:
1) Is this the right approach to solve the problem?
2) If so, what am I doing wrong?
Normally the laptop connects to the pi via ethernet. However the printer is not visible.
I tried setting up a bridge on the pi, using the following script:
brctl addbr brx
brctl stp brx on
ip addr show
brctl addif brx wlan0 eth0
echo added interfaces
brctl show
sync
sleep 30
brctl delbr brx
However this script does not work. The ethernet interface shuts down, and communications between laptop and pi are lost. The pi does not respond to pings or arp-scan. When the bridge is deleted, communications are restored.
My questions are:
1) Is this the right approach to solve the problem?
2) If so, what am I doing wrong?