BPI-R3 Can anyone share how to configure debian to work as a router?

for this the root-cause needs to be known…maybe it is a good moment to post the problem itself here: [BPI-R3] Which GPON ONU is working?

so the problem is that the gpios of the sfp are reused with the uart to getting in the embedded system of the stick. vendors debian only ignores the pins so the tx-fault pin cannot trigger the sfp-framework

neither for mainline nor for openwrt disabling tx-fault pin is a correct solution…so we need a better way before apply to any repo.

i tried some years ago adding an own patch to openwrt and failed :stuck_out_tongue:

i know that, but do anybody else know it too? imho it is necessary to separate these things :slight_smile:

afaik there is no quirk yet…but imho this could be a good solution

I see. Sounds like something that can be forced to work with a custom patch and hardcoded values

i think too, but we are on it since 2 weeks now with no improvement, we just get non working firmware, fixing one problem creates 10 others that didn’t exist before…

if you remember i found a command to execute in the SFP ONT, which disable this.

fw_setenv asc0 1

Since I’ve run this command, I don’t have any errors in the logs, but I still can’t access the ONT via ssh.

in your log in post after this, you have still the 1W limitation and the ping to wrong IP :slight_smile:

so pls test with the 3W limit and right ip :wink: and post logs and ethtool -m output

i fixed this too, i did the test with the 3w limit. Now i can’t compile a fully working firmware from @dangowrt git, i’m not the only one

we are turning around…

@frank-w can’t you just compile (or use the latest firmware i compiled) and burn it on a sdcard and test it on your BPI-R3 ? You’ll find immediatly what’s wrong and what’s need to be fixed…

this will go way faster as you know what to do, and you understand what you do…That’s actualy 2 weeks since i first posted here about this ONT problem and we are still at the same point, maybe with more problems added…

I agree it will also go faster when we know what is going wrong and can see the logs that Frank asked for…

Pls post it in:

i posted the logs each time someone asked me to.

Actually all topics i’m in are about “Do this”, “do that”, “post this”, “post that”. Now the situation is that we can’t create a working image from @dangowrt git, and we are still asked to do things. 2 weeks that we are turning around. all logs are already posted.

if you want more logs, please fix the git firmware which is actualy totaly broken even for RJ45 ports.

I’m not experienced in openwrt and do not have such sfp. So testing will be hard…and i have many sdcards currently in use (2+ for each board i have here for testing).

You ran into revovery maybe write to sdcard was not finished (or pervious boot filling pstore with crash dump). Make sure all data is written to card not rely on gui saying copy is finished. I don’t think kernel is broken in this way after last commits.

yes this is development…and r3 is a development board :slight_smile: there are only a few people here for getting things to work and doing support as far as possible. but we need some information on what is the exact problem…

you boot above shows only the tftp and nand detection…i guess abit more above there is a hint on which device is booted and maybe why tftp is done.

make sure the switches are really in the right position to boot from card. if uboot loads from card then kernel should too. but we experienced some read errors in uboot waiting for some guidance from vendor.

i changed the sdcard and finaly it worked.

@frank-w do you know how i can enable NAT offloading with my debian ?

when i tried a speedtest, the result was very slow, half the speed expected, 800Mbps with my 2Gbps fiber link…

With nftables should be similar to this (older config for r2)

https://wiki.fw-web.de/doku.php?id=en:bpi-r2:network:nftables#hwnat

But i do not know if vendor kernel contains all options for this

:frowning_face:

for the bpi-r3, what devices are supposed to be here ?

devices = { lan3, lan0, wan }

should i put all lan1-4 wan/eth1 sfp2 ?

devices = { lan1, lan2, lan3, lan4, sfp2, eth1, wan }

It depends on the interface names…and on which interfaces you need the offloading

I guess eth1 when your sfp is there,but you can add all hardware interfaces you see in ip a

the same way as openwrt works…that’s not all interfaces ??

I do not know how openwrt do things,but hw offloading works with macs (eth0/eth1) and dsa interfaces (lanX,wan). Afaik no bridges or other (tun,…) can be bound to offloading driver

Have not done much with offloading as i have only 25mbit

root@bpi-r3:/etc/config# nft -f /etc/nftables.conf
/etc/nftables.conf:9:17-21: Error: syntax error, unexpected flags
                flags offload;
                ^^^^^
root@bpi-r3:/etc/config#

:sob:

i think i’m going to send back this BPI-R3 to the reseller and buy a Mikrotik RB5009…

dev boards are definitly not for me…

Mhm, should be this module

So anything else is missing,maybe the vendor kernel does not yet contain r3 flow offload driver.

My debian image does not have it too. Current 6.1 should have it,but have not tried yet.

I have another guess…which debian version is the image you have? Afair nft in buster does not have the code for controlling the hw flow offload. I had sent a patch for it.

https://git.netfilter.org/nftables/commit/?id=8e6cc9f373854ed580156ec6f01bcd97786fa9f7

2022-12-18-debian-11-bullseye-lite-bpi-r3-5.15-sd-emmc.img