Allow Channels 12,13,14 based on country (*MOD*)

Suggest improvements and new features for Gargoyle.

Moderator: Moderators

marrco
Posts: 47
Joined: Fri Dec 26, 2014 1:00 pm

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by marrco »

EDIT: after a few unsuccessful test i realized there is an easier way to do that. So i removed the previous post

Ok, i found something interesting in cache_basic_vars.js thats called from basic.sh and to automagically add the new channels to the interface all i have to do is delete /var/cached_basic_vars that's recreated when the user first access basic.sh page.

so atm all i need to type is rm /var/cached_basic_vars after iw reg set EU_COUNTRYCODE

Lantis
Moderator
Posts: 6721
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by Lantis »

could you simply re-run the cache basic vars or does it check itself on run?

Glad you are squared away.

EDIT: seems like the script fails if it already exists (at least thats what hotplug says). looks like rm is your best method.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

marrco
Posts: 47
Joined: Fri Dec 26, 2014 1:00 pm

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by marrco »

Thanks for your help Lantis, i'm having fun learning how openwrt/gargoyle work. It's not easy for me to understand what files do what because of the overlay system and lots of scripts.

But building it in cloud is cheap (less than 10 cents per build) and fast. Right now i just found a better (maybe it's the correct) way to list all channels in the web interface:

-) Use a build with "CONFIG_ATH_USER_REGD=y" (easy)
-) ssh to your router or just install webshell plugin
-) uci set wireless.radio0.country=YOUR-COUNTRY-CODE
-) uci commit wireless && wifi
-) reboot

if you or someone else outside US wants to help testing just PM and I gladly prepare a build with CONFIG_ATH_USER_REGD=y for his router model.

Lantis
Moderator
Posts: 6721
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by Lantis »

It is fun isn't it? :) What is your profession? Do you have much experience with these kind of things? I personally love this stuff, and problem solving is what really gets my brain moving.
Most of Eric's code is actually very well documented. Openwrt's wiki is a bit hit and miss but most of the UCI system is documented well enough.

Ahh! Yes i did suggest setting a country code in /etc/config/wireless a few posts back. And this automatically triggers the Gargoyle interface to let you do as you please? This is definitely a better way of doing it.

That's a cool option for cloud building.

I'm quite busy with uni at the moment but i'll try this next build i do and report back.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

marrco
Posts: 47
Joined: Fri Dec 26, 2014 1:00 pm

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by marrco »

I'm just an old dog learning new tricks. Including the fact that's not always easy to modify a file and keep changes after reboot. I still haven't find my way with openwrt layout and its overlay system. So i was not obvious to me that to modify etc/config/wireless i had to use that uci command and not vi.
Add that to the fact my tplink has just 4MB disk, with less than 100KB free. And you have twice the fun. Especially if you consider that I don't really need chan 12 and 13, because i run my access point on chan 7.

I agree this is the way to go. Just enable that option at build time, set your country code and reboot.

I still have to verify the issue with US transmit power now. I'm rebuilding images atm. Default gargoyle has 30 dBm but the modded build only 20.

Do you know if we have to enable CONFIG_PACKAGE_ATH_DFS=y too?
i'm reading a discussion here: https://lists.openwrt.org/pipermail/ope ... 26619.html

Lantis
Moderator
Posts: 6721
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by Lantis »

i would expect not from reading this: http://wifi-insider.com/wlan/dfs.htm
looks like it is only relevant to the 5GHz band.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

marrco
Posts: 47
Joined: Fri Dec 26, 2014 1:00 pm

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by marrco »

do you have any experience integrating patches into gargoyle? I'd like to try this: https://forum.openwrt.org/viewtopic.php?id=52626
so to have not only the CONFIG_ATH_USER_REGD set, but also the reghack mod already done, via patched image.

I see that there are many openwrt version with that mod, ie. https://forum.openwrt.org/viewtopic.php?id=54604 and even on openwrt wiki that mod is cited (ie. http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd):
WiFi: Using other country regulations

Per default the WLan-"Country Code" is set to US. That means users of OpenWRT worldwide are limited to Channel 1-11.

To unlock the specific channels of your country, it is possible to compile OpenWRT with "ATH_USER_REGD" set (recommended), or by patching the kernel modules (see: http://luci.subsignal.org/~jow/reghack/).

WARNING: Do this only if you know what you're doing! Using the wrong frequencies can result in interfering with other radio services.
regarding "I still have to verify the issue with US transmit power now. I'm rebuilding images atm. Default gargoyle has 30 dBm but the modded build only 20. " i did a few more tests. It was my mistake, everything works fine

ATM, with just ATH_USER_REGD=y i can simply use the webshell plugin and paste: uci set wireless.radio0.country=2-letter-EU-country; uci commit wireless; wifi and after a reboot everything works fine, even the interface list 20dBm max transmit power and chan 12 and 13 available.
And after set wireless.radio0.country=US I get back maximum 30dBm and only channel 1-11 available

so i'd say that's a more legal and compliant gargoyle. Still defaulting to (wrong in many countries) US values, but that can be easily set to respect EU laws that have lower transmit power, but permit chan 12 and 13 usage.

so, with a modified kernel the easiest way to have a EU (or JP or whatever not-US country you may live in) is.
-) install Webshell plugin
-) uci set wireless.radio0.country=2-letter-id; uci commit wireless; reboot

to verify country and capabilities, using webshell plugin just type 'iw reg get' or 'uci show wireless' and 'iw list'

Lantis
Moderator
Posts: 6721
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by Lantis »

because its an openwrt patch it is just applied as stated in that topic by dropping it into "target/linux/ar71xx/patches-3.10" or the equivalent target and/or kernel version.

i've actually never tried it. i was going to kickoff a build this week but i've been having to use my computer flat out for other things.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

marrco
Posts: 47
Joined: Fri Dec 26, 2014 1:00 pm

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by marrco »

Lantis wrote:because its an openwrt patch it is just applied as stated in that topic by dropping it into "target/linux/ar71xx/patches-3.10" or the equivalent target and/or kernel version.
That's what i tought, but look here:
http://paste.debian.net/168088/
# Compile firmware
# Apply reghack
# Rebuild images to include reghack

maybe we can do that too. Today i tried to use 'make custom' but no luck in creating a build with a different module. I was trying to integrate nodogsplah in the image (8411nd han not enough free space to opkg install it), but all i got was an aborted build.

Ok, i know it's easier to get a wr-1043, but i'm trying to learn new things.

nworbnhoj
Posts: 916
Joined: Mon Jul 21, 2014 10:08 am
Location: Australia
Contact:

Re: Allow Channels 12,13,14 based on country (*MOD*)

Post by nworbnhoj »

marrco wrote:Ok, i know it's easier to get a wr-1043, but i'm trying to learn new things.
+1
Can you help someone else get Gargoyle up and running?
TL-WDR3600 : Gargoyle 1.9.0 : NBN FixedWireless
TL-WR1043ND-V2 : Gargoyle 1.8.0 : 3G Huawei E160E

Post Reply