hostap issues on etch box...

fred fredmfp
Wed Mar 7 05:10:21 PST 2007


Jouni Malinen a ?crit :
> On Tue, Mar 06, 2007 at 03:38:14PM +0100, fred wrote:
>
>   
>> I'm trying to set up my debian box (etch, kernel 2.6.18, hostapd 0.5.5)
>> as a wifi ap using a DWL-520 wifi PCI card with the madwifi driver.
>>     
>
> Which version of madwifi driver are you using? Could you please try
> hostapd 0.5.7? Number of bugs in the madwifi wrapper has been made
> after 0.5.5.
>   
Ok, I have successfully compiled/installed hostapd 0.5.7. Good ;-)

Now when I restart hostapd (/etc/init.d/hostapd restart), I have no more 
error message.

But when I run it as standalone:

  {pts/3}:~/[15]/> /usr/local/bin/hostapd -dd /etc/hostapd/hostapd.conf 
 > log
  ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
  l2_packet_receive - recvfrom: Network is down

and the file log says:

  Configuration file: /etc/hostapd/hostapd.conf
  ctrl_interface_group=0
  Configure bridge br0 for EAPOL traffic.
  madwifi_set_iface_flags: dev_up=0
  madwifi_set_privacy: enabled=0
  BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
  SIOCGIWRANGE: WE(compiled)=20 WE(source)=13 enc_capa=0xf
  ath0: IEEE 802.11 Fetching hardware channel/rate support not supported.
  Flushing old station entries
  madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
  madwifi_sta_deauth: Failed to deauth STA (addr ff:ff:ff:ff:ff:ff reason 3)
  Could not connect to kernel driver.
  Deauthenticate all stations
  madwifi_del_key: addr=00:00:00:00:00:00 key_idx=0
  madwifi_del_key: addr=00:00:00:00:00:00 key_idx=1
  madwifi_del_key: addr=00:00:00:00:00:00 key_idx=2
  madwifi_del_key: addr=00:00:00:00:00:00 key_idx=3
  Using interface ath0 with hwaddr CC:CC:CC:CC:CC:CC and ssid 'myssid'
  madwifi_set_ieee8021x: enabled=1
  madwifi_configure_wpa: group key cipher=1
  madwifi_configure_wpa: pairwise key ciphers=0xa
  madwifi_configure_wpa: key management algorithms=0x3
  madwifi_configure_wpa: rsn capabilities=0x0
  madwifi_configure_wpa: enable WPA=0x3
  madwifi_set_privacy: enabled=0
  WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
  GMK - hexdump(len=32): [REMOVED]
  GTK - hexdump(len=32): [REMOVED]
  WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
  madwifi_set_key: alg=TKIP addr=00:00:00:00:00:00 key_idx=1
  madwifi_set_privacy: enabled=1
  madwifi_set_iface_flags: dev_up=1
  ath0: Setup of interface done.
  Wireless event: cmd=0x8b19 len=16
  Wireless event: cmd=0x8c03 len=24
  ath0: STA AA:AA:AA:AA:AA:AA IEEE 802.11: associated
    New STA
  ath0: STA AA:AA:AA:AA:AA:AA WPA: event 1 notification
  madwifi_del_key: addr=AA:AA:AA:AA:AA:AA key_idx=0
  ath0: STA AA:AA:AA:AA:AA:AA WPA: start authentication
  WPA: AA:AA:AA:AA:AA:AA WPA_PTK entering state INITIALIZE
  madwifi_del_key: addr=AA:AA:AA:AA:AA:AA key_idx=0
  WPA: AA:AA:AA:AA:AA:AA WPA_PTK_GROUP entering state IDLE
  WPA: AA:AA:AA:AA:AA:AA WPA_PTK entering state AUTHENTICATION
  WPA: AA:AA:AA:AA:AA:AA WPA_PTK entering state AUTHENTICATION2
  IEEE 802.1X: 4 bytes from AA:AA:AA:AA:AA:AA
     IEEE 802.1X: version=1 type=1 length=0
  Wireless event: cmd=0x8c03 len=24
  ath0: STA AA:AA:AA:AA:AA:AA IEEE 802.11: associated
  ath0: STA AA:AA:AA:AA:AA:AA WPA: event 1 notification
  madwifi_del_key: addr=AA:AA:AA:AA:AA:AA key_idx=0
  ath0: STA AA:AA:AA:AA:AA:AA WPA: event 4 notification
  madwifi_del_key: addr=AA:AA:AA:AA:AA:AA key_idx=0
  WPA: AA:AA:AA:AA:AA:AA WPA_PTK entering state AUTHENTICATION2
  IEEE 802.1X: 4 bytes from AA:AA:AA:AA:AA:AA
     IEEE 802.1X: version=1 type=1 length=0
  Signal 2 received - terminating
  ath0: STA AA:AA:AA:AA:AA:AA MLME: 
MLME-DEAUTHENTICATE.indication(AA:AA:AA:AA:AA:AA, 1)
  ath0: STA AA:AA:AA:AA:AA:AA MLME: 
MLME-DELETEKEYS.request(AA:AA:AA:AA:AA:AA)
  madwifi_del_key: addr=AA:AA:AA:AA:AA:AA key_idx=0
  Removing station AA:AA:AA:AA:AA:AA
  Flushing old station entries
  madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
  Deauthenticate all stations
  madwifi_set_privacy: enabled=0
  madwifi_set_ieee8021x: enabled=0
  madwifi_set_iface_flags: dev_up=0

I can't get connecting my wifi clients (AA:AA:AA:AA:AA:AA).

So I resend my conf files, to be sure ;-)

I - wifi AP host side:

1) /etc/network/interfaces
  auto lo
  iface lo inet loopback

  auto eth0
  iface eth0 inet static
  address 192.168.1.60
  gateway 192.168.1.10
  netmask 255.255.255.0
    up /etc/init.d/snort start eth0

  iface ath0 inet static
  wireless-mode master
  wireless-channel 11

  auto br0
  iface br0 inet static
  address 10.0.0.1
  netmask 255.255.255.0
  bridge_ports eth1 ath0
  bridge_maxwait 0

2) ifconfig says:
br0       Lien encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx 
          inet adr:10.0.0.1  Bcast:10.0.0.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:446 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:0 (0.0 b)  TX bytes:103099 (100.6 KiB)

eth0      Lien encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx 
          inet adr:192.168.1.60  Bcast:192.168.1.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7297 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3089 errors:0 dropped:0 overruns:0 carrier:0
          collisions:4 lg file transmission:100
          RX bytes:2938424 (2.8 MiB)  TX bytes:578798 (565.2 KiB)
          Adresse de base:0xa000 Mmoire:d8000000-d8020000

eth1      Lien encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx 
          UP BROADCAST MULTICAST  MTU:1500  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 lg file transmission:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interruption:17 Adresse de base:0x4000

lo        Lien encap:Boucle locale 
          inet adr:127.0.0.1  Masque:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:204 errors:0 dropped:0 overruns:0 frame:0
          TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:13030 (12.7 KiB)  TX bytes:13030 (12.7 KiB)

3) /etc/hostapd/hostapd.conf (all commented lines are omitted)
  interface=ath0
  bridge=br0
  driver=madwifi
  logger_syslog=-1
  logger_syslog_level=2
  logger_stdout=-1
  logger_stdout_level=2
  debug=2
  dump_file=/tmp/hostapd.dump
  ctrl_interface=/var/run/hostapd
  ctrl_interface_group=0
  ssid=myssid
  max_num_sta=255
  macaddr_acl=1
  accept_mac_file=/etc/hostapd/hosts.allow
  deny_mac_file=/etc/hostapd/hosts.deny
  auth_algs=3
  wme_enabled=1
  wme_ac_bk_cwmin=4
  wme_ac_bk_cwmax=10
  wme_ac_bk_aifs=7
  wme_ac_bk_txop_limit=0
  wme_ac_bk_acm=0
  wme_ac_be_aifs=3
  wme_ac_be_cwmin=4
  wme_ac_be_cwmax=10
  wme_ac_be_txop_limit=0
  wme_ac_be_acm=0
  wme_ac_vi_aifs=2
  wme_ac_vi_cwmin=3
  wme_ac_vi_cwmax=4
  wme_ac_vi_txop_limit=94
  wme_ac_vi_acm=0
  wme_ac_vo_aifs=2
  wme_ac_vo_cwmin=2
  wme_ac_vo_cwmax=3
  wme_ac_vo_txop_limit=47
  wme_ac_vo_acm=0
  eapol_key_index_workaround=0
  own_ip_addr=127.0.0.1
  wpa=3
  wpa_psk=my64bitskey
  wpa_key_mgmt=WPA-PSK WPA-EAP
  wpa_pairwise=TKIP CCMP

4) my /etc/hostapd/hosts.allow & /etc/hostapd/hosts.deny
  hosts.allow:
  AA:AA:AA:AA:AA:AA
  BB:BB:BB:BB:BB:BB

Note: my /etc/hostapd/hosts.deny is empty. What should I put in it, 
knowing I want to deny all ?
Where can I get some info about it (nothing in man pages or 
/usr/share/doc/) ?

II - wifi client side (ipw3945 driver):

1) /etc/network/interfaces
  auto lo eth2

  iface lo inet loopback

  iface eth2 inet static
  wpa-ssid myssid
  wpa-key-mgmt WPA-PSK WPA-EAP
  wpa-pairwise TKIP CCMP
  wpa-psk my64bitskey
  address 10.0.0.2
  gateway 10.0.0.1
  netmask 255.255.255.0
 
 2) ifconfig says:
eth2      Lien encap:Ethernet  HWaddr AA:AA:AA:AA:AA:AA 
          inet adr:10.0.0.2  Bcast:10.0.0.255  Masque:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:1613 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:0 (0.0 b)  TX bytes:9645 (9.4 KiB)
          Interruption:17 Adresse de base:0xc000 Mmoire:d2100000-d2100fff

lo        Lien encap:Boucle locale 
          inet adr:127.0.0.1  Masque:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:62 errors:0 dropped:0 overruns:0 frame:0
          TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:4796 (4.6 KiB)  TX bytes:4796 (4.6 KiB)

eth2 is not running.

So I guess that the wifi client is connected to the AP but networking 
does not work.

When I run wpa_gui, I can see that my AP host status is 
associated/associating and so on...

What am I doing wrong ?

Any suggestion ?


PS : my lan works fine if it is wired.

Thanks in advance.

Cheers,

-- 
http://scipy.org/FredericPetit





More information about the Hostap mailing list