CRDA Issues with hostapd

Issues related to configuring your network
Post Reply
Thiudans
Posts: 3
Joined: 2018/11/12 19:19:38

CRDA Issues with hostapd

Post by Thiudans » 2018/11/12 21:37:17

Hello everyone --

This is my first post. A little history. I have a finless PC running Centos7 as an access point. Everything works fine in the 2GHz band, but when I try too set up the 5GHz band, the radio does not start.

Here are some outputs:

Output of iw reg get

Code: Select all

[root@localhost ~]# iw reg get
global
country US: DFS-FCC
	(2402 - 2472 @ 40), (N/A, 30), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
	(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
	(5735 - 5835 @ 80), (N/A, 30), (N/A)
	(57240 - 63720 @ 2160), (N/A, 40), (N/A)

phy#0
country US: DFS-FCC
	(2402 - 2472 @ 40), (N/A, 30), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
	(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
	(5735 - 5835 @ 80), (N/A, 30), (N/A)
	(57240 - 63720 @ 2160), (N/A, 40), (N/A)

global
country US: DFS-FCC
	(2402 - 2472 @ 40), (N/A, 30), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
	(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
	(5735 - 5835 @ 80), (N/A, 30), (N/A)
	(57240 - 63720 @ 2160), (N/A, 40), (N/A)

[root@localhost ~]# 
So far, so good!

However, when I run coda I see this:

Code: Select all

[root@localhost ~]# crda
COUNTRY environment variable not set.
[root@localhost ~]# 
This is stopping me from running on the 5GHz band, as every time I configure the configuration file for 5GHz the radio does not initialize.

Code: Select all

 Change wlan0 to your wireless device
interface=wlp1s0
# Tell hostapd what your new MAC address is
driver=nl80211
ssid=re-home
bridge=br0
hw_mode=a
ieee80211n=1
#ieee80211ac=1
wmm_enabled=1
ieee80211d=1
country_code=US
channel=48
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=thepassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
#bridge=br0
ht_capab=[HT40-][SHORT-GI-40][RX-STBC1][TX-STBC]
obss_interval=1
eap_reauth_period=360000000


bss=wlp1s0.25
ssid=re-bus
bridge=br1
wpa=3
wpa_passphrase=thepassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
ht_capab=[HT40-][SHORT-GI-40][RX-STBC1][TX-STBC]
eap_reauth_period=360000000

bss=wlp1s0.31
ssid=Re-Guest
bridge=br2
wpa=3
wpa_passphrase=thepassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
ht_capab=[HT40-][SHORT-GI-40][RX-STBC1][TX-STBC]
eap_reauth_period=360000000
[admin@localhost ~]$ 
Everything works fine on the 2GHz band.

I have searched the web, but I have found nothing -- which does not mean it isn't there....
Last edited by Thiudans on 2018/11/13 01:58:35, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CRDA Issues with hosted

Post by TrevorH » 2018/11/12 21:57:21

All the parameter names in an /etc/sysconfig/network-scripts/ifcfg-$interface file are case sensitive and must be upper case. So COUNTRY is not the same as country. The parameters themselves (the bit on the right hand side of the = sign) can be any case as far as I know.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Thiudans
Posts: 3
Joined: 2018/11/12 19:19:38

Re: CRDA Issues with hosted

Post by Thiudans » 2018/11/13 00:30:34

Hello Trevor,

I do not have an ifcfg for ,my wlan, do I need one? (Everything works fine on 2 GHz...) Also, I did not see the COUNTRY keyword for rfcfg anywhere.

Finally, if I try to manually set the country, I get the following:

Code: Select all

[admin@localhost ~]$ sudo iw reg set US ; COUNTRY=US /usr/sbin/crda
Failed to set regulatory domain: -28
[admin@localhost ~]$ journalctl | grep crda
Nov 12 19:04:13 localhost.localdomain crda[517]: setting regulatory domain to US based on timezone (America/New_York)
[admin@localhost ~]$ 
[admin@localhost ~]$ 
[admin@localhost ~]$ iw reg get
global
country US: DFS-FCC
	(2402 - 2472 @ 40), (N/A, 30), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
	(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
	(5735 - 5835 @ 80), (N/A, 30), (N/A)
	(57240 - 63720 @ 2160), (N/A, 40), (N/A)

phy#0
country US: DFS-FCC
	(2402 - 2472 @ 40), (N/A, 30), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
	(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
	(5735 - 5835 @ 80), (N/A, 30), (N/A)
	(57240 - 63720 @ 2160), (N/A, 40), (N/A)

global
country US: DFS-FCC
	(2402 - 2472 @ 40), (N/A, 30), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
	(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
	(5735 - 5835 @ 80), (N/A, 30), (N/A)
	(57240 - 63720 @ 2160), (N/A, 40), (N/A)

[admin@localhost ~]$ 
A couple of things that are confusing me. I get an error what I try to set the country code, then it looks like the code is not set, but then it looks like it is set.

I did notice "global" is blank. Is that significant? Also, I am getting -28 now with coda, but before I got -7. I have no idea I that is significant, because the coda man page does not mention it.

The $COUNTRY variable does not seem to take, unless I first type COUNTRY=US. Then, if I run crda I get the generic coda error again.

Code: Select all

[root@localhost ~]# COUNTRY=US
[root@localhost ~]# echo $COUNTRY
US
[root@localhost ~]# /usr/sbin/crda
COUNTRY environment variable not set.
[root@localhost ~]# 
I also have the user rule for coda in /etc/udev/rules

Thanks for your help!

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CRDA Issues with hosted

Post by TrevorH » 2018/11/13 00:51:12

So what is the 2nd file you posted in your initial post? The one that starts with " Change wlan0 to your wireless device"
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Thiudans
Posts: 3
Joined: 2018/11/12 19:19:38

Re: CRDA Issues with hosted

Post by Thiudans » 2018/11/13 01:40:04

That is my hostapd.conf file.

Post Reply