hostad config

I’m trying to set a system up as a WAP, but I can’t get it to appear in the list of networks on an iPad.

hwinfo reports:

55: None 00.0: 1070a WLAN
  [Created at net.126]
  Unique ID: AYEt.QXn1l67RSa1
  Parent ID: y9sn.2LwWUvQHt5F
  SysFS ID: /class/net/wlan0
  SysFS Device Link: /devices/pci0000:00/0000:00:02.5/0000:04:00.0
  Hardware Class: network interface
  Model: "WLAN network interface"
  Driver: "ath9k"
  Driver Modules: "ath9k"
  Device File: wlan0
  HW Address: 70:1a:04:8e:7d:44
  Permanent HW Address: 70:1a:04:8e:7d:44
  Link detected: yes
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #23 (WLAN controller)

Restarting hostapd produces the following journald entries:

Aug 09 12:29:14 yadda hostapd[21326]: wlan0: interface state ENABLED->DISABLED
Aug 09 12:29:14 yadda hostapd[21326]: wlan0: AP-DISABLED
Aug 09 12:29:14 yadda hostapd[21326]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Aug 09 12:29:14 yadda systemd[1]: Stopping Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator...
Aug 09 12:29:14 yadda kernel: device wlan0 left promiscuous mode
Aug 09 12:29:14 yadda kernel: br0: port 1(wlan0) entered disabled state
Aug 09 12:29:14 yadda systemd[1]: Stopped Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator.
Aug 09 12:29:14 yadda systemd[1]: Started Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator.
Aug 09 12:29:15 yadda hostapd[21432]: Configuration file: /etc/hostapd.conf
Aug 09 12:29:15 yadda hostapd[21432]: HT (IEEE 802.11n) with WPA/WPA2 requires CCMP/GCMP to be enabled, disabling HT capabilities
Aug 09 12:29:15 yadda kernel: br0: port 1(wlan0) entered blocking state
Aug 09 12:29:15 yadda kernel: br0: port 1(wlan0) entered disabled state
Aug 09 12:29:15 yadda kernel: device wlan0 entered promiscuous mode
Aug 09 12:29:15 yadda systemd-udevd[21437]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Aug 09 12:29:15 yadda systemd-udevd[21437]: Could not generate persistent MAC address for br0: No such file or directory
Aug 09 12:29:15 yadda hostapd[21432]: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Aug 09 12:29:15 yadda hostapd[21432]: Using interface wlan0 with hwaddr 70:1a:04:8e:7d:44 and ssid "\"yaddayadda\""
Aug 09 12:29:15 yadda hostapd[21432]: wlan0: interface state COUNTRY_UPDATE->ENABLED
Aug 09 12:29:15 yadda hostapd[21432]: wlan0: AP-ENABLED

/etc/hostapd.conf has the following settings:

channel=1
acs_num_scans=5
acs_chan_bias=1:0.8 6:0.8 11:0.8
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=-1
fragm_threshold=-1
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
ieee80211n=1
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=1
wpa_passphrase=blahblah 
wps_rf_bands=ag

Thank you for your assistance.

First,
What guide or guidance are you using to set up your hostap?

And,
More specifically,
I’m wondering why you have a br0 device configured…
Are you running your hostap in a virtual machine, and if you are what kind of virtualization and management is being used?
If you are running in a virtual machine, you may need to drop your firewall on your HostOS… or open the requisite ports and that could be many.

TSU

I’m running this on a PC Engines Apu3 with a Qualcomm Atheros AR928X Wireless Network Adapter, so there is no virtual machine involved. I did mistakenly select tumbleweed in the title of this post in this forum when it should be Leap 15.1.

I set the bridge=br0 parameter because the hostapd.conf comments include:

# In case of atheros and nl80211 driver interfaces, an additional
# configuration parameter, bridge, may be used to notify hostapd if the
# interface is included in a bridge.

I did not however, do anything else to configure the bridge. My hope was the bridge would allow traffic between the ethernet interface and the wireless one. If it is easier to set up with routing or configuring the bridge in a different manner, I’m happy to do that.

I stopped the firewall with “systemctl stop firewalld” and did not see any change in behavior.

As for guides, I did not find what seemed like a suitable one and made the settings based on the comments in the hostapd.conf file.

Thank you for your assistance.

  1. How many ethernet devices do you have on your machine?
  2. Try pinging (both directions) between your hostap machine and another if possible at all, what you’d be trying to do is establish whether there is <any> kind of basic network connectivity at all or if it all doesn’t work.
  3. In YaST you should also see if br0 is associated with the proper network interface, otherwise you should be able to collect the necessary info as follows…

The following ArchWiki seems pretty useful describing both ip and bridge-utils commands for displaying and configuring bridge devices (I’m more used to bridge-utils but have to get used to the newer commands which are default and don’t require installing a package)

https://wiki.archlinux.org/index.php/Network_bridge

TSU

There are three ethernet interfaces.

  1. Try pinging (both directions) between your hostap machine and another if possible at all, what you’d be trying to do is establish whether there is <any> kind of basic network connectivity at all or if it all doesn’t work.

The cable is plugged into eth0, it receives an IP address via DHCP, and I am able to ping (and ssh) from a separate PC to it. Pinging from the device to a PC works.

  1. In YaST you should also see if br0 is associated with the proper network interface, otherwise you should be able to collect the necessary info as follows…

I am able to see the bridge device in Yast, but the tool doesn’t appear to list or allow setting of what interfaces are associated with the bridge. It does have a static ip address specified. Even though the interface is up, it doesn’t appear listed with “ip addr show,” which shows the following:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0d:b9:4f:fb:98 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.79/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2600:1700:37a8:30:78cd:f551:dece:9017/64 scope global temporary dynamic 
       valid_lft 3357sec preferred_lft 3357sec
    inet6 2600:1700:37a8:30:20d:b9ff:fe4f:fb98/64 scope global mngtmpaddr dynamic 
       valid_lft 3357sec preferred_lft 3357sec
    inet6 fe80::20d:b9ff:fe4f:fb98/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:0d:b9:4f:fb:99 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:0d:b9:4f:fb:9a brd ff:ff:ff:ff:ff:ff
5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP group default qlen 1000
    link/ether 70:1a:04:8e:7d:44 brd ff:ff:ff:ff:ff:ff
12: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 70:1a:04:8e:7d:44 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::721a:4ff:fe8e:7d44/64 scope link 
       valid_lft forever preferred_lft forever

I am also unable to ping the bridge’s statically assigned IP address.

The /etc/sysconfig/network/ifcfg-br0 file reads:


BOOTPROTO='static'
BRIDGE='yes'
BRIDGE_FORWARDDELAY='0'
BRIDGE_PORTS='eth0 wlan0'
BRIDGE_STP='off'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.1.2/24'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'

Thanks for your help!

Changed it.

Please next time ask things like that through the report button (the triangle with the ! below each post. You can not expect us to always find such rather hidden remarks.

You should verify your bridge device with

bridge link

or if you have bridge-utils installed

brctl show

According to your interface file, your bridge device device should be configured for the address 192.168.1.2, is that a valid address on your eth0 physical network?
Note that address is not showing up in your “ip address” command for br0.

Did you install hostap from an openSUSE package or some other way?

TSU

After rebooting, I am know able to ping and ssh to 192.168.1.2. eth0 comes up without an IP address.

bridge link produces:


2: eth0 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 4 

or if you have bridge-utils installed

brctl show

Produces:


bridge name     bridge id               STP enabled     interfaces
br0             8000.000db94ffb98       no              eth0

According to your interface file, your bridge device device should be configured for the address 192.168.1.2, is that a valid address on your eth0 physical network?

Yes.

Did you install hostap from an openSUSE package or some other way?

Yes, it is the standard package installed with a default configuration via Yast.

After using the command “brctl addif br0 wlan0” brctl show returns:

bridge name     bridge id               STP enabled     interfaces
br0             8000.000db94ffb98       no              eth0
                                                        wlan0

Rebooting after that has brctl show only listing eth0 as an interface, even though wlan0 is listed as up.

I assume from your non-answer about what guide or reference you’re using to set up that you’re not using any, and your attempts to add the wlan0 interface is consistent with that (isn’t how hostapd works).

Looks like the SDB Hostapd wasn’t completed by whoever might have started it… the few commands are insufficient…
https://en.opensuse.org/SDB:Hostapd

When openSUSE lacks documentation or I’m looking to supplement I generally recommend the ArchWiki articles, and I recommend this again for setting up hostapd. It’ll walk you through the basics from verifying Linux support and installing alternate drivers if necessary for your wireless device, suggest some commands for testing, and various configurations, then various steps for completing your AP setup (including encryption).

https://wiki.archlinux.org/index.php/Software_access_point#Bridge_setup

Note that if you’re configured with the bridging setup, you should not assign the wlan0 interface to br0…

Try following the steps in the ArchWiki and if you run into a problem, post again with details on what was tried and the result.

TSU