Can't get hostap driver to work
Chuck Martin
zi8xfgj02
Fri Dec 12 13:51:56 PST 2008
On Thu, Dec 11, 2008 at 12:45:26PM -0500, Pavel Roskin proski-at-gnu.org |HostAP| wrote:
> It may be helpful if you explain concisely what you want to do rather
> than just add more technical information.
>
> Considering that orinoco worked for you, I assume that you are trying to
> make the card connect to an AP as a station (because orinoco doesn't
> support master mode).
That is correct.
> I'm not sure why you are trying to use wpa_supplicant without WPA.
Actually, I'm writing a script that will be used for other connections
as well, and using wpa_supplicant for all of them simplifies the writing
of the script. Although I was doing all of this manually for the purpose
of demonstration, I felt it would be best to reproduce what the script
does as nearly as possible. Once I get it working without WPA or WEP, I
will be working on getting it to also work with them on other networks.
> > root at theta:~# modprobe hostap_cs
> > root at theta:~# wpa_supplicant -Bddw -c/etc/wpa_supplicant.d/gdl.conf -ieth1 -Dhostap
>
> hostap would not call interface eth1. It would use names starting with
> "wlan". It's possible that the interface was renamed. See kernel log
> with the "dmesg" command.
Yes, it appears that since Slackware 12.1 has the hostap drivers
blacklisted by default, the orinoco driver was the first to load, and
/lib/udev/write_net_rules automatically added the following lines to
/etc/udev/rules.d/70-persistent-net.rules:
# PCMCIA device 0x0002:0x0156 (orinoco_cs)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:d6:43:20", ATTR{type}=="1", NAME="eth1"
Once I get the hostap driver working, I will delete those lines and use
the name the hostap driver creates. For now, I'll leave it as is.
> > Daemonize..
> > root at theta:~# ifconfig
> > eth1 Link encap:Ethernet HWaddr 00:05:5d:d6:43:20
> > inet6 addr: fe80::205:5dff:fed6:4320/64 Scope:Link
> > UP BROADCAST MULTICAST MTU:1500 Metric:1
>
> Lack of "RUNNING" suggests that wpa_supplicant didn't succeed. The
> output of iwconfig could be useful here. Maybe the interface is in
> master mode? Then it should be put in managed mode first:
>
> iwconfig eth1 mode managed
I noticed that I already did that in the script, but failed to do it
when I did it manually. The result is the same, however, I noticed
that ifconfig shows "RUNNING" before that command, and doesn't show it
after. Do you have any idea why that would be?
> > root at theta:~# wpa_supplicant -Bddw -c/etc/wpa_supplicant.d/gdl.conf -ieth1 -Dhostap
> > Daemonize..
>
> I don't think running wpa_supplicant with "-Dhostap" would work with
> orinoco and a WPA-enabled AP. "-Dhostap" uses hostap-specific API.
Yes, the script was originally set up to use the hostap driver, and
since it worked without changing it with the orinoco driver, I left it
as is so I wouldn't have to keep changing it depending on which driver
was loaded. I used the command as it appears in the script so you would
be able to see exactly what the script was doing, and what was and wasn't
working. Sorry for not explaining that before.
Here is the results of using the iwconfig command to set the mode and
show the results:
=====Start of session=====
root at theta:~# modprobe hostap_cs
root at theta:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:05:5d:d6:43:20
inet6 addr: fe80::205:5dff:fed6:4320/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:488 (488.0 B)
Interrupt:10 Base address:0x2100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wifi0 Link encap:UNSPEC HWaddr 00-05-5D-D6-43-20-6C-6F-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:5 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1548 (1.5 KiB) TX bytes:0 (0.0 B)
Interrupt:10 Base address:0x2100
root at theta:~# iwconfig eth1 mode managed
root at theta:~# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wifi0 IEEE 802.11b ESSID:"test" Nickname:"theta.nexus.of.obsolescence"
Mode:Managed Frequency:2.422 GHz Access Point: None
Bit Rate:2 Mb/s Sensitivity=1/3
Retry short limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
eth1 IEEE 802.11b ESSID:"test" Nickname:"theta.nexus.of.obsolescence"
Mode:Managed Frequency:2.422 GHz Access Point: None
Bit Rate:2 Mb/s Sensitivity=1/3
Retry short limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/92 Signal level=-90 dBm Noise level=-90 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
root at theta:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:05:5d:d6:43:20
inet6 addr: fe80::205:5dff:fed6:4320/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:7 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:576 (576.0 B)
Interrupt:10 Base address:0x2100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wifi0 Link encap:UNSPEC HWaddr 00-05-5D-D6-43-20-6C-6F-00-00-00-00-00-00-00-00
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:100 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:6 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8659 (8.4 KiB) TX bytes:0 (0.0 B)
Interrupt:10 Base address:0x2100
root at theta:~# wpa_supplicant -Bddw -c/etc/wpa_supplicant.d/gdl.conf -ieth1 -Dhostap
Daemonize..
root at theta:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:05:5d:d6:43:20
inet6 addr: fe80::205:5dff:fed6:4320/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:7 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:576 (576.0 B)
Interrupt:10 Base address:0x2100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wifi0 Link encap:UNSPEC HWaddr 00-05-5D-D6-43-20-6C-6F-00-00-00-00-00-00-00-00
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:100 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:6 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8659 (8.4 KiB) TX bytes:0 (0.0 B)
Interrupt:10 Base address:0x2100
root at theta:~# dhcpcd -d eth1
dhcpcd: MAC address = 00:05:5d:d6:43:20
root at theta:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root at theta:~# pccardctl eject
root at theta:~# killall wpa_supplicant
root at theta:~# modprobe -r hostap_cs
root at theta:~# modprobe orinoco_cs
root at theta:~# pccardctl insert
root at theta:~# wpa_supplicant -Bddw -c/etc/wpa_supplicant.d/gdl.conf -ieth1 -Dhostap
Daemonize..
root at theta:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:05:5d:d6:43:20
inet6 addr: fe80::205:5dff:fed6:4320/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64 (64.0 B) TX bytes:792 (792.0 B)
Interrupt:10 Base address:0x2100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root at theta:~# ifconfig eth1 up
root at theta:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:05:5d:d6:43:20
inet6 addr: fe80::205:5dff:fed6:4320/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64 (64.0 B) TX bytes:792 (792.0 B)
Interrupt:10 Base address:0x2100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root at theta:~# dhcpcd -d eth1
dhcpcd: MAC address = 00:05:5d:d6:43:20
dhcpcd: your IP address = 10.80.51.10
root at theta:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:05:5d:d6:43:20
inet addr:10.80.51.10 Bcast:10.80.51.255 Mask:255.255.255.0
inet6 addr: fe80::205:5dff:fed6:4320/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:400 (400.0 B) TX bytes:1550 (1.5 KiB)
Interrupt:10 Base address:0x2100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root at theta:~#
=====End of session=====
Does that tell you anything? The card is in managed mode for sure but
ifconfig doesn't say "RUNNING" for that interface.
Chuck
More information about the Hostap
mailing list