kaloz / mwlwifi

mac80211 driver for the Marvell 88W8864 802.11ac chip
394 stars 119 forks source link

Keep phy2 and radio2 with Linksys WRT 3200ACM European version on 160Mhz and DTS #280

Open p3x-robot opened 6 years ago

p3x-robot commented 6 years ago

Hello @yuhhaurlin !

How are you today?

This is something, I found and this is what is weird for me, given it is the latest LEDE 17.01.4 and your latest driver: Mar 6 19:37:11 192.168.78.1 digi.router hostapd: ACS: Only VHT20/40/80 is supported now

Ok, I found, I had to change the channel instead auto to 100 or 120 as sad in https://github.com/kaloz/mwlwifi/issues/226#issuecomment-338160144 by @BrainSlayer for Europe...

But, I still have a question. :1234:

My wifi /etc/config/wireless:

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11a'
    option path 'soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0'
    option channel 'auto'
    option country 'FR'
    option htmode 'VHT80'

config wifi-iface 'default_radio0'
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'patrikx3-digi'
    option encryption 'psk2+ccmp'
    option key '12345678'
    option wps_pushbutton '0'

config wifi-device 'radio1'
    option type 'mac80211'
    option hwmode '11g'
    option path 'soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0'
    option channel '1'
    option htmode 'HT20'
    option txpower '20'

config wifi-iface 'default_radio1'
    option device 'radio1'
    option network 'lan'
    option mode 'ap'
    option ssid 'patrikx3-digi-slow'
    option key '12345678'
    option encryption 'psk2+ccmp'
    option wps_pushbutton '1'

More info

For the next build I will wish to keep the phy2 (and the radio2 and because phy2 is fixed, I just fix it with the Europan router with this option in the radio2 and remove the option country from the radio0 and radio1:

config wifi-device 'radio1' or 'radio0'
    option country 'FR' # will remove this

Like this mwlwifi should let mwlwifi set it for you...

I found in the README.md that I can keep kmod-mwifiex-sdio and mwifiex-sdio-firmware, given I do not change the radio0, radio1 and because the phy2 is always US I could change to my router FR and it would work.

Do you have and idea what it could be or once phy2 is configured right, is it will work?

In one of your issue comment https://github.com/kaloz/mwlwifi/issues/185#issuecomment-363929704 you said, it might work with disable the option country for radio0 and radio1 and given radio2 is always US, I try to fix it with this option country 'FR' like:

config wifi-device 'radio2'
    option country 'FR'

What do you think master?

Thanks so much!

Patrik

eduperez commented 4 years ago

I noticed that phy#2 can be forced to a region:

root@router:~# cat /etc/modules.d/mwifiex
mwifiex reg_alpha2=FR

Now, all three radios are on the same region, and even the global region is properly configured:

root@router:~# iw reg get
global
country FR: DFS-ETSI
    (2402 - 2482 @ 40), (N/A, 20), (N/A)
    (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
    (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
    (5470 - 5725 @ 160), (N/A, 27), (0 ms), DFS
    (5725 - 5875 @ 80), (N/A, 13), (N/A)
    (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#2
country FR: DFS-ETSI
    (2402 - 2482 @ 40), (N/A, 20), (N/A)
    (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
    (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
    (5470 - 5725 @ 160), (N/A, 27), (0 ms), DFS
    (5725 - 5875 @ 80), (N/A, 13), (N/A)
    (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#1
country FR: DFS-ETSI
    (2402 - 2482 @ 40), (N/A, 20), (N/A)
    (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
    (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
    (5470 - 5725 @ 160), (N/A, 27), (0 ms), DFS
    (5725 - 5875 @ 80), (N/A, 13), (N/A)
    (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country FR: DFS-ETSI
    (2402 - 2482 @ 40), (N/A, 20), (N/A)
    (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
    (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
    (5470 - 5725 @ 160), (N/A, 27), (0 ms), DFS
    (5725 - 5875 @ 80), (N/A, 13), (N/A)
    (57000 - 66000 @ 2160), (N/A, 40), (N/A)

This way, phy#2 remains fully functional, and phy#0 can be used at 160MHz:

root@router:~# iw dev
phy#2
    Interface wlan_iot
        ifindex 28
        wdev 0x200000001
        addr 60:38:e0:bc:34:e3
        ssid acuario_iot
        type AP
        channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
        txpower 17.00 dBm
phy#1
    Interface wlan_kid1
        ifindex 35
        wdev 0x100000004
        addr 62:38:e0:bc:34:ef
        ssid acuario_kid
        type AP
        channel 1 (2412 MHz), width: 40 MHz, center1: 2422 MHz
        txpower 20.00 dBm
    Interface wlan_ext1
        ifindex 32
        wdev 0x100000003
        addr 62:38:e0:bc:34:e0
        ssid acuario_ext
        type AP
        channel 1 (2412 MHz), width: 40 MHz, center1: 2422 MHz
        txpower 20.00 dBm
    Interface wlan_lan1
        ifindex 27
        wdev 0x100000002
        addr 60:38:e0:bc:34:e1
        ssid acuario
        type AP
        channel 1 (2412 MHz), width: 40 MHz, center1: 2422 MHz
        txpower 20.00 dBm
phy#0
    Interface wlan_kid0
        ifindex 44
        wdev 0x5
        addr 62:38:e0:bc:34:e4
        ssid acuario_kid
        type AP
        channel 104 (5520 MHz), width: 160 MHz, center1: 5570 MHz
        txpower 27.00 dBm
    Interface wlan_ext0
        ifindex 43
        wdev 0x4
        addr 62:38:e0:bc:34:e3
        ssid acuario_ext
        type AP
        channel 104 (5520 MHz), width: 160 MHz, center1: 5570 MHz
        txpower 27.00 dBm
    Interface wlan_lan0
        ifindex 42
        wdev 0x3
        addr 60:38:e0:bc:34:e2
        ssid acuario
        type AP
        channel 104 (5520 MHz), width: 160 MHz, center1: 5570 MHz
        txpower 27.00 dBm

Hope this helps!

p3x-robot commented 4 years ago

wow it is awesome! insider solution!

howl commented 4 years ago

We still will be broadcasting the wrong country code in many places. But at least with your appointment plus the reg free patch is possible to enforce the country code where one is by only compiling mwlwifi and not both mwlwifi and mwifiex.

Thanks @eduperez.

thecode commented 4 years ago

I wonder if there is similar workaround for the mwlwifi to set the region code in similar way without a path. Anyway I think the regfree patch should be included in next openwrt releases. It doesn't override TX regulations, it will just allow setting the right country code.

eduperez commented 4 years ago

@howl Well, it's not the wrong region here... (it's the wrong country, but so far I cannot force the country to the mwlwifi driver, so the situation is not worse).

eduperez commented 4 years ago

@thecode I think that the mwlwifi kernel module does not accept any parameter at all, or at least I could not find any reference in the source code.

howl commented 4 years ago

@eduperez it's only possible to avoid forcing the country code by patching the module.

p3x-robot commented 4 years ago

@eduperez this hack is awesome, but my question, it does not work on 160mhz , correct?

howl commented 4 years ago

@p3x-robot the parameter is only to adjust the same country code you have hardcoded for the mwifiex module phy2, so the result is you can use 160 mhz over phy0 without being necesary to deactivate phy2.

p3x-robot commented 4 years ago

now it works awesome, but it works now with DFS and 160MHZ but the wifi i get only just like 10 megabit, if i switch to 80 mhz it goes to up to 600 megabits.

how do you make it to work with 160mhz? it supposed to be double transffer speed, right? 160mhz should be 1733 megabit, bit i can only reach 10 megabit on 160 mhz, why? i want the 1733 megabit. :)

p3x-robot commented 4 years ago

this is my problem, at 160mhz i get: image image it looks like tons of retry problems....

but on 80mhz, i get: image image it looks like few retry problems.

eduperez commented 4 years ago

@eduperez it's only possible to avoid forcing the country code by patching the module.

Is there any advantage? Patching the module is way harder than using a parameter. Besides, as far as I know, patching the module only allows you to specify a country in the config, doesn't it? I do not see a difference.

eduperez commented 4 years ago

@p3x-robot I haven't done any speed tests so far, I just assumed 160MHz would just be faster... Will do some tests after upgrading to 19.07.1 (there is a WMM-related bug on 19.07.0 that can impact speeds).

howl commented 4 years ago

@eduperez he is testing the mwlwifi interfaces, only way is to patch.

@p3x-robot I cannot get it stable, at least using the three interfaces at the same time, causes lots of troubles. Also using only the mwlwifi 5 GHz as client does.

p3x-robot commented 4 years ago

@howl i only use 2 wireless (if i could i would disable 2.4ghz as well, but some old devices cant use 5ghz). for me it is perfect, but i cannot go over 866.7 Mbits. 160Mhz is supposed to be faster (double of 866.7 mbits), but as the screenshot shows above i have issues. on 5ghz 80mhz it is perfect. besides with the 3rd radio hack DTS is working perfectly as well.

eduperez commented 4 years ago

@howl In my case, the mwlwifi interfaces are already on the right region, I do not need to change those. Also, speed tests pending, so far it seems rock solid for me (not using it in client mode, however).

howl commented 4 years ago

@eduperez for all Europe the hardcoded country is France. I could be in a mistake but I suppouse the people without troubles are those ones in United States, where you have US hardcoded for all the interfaces.

thecode commented 4 years ago

Correct, but with the reg_alpha2=FR, you can now set radio2 to FR also.

howl commented 4 years ago

@thecode that's why the mwlwifi patch still makes sense, I don't live in France so to set the three radios is needed the patch for mwlwifi and the module parameter spotted by @eduperez.

Anyway, the router is not stable at all using the three interfaces.

p3x-robot commented 4 years ago

weird, for me it works perfectly, except i cannot get over 877mbit with the wifi. it would be cool with double speed. :) with 160mhz....

p3x-robot commented 4 years ago

@eduperez what is the client mode??? which settings is there?

eduperez commented 4 years ago

@p3x-robot "client mode" is when the router connects to another router by wifi, for example in a "wireless range extender".

p3x-robot commented 4 years ago

@eduperez gotcha thx

httpstorm commented 4 years ago

@thecode I think that the mwlwifi kernel module does not accept any parameter at all, or at least I could not find any reference in the source code.

@eduperez I read the entire source code for mwlwifi in hope to override the TX power to the maximum allowed in my country, but could not find any interface for that. Unless someone can reverse the firmware binary 88W8964.bin. I also did not find a way to override the country code, so airport -s shows the country as -- even though OpenWRT is set to BG and I'm using the region free patch. An interesting observation to note is that the stock firmware is able to set the country code. If I recall correctly, airport -s shows EU or 98. It is also possible to modify mwlwifi so that the fixed region code (in my case 98) will be reported to OpenWRT as BG or any other country instead of FR. So pretty much no interesting parameters are accepted by the kernel module, or at least I didn't find a way of sending them to the hardware. Since all of my routers use custom preconfigured images and I'm building anyway, patching is as easy as copying the patch to the right place.

One important note about reliability. I tried enabling WPA3 and .11w, but with these the mwlwifi driver dies after a few minutes and requires a reboot. I also remember that phy2 (mwifiex) is not reliable and certain configurations may cause it to stop and deregister. I like using it as a client to some bad public network when travelling abroad. Its directional antenna has a good range, but the speed a very poor. Any time I need a client, I would prefer using the 2.4 GHz radio (phy1) for that, and the 5 GHz (phy0) as an AP. With that said, phy2 is available on my build, but the AP and client configurations I have set for it are not enabled. So far 33 days of uptime and everything works great.

I'm not familiar with the 19.xx.x naming. Is r11829 affected by the WMM bug?

@howl For devices in Europe, the hard-coded region is 98 which should refer to the non-existing code EU. Hence someone patched the driver to report FR instead. This can be changed to BG or any other country you like:

mwlwifi-2019-03-02-31d93860/core.c
-   {"FR", 0x30}, /* France */
+   {"BG", 0x30}, /* Bulgaria */

@p3x-robot 160 MHz works with my region-free patch. And you can use all three radios. Removing the DFS markers from regdb also helps to get everything running smoothly. Otherwise you may have to wait like 5 minutes before the Wi-Fi network gets online if using 160 MHz, because the radio takes a very long time to scan for radars. I have not used the original reg-db in the past three years, so my memory is a bit fuzzy on this. One important note about 160 MHz is that you need both sides to support it, and it is non standard so compatibility may not be perfect. I don't have a second device, so even though 160 MHz is enabled on the router, my MacBook Pro 2018 only supports 80 MHz. Benchmarks show around 800-900 Mbit/s at 62% signal, around three meters away. You can use my tool gns to benchmark the network. It is compiled for WRT3200ACM, Windows and Linux x64. It also supports FreeBSD and iOS but I need to compile it: http://httpstorm.com/tools/gns/

I have the best signal strength at channel 100. 104 is the same or 1 dB lower. Above that, it gets a few dB lower. I see the two screenshots use different channels. Perhaps this affects the performance? There are no 5 Ghz radios around me. BTW if you want 160 MHz up to ch 128, you need to do some serious black magic with the reg-db. Your signal strength is much higher than mine, but the screenshot shows lower bitrate and BW for RX. While Intel have good LAN adapters, their Wi-Fi cards are not a good choice when performance and signal are important. My iPhone 7 Plus is using Intel. The old iPhone 4s had a way better reception. I see this in both directions, and the link to my MacBook Pro 2018 (Broadcom) is always perfect: 1300.0 Mbit/s, 80MHz, VHT-MCS 9, VHT-NSS 3, Short GI

With my iPhone 7 Plus the link varies a lot on mood and position. I usually get 200-600 Mbit/s during tests.

httpstorm commented 4 years ago

If anyone is interested in testing my region free OpenWRT image for WRT3200ACM, please let me know if it works well! http://httpstorm.com/openwrt/

FCS001FCS commented 3 years ago

I noticed that phy#2 can be forced to a region:

root@router:~# cat /etc/modules.d/mwifiex
mwifiex reg_alpha2=FR

Now, all three radios are on the same region, and even the global region is properly configured:

@eduperez

I tried your fix and it did not work fully for me. DFS works OK for Radio 0 but the third Radio (radio 2) will not come up. It scans OK but will remain disabled in the GUI.

BTW the file name in my set up is: /etc/modules.d/mwifiex-sdio (not just mwifiex) and after your fix the text in the file is:

mwifiex_sdio
mwifiex reg_alpha2=FR

I get the same good output as you for the iw reg get with all radios and global at country FR: DFS-ETSI

I do not get the same output for iw dev it only lists the first 2 Radios, the third radio (radio 2 - phy#2) is not listed, I guess this is the problem

Wireless config for the third radio is:

config wifi-device 'radio2'
    option type 'mac80211'
    option path 'platform/soc/soc:internal-regs/f10d8000.sdhci/mmc_host/mmc0/mmc0:0001/mmc0:0001:1'
    option hwmode '11g'
    option legacy_rates '0'
    option channel '3'
    option country 'FR'

config wifi-iface 'default_radio2'
    option device 'radio2'
    option network 'lan'
    option mode 'ap'
    option encryption 'none'
    option ssid 'TestThirdRadio'

My system log errors are:

Sun Sep 20 23:12:59 2020 daemon.notice netifd: radio2 (3338): command failed: Not supported (-95)
Sun Sep 20 23:12:59 2020 user.notice mac80211: Failed command: iw phy phy2 set antenna_gain 0
Sun Sep 20 23:12:59 2020 daemon.err hostapd: Configuration file: /var/run/hostapd-phy2.conf
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.636523] br-lan: port 4(wlan2) entered blocking state
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.641873] br-lan: port 4(wlan2) entered disabled state
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.647378] device wlan2 entered promiscuous mode
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: wlan2: interface state UNINITIALIZED->COUNTRY_UPDATE
Sun Sep 20 23:12:59 2020 daemon.err hostapd: Using interface wlan2 with hwaddr 60:38:e0:bd:6e:e3 and ssid "TestThirdRadio"
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.662559] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0xb1 error, result=0x1
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.669570] mwifiex_sdio mmc0:0001:1: Failed to start the BSS
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.675374] mwifiex_sdio mmc0:0001:1: Failed to start AP
Sun Sep 20 23:12:59 2020 daemon.err hostapd: Failed to set beacon parameters
Sun Sep 20 23:12:59 2020 daemon.err hostapd: Interface initialization failed
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: wlan2: interface state COUNTRY_UPDATE->DISABLED
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: wlan2: AP-DISABLED
Sun Sep 20 23:12:59 2020 daemon.err hostapd: wlan2: Unable to setup interface.
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: wlan2: interface state DISABLED->DISABLED
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: wlan2: AP-DISABLED
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: wlan2: CTRL-EVENT-TERMINATING
Sun Sep 20 23:12:59 2020 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan2 wasn't started
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: nl80211: deinit ifname=wlan2 disabled_11b_rates=0
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.725027] device wlan2 left promiscuous mode
Sun Sep 20 23:12:59 2020 kern.info kernel: [  768.729548] br-lan: port 4(wlan2) entered disabled state
Sun Sep 20 23:12:59 2020 daemon.notice hostapd: ELOOP: remaining socket: sock=24 eloop_data=0xb6fa3900 user_data=0 handler=0x2b8e4
Sun Sep 20 23:12:59 2020 daemon.notice netifd: radio2 (3338): cat: can't open '/var/run/wifi-phy2.pid': No such file or directory
Sun Sep 20 23:12:59 2020 daemon.notice netifd: radio2 (3338): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process  path (/proc/exe)
Sun Sep 20 23:12:59 2020 daemon.notice netifd: radio2 (3338): Command failed: Invalid argument
Sun Sep 20 23:12:59 2020 daemon.notice netifd: radio2 (3338): Device setup failed: HOSTAPD_START_FAILED

The relevant packages installed are: image

What am I missing to make this work?

eduperez commented 3 years ago

Try building from here: git clone https://github.com/httpstorm/openwrt.git cd openwrt/ git checkout gvalkov

That "gvalkov" branch contains patches that disable DFS and ignore all regulations... that has to be illegal!

eduperez commented 3 years ago

What am I missing to make this work?

I have no idea... you seems to have the relevant packages, and your config seems almost identical to mine.

httpstorm commented 3 years ago

@eduperez Technically speaking, locking the region of radios to US or EU (non-existent, mapped to FR) creates conditions where a user is not able to set their own region, which may end up working outside local regulatory limits.

Commit DFS-free radio, ignores the hard coded region, and allows the user to follow the local regulations. This branch is meant for testing at user's responsibility, and a hint to aid @FCS001FCS . That should be enough to have all radios working correctly when set to the correct local region. I should also note that it is impossible to change the TX power on the main radio0 radio1, while radio2 is locked up to 14 dBm, which is way bellow any limits.

FCS001FCS commented 3 years ago

What am I missing to make this work?

I have no idea... you seems to have the relevant packages, and your config seems almost identical to mine.

I started from scratch and used Image Builder with both radio type packages selected (mwifiex-sdio-firmware kmod-btmrvl kmod-mwifiex-sdio and mwlwifi-firmware-88w8964). Then did your fix for FR on the Third Radio. Then did wifi down then wifi config then wifi up. Went into the GUI and slowly adjusted all settings on all 3 radios. I had to reboot a few times to make sure the setting took but that's just me. I ended up setting all 3 radios to FR but do not know if it is really needed, it works for me.

2 small observations:

  1. The power is reported as 0 dBm but I see the signal on WIFI Commander (Win 10 laptop).
  2. When the Allow legacy 802.11b rates box is un-selected in the GUI, the Third Radio (Radio2) will not start. When the box is checked, it works OK. I am on channel 13 Legacy. image

Will check it more over the next days but it seems to work OK.

eduperez commented 3 years ago

I ended up setting all 3 radios to FR but do not know if it is really needed, it works for me.

In my case, radio0 and radio1 are fixed to FR, while radio2 was fixed to something else. The firmware for the 88W8964 would detect another radio in a different region, and thus lock radio0 and radio1 into a very restrictive mode: I could use just a few channels on the 5GHz band, and 160MHz could not be used at all.

httpstorm commented 3 years ago

@eduperez radio 2 is hard-coded to US. If drivers are modified so they don't report their hard-coded region, the system considers them unlocked and honours the user set region. 160MHz and 5GHz channels will work according to regulations. Hint: despite its name, one of my patches does that and only that.

As far as I recall, before starting operation on a DFS channel, the radio spends some time monitoring for radars. This is usually around five minutes. The AP should appear after that.

eduperez commented 3 years ago

@httpstorm: A few posts above I outlined a method to change the region code for the third radio, and achieve 160MHz, without having to modify the drivers.

bricco1981 commented 3 years ago

@httpstorm i'm able to change txpower on radio0 and radio1, from luci and from command line. in luci i see txpower set by me.at this point it's just a visual thing?

httpstorm commented 3 years ago

@bricco1981 The driver for radio0 and radio1 does not support changing TX power. I've looked through the entire source code. If you run a WiFi scanner or signal indicator, you will see that the RSSI on the client does not change. On macOS run: airport -s On Windows, you can use my Wi-Fi scanner: http://httpstorm.com/tools/win/wlanscan/

You can achieve the best signal strength and throughput on channels 100-104. 160 MHz is possible on channels 100-128, as well as 36-52*. Note that 36-52 require changes to regdb. Regular speeds with my MacBook Pro 2018 (supports only 80 Mhz) are 800-900 Mbit/s. Benchmark tool: http://httpstorm.com/tools/net/g-net-speed/

bricco1981 commented 3 years ago

@httpstorm so let me understand please, the eu version of the wrt 3200 acm the max txpower without patch on dsf channels is 27 dbm, now with the patch if i set contry code us and i see 30 dbm txpower, is that a true value or not? or at the end still 27?

httpstorm commented 3 years ago

You are far from the truth. Short story: You cannot get or set TX power or break any regulations with this router. At best you can make it work. Long story: First there is the user config. Then the system will apply some restrictions. Then we have a driver which does not support getting or setting TX power. And finally we have a firmware image in binary 88w8964.bin without any source code which runs on the radio - that has a power table and region preprogrammed. When you patch the driver so it doesn't report the region, the system will happy use the restrictions from whatever region you configure. When you patch regdb, the system will allow the maximum TX power specified there, and since the driver does not report the actual power the web interface will just show the maximum allowed value.

bricco1981 commented 3 years ago

hi httpstorm, no I don't break any regulation, I asked just to understand,my country code and txpower are not again regulations. the only think that I'm trying to resolve on this machine is the very very low coverage on 2.4 ghz band. I never had any kind of problem on 5 ghz radio.that's all. anyway thanks for your explanation.

httpstorm commented 3 years ago

Hi @bricco1981 ! There are two reasons I looked through the entire source code of the driver: 1. to make sure the radio works without any region conflicts and startup delays due to DFS scanning; 2. because I also felt that the TX power is way less than the allowed. For example my old 1043ND v4 covers my entire three story building + ceiling. While with WRT3200ACM some devices might switch from 5 GHz to 2.4 in the next room. While in the same room I'm getting 900 Mbit's with my laptop and 500 with my phone. Sadly I could not find any interface or code that affects TX power, but at lease I could disable the code which reports the region, so we can resolve point 1. For 5GHz I recommend using channel 100. For 2.4 GHz: 8 or 5 might be a good option, but you should test what works best for you. Hove you performed any benchmarks or statistics?

abuzaruzair commented 3 years ago

Hi @httpstorm

If anyone is interested in testing my region free OpenWRT image for WRT3200ACM, please let me know if it works well! http://httpstorm.com/openwrt/

i flashed this version then rest the router, now i dont know the root password & even the wifi "ivan" password, please help 😟

httpstorm commented 3 years ago

Hi @abuzaruzair Please excuse my mistake! I forgot to remove my config. Don't worry, I will help you restore your router, it's quite easy even without a root password. To boot the previous firmware, perform these steps:

  1. Power off the router
  2. Power on, wait 10 seconds, and then power off (repeat 3 times)
  3. Power on the router, it will boot from the previous partition

You can install the new FW. I compiled and tested it on my router to make sure there are no passwords or left over config. You may use the same link: http://httpstorm.com/openwrt/wrt3200acm/

The default Wi-Fi network is called httpstorm, and operates on channel 100, using 160 MHz. As a bonus, the new FW image is configured to mount USB storage automatically under /mnt. Pressing the reset button for less than a second, ejects all removable media. You can also access it under http://192.168.1.1:83/ - this can be disabled under System, Startup, g_httpstorm.

If you wish to run network benchmark, run the gns tool, which is preinstalled on the router. You also need to run it on a computer or another router: http://httpstorm.com/tools/net/g-net-speed/

Let me know if you still have any issues or requests, and I will help you get back to a happy router as soon as possible to compensate for my mistake! Good luck!

abuzaruzair commented 3 years ago

Hi @httpstorm

Thanks for fast reply and helpful solution, one more thing, the kernel version in you package is 5.4.75-1XXX and i want to install many package requires the version 5.4.87-1XXX any solution? :(

httpstorm commented 3 years ago

Hi @abuzaruzair Unfortunately, even if I build the correct kernel version, you probably won't be able to install kernel modules from another source. Each build adds a unique tag to the kernel, and the kernel modules will only install on that kernel. Regular apps are not affected: I was able to install new apps on a 3 year old kernel.

You have two options:

  1. If you provide a list of all required packages, I can build a custom image for you.
  2. Create your own build environment. It's quite easy, and you can customise your image and default settings:
    git clone https://github.com/httpstorm/openwrt.git
    git checkout gvalkov

    You may need to revert the commit labeled "Added software from gvalkov": git reset --hard HEAD~1. Or disable my apps from the build, since you don't have source code to compile them. Make sure to copy my apps and scripts from your router if you need them. If you like the default packages I have included, I can share my build config with you.

abuzaruzair commented 3 years ago

Dear friend @httpstorm

I dont have enough experience into building my package, but i really thank you, and feeling happy with 160mhz 5GHz wifi

i only need VPN policy based routing package with its dependencies, i think it will be like "luci-i18n-vpn-policy-routing-en" and its all sub packages like "luci-app-vpn-policy-routing" and one more package "dnsmasq-full"

Thanks ❤️

httpstorm commented 3 years ago

Hi @abuzaruzair I'm glad to help you! I'll try to build an image with your packages later today after work. Perhaps I will also learn something new, and find useful packages. 😊The reason I started building my own images is because now I can update a router at a remote location and it will keep all settings and packages. Before that adding a new kernel package required physical access to reinstall all packages. If you have some free time, please test my packages and give me some feedback. My web server is running on port 83, you may connect a disk with music, videos and pictures and play them in a web browser http://192.168.1.1:83/ The gns network benchmark tool will test the speed and reliability of your network. I'm curious to see the results on a 160MHz Wi-Fi. If you know what USB to Serial is, these devices when connected are accessible on ports 81-83. Both TCP and WebSocket will work. The gfc command can be used to clone disks to and from another disk or file.

httpstorm commented 3 years ago

Hi @abuzaruzair I have built a new image http://httpstorm.com/openwrt/wrt3200acm/2021-01-17.r14970/ Included are luci-app-vpn-policy-routing, and it's dependencies. I was not able to locate luci-i18n-vpn-policy-routing-en in the build menu, but I assume it is just translation, and since the default interface is already in English, it is should not be needed. You can install it manually. Regarding dnsmasq-full, a dependency package libnettle fails to build on macOS, but I was able to include dnsmasq-dhcpv6. I believe you can uninstall dnsmasq-dhcpv6 and install the official dnsmasq-full.

I hope that fits your needs! I also tried building from the latest GIT snapshot, unfortunately there are some packages which fail to build on macOS and that might take a long time for me to fix. Alas, unlike building on Ubuntu Linux, which is quite easy, since everyone is using it, building on macOS is often very hard, since many packages get updated and not tested to build on that platform.

Good luck! And please let me know if everything works well! I had no time to install and test the image.

BeNeE25 commented 3 years ago

Hello everyone, I just bought the WRT3200ACM and am hapoy to see all the work here. I had no luck for now by editing with putty the wifiex file (newbie with this soft). But I am testing also @httpstorm build which is working great. I can put the maximum on Tx power that can set in my country. I will try again the other method from @eduperez but i could not find the mwifiex file only mwifiex-sdio and did not succeed to edit it. Thank for sharing your work and idea make me glad to have this router.

httpstorm commented 3 years ago

@BeNeE25 WRT3200ACM does not support getting or setting TX power on the main radio. What you see on the web interface is as per the database for each country. For the other radio which has a built-in antenna for radar detection, TX power can be changed – as I recall the maximum is 14 dBm. Last time I tried it was slow and unreliable, yet it covered a good distance. With my build you will still be within regulations. You are also free to select your correct country. Enjoy!

BeNeE25 commented 3 years ago

@httpstorm ok thx I understand. Just by curiosity it's mean that it is always 23db as it appear in openwrt 19.07.6 and so that in every case this router will be limited in power for 5Ghz? Just for your information, Luci gui was not working on your build last night. I try to restart it via putty but it did not work. More easier to reinstall. Maybe i played too much with it.

httpstorm commented 3 years ago

@BeNeE25 Since the driver does not report the actual TX power, what you see in the GUI is irrelevant. This holds true no matter what version you are using. Luci is working fine in my builds. I have seen occasions where right after a reboot, the first page after login is not fully displayed, however everything functions correctly after you refresh the web page. If you experience any issues caused by custom changes to the configuration, you might restore the factory settings. All packages will be kept, since they are part of the firmware image.