[BPI-R2] internal Wifi/BT (MT6625L) - Kernel

How much time is it (approx)? Which channel (2.4ghz)? Have you overlapping channels in neighborhood? Can you reconnect or is ap dead?

I have only this very buggy driver and not much knowledge to make it better :frowning:

I see you have prepared bridge with ap0,but disabled…do not bridge ap0 as it does not work

0 to 10 minutes after connecting to AP. 2.4 and 5GHz are the same.

as I understand it depends on the load on AP.

Yes, 2.4 GHz all channels overlap more or less. At 5 GHz, most channels are free.

I try to reconnect to the AP, the AP is available, visible, but the client connection resets and it is on a loop

then I just have to try to install and configure everything again, because other people have internal WIFI AP :ok_man:

I can make and send you an SD card image with my system :sweat_smile:

I wanted wired LAN clients and WiFi clients to be on the same subnet

Hi, Frorip,

Please check if sch_fq module is loaded, i previously had the problem with this module and internal wifi.

You can search around my post from jan 9th for additional info: [BPI-R2] internal Wifi/BT (MT6625L) - Kernel

+/- a couple of days.

Maybe i should block sch_fq if combo is enabled via kconfig? How was it added in your case (automaticly by any other option or manually)?

Hi! thank you for your help!

I rebuilt the kernel with configuration CONFIG_NET_SCH_FQ=m - the trouble remained…

Is module unloaded? Could you completely remove this option?

try lsmog | grep sch_fq, if it’s loaded - you’ll likeli won’t be able to unload it, so you can try to rename/delete it or to set CONFIG_NET_SCH_FQ=n.

Also You may check other network scheduler modules.

Please show your lsmod and tc qdisc show dev ap0

P.S. mine is :

bpi-r2-gentoo ~ # tc qdisc show dev ap0
qdisc mq 0: root
qdisc pfifo_fast 0: parent :4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

and it works fine.

If it’s the reason then likely yes, at-least unless the issue is be fixed.

By build.sh importconfig, i suppose. I don’t remember exactly, i use my own config since 5.4(w/o this scheduler).

i don’t think so as it is not enabled in my tree after running importconfig…

Yes, I copied and added the sch_fq module for autoloading. And it not work…

Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.19.138-bpi-r2 armv7l)
 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

Last login: Wed Sep  9 00:24:54 2020 from 192.168.0.13
root@bpi-r2-ubuntu:~# lsmod
Module                  Size  Used by
ipt_MASQUERADE         16384  5
iptable_nat            16384  1
nf_nat_ipv4            16384  2 ipt_MASQUERADE,iptable_nat
nf_nat                 36864  1 nf_nat_ipv4
nf_conntrack          147456  3 ipt_MASQUERADE,nf_nat_ipv4,nf_nat
nf_defrag_ipv6         20480  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
mtk_thermal            16384  0
thermal_sys            61440  1 mtk_thermal
spi_mt65xx             20480  0
pwm_mediatek           16384  0
mt6577_auxadc          16384  0
mtk_pmic_keys          16384  0
nvmem_mtk_efuse        16384  0
sch_fq_codel           24576  7
sch_fq                 20480  0
ip_tables              24576  1 iptable_nat
x_tables               32768  2 ip_tables,ipt_MASQUERADE
root@bpi-r2-ubuntu:~# tc qdisc show dev ap0
qdisc mq 0: root 
qdisc fq_codel 0: parent :4 limit 3068542532p flows 3068542532 quantum 3068542532 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
qdisc fq_codel 0: parent :3 limit 3068542532p flows 3068542532 quantum 3068542532 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
qdisc fq_codel 0: parent :2 limit 3068542532p flows 3068542532 quantum 3068542532 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
qdisc fq_codel 0: parent :1 limit 3068542532p flows 3068542532 quantum 3068542532 target 5.0ms interval 100.0ms memory_limit 32Mb ecn 
root@bpi-r2-ubuntu:~#

You should disable it…it is known to break ap

Oh, I’m sorry, I misunderstood you. Initially, the module sch_fq was disabled, missing from the root, and not loaded into the kernel. Only be sch_fq_codel

You have issues without sch_fq and sch_fq_codel ?

Could you please try only with my defconfig (no additional options)? There i have no problems in 5.4. How much clients are connected and which signal strength? Do you have issues only with much traffic or also in idle?

You should disable both this modules. Fastest and rudest way to see if it works - delete (move) them from your /lib/modules/<your_kernel>/… and reboot

In my case the sch_fq was the root of problem. in this case:

the sch_fq_codel was the reason.

So you shouldn’t use both of them.

I don’t insist :slight_smile: as i said i use my own config for a long time, so i might enable it by myself. I don’t remember.

BTW, you may to add this information to your R2 wiki, at least for me it’s quite useful :slight_smile:

what exactily was the issue? no traffic after a while (how long) or dropping client, no reconnection, …

Yes.

Totally depends on traffic amount, but not so much (e.g. it can work for minutes with ping only, but just a couple of seconds on heavy traffic, like file download. Usually not enought to download a web page) after this traffic “limit” there is no even ping packets seen on ap0 (using tcpdump)

clients drops after a while, no reconnection at least because no dhcp pakets passes throught wlan. I didn’t tested if it works with static ip.

My thought is: there is some traffic shaping/policing mechanism (or very similar) in these schedulers, which depends on some timer, which should reset the I/O packets or bytes counter, but it’s buggy or not implemented (by driver? somwhere else? idk :man_shrugging:) I’m not proficient enought with linux netfilter/tc schedulers, to find it out. May be some long-term project, but i’m absolutely with no deadlines :slight_smile:

P.S. Another question is why these schedulers used by default?

and why they didn’t loaded in your case?

that was in january…if i make importconfig the module is not set

NET_SCH_FQ [=n]

and for driver-support/bug…idk too…driver-code is huge, and i have not seen all, not talking about understanding whats going on there :smiley:

There are also some anomalies, according to fq_codel man pages the default values for limit, flows, and quantum are: 10240, 1024, and 1514 . In previous example the numbers are equal and incredibly large.

@Frorip, any progress on your problem?

P.S. at least two timers seems to be used here: target and interval

Some days ago i’ve enabled a lot of network/tc/netfilter/iptables/nf_tables/etc stuff in my config (r2 is a router, it needs a network related stuff :wink: ) for my actual needs and experimental purposes, so these schedulers (in my kerel) probably was enabled by me :slight_smile:. And i have no idea why they are in kernels of other users (all my R2 kernels compiled my myself). So probably the best advice for all users is to use the latest precompiled kernel (i suppose these schedulers should be disabled). Or to compile it by themselves after double-checking CONFIG_NET_SCH_FQ_CODEL and CONFIG_NET_SCH_FQ options :slight_smile:

and it’s an other person’s code :wink: