Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I've got a raspberry pi that bridges wlan0 and eth0 so an old xbox can have wifi, yay! The bridging happens at startup through a script I wrote that reads a file to decide whether or not to bridge. The issue is, I'd like to still be able to remotely access the pi. The bridging makes this difficult (impossible at the moment). The br0 interface can obtain an IP, as I showed here, but that doesn't respond to ping, etc. The thing is idle, so my current technique is to plug in a keyboard and monitor, login, change it to NOT bridge, then poweroff. I was thinking I could program a button to do all that, but I wonder if there's something better?

share|improve this question
    
You could attach a button (or switch) to the GPIO and set up a script to poll its status. See here for some examples. –  Bob Jun 21 '13 at 13:15
    
Thanks for the link, Bob. I'm guessing this might be what I end up doing, but I figured there might be some clever people here with a nice alternative. –  Calvin Flegal Jun 21 '13 at 13:46
    
Yea, there might be some software/network solution. But a simple hardware button may actually be easier to use, if it's next to the Xbox. There might actually be some way to directly link the Pi to the Xbox's power... if you're ambitious, maybe if you can get some constant low-voltage power out of the Xbox (controller ports, maybe?), you could have that activate a relay to power on the Pi, and have the Pi's own GPIO supply power to the same relay to keep it active for a safe shutdown. Then, also have the Xbox connected to GPIO to detect when it goes off, which can initiate a safe shutdown... –  Bob Jun 21 '13 at 15:42
    
...which causes the GPIO power to turn off, therefore turning off the relay. Sounds complicated? It's simple in theory, but may take some time to implement. It would give you automatic startup and automatic safe shutdown, though. –  Bob Jun 21 '13 at 15:43
    
Why doesn't the br0 respond to ping? It should... –  Paul Jun 22 '13 at 2:36

1 Answer 1

To add a separate IP address so you could log on, add this to your /etc/network/interfaces:

auto wlan0:1
iface wlan0:1 inet static
address 192.168.x.y
netmask 255.255.255.0

Of course, replace the placeholder in the address line with an appropriate IP address, different from the main one.

Do remember that the pi doesn't power off after a 'halt' or 'shutdown -h now' command. It just sort of hangs, and since the main controller stops running, the current drawn is often higher than when running at idle. The guy's comments above about using a GPIO pin to control a relay are valid solutions to your shutdown issues. My answer would possibly give you the ability to log in remotely without needing to attach everything.

Unless you're really worried about it, leave it running. Repeated cycling can cause SD card corruption, try to minimize them.

share|improve this answer
    
Haven't had a chance to try this yet but I'm happy to mark it as the answer once I do if I can make it work. –  Calvin Flegal Jul 29 '13 at 13:17
    
unfortunately, though I got a new IP, this IP also ignored pings, ssh, etc :( –  Calvin Flegal Aug 21 '13 at 1:31
    
I solved this by adding another non-bridged wireless card. A quick and easy $10 solution. –  Calvin Flegal Oct 7 '13 at 12:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.