XO as AP

From OLPC
Revision as of 15:14, 5 June 2008 by 71.156.104.53 (talk)
Jump to: navigation, search

This documents describes how to set up the XO as an access point using the built-in wireless card.

Setting up the Thinfirm driver / firmware

The access point functionality only works with the libertastf driver, which is not the one bundled in the official builds. To set up this driver follow the instructions at Libertas Thinfirmware HOWTO.

Getting and compiling Hostapd

Hostapd requires a more recent version of libnl than the one included in the OLPC builds. An up to date libnl rpm can be downloaded here.

Download hostapd;

git-clone  git://w1.fi/srv/git/hostap.git

The latest tested version is b717ee2ab25c but more recent versions should work too.

To compile it, go to the directory hostapd, copy defconfig to .config. On .config:

  1. Uncomment CONFIG_DRIVER_NL80211=y.
  2. To make hostapd use the headers from a kernel different that the one running in you machine, at the end add the lines:
CONFIG_KERNEL_LOC = /path/to/your/kernel-tree
CFLAGS += -I$(CONFIG_KERNEL_LOC)/include

Then compile with make</tt< and copy hostapd and hostapd_cli to the target XO.

If hostapd was not compiledy in a fedora system, it may complain when executing about not finding the library /lib/libssl.so.0.9.8. If that is the case, you can easily fix it doing, on the target XO:

# cd /lib
# ln -s /lib/libssl.so.0.9.8b /lib/libssl.so.0.9.8
# ln -s /lib/libcrypto.so.0.9.8b /lib/libcrypto.so.0.9.8

Start hostapd

Copy a hostapd configuration file (example) and customize it. The most relevant fields are ssid and channel. Then start the access point with:

# hostapd -d hostapd.conf

Then other machines will be able to associate to the new created access point. A same-subnet IP address must be assigned to each machine, either manually, via dhcp or link-local, to make them able to connect to each other.