Request support to use frank system Banana BPI-R4

I changed the main router ip page

apt update

root@bpi-r4:~# date -s "2024-07-29 19:31 CEST"
Mon Jul 29 17:31:00 UTC 2024
root@bpi-r4:~# apt update
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:2 http://security.debian.org/debian-security bookworm-security/main Sources [105 kB]
Get:3 http://security.debian.org/debian-security bookworm-security/main arm64 Packages [166 kB]
Get:4 http://security.debian.org/debian-security bookworm-security/main Translation-en [102 kB]
Hit:5 http://ftp.de.debian.org/debian bookworm InRelease
Get:6 http://ftp.de.debian.org/debian bookworm-updates InRelease [55.4 kB]
Fetched 428 kB in 8s (51.3 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
7 packages can be upgraded. Run 'apt list --upgradable' to see them.

ip r

root@bpi-r4:~# ip r
default via 192.168.3.3 dev wan proto dhcp src 192.168.3.102 metric 1024
192.168.1.0/24 dev lanbr0 proto kernel scope link src 192.168.1.1
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.2
192.168.3.0/24 dev wan proto kernel scope link src 192.168.3.102 metric 1024
192.168.3.3 dev wan proto dhcp scope link src 192.168.3.102 metric 1024
root@bpi-r4:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP group default qlen 1000
    link/ether 02:da:b0:a6:8a:c1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.2/24 scope global eth0
       valid_lft forever preferred_lft forever
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether ae:8f:91:87:8b:51 brd ff:ff:ff:ff:ff:ff
5: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 76:83:fa:da:45:f6 brd ff:ff:ff:ff:ff:ff
6: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:da:b0:a6:8a:c1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.102/24 metric 1024 brd 192.168.3.255 scope global dynamic wan
       valid_lft 86177sec preferred_lft 86177sec
    inet6 fe80::da:b0ff:fea6:8ac1/64 scope link
       valid_lft forever preferred_lft forever
7: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master lanbr0 state DOWN group default qlen 1000
    link/ether 02:da:b0:a6:8a:c1 brd ff:ff:ff:ff:ff:ff
8: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lanbr0 state UP group default qlen 1000
    link/ether 02:da:b0:a6:8a:c1 brd ff:ff:ff:ff:ff:ff
9: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master lanbr0 state LOWERLAYERDOWN group default qlen 1000
    link/ether 02:da:b0:a6:8a:c1 brd ff:ff:ff:ff:ff:ff
10: lanbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 1a:03:b0:1e:b6:0e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global lanbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::1803:b0ff:fe1e:b60e/64 scope link
       valid_lft forever preferred_lft forever
11: he-ipv6@lanbr0: <NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
    inet6 ::127.0.0.1/96 scope host
       valid_lft forever preferred_lft forever

I think the board is getting network but my laptop is not


root@bpi-r4:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=109 time=133 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=109 time=133 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=109 time=132 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=109 time=130 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=109 time=129 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=109 time=128 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=109 time=127 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=109 time=126 ms

What does ping to www.google.de say?

It is possible that you need to enable ipforwarding in /etc/sysctl.conf…

If dns works on r4,look if client gets ip from r4,try pinging from your laptop connected on lanbr0…first lanbr-ip,then wan-ip,then your main-routers ip,8.8.8.8,and www.google.com

Possible you need static route on main-router for your r4 lan network,but i think it is not needed because you should have nat on wan,so your main-router should not see your lan subnet…only r4 wan ip

Now I’m connecting Main router to wan of banana BPI-R4

root@bpi-r4:~# ping www.google.de
PING www.google.de (216.239.38.120) 56(84) bytes of data.
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=1 ttl=114 time=79.2 ms
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=2 ttl=114 time=79.1 ms
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=3 ttl=114 time=118 ms
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=4 ttl=114 time=117 ms

Boss so what I should do next to get the modem of 5G is working ?

Note : I installed Modem Manager package on the system

root@bpi-r4:~# apt install - modemmanager
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  dbus-user-session libduktape207 libglib2.0-0 libglib2.0-data libgudev-1.0-0 libicu72 libjim0.81 libmbim-glib4 libmbim-proxy libmbim-utils libmm-glib0 libpam-systemd libpolkit-agent-1-0 libpolkit-gobject-1-0
  libqmi-glib5 libqmi-proxy libqmi-utils libqrtr-glib0 libusb-1.0-0 libxml2 polkitd sgml-base shared-mime-info usb-modeswitch usb-modeswitch-data xdg-user-dirs xml-core
Suggested packages:
  low-memory-monitor polkitd-pkla sgml-base-doc comgt wvdial debhelper
The following NEW packages will be installed:
  dbus-user-session libduktape207 libglib2.0-0 libglib2.0-data libgudev-1.0-0 libicu72 libjim0.81 libmbim-glib4 libmbim-proxy libmbim-utils libmm-glib0 libpam-systemd libpolkit-agent-1-0 libpolkit-gobject-1-0
  libqmi-glib5 libqmi-proxy libqmi-utils libqrtr-glib0 libusb-1.0-0 libxml2 modemmanager polkitd sgml-base shared-mime-info usb-modeswitch usb-modeswitch-data xdg-user-dirs xml-core
0 upgraded, 28 newly installed, 0 to remove and 7 not upgraded.
Need to get 16.3 MB of archives.
After this operation, 75.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ftp.de.debian.org/debian bookworm/main arm64 sgml-base all 1.31 [15.4 kB]
Get:2 http://ftp.de.debian.org/debian bookworm/main arm64 libpam-systemd arm64 252.26-1~deb12u2 [209 kB]
Get:3 http://ftp.de.debian.org/debian bookworm/main arm64 dbus-user-session arm64 1.14.10-1~deb12u1 [78.1 kB]
Get:4 http://ftp.de.debian.org/debian bookworm/main arm64 libduktape207 arm64 2.7.0-2 [124 kB]


I did connected the Banana BPI from Main router and I tested the ping on each lan port (all same result)

root@bpi-r4:~# ping www.google.de
ping: www.google.de: Temporary failure in name resolution

Check ip forwarding:

cat /proc/sys/net/ipv4/ip_forward

And to enable forwarding:

sysctl -w net.ipv4.ip_forward=1

For modem i guess you need to add driver to kernel,but i do not know which…

First test if it is recognized by using lsusb (maybe you need to install usb-utils)

Dear @frank-w

Currently Network from main router To WAN Banana BPI R4

I enabled forwarding But still my laptop is not receiving network from Banana BPI R4 ………………………

When I removed the wan cable… that came from main router … To see if there is network from the modem but no luck

… In OpenWrt system I was using modem manager

I installed it on this system but i don’t know how control it … ?

Is there web interface? Can be installed from these packages to control the system?

_

I do not have this modem…with mine i did some manual steps to get network connection.

I do not know any web interface like lucy as it is the best way to hack the router (my webserver is put into lxc container and blocked in firewall from external interfaces).

Is there any commands do you want me to use them and to install package for this modem …to run this modem

Im planning after this try to make video on YouTube to know how to use your system (frank system) to keep reference for other people

as i said above you will need to add driver for this module to kernel, but first check if it is recognized correctly via lsusb

but i have only did some basic tests with my modem.

still have no ides why your internet does not work on your client

can you do

nft list ruleset
sysctl -p

on your r4? and try pinging vom your client to lanbr-ip,wan-ip,main-router lan-ip

its =1 ( enabled)

but still no network on my laptop … when i’m connecting the main router to R4 and lan from R4 to my laptop

Ok,so no nat on wan, causing your main-router does not know how to send packets to your client…

Can you add route for your client subnet over r3 wan-ip on your main-router?

Alternatively you can try adding masquerade on r3 (hope command is correct…normally i load nft file)

nft add rule nat postrouting oif wan masquerade

Is the nftables service started?

systemctl status nftables

systemctl start nftables

systemctl status nftables

nft list ruleset

It seems i missed to add the rules file…

I formatted the flash and I burned the other image on it (I gave up from first file )

I burned the 2nd one on SD card

the 2nd one still there is no network on laptop but there is network on Router Banana R4

root@bpi-r4:~# cat /proc/sys/net/ipv4/ip_forward
1
root@bpi-r4:~# nft list ruleset
-bash: nft: command not found
root@bpi-r4:~# sysctl -p

All package updated … Ping to google is working

Dude @ericwoud I added package nftables … by apt install nftables

root@bpi-r4:~# nft list ruleset
root@bpi-r4:~# systemctl status nftables
○ nftables.service - nftables
     Loaded: loaded (/usr/lib/systemd/system/nftables.service; disabled; preset: enabled)
     Active: inactive (dead)
       Docs: man:nft(8)
             http://wiki.nftables.org
root@bpi-r4:~# systemctl start nftables
root@bpi-r4:~# systemctl status nftables
● nftables.service - nftables
     Loaded: loaded (/usr/lib/systemd/system/nftables.service; disabled; preset: enabled)
     Active: active (exited) since Tue 2024-07-30 15:32:16 UTC; 4s ago
       Docs: man:nft(8)
             http://wiki.nftables.org
    Process: 6511 ExecStart=/usr/sbin/nft -f /etc/nftables.conf (code=exited, status=0/SUCCESS)
   Main PID: 6511 (code=exited, status=0/SUCCESS)
        CPU: 32ms

Jul 30 15:32:16 bpi-r4 systemd[1]: Starting nftables.service - nftables...
Jul 30 15:32:16 bpi-r4 systemd[1]: Finished nftables.service - nftables.
root@bpi-r4:~# nft list ruleset
table inet filter {
        chain input {
                type filter hook input priority filter; policy accept;
        }

        chain forward {
                type filter hook forward priority filter; policy accept;
        }

        chain output {
                type filter hook output priority filter; policy accept;
        }

but still no network

Like frank said, no rules file present

So should I wait ?

can you advise me how to let system detect the modem …( because first time)

Oh…is nft missing? Try installing it via apt install nftables…and then run command i sent to add masquerade on wan

but i wonder why the service is there…

Uploaded a basic nftables rule file

I did it and I did this also

but still no network on my laptop

does nft print any errors?

how does nft list ruleset looks like now?

oh i guess you need to create table and chain first

nft add table nat
nft 'add chain nat postrouting { type nat hook postrouting priority 100 ; }'
nft add rule nat postrouting oifname  wan masquerade

for modem please show output of lsusb and lspci (if this has pci-conection)

i found this patch [PATCH] USB: serial: option: add Fibocom FM350-GL

but have not found driver for it yet which needs to be enabled (with kernel recompile)

Nothing Happened still no network… should I download the image again from your Google Drive

root@bpi-r4:~# nft add table nat
root@bpi-r4:~# nft add table nat
nft 'add chain nat postrouting { type nat hook postrouting priority 100 ; }'
nft add rule nat postrouting oifname  wan masquerade

root@bpi-r4:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@bpi-r4:~# nft list ruleset
root@bpi-r4:~# sysctl -p

root@bpi-r4:~# via apt install nftables
-bash: via: command not found
root@bpi-r4:~# apt install nftables
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nftables is already the newest version (1.0.9-1build1).

root@bpi-r4:~#
systemctl status nftables

systemctl start nftables

systemctl status nftables

nft list ruleset
○ nftables.service - nftables
     Loaded: loaded (/usr/lib/systemd/system/nftables.service; disabled; preset>
     Active: inactive (dead)
       Docs: man:nft(8)
             http://wiki.nftables.org
lines 1-5/5 (END)...skipping...
○ nftables.service - nftables
     Loaded: loaded (/usr/lib/systemd/system/nftables.service; disabled; preset: enabled)
     Active: inactive (dead)
       Docs: man:nft(8)
             http://wiki.nftables.org

root@bpi-r4:~# ip r
default via 192.168.1.3 dev wan proto dhcp src 192.168.1.101 metric 1024
192.168.1.0/24 dev lanbr0 proto kernel scope link src 192.168.1.1
192.168.1.0/24 dev wan proto kernel scope link src 192.168.1.101 metric 1024
192.168.1.3 dev wan proto dhcp scope link src 192.168.1.101 metric 1024

I would like to solve my laptop network issue after that start with modem issue

I appreciate your support