Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hostapd iwlagn
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 661

PostPosted: Sun Nov 11, 2012 9:14 am    Post subject: hostapd iwlagn Reply with quote

Hi, I have a problem setting up access point with hostapd. I have the intel wireless card:

Code:

sys-firmware/iwl5000-ucode (8.24.2.12(1)@10/26/12): Intel (R) Wireless WiFi Link 5100/5300 ucode


The module used:
Code:

# lsmod | grep iw
iwlwifi               175842  0
mac80211              340414  1 iwlwifi
cfg80211              149485  2 iwlwifi,mac80211


The hostapd.conf looks like this:
Quote:

interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=connectme
hw_mode=g
channel=6
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=3
wpa_passphrase=test
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP



The problem is that when running the hostapd command, the AP is not visible by other wireless devices I have at home. The output of hostapd command is as follows:

Quote:

# hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Add own interface ifindex 4
nl80211: Set mode ifindex 4 iftype 3 (AP)
nl80211: Failed to set interface 4 to mode 3: -95 (Operation not supported)
nl80211: Interface already in requested mode - ignore error
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan0 created: ifindex=14
nl80211: Add own interface ifindex 14
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 20 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 40 MHz
nl80211: 5735-5835 @ 40 MHz
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=15 dBm
Completing interface initialization
Mode: IEEE 802.11g Channel: 6 Frequency: 2437 MHz
nl80211: Set freq 2437 (ht_enabled=0 sec_channel_offset=0)
Failed to update rate sets in kernel module
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Could not connect to kernel driver.
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:26:c6:21:cf:1a and ssid 'connectme'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
63 6f 6e 6e 65 63 74 6d 65 connectme
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon set failed: -95 (Operation not supported)
Failed to set beacon parameters
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=4 alg=2 addr=0x48341a key_idx=1 set_tx=1 seq_len=0 key_len=32
broadcast key
nl80211: set_key failed; err=-67 Link has been severed)
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface mon.wlan0 is up
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: if_removed already cleared - ignore event
mgmt::deauth cb



Any ideas what's going on? Why is the AP not visible, there are some errors when running hostapd, but I'm not sure they are related to the problem of AP not being visible.

THanks
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4121
Location: Houston, Republic of Texas

PostPosted: Sun Nov 11, 2012 9:27 am    Post subject: Reply with quote

disclaimer - ive never attempted doing what you're doing, but ive fought enough with wireless in the kernel hopefully i can make an educated guess

The one thing in particular that jumps out at me

Code:

Could not connect to kernel driver.


do you have CONFIG_HOSTAP set in your kernel? It may require some of the lib80211 crap as well, not certain, but that'd be the first place I'd look
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 661

PostPosted: Sun Nov 11, 2012 10:26 am    Post subject: Reply with quote

Hi,

I have enabled the HOSTAP in the kernel and restarted:

Code:

# cat /usr/src/linux/.config | grep HOSTAP
CONFIG_HOSTAP=y
# CONFIG_HOSTAP_FIRMWARE is not set
CONFIG_HOSTAP_PLX=y
CONFIG_HOSTAP_PCI=y
CONFIG_HOSTAP_CS=y


Now the hostapd is printing the following:
Quote:

# hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Add own interface ifindex 4
nl80211: Set mode ifindex 4 iftype 3 (AP)
nl80211: Failed to set interface 4 to mode 3: -95 (Operation not supported)
nl80211: Interface already in requested mode - ignore error
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan0 created: ifindex=6
nl80211: Add own interface ifindex 6
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 20 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 40 MHz
nl80211: 5735-5835 @ 40 MHz
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=15 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=15 dBm
Completing interface initialization
Mode: IEEE 802.11g Channel: 6 Frequency: 2437 MHz
nl80211: Set freq 2437 (ht_enabled=0 sec_channel_offset=0)
Failed to update rate sets in kernel module
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Could not connect to kernel driver.
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:26:c6:21:cf:1a and ssid 'connectme'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
63 6f 6e 6e 65 63 74 6d 65 connectme
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 16/20 bytes from /dev/random
random: Only 16/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon set failed: -95 (Operation not supported)
Failed to set beacon parameters
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=4 alg=2 addr=0x48341a key_idx=1 set_tx=1 seq_len=0 key_len=32
broadcast key
nl80211: set_key failed; err=-67 Link has been severed)
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface mon.wlan0 is up
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: if_removed already cleared - ignore event
mgmt::deauth cb
random: Got 4/4 bytes from /dev/random



It still cannot connect to kernel. Any more ideas about this?
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4121
Location: Houston, Republic of Texas

PostPosted: Sun Nov 11, 2012 11:46 am    Post subject: Reply with quote

asking a possibly silly question - what were your exact steps after enabling hostap in the kernel?

did you reissue a "make && make modules_install", re-copy the new bzImage to /boot, and boot from it?

if HOSTAP and its requisite dependencies are enabled in a running kernel, i cant imagine why you'd still see that error
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 661

PostPosted: Sun Nov 11, 2012 11:49 am    Post subject: Reply with quote

Hi,

Of course I rebuilt the kernel and booted off of it :) I can prove it (noticed the date?):

Code:

# uname -a
Linux localhost 3.4.9-gentoo #4 SMP PREEMPT Sun Nov 11 11:18:26 CET 2012 x86_64 Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz GenuineIntel GNU/Linux
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2192

PostPosted: Mon Nov 12, 2012 12:42 am    Post subject: Reply with quote

eleanor, cach0rr0, et al ...

The hostap driver is not whats at issue, this driver is for prism2 cards, hostapd uses the mac80211 subsystem (via hostapd's netlink, nl80211, driver).

So, firstly you should check mac80211 and cfg80211 are enabled:

Code:
# awk '/(MAC|CFG)80211/' /usr/src/linux/.config

Secondly, does the card show 'AP' (infrastructure mode) as a capability (requires net-wireless/iw):

Code:
# iw list

You should see something like the following:

Code:
    Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * monitor
    software interface modes (can always be added):
         * AP/VLAN
         * monitor

Then test if the card can be put into AP mode:

Code:
# iw phy phy0 interface add wlan0 type ap
# iw dev wlan0 del

This being successfull you should then test with the hostapd-minimal.conf.

I see in the above "Failed to set interface 4 to mode 3" (which is AP mode) and then subequently "Interface already in requested mode - ignore error" ... which seems odd, and the reason I'd suggest the above tests/checks.

Then there are some other errors setting rates, and TX parameters, and then it reports the interface is down. Not sure whats happening here but I imagine its unable to bring wlan0 up correctly due to not being able to set the TX. You might test and see if TX can be set manually:

Code:
# iw dev wlan0 set txpower fixed 3000

This value is in mBm (100 mBm = 1 dBm) ... so 'iw phy0 info' can provide some info as to the current dBm.

I can't see easily what the issue is, but the above tests may show some issue/problem with iwlagn.

best ... khay
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 661

PostPosted: Mon Nov 12, 2012 3:25 pm    Post subject: Reply with quote

Hi,

I guess the interface cards don't have AP support. The "iw list" displays this output about my two interface cards:

Quote:

Wiphy phy1
Band 1:
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS)
* 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS)
* 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps
* 5.5 Mbps
* 11.0 Mbps
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
max # scan SSIDs: 4
max scan IEs length: 2285 bytes
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* monitor
software interface modes (can always be added):
* monitor
interface combinations are not supported
Supported commands:
* new_interface
* set_interface
* new_key
* new_beacon
* new_station
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* remain_on_channel
* set_tx_bitrate_mask
* action
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* Unknown command (84)
* Unknown command (87)
* Unknown command (85)
* testmode
* connect
* disconnect
Supported TX frame types:
* IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
Supported RX frame types:
* IBSS: 0x00d0
* managed: 0x0040 0x00d0
* AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
* AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
* mesh point: 0x00b0 0x00c0 0x00d0
* P2P-client: 0x0040 0x00d0
* P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
Device supports RSN-IBSS.
HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
Device supports TX status socket option.
Device supports HT-IBSS.
Wiphy phy0
Band 1:
Capabilities: 0x872
HT20/HT40
Static SM Power Save
RX Greenfield
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 7935 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 4 usec (0x05)
HT RX MCS rate indexes supported: 0-15, 32
TX unequal modulation not supported
HT TX Max spatial streams: 1
HT TX MCS rate indexes supported may differ
Frequencies:
* 2412 MHz [1] (15.0 dBm)
* 2417 MHz [2] (15.0 dBm)
* 2422 MHz [3] (15.0 dBm)
* 2427 MHz [4] (15.0 dBm)
* 2432 MHz [5] (15.0 dBm)
* 2437 MHz [6] (15.0 dBm)
* 2442 MHz [7] (15.0 dBm)
* 2447 MHz [8] (15.0 dBm)
* 2452 MHz [9] (15.0 dBm)
* 2457 MHz [10] (15.0 dBm)
* 2462 MHz [11] (15.0 dBm)
* 2467 MHz [12] (15.0 dBm) (passive scanning, no IBSS)
* 2472 MHz [13] (15.0 dBm) (passive scanning, no IBSS)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Band 2:
Capabilities: 0x872
HT20/HT40
Static SM Power Save
RX Greenfield
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 7935 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 4 usec (0x05)
HT RX MCS rate indexes supported: 0-15, 32
TX unequal modulation not supported
HT TX Max spatial streams: 1
HT TX MCS rate indexes supported may differ
Frequencies:
* 5180 MHz [36] (14.0 dBm) (passive scanning, no IBSS)
* 5200 MHz [40] (15.0 dBm) (passive scanning, no IBSS)
* 5220 MHz [44] (15.0 dBm) (passive scanning, no IBSS)
* 5240 MHz [48] (15.0 dBm) (passive scanning, no IBSS)
* 5260 MHz [52] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5280 MHz [56] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5300 MHz [60] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5320 MHz [64] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5500 MHz [100] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5520 MHz [104] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5540 MHz [108] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5560 MHz [112] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5580 MHz [116] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5600 MHz [120] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5620 MHz [124] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5640 MHz [128] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5660 MHz [132] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5680 MHz [136] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5700 MHz [140] (15.0 dBm) (passive scanning, no IBSS, radar detection)
* 5745 MHz [149] (15.0 dBm) (passive scanning, no IBSS)
* 5765 MHz [153] (15.0 dBm) (passive scanning, no IBSS)
* 5785 MHz [157] (15.0 dBm) (passive scanning, no IBSS)
* 5805 MHz [161] (15.0 dBm) (passive scanning, no IBSS)
* 5825 MHz [165] (15.0 dBm) (passive scanning, no IBSS)
Bitrates (non-HT):
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
max # scan SSIDs: 20
max scan IEs length: 127 bytes
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* monitor
software interface modes (can always be added):
* monitor
interface combinations are not supported
Supported commands:
* new_interface
* set_interface
* new_key
* new_beacon
* new_station
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* remain_on_channel
* set_tx_bitrate_mask
* action
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* Unknown command (84)
* Unknown command (87)
* Unknown command (85)
* testmode
* connect
* disconnect
Supported TX frame types:
* IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
* P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
Supported RX frame types:
* IBSS: 0x00d0
* managed: 0x0040 0x00d0
* AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
* AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
* mesh point: 0x00b0 0x00c0 0x00d0
* P2P-client: 0x0040 0x00d0
* P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
Device supports RSN-IBSS.
HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
Device supports TX status socket option.
Device supports HT-IBSS.



But it's rather strange that Wireless Alpha Card doesn't have support for that: https://lh4.googleusercontent.com/-mL04G8acKAk/TYziOI5X47I/AAAAAAAAAs0/vIgUeHRoyAE/Alpha+wireless.jpg


Can you confirm that the two interface cards really don't support the AP mode?

Thank you
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2192

PostPosted: Tue Nov 13, 2012 12:07 am    Post subject: Reply with quote

eleanor wrote:
I guess the interface cards don't have AP support. The "iw list" displays this output about my two interface cards:
Code:
    Supported interface modes:
        * IBSS
        * managed
        * monitor
    software interface modes (can always be added):
        * monitor
[...]
    Supported interface modes:
        * IBSS
        * managed
        * monitor
    software interface modes (can always be added):
        * monitor

Yes, it would seem so, but this may be the kernel version (which you haven't mentioned so far) and firmware revision.

eleanor wrote:
But it's rather strange that Wireless Alpha Card doesn't have support for that

I'm pretty sure the Alpha's have Ralink cards and not intel, so this again be a question of kernel/firmware. I assume you are using the kernel driver and not that provided with the card?

eleanor wrote:
Can you confirm that the two interface cards really don't support the AP mode?

Did you perhaps try to set ap mode manually (using the above command)? Note that with two interfaces you need to be sure that you are targeting the correct interface, so, phy0 and phy1 ... you should see "registered as phy[N]" in dmesg when the driver is loaded.

best ... khay
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 661

PostPosted: Fri Nov 16, 2012 6:25 pm    Post subject: Reply with quote

Hi,

I managed to start the AP successfully. But I cannot connect to it, neither statically nor dynamically. I've tried setting the IP in /etc/conf.d/net:
Quote:


modules_wlan1=( "!iwconfig !wpa_supplicant" )
config_wlan1=( "10.1.2.1 broadcast 10.1.2.255 netmask 255.255.255.0" )




The ifconfig:
Code:

wlan1     Link encap:Ethernet  HWaddr 00:c0:ca:3e:67:c6
          inet addr:10.1.2.1  Bcast:10.1.2.255  Mask:255.255.255.0
          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 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



We can see that the IP of the wlan1 interface is OK. The hostapd is OK as we can see here:

Quote:

# hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: interface wlan1 in phy phy10
rfkill: initial event: idx=5 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=6 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=14 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Add own interface ifindex 21
nl80211: Set mode ifindex 21 iftype 3 (AP)
nl80211: Failed to set interface 21 to mode 3: -95 (Operation not supported)
nl80211: Interface already in requested mode - ignore error
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan1 created: ifindex=22
nl80211: Add own interface ifindex 22
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 20 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 40 MHz
nl80211: 5735-5835 @ 40 MHz
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g Channel: 6 Frequency: 2437 MHz
nl80211: Set freq 2437 (ht_enabled=0 sec_channel_offset=0)
Failed to update rate sets in kernel module
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Could not connect to kernel driver.
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan1 with hwaddr 00:c0:ca:3e:67:c6 and ssid 'connectme'
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon set failed: -95 (Operation not supported)
Failed to set beacon parameters
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan1: Setup of interface done.
random: Got 18/20 bytes from /dev/random
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface wlan1 is up
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Ignore interface down event since interface mon.wlan1 is up
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan1' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
nl80211: if_removed already cleared - ignore event
mgmt::deauth cb
random: Got 2/2 bytes from /dev/random



When I connect to the AP with an IP that was set statically by the phone itself (not DHCP), I get this (the output is taken from the phone);
Quote:

$ ifconfig wlan0
wlan0: ip 10.1.2.2 mask 255.255.255.0 flags [up broadcast running multicast]


$ ping 10.1.2.1
PING 10.1.2.1 (10.1.2.1) 56(84) bytes of data.
From 10.1.2.2 icmp_seq=1 Destination Host Unreachable
From 10.1.2.2 icmp_seq=2 Destination Host Unreachable
From 10.1.2.2 icmp_seq=3 Destination Host Unreachable
^C
--- 10.1.2.1 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3005ms


Here's the first problem. I've got the correct IP set on the phone, but the problem is that it can't see the 10.1.2.1 (the AP - the wlan1 interface card on laptop). And the wifi manager on the phone says it's connected. Any ideas about this one?


Another problem is that the dnsmasq doesn't work, it doesn't allocate the IP to the mobile phone. The conf contains only this line:

Quote:

# cat /etc/dnsmasq.conf | grep -v ^# | grep -v ^$
dhcp-range=10.1.2.100,10.1.2.150,12


And when I start it, the following is outputed:
Quote:

# dnsmasq -d
dnsmasq: started, version 2.63rc6 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-scripts no-TFTP no-conntrack
dnsmasq-dhcp: DHCP, IP range 10.1.2.100 -- 10.1.2.150, lease time 12h
dnsmasq: reading /etc/resolv.conf
dnsmasq: read /etc/hosts - 2 addresses




The port 53 is open.
Quote:

tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 27564/dnsmasq
tcp6 0 0 :::53 :::* LISTEN 27564/dnsmasq



So there are two open questions:
1. Why doesn't the phone see the AP even though it's connected and has the right IP?
2. Why doesn't the dnsmasq work and give the phone an IP?
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 661

PostPosted: Tue Nov 20, 2012 11:42 pm    Post subject: Reply with quote

Just moving the message up the stack.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum