How to run hostpad daemon WAS: Is hostapd really necessary?
Douglas Held
wireless
Sat May 10 16:44:44 PDT 2003
To recap, then:
HOWTO: Running the hostapd userspace daemon :
1. obtain the hostap file tree
2. choose hardware support type and configure ./Makefile according to README docs
3. edit ./driver/modules/hostap_config.h : remove /*comments*/ around the line:
#define PRISM2_HOSTAPD
4, type 'make clean'
5. type 'make plx' || 'make pccard' || 'make pci'
6. type 'make install'
7. cd ./hostapd
8. type 'make'
9. edit ./hostapd/hostapd.conf
10,
10. copy ./hostapd/hostapd to suitable bin directory like /usr/local/bin/
11. copy ./hostapd/hostapd.conf to /etc/hostapd.conf
12. create a file such as the following in /etc/init.d :
#!/bin/bash
# filename: /etc/init.d/hostap
case "$1" in
start)
insmod hostap_crypt
insmod hostap_crypt_wep
insmod hostap
insmod hostap_plx
/usr/local/bin/hostapd -B /etc/hostapd.conf
echo "hostapd apparently running as pid `pidof hostapd`"
pidof hostapd > /var/run/hostapd.pid
;;
stop)
echo "Bringing down AP..."
kill -9 `cat /var/run/hostapd.pid`
ifconfig wlan0ap down
rmmod hostap_plx
rmmod hostap
rmmod hostap_crypt_wep
rmmod hostap_crypt
;;
"")
echo "no command given"
;;
esac
13. Enter runlevel 3 and ensure that no scripts are bringing up the wireless interface already.
(This can be done by rebooting, logging in as root and typing 'ifconfig')
14. The commands '/etc/init.d/hostap start' and '/etc/init.d/hostap stop' can now be used at will to take up and put down the AP.
15. Optionally, soft link the script created in step 12 to rc?.d directories. Example:
cd /etc/rc3.d
ln -s /etc/init.d/hostap S90hostap
chmod +x S90hostap
cd /etc/rc2.d
ln -s /etc/init.d/hostap K10hostap
chmod +x K10hostap
16. The AP should now be configured to come up and down when the router restarts.
Thanks to everyone who helped. I hope this message will be easy for newbies like me to find when searching the archives for help.
--Doug
At 07:35 PM 5/9/2003, you wrote:
>On Fri, May 09, 2003 at 09:26:05AM -0700, doug held wrote:
>
>> and now I get symbol errors. malloc? These look like very average symbols, and /usr/src/linux does indeed soft link to linux-2.4.20-8.
>
>Well, they are average _user space_ symbols..
>
>> /sbin/depmod -ae
>> depmod: *** Unresolved symbols in /lib/modules/2.4.20-8/net/hostapd.o
>> depmod: malloc
>> depmod: hostapd_flush
>
>How did that hostapd.o end up being copied into kernel module directory?
>It is an object file for the user space hostapd daemon and it most
>certainly should not be in that directory. hostapd.o is created when you
>run 'make' in hostapd directory. However, I don't think 'make install'
>in any directory should copy it anywhere..
>
>--
>Jouni Malinen PGP id EFC895FA
>_______________________________________________
>HostAP mailing list
>HostAP at shmoo.com
>http://lists.shmoo.com/mailman/listinfo/hostap
More information about the Hostap
mailing list