Kevin Steen's bit o'Web
Want to connect to your neighbours without any wires or going via the Internet? Free Software has advanced to the point where it is now relatively easy. It's not yet point and click (2014) but it's not difficult.
Using the Debian operating system and the B.A.T.M.A.N. mesh-networking software you can get started on your own community network.
Here's the main steps you'll need to follow:
You need to add some software which isn't usually installed. You'll need to have Administrator permissions to do this.
and press Enter
apt-get install batctl iw bridge-utils pidgin pidgin-otr
You need to find out the name of the wireless network interface so that you can configure it to come up automatically when the computer starts. Using the same root terminal, type
You should see something like this
The wlan0 is the name you need. Make a note of it.
Next, edit the network configuration file : /etc/network/interfaces
Make a backup, just in case
cp interfaces interfaces.good
Use your favourite editor (or nano) to modify the interfaces files
There shouldn't be one on a standard system (which uses NetworkManager) but
look for a section starting
iface wlan0 inet (if your wireless
interface is named wlan0 like mine.) If it is there, modify it, otherwise add
these lines to the bottom of the file (replacing wlan0 with your interface name):
iface wlan0 inet manual
pre-up ifconfig $IFACE mtu 1532
up ifconfig $IFACE up
post-up iw dev $IFACE ibss join mesh 2412 fixed-freq 02:CA:FF:EE:BA:BE
post-up modprobe batman-adv || true
post-up batctl if add $IFACE || true
down ifconfig $IFACE down
iface bat0 inet manual
up ifconfig $IFACE up
$IFACE parts exactly like that - you'll thank me later.
Save the file, exit your editor and close the terminal window.
Now we discover the joy of using B.A.T.M.A.N. - there's no configuration
required! The entire mesh appears like a hardware switch to your computer,
plugged into the
Reboot so that NetworkManager releases control of the wireless interface.
When your system has restarted, you should see the wireless light flickering continuously as it sends out "I'm here" packets once a second to detect other peers in the network.
Now, open a terminal window again, and gain root access with
su -, then type in:
batctl o -w
Assuming everything has gone well, you should see something like this:
[B.A.T.M.A.N. adv 2011.4.0, MainIF/MAC wlan0/00:90:4b:aa:bb:cc (bat0)]
Originator last-seen (#/255) Nexthop [outgoingIF]: Potential nexthops ...
No batman nodes in range ...
Once you have repeated all the above steps on the 2nd computer, you should see the "No batman nodes" message replaced with the MAC address of the 2nd computer.
That's it, you've got a functioning mesh network!
Since Debian supports IPv6, the mesh interface
have automatically been given a link-local IPv6 address. The local-LAN
directory software, Avahi, will already be broadcasting your
presence to the mesh.
To chat, send files, etc over the mesh, you can use the Pidgin messaging software. (Empathy doesn't work properly on IPv6-only networks at the time of writing, but it may be fixed by the time you read this.)
Start Pidgin from the normal menus, and create a Bonjour account although you may want to change the LastName field to a space or something else - remember that these details will be broadcast across the whole mesh, so think about what information you want your neighbours to know about you! Bonjour is one of the names for the protocol used for LAN-only chat - in Empathy it's called People Nearby and on Mac computers it's iChat.
This simple configuration provides an unencrypted network - everything you send over the mesh is visible to anyone with a wireless card within range of any of the mesh nodes. To secure your information, use applications and protocols which provide a security layer and end-to-end encryption. For example https for website transfers, IMAPS and POP3S for accessing email and OTR for instant messaging. (The OTR plugin for pidgin is already installed, but needs to be activated from the plugins menu.)
Sometimes, things just don't work right the first time, so here's some areas to look at to find the problem.
iw dev wlan0 linkto verify.
iw dev wlan0 ibss join mesh 2412 fixed-freq 02:CA:FF:EE:BA:BE. If that gives an error, you might need to try a different wireless card.
ifup -v wlan0
batctl ogives an error, the batman kernel module may not be loading. Run
lsmod | grep batmanand make sure you get a non-empty result.
iwconfig wlan0(the older version of the
iwutility might help.
If you spot any errors on this page, or have anything to add, please send me a message via my contact form
Last update: 28 Jul 2014