Setting country code for Edge


since hostapd is no longer used to create the AP in the latest firmware, how do I set the regulatory domain for Edge? I already tried to set it manually with “iw set reg DE” and it worked (iw list showed 13dbm for channel 161) until I power cycled the Edge, then it was back to country code 00. I then tried to set the regulatory domain in /etc/default/crda and now “iw get reg” shows me some mixed settings:

Country DE: DFS-ETSI

“iw list” now shows 30dbm for channel 161 (13dbm allowed in Germany) and even “iw reg set DE” does not change anything anymore. Maybe I am the only one concerned with such regulatory BS, but I think, anybody who wants to use the Edge commercially should be able to make sure he obeys the rules.

1 Like

Would have liked to fly the copter this weekend, but I am giving up for now.

What worked:
Removing every reg domain (crda, raspi-config, etc.) setting so “iw reg get” shows reg domain unset global 00 , reboot, then set reg domain with “iw reg set DE”,
“iw list” shows the correct power settings for the 5GHz channels.
This only holds till the next reboot/power cycle

What does not work:

Basically everything I tried to make this setting last:

Setting wifi country in raspi-config only adds Country=DE to wpa_supplicant.conf, no effect.
Adding “sudo iw reg set DE” to rc.local. “iw reg get” shows global, Country=DE, but “iw list” shows every channel at 30dbm.
Creating a script and service to run “iw reg set DE” before Networkmanager, same effect as the solution above.
After any permanent setting is active, manually entering “iw reg set DE” does not change anything anymore.
I am out of ideas, perhaps someone from @emlid could add something?

Hi, @schuermannsebastian!
Sorry for any inconvenience this has caused. We’re testing regional settings support and will add them as soon as possible in the further update. For now wifi manager daemon sets txpower on start to 30 dBm. You can change this by typing iwconfig wlan0 txpower 13. Alternatively you can disable this behavior by modifying our Python script. If you’re interested in it, I can show your what needs to be changed there.

Hi Kirill, no worries, I had other things to fly with. I suspect the setting with iwconfig will also not be permanent.
If you could tell me what I would have to change in the python script, that would be great.

1 Like

You just need to edit /usr/lib/python3/dist-packages/edgenmcontrol/ Go to the line 130 and substitute 30 with 13.

Just wanted to add one thing. We’re using U-NII-3 band for access point, but in most of Europe only SRDs (Short Range Devices) are allowed to use it. Changing the band to 140 should be a better choice since you can increase txpower to 26 dBm. Type nmcli c modify edge:xxxxxx 140, where edge:xxxxxx is the Edge’s ssid.

Unfortunatly we are only allowed to fly SRD channels 149-165 at 25mW in Germany, it is not allowed to use any other 5GHz channel on the outside of an aircraft, even if the access point supports DFS/TPC. 5GHz is used by radar installations and the german regulatory authority (Bundesnetzagentur) has fixed listening stations all over the country, to detect rogue frequency usage. Since I fly in the same spots most of the time, I am not going to risk it.

I flew the copter yesterday with TX power set to 13dbm. I had the Alfa adapter on a tripod about 1.7m above the ground. Flying at about 50m (I have to check the log to see how high it actually was), I got a telemetry range of 350m. The link was stable, but aa soon as I flew into a position where a car was in line between the ground antenna and the copter, the connection was gone. The car was parked about 2m away from the antenna and not directly in the line of sight.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.