[BPI-R3] [BPi-R3-Mini] Imagebuilder R3 ArchlinuxArm, linux-rolling-stable

Yes, I know. I was able to flash Debian but not Arch linux.

Then copy the bpir.img.gz to the SD card /tmp/ folder. It is accessable without root.

If using a pre-build image, rename it to bpir.img.gz

Boot the R64/R3 with the SD card with UART connected. When kernel starts keep ‘shift E’ keys pressed. When finised, you can reboot.

You can keep ‘x’ pressed instead if you want to enter a busybox ash.

Note for R3: To run on EMMC, only the switch most near to powerplug (D) should be down, the rest up. This is different from the normal switch settings. It is done so that you do not need mmcblk0boot0.

Just read the readme and follow step by step.

I really cannot make it more simple then this.

Thanks a lot. Good to know. I have already booted.

After=graphical.targe - won’t start hostapd at all. I have also noticed that sometimes wlan1 goes down and a restart helps. It rarely happens, but it does happen. I tried to tune the 5GHz WiFi, but I can’t get a traffic higher than about 26Mbps. I got about 100Mbps with Openwrt. WiFi 2.4GHz reached about 50Mbps with Arch Linux.

Maybe compare between openwrt and archlinuxarm output of iw dev to check the tx power.

Do you get 100 mbps at very close range?

Check the Debian image and compare hostapd.conf settings.

100Mbps is at a distance of about 1m. I’ve tried the configuration from Debian as well and I can’t get an adequate 5GHz wifi transmission speed. My wlan1.conf is currently:

  GNU nano 8.1                                                                wlan1.conf                                                                           
# hostapd configuration file

interface=wlan1
driver=nl80211
ssid=WIFI50
bridge=brlan
country_code=CZ
channel=40
hw_mode=a
ieee80211d=1
ieee80211h=1
ieee80211ax=1  # Enable 802.11ax (Wi-Fi 6)

# HT capabilities
#ht_capab=[HT20][HT40-][HT40+][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1]

# VHT capabilities
#vht_capab=[SHORT-GI-80][RX-STBC-1]
#vht_oper_chwidth=1  # 80 MHz channel width

# HE (High Efficiency) capabilities
# Uncomment if supported by your hardware and hostapd version
#he_capab=[HE80]

auth_algs=1
#wmm_enabled=1

# WPA/IEEE 802.11i settings
wpa=2
wpa_passphrase=justsomepassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP

Max traffic 19Mbps.

Without the ht and vht capabilities set, it will not reach max.

They may need some more tweaking, that is still on my todo list. But you do need them.

Also the tx strength shown by:

iw dev

Check the db, and maybe @frank-w knows which should be the max reachable db.

Not really…i’m no wifi expert

At how many db is your R3 running (iw dev)? I remember seeing 13db, which is why it is on my todo list, but cannot check this now myself.

You may need to play with

iw reg get
Iw reg set

To get more tx db

You can find mire useful info at:

https://wiki.archlinux.org/title/Network_configuration/Wireless#Respecting_the_regulatory_domain

From this text I read editing /etc/conf.d/wireless-regdom This is (not yet) part of the installation script, so it may be useful to look there.

I’m also away from my r4 boards atm to check this and the unique serial.

I reverted back to the original wlan1.conf. I used channel 36 instead of channel 149. I measured about 50Mbps. Unfortunately, it is not possible to connect an iPhone to the AP set in this way - Raspberry and lenovo motebooks have no connection problem.

It will probably go faster with higher db.

Check iw dev

Need to figure out how to increase

Edit:

Then at chennel 149 only 13 db it actually seems correct. But better set everything to a country where more db is allowed, or use a different channel

Also need to see if next to

vht_oper_centr_freq_seg0_idx=42

we use the second

vht_oper_centr_freq_seg1_idx=159

Instead of (un)commenting at channel switch.

And as for mbps, I see

ieee80211ax=1

Is not set for wlan1, so with more tweaking, higher speeds should be possible.

Edit:

And here is some more usefull info for tweaking, also in posts above:

I do not have anything in dmesg or output from hostapd. It just fails.

However, it does look like timeout related. If the AP or the (last) STA times out, maybe it does shut down to save energy? So maybe some unwanted energy saving behavior? But I’m still just guessing…

Edit:

In the middle of doing an iperf3, I got:

Sep 03 08:55:41 bpir3 systemd-networkd[2980]: wlan1: Lost carrier

Nothing else, also not in dmesg output. So it is not timeout related (or this is another bug).

Then iw dev looks like:

phy#1
	Interface wlan1
		ifindex 12
		wdev 0x100000001
		addr aa:bb:cc:xx:xx:xx
		type AP
		txpower 20.00 dBm
		multicast TXQ:
			qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcol	tx-bytes	tx-packets
			0	0	37	0	0	0	0	3910		38

I have a fairly complete Linux router. There are about 7 LAN devices running on it. One of them is Raspberry Pi 5. I am currently solving this problem: About one in 7 RPI5 boots won’t get a LAN connection. The RPI5 receives an IP address from the DHCP server, but cannot ping anywhere. Conversely, it is possible to ping RPI5 from the router. The fault is likely to be on the RPI side. I just want to make sure there is no setting on the BPI-R3 that can fix this.

If ping works from 1 side, it usually works from another side, so this is strange.

Check the ip address and routing table with the commands:

ip a
ip r

Compare working and non-working situation on both sides. Since it is the rpi5 rebooting and the r3 is sitting idle, one would suspect the rpi5.

Are all lan connections bridged?

Moved the repo server and image-files server over to Oracle always-free-services tier, which has a static ip. There should be no problems migrating. It may be better reachable, perhaps even through the great wall of china.

Ftp and http servers are up, https is to follow up.

http://woudstra.mywire.org

All packages are also built on this (aarch64) server periodially, keeping them up to date.

Hello Eric

is it possible to advise on my case please? trying on bpi-r4 board

Got one of the ready images also used your script to create a new sdcard both AP and router but I cant set the interfaces up due to memory and apparently something is wrong with the system not recognizing the memory correctly

[root@bpir4 ~]# free -hm
               total        used        free      shared  buff/cache   available
Mem:           231Mi       165Mi        14Mi       684Ki        66Mi        66Mi
Swap:             0B          0B          0B

Also during boot there are sine services failing.

[**FAILED**] Failed to start **Setup MAC addresses**.
See 'systemctl status setmac.service' for details.

[**FAILED**] Failed to start **Netfilter Tables**.
See 'systemctl status nftables.service' for details.
[root@bpir4 ~]# ip link set wan up
[  173.937409] ip: page allocation failure: order:10, mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0
[  173.949931] CPU: 2 UID: 0 PID: 3169 Comm: ip Not tainted 6.10.0-next-20240724-bpi #3
[  173.957676] Hardware name: Banana Pi BPI-R4 (DT)
[  173.962283] Call trace:
[  173.964720]  dump_backtrace+0xd4/0x110
[  173.968468]  show_stack+0x18/0x24
[  173.971775]  dump_stack_lvl+0x5c/0x7c
[  173.975429]  dump_stack+0x18/0x24
[  173.978734]  warn_alloc+0xdc/0x17c
[  173.982129]  __alloc_pages_noprof+0x3e4/0x940
[  173.986477]  __alloc_pages_node_noprof+0x78/0xac
[  173.991084]  ___kmalloc_large_node+0x68/0xb8
[  173.995343]  __kmalloc_noprof+0x3c/0x1d0
[  173.999257]  kmalloc_array_noprof.constprop.0+0x24/0x38
[  174.004475]  mtk_open+0x314/0x8e8
[  174.007782]  __dev_open+0x168/0x1b8
[  174.011263]  dev_open+0x20/0x6c
[  174.014396]  dsa_user_open+0x2c/0x94
[  174.017962]  __dev_open+0x168/0x1b8
[  174.021442]  __dev_change_flags+0x180/0x1a8
[  174.025615]  dev_change_flags+0x24/0x6c
[  174.029442]  do_setlink+0x55c/0xbb8
[  174.032923]  __rtnl_newlink+0x338/0x68c
[  174.036748]  rtnl_newlink+0x50/0x7c
[  174.040225]  rtnetlink_rcv_msg+0x27c/0x2d0
[  174.044312]  netlink_rcv_skb+0xa4/0x118
[  174.048140]  rtnetlink_rcv+0x18/0x24
[  174.051707]  netlink_unicast+0x12c/0x1c4
[  174.055620]  netlink_sendmsg+0x288/0x2e0
[  174.059533]  sock_sendmsg_nosec+0x1c/0x34
[  174.063535]  ____sys_sendmsg+0x1a4/0x248
[  174.067449]  ___sys_sendmsg+0x80/0xdc
[  174.071099]  __sys_sendmsg+0x6c/0xbc
[  174.074664]  __arm64_sys_sendmsg+0x20/0x2c
[  174.078748]  invoke_syscall+0x64/0xec
[  174.082400]  el0_svc_common+0xbc/0xd8
[  174.086051]  do_el0_svc+0x20/0x2c
[  174.089355]  el0_svc+0x70/0xa0
[  174.092399]  el0t_64_sync_handler+0x84/0x12c
[  174.096659]  el0t_64_sync+0x194/0x198
[  174.100340] Mem-Info:
[  174.102614] active_anon:124 inactive_anon:6114 isolated_anon:0
[  174.102614]  active_file:6208 inactive_file:5471 isolated_file:0
[  174.102614]  unevictable:0 dirty:136 writeback:173
[  174.102614]  slab_reclaimable:2789 slab_unreclaimable:7857
[  174.102614]  mapped:7268 shmem:171 pagetables:309
[  174.102614]  sec_pagetables:0 bounce:0
[  174.102614]  kernel_misc_reclaimable:0
[  174.102614]  free:8575 free_pcp:16 free_cma:0
[  174.141179] Node 0 active_anon:500kB inactive_anon:24476kB active_file:24832kB inactive_file:21884kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:29120kB dirty:688kB writeback:692kB shmem:684kB writeback_tmp:0kB kernel_stack:1936kB pagetables:1236kB sec_pagetables:0kB all_unreclaimable? no
[  174.168187] DMA free:34300kB boost:0kB min:1888kB low:2360kB high:2832kB reserved_highatomic:0KB active_anon:500kB inactive_anon:24424kB active_file:24728kB inactive_file:21884kB unevictable:0kB writepending:1380kB present:262144kB managed:237356kB mlocked:0kB bounce:0kB free_pcp:64kB local_pcp:0kB free_cma:0kB
[  174.195829] lowmem_reserve[]: 0 0 0 0
[  174.199493] DMA: 1019*4kB (UME) 573*8kB (UME) 249*16kB (UME) 150*32kB (UME) 74*64kB (UME) 30*128kB (UME) 16*256kB (UME) 4*512kB (UM) 1*1024kB (M) 1*2048kB (E) 0*4096kB = 35236kB
[  174.215404] 11852 total pagecache pages
[  174.219231] 0 pages in swap cache
[  174.222534] Free swap  = 0kB
[  174.225413] Total swap = 0kB
[  174.228282] 65536 pages RAM
[  174.231064] 0 pages HighMem/MovableOnly
[  174.234893] 6197 pages reserved
[  174.238036] mt7530-mmio 15020000.switch wan: failed to open conduit eth0
RTNETLINK answers: Cannot allocate memory

Any help would be appreciated.

Thank you.

Please create bpi-r4 thread if none exist for this. This thread is for r3(mini)