Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教一下修改信道设置是在哪个文件? #8

Open
BROBIRD opened this issue Feb 9, 2017 · 5 comments
Open

请教一下修改信道设置是在哪个文件? #8

BROBIRD opened this issue Feb 9, 2017 · 5 comments

Comments

@BROBIRD
Copy link

BROBIRD commented Feb 9, 2017

工信部已经开放了更多的5G信道,但是固件里的这个列表一直没有更新过。
https://zh.wikipedia.org/wiki/WLAN%E4%BF%A1%E9%81%93%E5%88%97%E8%A1%A8#5_GHz_.28802.11a.2Fh.2Fj.2Fn.2Fac.29.5B15.5D

@gorden5566
Copy link
Owner

gorden5566 commented Feb 11, 2017

1、从页面元素可以定位到trunk/user/www/n56u_ribbon_fixed/Advanced_Wireless_Content.asp的第550行

543 <select name="wl_country_code" class="input" onChange="return change_common_wl(this, 'WLANConfig11a', 'wl_country_code')">
544     <option value="US" <% nvram_match_x("", "wl_country_code", "US","selected"); %>>USA (channels 36,40,44,48,149,153,157,161,165)</option>
545     <option value="AU" <% nvram_match_x("", "wl_country_code", "AU","selected"); %>>Australia (channels 36,40,44,48,149,153,157,161,165)</option>
546     <option value="NO" <% nvram_match_x("", "wl_country_code", "NO","selected"); %>>Norway (channels 36,40,44,48,149,153,157,161,165)</option>
547     <option value="FR" <% nvram_match_x("", "wl_country_code", "FR","selected"); %>>France (channels 36,40,44,48)</option>
548     <option value="GB" <% nvram_match_x("", "wl_country_code", "GB","selected"); %>>Europe (channels 36,40,44,48)</option>
549     <option value="TW" <% nvram_match_x("", "wl_country_code", "TW","selected"); %>>Taiwan (channels 149,153,157,161)</option>
550     <option value="CN" <% nvram_match_x("", "wl_country_code", "CN","selected"); %>>China (channels 149,153,157,161,165)</option>

这里只是页面显示,不是实际写入的值
2、通过onChange事件函数调用change_common_wl(this, 'WLANCo nfig11a', 'wl_country_code')定位到trunk/user/www/n56u_ribbon_fixed/wireless.js中的函数定义,根据调用可以找到574行CN信道定义,对应第579行

571     else if (country == "BZ" ||
572         country == "BO" ||
573         country == "BN" ||
574         country == "CN" ||
575         country == "ID" ||
576         country == "IR" ||
577         country == "PE" ||
578         country == "PH")
579         channels = new Array(0, 149, 153, 157, 161, 165); //Region 4

这里把CN拿出来,再加个if判断处理,自己定义下信道
else if (country == "CN") {
channels = new Array(0, 149, 153, 157, 161, 165)

以上只是解决问题的思路,未曾测试,具体还需自己多尝试

@BROBIRD
Copy link
Author

BROBIRD commented Feb 11, 2017

好的 感谢赐教!我来做一些测试。

@BROBIRD
Copy link
Author

BROBIRD commented Feb 11, 2017

我用149, 153, 157, 161, 165作为关键字在源码中搜索,结果如下:https://github.com/andy-padavan/rt-n56u/search?l=C&q=%22149%2C+153%2C+157%2C+161%2C+165%22&type=Code&utf8=%E2%9C%93 似乎是与硬件有关的代码,这一部分是否也需要改动呢?

@gorden5566
Copy link
Owner

这个我不清楚,有可能我前面提到的只是页面显示部分,那就需要改其他地方的代码。

@BROBIRD
Copy link
Author

BROBIRD commented Feb 11, 2017

我觉得……还是等原作者andy修改吧= =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants