dr-ni/openwrt-wrt3200acm-de

country codes

Opened this issue · 11 comments

dr-ni commented

Hi Georgi,

do I have to add "DE" here insread "BG"?

-{"FR", 0x30}, /* France */
+{"BG", 0x30}, /* Bulgaria */
Index: mwlwifi-2020-02-06-a2fd00bb/core.c
===================================================================
--- mwlwifi-2020-02-06-a2fd00bb.orig/core.c
+++ mwlwifi-2020-02-06-a2fd00bb/core.c
@@ -127,7 +127,7 @@ struct region_code_mapping {
 static const struct region_code_mapping regmap[] = {
 {"US", 0x10}, /* US FCC */
 {"CA", 0x20}, /* Canada */
-{"FR", 0x30}, /* France */
+{"BG", 0x30}, /* Bulgaria */
 {"ES", 0x31}, /* Spain  */
 {"FR", 0x32}, /* France */
 {"JP", 0x40}, /* Japan  */

Yes

dr-ni commented

ok, perfect. Have now compiled successfully an image. I'll flash it tomorrow...

Have also found an really easy way to mount the stock filesystem hehe :-)
The router has a dual boot layout. Just had to mount the second layout from OpenWrt:
mount -t jffs2 /dev/mtdblock8 /mnt/

Thanks! I was curious how to do this. It mounts, unfortunately I am getting errors about unknown compression algorithm, so most files are not readable. Am I missing any packages to add support for this?

dr-ni commented

I'm not sure about that - maybe jffs2 filesystem support is missing. I was using the original 19.07.6 image. Maybe installed something or not - don't know it anymore. Have no warning:

$ mount -t jffs2 /dev/mtdblock8 /mnt/
$ ls /mnt 
JNAP     cgroup   etc      lib      media    opt      root     sys      usr      www
bin      dev      home     linuxrc  mnt      proc     sbin     tmp      var
$ ls -la /mnt/etc
drwxr-xr-x   18 root     root             0 Jan 15  2020 .
drwxr-xr-x   18 root     root             0 Jan  1  1970 ..
-r--r--r--    1 root     root        154993 Jan 15  2020 FW_LICENSE_default.pdf.gz
drwxr-xr-x    2 root     root             0 Jan 15  2020 IGD
-r--r--r--    1 root     root          9666 Jan 15  2020 SC4_AP_Rango_APAC_v1.1.ini
-r--r--r--    1 root     root          9846 Jan 15  2020 SC4_AP_Rango_AUS_v1.1.ini
-r--r--r--    1 root     root          8308 Jan 15  2020 SC4_AP_Rango_ETSI_v1.1.ini
-r--r--r--    1 root     root         10064 Jan 15  2020 SC4_AP_Rango_FCC_v1.1.ini
-r--r--r--    1 root     root          9961 Jan 15  2020 SC4_AP_Rango_IC_v1.1.ini
-r--r--r--    1 root     root          9952 Jan 15  2020 SC4_AP_Rango_SRRC_v1.1.ini
-r--r--r--    1 root     root          4121 Jan 15  2020 VLANTagging_ISP_Profiles.json
-rw-------    1 root     root          1611 May 10  2017 WlanCalData_ext.conf
-rw-r--r--    1 root     root            16 Jan 15  2020 builddate
-rw-r--r--    1 root     root            10 Jan 15  2020 builddate.timet
-rw-r--r--    1 root     root           107 Jan 15  2020 builddetails
-rw-r--r--    1 root     root             6 Jan 15  2020 buildrev
drwxr-xr-x    3 root     root             0 Jan 15  2020 certs
-r--r--r--    1 root     root            46 Jan 15  2020 cloud_dns_names
drwxrwxr-x    2 root     root             0 May 10  2017 config
lrwxrwxrwx    1 root     root             9 Jan 15  2020 cron -> /tmp/cron
lrwxrwxrwx    1 root     root            21 Jan 15  2020 ddns_update.conf -> /tmp/ddns_update.conf
lrwxrwxrwx    1 root     root            20 Jan 15  2020 ddns_update.out -> /tmp/ddns_update.out
-rw-r--r--    1 root     root         21937 Jan 15  2020 devregex.json
-rw-------    1 root     root           165 May 10  2017 dfsconfig.conf
lrwxrwxrwx    1 root     root            18 Jan 15  2020 dhclient.conf -> /tmp/dhclient.conf
lrwxrwxrwx    1 root     root            16 Jan 15  2020 dhcp6s.conf -> /tmp/dhcp6s.conf
lrwxrwxrwx    1 root     root            17 Jan 15  2020 dhcp_options -> /tmp/dhcp_options
lrwxrwxrwx    1 root     root            22 Jan 15  2020 dhcp_static_hosts -> /tmp/dhcp_static_hosts
lrwxrwxrwx    1 root     root            17 Jan 15  2020 dnsmasq.conf -> /tmp/dnsmasq.conf
lrwxrwxrwx    1 root     root            19 Jan 15  2020 dnsmasq.leases -> /tmp/dnsmasq.leases
-r--r--r--    1 root     root           458 Jan 15  2020 dropbear_dss_host_key
-r--r--r--    1 root     root           427 Jan 15  2020 dropbear_rsa_host_key
-rwxr-xr-x    1 root     root          3424 Jan 15  2020 ebtables
-rw-r--r--    1 root     root            97 Jan 15  2020 environment
-r--r--r--    1 root     root          1385 Jan 15  2020 ethertypes
-r-xr-xr-x    1 root     root            50 Jan 15  2020 files-to-keep.conf
lrwxrwxrwx    1 root     root            20 Jan 15  2020 group -> /tmp/etc/.root/group
drwxr-xr-x    2 root     root             0 Jan 15  2020 guardian
lrwxrwxrwx    1 root     root            13 Jan 15  2020 hostname -> /tmp/hostname
lrwxrwxrwx    1 root     root            10 Jan 15  2020 hosts -> /tmp/hosts
drwxr-xr-x    3 root     root             0 Jan 15  2020 hotplug.d
-rw-r--r--    1 root     root           833 Jan 15  2020 hotplug2-common.rules
-rw-r--r--    1 root     root            80 Jan 15  2020 hotplug2-init.rules
-rw-r--r--    1 root     root           240 Jan 15  2020 hotplug2.rules
-rw-r--r--    1 root     root          1529 Jan 15  2020 igmpproxy.conf
drwxr-xr-x   17 root     root             0 Jan 15  2020 init.d
-r--r--r--    1 root     root           430 Jan 15  2020 inittab
drwxr-xr-x    2 root     root             0 Jan 15  2020 iproute2
-r-xr-xr-x    1 root     root            86 Jan 15  2020 jcpd.conf
lrwxrwxrwx    1 root     root             9 Jan 15  2020 l2tp -> /tmp/l2tp
drwxr-xr-x    7 root     root             0 Jan 15  2020 l7-protocols
-r--r--r--    1 root     root             0 Jan 15  2020 ld.so.conf
drwxr-xr-x    2 root     root             0 Jan 15  2020 led
lrwxrwxrwx    1 root     root            18 Jan 15  2020 lighttpd.conf -> /tmp/lighttpd.conf
lrwxrwxrwx    1 root     root            14 Jan 15  2020 localtime -> /tmp/localtime
lrwxrwxrwx    1 root     root            20 Jan 15  2020 mini_httpd.conf -> /tmp/mini_httpd.conf
-r--r--r--    1 root     root          3143 Jan 15  2020 minidlna.conf
-rwxr-xr-x    1 root     root        192204 Jan 15  2020 mlanutl
drwxr-xr-x    2 root     root             0 Jan 15  2020 modprobe.d
-r--r--r--    1 root     root          4042 Jan 15  2020 nvram.cleanup.lst
-r--r--r--    1 root     root           616 Jan 15  2020 otherservices
lrwxrwxrwx    1 root     root            21 Jan 15  2020 passwd -> /tmp/etc/.root/passwd
-r--r--r--    1 root     root            44 Jan 15  2020 persistence_settings
lrwxrwxrwx    1 root     root             8 Jan 15  2020 ppp -> /tmp/ppp
-rw-r--r--    1 root     root             5 Jan 15  2020 product
-rw-r--r--    1 root     root            10 Jan 15  2020 product.type
lrwxrwxrwx    1 root     root            12 Jan 15  2020 profile -> /tmp/profile
-r--r--r--    1 root     root          2626 Jan 15  2020 protocols
lrwxrwxrwx    1 root     root            15 Jan 15  2020 radvd.conf -> /tmp/radvd.conf
-r--r--r--    1 root     root            51 Jan 15  2020 regccode
drwxr-xr-x    2 root     root             0 Jan 15  2020 registration.d
lrwxrwxrwx    1 root     root            16 Jan 15  2020 resolv.conf -> /tmp/resolv.conf
lrwxrwxrwx    1 root     root            14 Jan 15  2020 ripd.conf -> /tmp/ripd.conf
-rw-r--r--    1 root     root           666 Jan 15  2020 scsi_id.config
drwxr-xr-x    2 root     root             0 Jan 15  2020 security
-r--r--r--    1 root     root         18476 Jan 15  2020 services
lrwxrwxrwx    1 root     root            21 Jan 15  2020 shadow -> /tmp/etc/.root/shadow
-r--r--r--    1 root     root           213 Jan 15  2020 srvlst
lrwxrwxrwx    1 root     root            14 Jan 15  2020 ssmtp -> /tmp/etc/ssmtp
drwxr-xr-x    2 root     root             0 Jan 15  2020 ssmtp-sample
drwxr-xr-x    2 root     root             0 Jan 15  2020 sysconfig
-r--r--r--    1 root     root           263 Jan 15  2020 syseventp.conf
-r--r--r--    1 root     root            31 Jan 15  2020 syseventrelay.conf
drwxr-xr-x    2 root     root             0 Jan 15  2020 system
-r--r--r--    1 root     root         46372 Jan 15  2020 system_defaults
-r--r--r--    1 root     root          2348 Jan 15  2020 timesettings
-rwxr-xr-x    1 root     root        302336 Jan 15  2020 uaputl.exe
drwxr-xr-x    2 root     root             0 Jan 15  2020 udev
-rw-r--r--    1 root     root            13 Jan 15  2020 version
lrwxrwxrwx    1 root     root            26 Jan 15  2020 vsftpd.conf -> /tmp/etc/.root/vsftpd.conf
-r--r--r--    1 root     root             0 Jan 15  2020 wifi_power_table
lrwxrwxrwx    1 root     root            15 Jan 15  2020 zebra.conf -> /tmp/zebra.conf
dr-ni commented

could also be that your stock is on mtdblock6, or you probably flashed two factory images of OpenWrt so that both layouts are now OpenWrt

dr-ni commented

Theree are some problems with the regdb patch. Wifi is working slow and unreliable. So I've removed your regdb patch, then I'll get:

global
country DE: DFS-ETSI
	(2400 - 2483 @ 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, 26), (0 ms), DFS
	(5725 - 5875 @ 80), (N/A, 13), (N/A)
	(57000 - 66000 @ 2160), (N/A, 40), (N/A)

On my Tablet I have:

global
country 00: DFS-UNSET
	(2402 - 2472 @ 40), (N/A, 20), (N/A)
	(2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, PASSIVE-SCAN
	(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
	(5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, PASSIVE-SCAN
	(5735 - 5835 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
	(57240 - 63720 @ 2160), (N/A, 0), (N/A)

phy#0 (self-managed)
country DE: DFS-UNSET
	(2402 - 2437 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-80MHZ, NO-160MHZ
	(2422 - 2462 @ 40), (6, 22), (N/A), AUTO-BW, NO-80MHZ, NO-160MHZ
	(2447 - 2482 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-80MHZ, NO-160MHZ
	(5170 - 5190 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, PASSIVE-SCAN
	(5190 - 5210 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, PASSIVE-SCAN
	(5210 - 5230 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, PASSIVE-SCAN
	(5230 - 5250 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, PASSIVE-SCAN
	(5250 - 5270 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
	(5270 - 5290 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
	(5290 - 5310 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
	(5310 - 5330 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
	(5490 - 5510 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
	(5510 - 5530 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
	(5530 - 5550 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
	(5550 - 5570 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
	(5570 - 5590 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
	(5590 - 5610 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
	(5610 - 5630 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
	(5630 - 5650 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
	(5650 - 5670 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
	(5670 - 5690 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5690 - 5710 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
	(5710 - 5730 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5735 - 5755 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-160MHZ
	(5755 - 5775 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-160MHZ
	(5775 - 5795 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-160MHZ
	(5795 - 5815 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-160MHZ
	(5815 - 5835 @ 20), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-HT40PLUS, NO-80MHZ, NO-160MHZ

how can I apply these settings also to the WRT3200ACM regdb?

Hello @dr-ni
The reg-db patch shouldn't cause any slowdown. You can always build without it, or make your own changes if in doubt. I would suspect something else might be causing a slowdown for you.

The following steps should be a good guidance how to make your own changes on top of the original:

make package/firmware/wireless-regdb/{clean,prepare} QUILT=1
cd build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/wireless-regdb-2020.11.20/
quilt push patches/500-world-regd-5GHz.patch
quilt new 600-g-wireless-regdb.DFS-free.patch
quilt add db.txt
# edit db.txt
quilt refresh
cd ../../..
make package/firmware/wireless-regdb/update
make package/firmware/wireless-regdb/{clean,compile}

The wireless-regdb package is after compilation in openwrt-wrt3200acm-de/bin/packages/arm_cortex-a9_vfpv3-d16/base/
It has to be installed with eg. opkg install -force_reinstall wireless-regdb_2023.09.01-1_all.ipk

@dr-ni The topic from your link describes precisely the issues I've been having on master for a long time. Originally I though that only OrangePI is affected, since my laptop worked reliably near the router on 5 GHz. But lately as I moved to my home where the distance between my MacBook Pro 2019 and the WRT3200 is two floors, I experience very frequent drops, where the laptop thinks it is connected, but there is no ping from the router. The signal is good: -70 dBm, speed: 112 Mbit/s up and down.
I will try to look into this. It might take some time to read the discussion from your link and make tests. Keep in touch.

Edit: I compiled and installed the latest master: r18239 4d1f133
Edit: Thank you for letting me know about the fix. The issue seems to be resolved. Here is a link to my build: https://httpstorm.com/openwrt/WRT3200ACM/2022-01-06.r18239/

dr-ni commented

ok, I'm still on 19.07 which is running very reliable with my described changes #3 (comment). 21.02 release is running very bad on my second wrt3200. I have to check a snapshot, too...

dr-ni commented

The new 23.05 release without DFS (https://github.com/dr-ni/openwrt-wrt3200acm-de/tree/23.05-DFS_free) is now working pretty nice on channel 100@160 with forced mwiflex to FR


  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 23.05.0, r23497-6637af95aa
 -----------------------------------------------------
root@OpenWrt:~# iperf -s 
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------
[ ID] Interval       Transfer     Bandwidth
[  5] 0.0000-10.0100 sec  1.40 GBytes  1.20 Gbits/sec
[  6] local 192.168.2.1 port 5001 connected with 192.168.2.241 port 35044
[ ID] Interval       Transfer     Bandwidth
[  6] 0.0000-10.0208 sec  1.42 GBytes  1.21 Gbits/sec
[  7] local 192.168.2.1 port 5001 connected with 192.168.2.241 port 45568
[ ID] Interval       Transfer     Bandwidth
[  7] 0.0000-10.0306 sec  1.14 GBytes   974 Mbits/sec
[  8] local 192.168.2.1 port 5001 connected with 192.168.2.241 port 42702
[ ID] Interval       Transfer     Bandwidth
[  8] 0.0000-10.0280 sec  1.42 GBytes  1.22 Gbits/sec