Iwchan usage, wiki

I have a problem using iwchan, as described on wiki. 'iwchan list' works for me, but 'iwchan get' always gets an empty string. Running 21.02.03, on GLiNet AR300M16.
BTW: Isn't "chmod +x iwchan.sh" missing ?

Apparently, currently there is no new channel that meets the requirements.

The default thresholds are as follows:

if(freq_thr == "") freq_thr = 15
if(load_thr == "") load_thr = 1000

This means that the load of the new channel must be at least 1001 units lower and the space between the new and the current channel must be at least 20Mhz.
If these conditions are not met, the function returns nothing.

if(freq_diff < freq_thr || load_diff < load_thr) return

If you want to see the channel with the least load without any conditions, set the thresholds to zero.

root@OpenWrt:~# awk -f iwchan.awk get
root@OpenWrt:~# awk -f iwchan.awk get phy1 0 0
11
root@OpenWrt:~#

Running the script using source does not require execute permissions or shebang.

Ah, this should be the reason. Thanx.