I am attempting to set up my Raspberry Pi as a bridge, using Debian wheezy. I have a hostapd.conf
: (some details changed for security, and yes, I know WEP is no good)...
interface=wlan0
bridge=br0
driver=nl80211
auth_algs=1
macaddr_acl=0
ignore_broadcast_ssid=0
logger_syslog=-1
logger_syslog_level=0
hw_mode=g
ssid=MY_SSID
channel=11
wep_default_key=0
wep_key0=MY_KEY
wpa=0
And this in /etc/network/interfaces
:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
auto br0
iface br0 inet dhcp
bridge-ports eth0 wlan0
Everything seems to come up ok, but I cannot associate with the bridged wireless connection - even though the flashing lights on the USB stick suggest packets are being exchanged.
I have read somewhere that not all cards/devices will run in hostap mode - they won't pass packets in one direction: is that right? (The info was a bit old)- this my card:
[ 3.663245] usb 1-1.3.1: new high-speed USB device number 5 using dwc_otg
[ 3.794187] usb 1-1.3.1: New USB device found, idVendor=0cf3, idProduct=9271
[ 3.804321] usb 1-1.3.1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 3.816994] usb 1-1.3.1: Product: USB2.0 WLAN
[ 3.823790] usb 1-1.3.1: Manufacturer: ATHEROS
[ 3.830645] usb 1-1.3.1: SerialNumber: 12345
So, what have I got wrong here?
Update: So I have done further investigations and can get the bridge up, but seemingly that destroys the (wired) ethernet connection, which is odd. E.g., on the RPi:
Boot the system...
ping 192.168.62.1
(router) - this works
Attempt to associate with wireless LAN ... fails (or rather "with limited connectivity" on Android phone - no good)
brctl showmacs br0
This just shows mac of wlan0 and mac of phone at this point
brctl addif br0 eth0 wlan0
At this point I can now associate the phone with the wireless network, but...
ping 192.168.62.1
...fails
And similarly I can no longer ping the RasPi from any other machine on the network
Running
ifconfig br0
Suggests the bridge is dropping packets...
Any ideas?
Further update: The /etc/network/interfaces
file now (and for the above sequence) reads:
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
iw dev wlan0 info
show? And Googling on your device ID shows you need a recent kernel or wireless modules for running this device in AP mode. See this. What kernel andath9k
driver are you running?