So I\'m trying to setup a wireless mesh network using Raspberry Pi\'s, with the Edimax EW-7811Un WLAN Adapter and the batman-adv protocol.
I\'ve tried following the
You try to setup an adhoc network. However I suggest to start with a simpler approach -- Wifi Access Point and then switch over to adhoc network.
From my point of view it is easier to connect the raspi to a wireless accesspoint. Because the accesspoint will hand over the IP adresses through DHCP. Where in adhoc mode you have to care about the IPs yourself (as far as I know).
Therefore the config for the accespoint based solution would be like
/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
(which is by the way pretty much like yours already)
and then the /etc/wpa_supplicant/wpa_supplicant.conf which connects to a WPA2 accesspoint
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="KBBL"
psk=af2a9daa6cadd3434ad96db48173a04acddb04e6a8c5adf52ae78ef13XXXX
key_mgmt=WPA-PSK
scan_ssid=1
proto=RSN
pairwise=CCMP
group=CCMP
}
Please note that the psk key needs to be generated by
$wpa_passphrase "KBBL" "YOUR_KEY"
which results in something like
network={
ssid="KBBL"
#psk="YOUR_KEY"
psk=29af596e046ad450eeffffd6752432d5dbd26575960b9024e5cbb99e945cdafa4e
}
just copy and paste the psk
Then reboot! I sometimes have trouble when just changing the network wifi settings on the fly. While after reboot everything is fine. Also the wifi network takes some time. At my place something between 20-40secs.
Btw. I also had trouble when trying to setup wifi without encryption or WEP encryption so I suggest to use WPA2 or WPA. Please also note that the WPA configuration of the wpa_supplicant is much different from this of WPA2. So you might start using the above example for WPA2.