HostAP in FC4

Lee Ryman leeryman_lists at hotmail.com
Sun Oct 23 11:59:43 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mishar wrote:
| I am a newb in Linux.  And I am trying to configure hostap in AP mode
| using the LinkSys cards.
|
| I have been successful in installed the hostap kernel modules and the
| device driver coming in RPM which  . 'lsmod' says that pcmcia is
| attached to hostap_cs. But whenever I do a ifconfig wlan0/eth1 I get
| this message
|
| wlan0:error fetching interface information: Device not found.
|
| I edited the etc/modprobe.conf adding the following lines
|
| alias wlan0 hostap_cs
| alias eth1 hostap_cs
|
| In the network device manager I have found Linksys cards in the Ethernet
| Device category and also the device name being 'eth1'. But its not
found as
| a wireless device .
|
| What can I do? The Readme is not helping me much for
| installation.Please help me with your experience
|


Your email is a bit lacking in the information department, but hopefully
some of the following ideas might help you solve the problem...


[Disclaimer: Experts please feel free to correct me if I'm wrong, its
been a while since i had to delve into this stuff :) ]


Hostap actually creates two kernel devices for each wireless card in the
system, called wifi0 and wlan0 (or wifi1 and wlan1 and so on). wifi0 is
used internally by the driver to do various wireless/802.11-specific
configuration, whilst wlan0 is the interface used to actually transmit
and receive ethernet data on. When loading hostap kernel modules you
actually need to refer to the wifi0 device. This can confuse
RedHat/FC4's network configuration scripts, which require you to name
the device by its 'data' interface wlan0, in order to configure the
interface's TCP/IP properties.

To get around this I have used the following entries in modprobe.conf.
These allow us to refer to wlan0 in RH/FC network scripts so they are
kept happy, yet allow modprobe to know the correct name of the interface
as far as the kernel module goes...


alias wifi0 hostap_cs
install wlan0 /sbin/modprobe wifi0
remove wlan0 /sbin/modprobe -r wifi0


... To find out whats going on here, run `man modprobe.conf` and have a
read.


BTW, its often helpful to manually load the drivers to ensure everything
is operating as it should before you go relying on the pcmcia service or
~ redhat network configuration scripts to bring up the interface
automaticly. If the card has been inserted but the interface has not
been brought up try running `modprobe -v hostap_cs` and take a look at
the output of `dmesg`. You should see something like this appear (this
is for a pci card, but yours should still look somewhat similar)...

hostap_pci: Registered netdevice wifi0
wifi0: Original COR value: 0x0
prism2_hw_init: initialized in 196 ms
wifi0: NIC: id=0x8013 v1.0.0
wifi0: PRI: id=0x15 v1.1.1
wifi0: STA: id=0x1f v1.7.4
wifi0: Intersil Prism2.5 PCI: mem=0xdd003000, irq=11
wifi0: registered netdevice wlan0

... If you get something like that it means that you've successfully
loaded the hopstap module and you should them be able to do a `ifconfig
wlan0 xxx.xxx.xxx.xxx`, etc.

If that works, then you can proceed to set up the pcmcia scripts to do
all this automaticly when you insert the card. Hostap creates a file
/etc/pcmcia/hostap_cs.conf when it is instead. This file contains a
number of known Prism based cards and their manufacturer ids. An id is
two hex numbers, normally writted as 0xaaaa:0xbbbb or something similar.
If your card did not come up automaticly then it is likely that the
hostap_cs.conf file does not contain an entry which matches the
specifics of your card. This is not too uncommon in my experience
(Although Jouni has done a good job of listing quite a number).

To recitfy this run `cardctl ident`. Unfortunatly I don't have a laptop
handy to see the output of this command but it should display
information about each card inserted in pcmcia sockets on your machine,
including a manufacturer id. Once you have this create a new entry into
the hostap_cs.conf file something along the lines of...


# Added by Me on 24-10-05 to make cardmgr recognise my Prism2 card
# and load the hostap driver...
card "My unknown lynksys Prism card"
	manfid 0xaaaa, 0xbbbb    # <-- get these numbers from cardctl
	bind "hostap_cs"


... Bring down the interface that you brought up manually before:
`ifconfig wlan0 down`. Remove the kernel modules: `modprobe -v -r
hostap_cs`. Restart the pcmcia service: `service pcmcia restart`. That
*should* be it [if I remember correctly]. cardmgr should now recognise
the card by its manufacturer ids and load the hostap_cs module for you.


That should give you some idea of where to start. Unfortunatly my linux
laptop which I have done this all on in the past is currently out of
commission (its IBM travelstar hdd died, big suprise there), so I'm
going off a very taxed memory here. Some of the particulars *may* be
wrong but I'm sure the more knowledgable members of the mailing list can
fill the gaps. BTW, there is a fair bit of information about all this in
the README file available in the source download of the drivers. You
should really try installing them from source one day, its not that hard!


Kind regards,

Lee

- --
Lee Ryman

Email/MSN:  leeryman at hotmail.com
ICQ:  21246863
Skype:  leeryman
OpenPGP Id: 0x081AD0B0
OpenPGP Fingerprint: 55DF B602 F702 AA65 A602  2376 85B7 05A5 081A D0B0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iEYEARECAAYFAkNbs28ACgkQhbcFpQga0LCk6ACfcZDevf0eXXqvvWYz7dgRDUHe
x5UAmgKWnnklg1ZBlwFTLLyndwsS1anN
=lXEC
-----END PGP SIGNATURE-----



More information about the HostAP mailing list