by April 6, 2004 0 comments

A wireless access point lets wireless clients connect and access a LAN. You could either purchase commercial access points, which are hardware boxes, or you could build your own using a Linux box and a PCI wireless card. This can be great for small organizations with limited office space and budgets. They can set up a Linux server with all the basic services such as file and print, Internet access, proxy and e-mail, and then provide these services to both wired and wireless clients. The wireless
PCI card would cost around Rs 3,500. Let’s see how this can be done.

    STEP ONE          

Get started
You’ll need a machine with PCQLinux 2004 and Kernel 2.6 installed. We made our access point on a PCQLinux 2004 ‘developer workstation’ installation, which also had Kernel 2.6 and Kernel development components installed. We used Kernel 2.6 instead of Kernel 2.4.22nptl because the latter gave errors when we installed the HostAP driver on it. You’ll need a WiFi card that’s based on the PRISM 2/2.5/3 chipset, as it won’t work with any other. We used a NetGear 311 PCI card that cost us Rs 3,500.

    STEP TWO          

Applies to SMEs
Usp Reduce cost by reusing old PCs 

Configure and install
Before you put the WiFi card into the system, copy the hostap-driver-0.1.3.tar.gz from this month’s 
PCQEssential CD to your home directory and unpack it as follows: 

#cp hostap-driver-0.1.3.tar.gz ~
#tar —zxvf hostap-driver-0.1.3.tar.gz

Now create a simlink of your /usr/src/kernel-2.6.2-1.160 folder to /usr/src/linux and go to the new directory. Now run the following commands to patch your Kernel.

#patch -p1 < ~/hostap-driver-0.1.3/kernel-patches/hostap-linux-2.6.2.patch
#cp ~/hostap-driver-0.1.3/driver/modules/hostap*.[ch] driver/net/wireless

Next you have to compile your Kernel with HostAP support, for which the following sequence must be followed in the given order. 

#make mrproper
#make oldconfig
#make bzImage
#make modules
#make modules_install
#make install

The WiFi card is working in Master mode which means that now it is working as an access point

The last command ‘make install’ might terminate with some error, but you can safely ignore it, shutdown your system and insert the WiFi card in it. When you reboot your system, it will have an entry called ‘kernel-2.6.2-1.160custom’ on the grub boot loader screen. The system will now recognize the WiFi card and prompt you to configure it. Ignore this and don’t configure the card right now. That’s because by default PCQLinux 2004 configures Prism-based cards using the Orinoco driver. We need to configure the card with the Prism drivers only, so once your machine has booted, just switch to the ~/hostap-driver-0.1.3 directory and run the following command.

#make all
#make install

his will compile and install modules for the HostAP. Restart the machine and you are ready to run the Access Point.

    STEP THREE          

Run the AP
After you reboot, first run the following command to load the HostAP module.

#modprob hostap_pci

If this doesn’t show any error then everything till now is just fine. Now run the following command to configure your WiFi card as access point.

#ifconfig wlan0 <your_ip_address> netmask <your_subnet_mask> up
#iwconfig wlan0 essid <your_essid> mode master 
channel 6

In the above commands, change <your_ip_address> and <your_subnet_mask> with those of your network, and put in the right ESSID in place of <your_essid>. You can also change the channel as per your requirement. The most important entry in the above commands is ‘mode master’. It actually sets the WiFi card as an access point. 

Your Linux box will now work as an access point. Any client with a WiFi card should be able to find the access point and use it to access the rest of your network. Currently, this is running as a simple access point. Next time, we’ll talk about how to configure security settings on

Anindya Roy

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.