Jump to content

WLAN access point issues with services and channels


ygoe

Recommended Posts

Hello,

 

I'd like to set up a WLAN access point with WLAN adapters attached to USB on my Orange Pi Zero.

 

First I started with a dualband adapter and used the armbian-config tool. It took forever (like minutes with a black screen) but eventually completed and gave me a working access point on channel 40. That's fine but I also need to be able to change this to a 2.4 GHz channel. That's where things got problematic.

 

I edited /etc/hostapd.conf and changed the channel number from 40 to 5, then restarted hostapd. That didn't work. The service restarted but there was no access point anywhere to be found on the air. Also, the WLAN adapter's LED didn't blink regularly as before, but only occasionally. I couldn't find anything in the logs. Can't I just change the channel number? Do I also need to change other settings?

 

Next I tried with another WLAN adapter that only supports 2.4 GHz. I rebooted the device with the other adapter attached. It was also recognised. I updated these files to use the new network interface accordingly:

 

/etc/network/interfaces.d/armbian.ap.nat

/etc/hostapd.conf

/etc/dnsmasq.conf

 

The access point comes up on the desired channel this time. But I can't connect because dnsmasq isn't running. It wants to bind to the WLAN's IP address but that isn't assigned. I'm not sure how a statically assigned IP address can't be assigned. Maybe I need another magic spell for that one as well.

 

So for now, nothing except 5 Ghz works. That's not enough.

 

Here are my current config files:

/etc/network/interfaces.d/armbian.ap.nat

#allow-hotplug wlx0013eff45e2e   # dual-band adapter
allow-hotplug wlx801f02e695a0    # 2.4 GHz adapter
#iface wlx0013eff45e2e inet static
iface wlx801f02e695a0 inet static
        address 10.0.0.1
        netmask 255.255.255.0
        network 10.0.0.0
        broadcast 10.0.0.255

 

/etc/hostapd.conf

ssid=ARMBIAN
#interface=wlx0013eff45e2e   # dual-band adapter
interface=wlx801f02e695a0    # 2.4 GHz adapter
hw_mode=g
channel=5
#bridge=br0
driver=nl80211

logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
wpa=2
preamble=1

#wpa_psk=34ed41c482f2bb8ffbbf589952245121ee70c666d1186ebefa51a86b17829990
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

## IEEE 802.11n
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]
country_code=DE
ieee80211d=1
## IEEE 802.11n

## IEEE 802.11a
#hw_mode=a        # disabled for the 2.4 GHz adapter
## IEEE 802.11a

## IEEE 802.11ac
#ieee80211ac=1        # disabled for the 2.4 GHz adapter
vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP3]
vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=42
## IEEE 802.11ac

# controlling enabled
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

 

/etc/dnsmasq.conf

#interface=wlx0013eff45e2e   # dual-band adapter
interface=wlx801f02e695a0    # 2.4 GHz adapter
listen-address=10.0.0.1
bind-interfaces
server=8.8.8.8
domain-needed
bogus-priv
dhcp-range=10.0.0.10,10.0.0.199,12h

 

This is the output of ip a:

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
    (...)
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 12:42:35:f1:2d:fe brd ff:ff:ff:ff:ff:ff
4: wlx801f02e695a0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 80:1f:02:e6:95:a0 brd ff:ff:ff:ff:ff:ff

 

eth0 is my wired network, wlan0 is the on-board WLAN I'm not using (no antenna attached). The other wlx... interfaces are the USB WLAN adapters.

 

And this is my general system info:

http://ix.io/3xLF

 

What do I need to do to make this WLAN access point work with both adapters, and on any channel I want (supported by the hardware)?

Link to comment
Share on other sites

7 minutes ago, ygoe said:

Not at the same time.

 

I have been running two AP points this way. One at 2.4 and one at 5. With some different hardware ofc.

 

First you have to be sore they are working separately, then you can bring up both. If this is not working, its a bug somewhere. Not necesarely in the hostap, but in drivers or legislate - perhaps certain channel is blocked at your location / country setting.

 

... and you need to have bridge mode, with both devices added to the bridge.

Link to comment
Share on other sites

Maybe my description was a bit confusing. I'll try to clarify.

 

I don't want to have an access point on both bands at the same time. I just want it on one (configurable) band. That's already enough. At first the armbian-config tool chose the 5 GHz band for me and everything was fine. But it didn't offer me to change that (or it did and failed, I can't remember). I wanted to use the same dual-band adapter and have the network on 2.4 GHz now. That is part one. Doesn't work because the SSID isn't visible in 2.4 GHz, only in 5 GHz channel 40.

 

Part two is that I tried with a different WLAN adapter that can only handle 2.4 GHz. This time, the SSID appeared on channel 5 (which also certainly isn't blocked anywhere in the world) but dnsmasq failed to start, probably because the WLAN adapter doesn't have the static IP address that's configured for it. Can a WLAN adapter driver bug cause the static IP address assignment to fail? Without any entry in dmesg? Recently I've learned that Linux drivers can contain any bugs anyone could or could not imagine, including bugs that haven't been invented yet. But this sounds pretty simple to me.

 

WLAN access point configuration looks very complicated to me, with lots of settings no user of a regular access point consumer device would ever see. I'm wondering if all of this is necessary. The more settings there are, the more mistakes one can make setting them. Can I just leave some of them out? Is there a minimal working config set described anywhere? Each WLAN AP tutorial on the web shows completely different settings and values.

Link to comment
Share on other sites

Not sure about the bridge. I have none, says "brctl". armbian-config didn't use a bridge either. The "bridge=br0" line was commented out from the start. At least I'd expect to connect to the device itself, even if I won't get anywhere else. That'd be fine if I want to configure the IoT device via an AP WLAN interface. It doesn't need to provide a WLAN gateway to the internet for me.

 

Update: I've attached the dual-band adapter again. This time, after a reboot, the channel 5 was actually applied. I have no idea why it worked now when it didn't yesterday. And I still have no bridge but can connect to the internet via this AP. traceroute confirms this extra hop. So a bridge certainly isn't required here. Very confusing. Or maybe just unreliable. Still, the 2.4-GHz-only adapter doesn't work at all. And it's one with known good Linux support from Edimax, recommended for RasPi.

Link to comment
Share on other sites

1 hour ago, ygoe said:

The more settings there are, the more mistakes one can make setting them.


Agree, but technology behind is very complicated. Its hard to strip it down.

armbian-config masks a lot of this complexity but its sadly also not a perfect tool. It lack functions, proper maintenance and it lacks it because developing this is very expensive. One needs to have a lot of knowledge and a lot of time. And there comes nothing back to cover that loss. We are trying to get some funding to restart the refactoring of this tool since with our funding, nothing is possible to move on.

1 hour ago, ygoe said:

I just want it on one (configurable) band.


Planned, never done.

 

1 hour ago, ygoe said:

Not sure about the bridge. I have none, says "brctl". armbian-config didn't use a bridge either.


It used to be, but that option was later commented out. Its still in the code, but don't know if it works.  Sadly I can only dedicated few seconds to your questions :( Have to go.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines