Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions board/aarch64/bananapi-bpi-r4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,45 @@ Infix ships with the following factory defaults.
> are bridged into the LAN as access points. WiFi is not included with the board
> and is not part of the factory default configuration.

## SIM Card Installation

The BPI-R4 has three SIM holders, one per PCIe slot:

| Slot | PCIe socket | Typical use |
|----------|-------------|--------------------------|
| **SIM1** | M.2 Key-B | 4G/5G WWAN modem |
| **SIM2** | mPCIe #1 | Cellular or other modem |
| **SIM3** | mPCIe #2 | Cellular or other modem |

All three take **nano-SIM (4FF)** cards.

> [!NOTE]
> The official Banana Pi pages show an older board revision with a sliding
> "sled" holder. Newer boards ship with a fixed friction-fit holder instead:
> there is no lid to lift and no spring eject. The [closest matching photo on
> bananapi.org][15] shows the current mechanism.

### Inserting a SIM

1. Orient the card with the gold contacts facing the PCB (printed
side up) and the cut corner pointing toward the M.2/mPCIe socket,
which on this board is also toward the outer edge. The silkscreen
next to each holder shows the same outline.
2. Push the SIM straight in until it is fully seated. There is no
click and the holder is not spring-loaded, so press firmly until
the contacts engage and the rear edge of the card sits flush with
the holder.
3. A SIM that still protrudes is not fully inserted; push again.

### Removing a SIM

The friction grip on these holders is tight. Gently pry the card out
with a fingernail or a thin plastic spudger. Avoid metal tweezers
near the contacts. Removing the front panel of the metal case is
absolutely necessary to access the SIM holder.

For software configuration once the modem is recognised, see the
[Cellular Modem User's Guide][16].

## Getting Started

Expand Down Expand Up @@ -358,3 +397,6 @@ make aarch64
[12]: https://github.com/frank-w/u-boot/releases
[13]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2026-01-bpi-2026.01-2026-01-15_2013/bpi-r4_spim-nand_bl2.img
[14]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2026-01-bpi-2026.01-2026-01-15_2013/bpi-r4_spim-nand_fip.bin
[15]: https://docs.banana-pi.org/bpi-r4/bpi-r4_4g5g_2.jpg
[16]: https://www.kernelkit.org/infix/latest/modem/

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"state": {
"admin-state": "unlocked"
}
},
{
"name": "USB2",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
}
]
},
Expand Down Expand Up @@ -366,7 +373,7 @@
]
},
"infix-meta:meta": {
"version": "1.7"
"version": "1.8"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"state": {
"admin-state": "unlocked"
}
},
{
"name": "USB2",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
}
]
},
Expand Down Expand Up @@ -358,7 +365,7 @@
]
},
"infix-meta:meta": {
"version": "1.7"
"version": "1.8"
},
"infix-services:mdns": {
"enabled": true
Expand Down
4 changes: 4 additions & 0 deletions board/common/rootfs/etc/default/confd
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
CONFD_TIMEOUT=60
#DEBUG=1

# -v debug
CONFD_ARGS=""
1 change: 1 addition & 0 deletions board/common/rootfs/etc/iproute2/rt_addrprotos
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
4 static
5 dhcp
6 random
7 wwan
68 changes: 68 additions & 0 deletions board/common/rootfs/usr/libexec/infix/init.d/00-probe
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,73 @@ def probe_ptp_capabilities(out):
out.setdefault("interfaces", {}).update(ifaces)


def _usb_root_from_sysfs(dev_path):
p = dev_path
while p not in ("/", "/sys"):
parent = os.path.realpath(os.path.join(p, ".."))
basename = os.path.basename(parent)
if basename.startswith("usb") and basename[3:].isdigit():
return parent
p = parent
return None


def _read_usb_vid_pid(dev_path):
p = dev_path
while p not in ("/", "/sys"):
try:
vid = open(os.path.join(p, "idVendor")).read().strip()
pid = open(os.path.join(p, "idProduct")).read().strip()
return vid, pid
except OSError:
pass
p = os.path.dirname(p)
return "", ""


def probe_modems(out):
"""devpath is the USB bus root; ModemManager matches by path prefix.
seen_roots deduplicates cdc-wdm and ttyUSB ports of the same physical modem."""
seen_roots = set()
modems = []
idx = 0

def add_modem(dev_path):
nonlocal idx
usb_root = _usb_root_from_sysfs(dev_path)
if usb_root is None or usb_root in seen_roots:
return
seen_roots.add(usb_root)
vid, pid = _read_usb_vid_pid(dev_path)
modems.append({
"index": idx,
"name": "modem%d" % idx,
"devpath": usb_root,
"vid": vid,
"pid": pid,
})
idx += 1

for cls_dir, prefix in (("/sys/class/usbmisc", "cdc-wdm"),
("/sys/class/tty", "ttyUSB")):
try:
entries = os.listdir(cls_dir)
except OSError:
continue
for entry in entries:
if not entry.startswith(prefix):
continue
try:
dev_path = os.path.realpath(
os.path.join(cls_dir, entry, "device"))
add_modem(dev_path)
except OSError:
pass

if modems:
out["modem"] = modems


def main():
out = {
"vendor": None,
Expand Down Expand Up @@ -647,6 +714,7 @@ def main():

probe_wifi_radios(out)
probe_ptp_capabilities(out)
probe_modems(out)

if not out["factory-password-hash"]:
sys.stdout.write("\n\n\033[31mCRITICAL BOOTSTRAP ERROR\n" +
Expand Down
1 change: 1 addition & 0 deletions configs/aarch64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://www.kernelkit.org/infix/"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_FEATURE_GPS=y
BR2_PACKAGE_FEATURE_MODEM=y
BR2_PACKAGE_FEATURE_WIFI=y
BR2_PACKAGE_FEATURE_WIFI_MEDIATEK=y
BR2_PACKAGE_FEATURE_WIFI_QUALCOMM=y
Expand Down
13 changes: 9 additions & 4 deletions doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,26 @@ All notable changes to the project are documented in this file.

- Add Wi-Fi roaming for fast, seamless handoff between access points that
share an SSID: 802.11k, 802.11v and 802.11r (over-the-air FT). See the
[Wi-Fi][wifi] guide for details
[Wi-Fi User's Guide][wifi] for details
- Add Wi-Fi 802.11s mesh support, letting access points form a wireless
backhaul between each other without cabling
- Add band steering for dual-band access points, nudging dual-band
clients onto the faster 5/6 GHz band
- Add `legacy-rates` option to re-enable 802.11b rates on 2.4 GHz for
old IoT devices (disabled by default)
- Add cellular modem (WWAN) support for USB-attached MBIM/QMI modems,
including USB dongles, mPCIe cards, and M.2 Key-B modules. Multiple
APNs per modem, SIM PIN configuration, and NMEA routing from modem
GPS to gpsd. See the [Modem User's Guide][modem] for details

### Fixes

- Firewall masquerade no longer enables the global IPv4/IPv6 forwarding
sysctls. You must now enable IP forwarding explicitly on the interfaces
that should route traffic; enabling NAT alone is no longer enough

[wifi]: wifi.md
[wifi]: https://www.kernelkit.org/infix/latest/wifi/
[modem]: https://www.kernelkit.org/infix/latest/modem/

[v26.05.0][] - 2026-05-29
-------------------------
Expand Down Expand Up @@ -83,9 +88,9 @@ All notable changes to the project are documented in this file.
show`, which were not expanded, so `show interface` and other operational
reads failed. Ranges are now expanded and listed correctly

[ethernet]: ethernet.md#restricting-advertised-link-modes
[ethernet]: https://www.kernelkit.org/infix/latest/ethernet/#restricting-advertised-link-modes
[BPI-R3]: https://docs.banana-pi.org/en/BPI-R3/BananaPi_BPI-R3
[AcerConnectVero]: ../board/aarch64/acer-connect-vero-w6m/
[AcerConnectVero]: https://github.com/kernelkit/infix/tree/main/board/aarch64/acer-connect-vero-w6m/

[v26.04.0][] - 2026-04-30
-------------------------
Expand Down
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ regression test system solely relies on NETCONF and RESTCONF.
- [Network Configuration](networking.md)
- [Wi-Fi](wifi.md)
- [DHCP Server](dhcp.md)
- [Cellular Modem (WWAN)](modem.md)
- [Syslog Support](syslog.md)
- **Infix In-Depth**
- [Boot Procedure](boot.md)
Expand Down
Loading