server WiFi, AP only -- card's recognized, but no IP on if 'up'?

I’ve a Leap 42.2 server.

I’m trying to set it up as a WiFi access point (AP). So, functioning ONLY as an AP/server – no client functionality wanted.

I’ve attached a TP-Link TL-WN&22N USB WiFi connector,


lsusb | grep -i atheros
    Bus 002 Device 004: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n

iwconfig
    wlan0     IEEE 802.11  ESSID:off/any
              Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm
              Retry short limit:7   RTS thr:off   Fragment thr:off
              Encryption key:off
              Power Management:off

    lo        no wireless extensions.

    eth0      no wireless extensions.

    eth1      no wireless extensions.

    ifb0      no wireless extensions.


iw list
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        max # sched scan SSIDs: 0
        max # match sets: 0
        max # scan plans: 1
        max scan plan interval: -1
        max scan plan iterations: 0
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports RSN-IBSS.
        Device supports T-DLS.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP-128 (00-0f-ac:4)
                * CCMP-256 (00-0f-ac:10)
                * GCMP-128 (00-0f-ac:8)
                * GCMP-256 (00-0f-ac:9)
                * CMAC (00-0f-ac:6)
                * CMAC-256 (00-0f-ac:13)
                * GMAC-128 (00-0f-ac:11)
                * GMAC-256 (00-0f-ac:12)
        Available Antennas: TX 0x1 RX 0x1
        Configured Antennas: TX 0x1 RX 0x1
        Supported interface modes:
                 * IBSS
                 * managed
!!!                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
                 * outside context of a BSS
        Band 1:
                Capabilities: 0x116e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-7
                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
                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)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (disabled)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * new_mpath
                 * set_mesh_config
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * join_mesh
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * frame
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * tdls_mgmt
                 * tdls_oper
                 * probe_client
                 * set_noack_map
                 * register_beacons
                 * start_p2p_device
                 * set_mcast_rate
                 * connect
                 * disconnect
                 * channel_switch
                 * set_qos_map
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        valid interface combinations:
                 * #{ managed, P2P-client } <= 2, #{ AP, mesh point, P2P-GO } <= 2,
                   total <= 2, #channels <= 1
        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.
        Device supports SAE with AUTHENTICATE command
        Device supports low priority scan.
        Device supports scan flush.
        Device supports AP scan.
        Device supports per-vif TX power setting
        Driver supports full state transitions for AP/GO clients
        Driver supports a userspace MPM
        Device supports configuring vdev MAC-addr on create.

hwinfo --netcard
    35: USB 00.0: 0282 WLAN controller
      [Created at usb.122]
      Unique ID: cEJe.B4pqOVVOeJE
      Parent ID: pBe4.9T1GDCLyFd9
      SysFS ID: /devices/pci0000:00/0000:00:1d.7/usb2/2-7/2-7:1.0
      SysFS BusID: 2-7:1.0
      Hardware Class: network
      Model: "Qualcomm Atheros AR9271 802.11n"
      Hotplug: USB
      Vendor: usb 0x0cf3 "Qualcomm Atheros Communications"
      Device: usb 0x9271 "AR9271 802.11n"
      Revision: "1.08"
      Serial ID: "12345"
      Driver: "ath9k_htc"
      Driver Modules: "ath9k_htc"
      Device File: wlan0
      Features: WLAN
      Speed: 480 Mbps
      HW Address: ec:08:6b:14:ee:d3
      Permanent HW Address: ec:08:6b:14:ee:d3
      Link detected: no
      WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13
      WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472
      WLAN encryption modes: WEP40 WEP104 TKIP CCMP
      WLAN authentication modes: open sharedkey wpa-psk wpa-eap
      Module Alias: "usb:v0CF3p9271d0108dcFFdscFFdpFFicFFisc00ip00in00"
      Driver Info #0:
        Driver Status: ath9k_htc is active
        Driver Activation Cmd: "modprobe ath9k_htc"
      Config Status: cfg=no, avail=yes, need=no, active=unknown
      Attached to: #36 (Hub)

I’ve setup the network config for the interface


cat /etc/sysconfig/network/ifcfg-wlan0 
    IPADDR='10.1.1.2/24'
    BOOTPROTO='static'
    STARTMODE='auto'
    NAME='Atheros AR9271 802.11n'
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    BRIDGE='no'
    MTU='1500'
    DHCPCLASS=''
    NM_CONTROLLED='no'
    NETWORK=''
    REMOTE_IPADDR=''
    IPV6INIT='no'
    IPV6_AUTOCONF='no'

When I bring up the interface, it only displays “setup-in-progress”


ifup wlan0
    wlan0           setup-in-progress

and never receives an IP address


ip addr show wlan0
    4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether ec:08:6b:14:ee:d3 brd ff:ff:ff:ff:ff:ff

ifconfig wlan0
    wlan0     Link encap:Ethernet  HWaddr EC:08:6B:14:EE:D3
              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)

What’s missing to bring this interface up with an IP?

I’m not sure what the problem might be here, but you could examine wicked logging for clues using…

sudo journalctl -fu wicked

then try activating the hotspot connection and observe the journal output.

The second idea is just to use hostapd perhaps…
http://www.linuxintro.org/wiki/Set_up_a_hotspot_with_Linux
An old ‘how-to’ thread on the subject…
https://forums.opensuse.org/showthread.php/410475-How-to-setup-an-Access-Point

Am Sat, 11 Mar 2017 01:36:01 GMT
schrieb lsslb <lsslb@no-mx.forums.microfocus.com>:

> I’ve a Leap 42.2 server.
>
> I’m trying to set it up as a WiFi access point (AP). So, functioning
> ONLY as an AP/server – no client functionality wanted.
>
> I’ve attached a TP-Link TL-WN&22N USB WiFi connector,

> Code:
> --------------------
>
> lsusb | grep -i atheros
> Bus 002 Device 004: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
>

> Configured Antennas: TX 0x1 RX 0x1
> Supported interface modes:
> * IBSS
> * managed
> !!! * AP
> * AP/VLAN

First, the good new:

Your card supports AP mode (I am sure you already know that).

Now, the “bad” news.

You are most likely using the wrong tool(s).

>
> I’ve setup the network config for the interface
>
>
> Code:
> --------------------
>
> cat /etc/sysconfig/network/ifcfg-wlan0
> IPADDR=‘10.1.1.2/24’
> BOOTPROTO=‘static’
> STARTMODE=‘auto’
> NAME=‘Atheros AR9271 802.11n’
> BROADCAST=’’
> ETHTOOL_OPTIONS=’’
> BRIDGE=‘no’
> MTU=‘1500’
> DHCPCLASS=’’
> NM_CONTROLLED=‘no’
> NETWORK=’’
> REMOTE_IPADDR=’’
> IPV6INIT=‘no’
> IPV6_AUTOCONF=‘no’
>

I am not sure if wicked would even support AP mode, but the tools you are
looking for are:

  1. hostapd for AP functionality

  2. some DHCP server

  3. some DNS server/recursor

I am running one of my laptops as an “opportunistic” AP (=when I need it) with
hostapd, dhcpcd and pdns-recursor (dnsmasq might be an alternative here).

AK


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)

Am Sat, 11 Mar 2017 22:32:25 GMT
schrieb AK <Akoellh@no-mx.forums.microfocus.com>:

> with hostapd, dhcpcd and pdns-recursor (dnsmasq might be an alternative here).

Whoops, typo, that should be

dhcpd (instead of dhcpcd which is a client program).

AK


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)