patches/ now mirrors the topic-branch structure on
marfrit/bes2600-dkms:
factory-series/ = bes2600/factory-no-efuse-flag (c1 + c5 stacked)
0001-*-request_firmware-*.patch = c1 (request_firmware() read path)
0002-*-STANDARD_FACTORY_EFUSE_FLAG-*.patch = c5 (default flag off)
pm-gate-on-handshake/ = bes2600/pm-gate-on-handshake (c2 standalone off mobian)
0001-*-gate-device-LP-mode-entry-*.patch = c2 (gate + ETIMEDOUT)
c1 + c5 are stacked because c5's fix depends on c1's rewrite of
factory_section_read_file() having been applied first (otherwise the
parse-fail error is masked).
c2 is standalone because bes_pwr.c is orthogonal to the factory/
request_firmware work; it can be submitted independently.
All three patches verified on PineTab2 (BES2600WM + RK3566) running
linux-pinetab2 6.19.10-danctnix1-1. Bug #1 (factory.txt read path),
bug #1.5 (parse fail), bug #2 (PM handshake timeout spam) all resolved
by this series. Bug #3 (SDIO TX WARN) is reduced to a single boot-time
event that does not cascade.
Signed-off-by: Markus Fritsche <fritsche.markus@gmail.com>
BESser — BES2600 driver mainlining for Pine64 PineTab2
Working tree for upstreaming the Bestechnic BES2600WM WiFi/BT combo driver currently shipped out-of-tree by the danctnix kernel for the Pine64 PineTab2.
Why "BESser"
"BES" (the chip vendor) + German besser ("better"). Sibling to:
- Bin — u-boot upstreaming for the CoolPi GenBook (RK3588)
- MegabitChip — DDR init blob RE for the same SoC
- SouthAfrica — OpenPineBuds / 1MORE Fit SE BES2300 firmware RE (chip family relative)
- RockHard — RK3588 mainline kernel work
Hardware target
| Item | Value |
|---|---|
| Device | PineTab2 |
| Host name | ohm (ohm.fritz.box, ohm.vpn = 10.170.16.14) |
| SoC | Rockchip RK3566 (aarch64) |
| WiFi/BT | Bestechnic BES2600WM — WiFi 4 (11n dual-band 1x1) + BT 5.2/5.3 |
| WiFi interface | SDIO 3.0, vendor 0xBE57 device 0x2002 |
| BT interface | UART HCI (separate bes2600_btuart module) |
| OS | Arch Linux ARM, danctnix kernel 6.19.10-danctnix1-1-pinetab2 |
Driver lineage
ST-Ericsson CW1200 (mainline drivers/net/wireless/st/cw1200/)
│ author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
▼
Bestechnic BES2600 (closed fork ~2015–2023, same author)
│ adds: BT-over-UART, 5GHz, ePTA coexistence, SDIO ADMA, char-dev API
▼
Released for Chinese Android burner-phone vendor kernels (~2023)
│
▼
arjan-vlek/bes2600 (GitLab, 2023-07) → 26-commit checkpatch cleanup
│
├── TuxThePenguin0/bes2600 (preserves pre-removal Android source)
├── salsa.debian.org/Mobian-team/devices/bes2600-dkms (active, our PR target)
└── codeberg.org/DanctNIX/linux-pinetab2 (in-kernel at drivers/staging/bes2600/)
CW1200-ancestry markers in current source: same author Dmitry Tarnyagin,
CONFIG_BES2600_USE_STE_EXTENSIONS (STE = ST-Ericsson),
CONFIG_BES2600_WSM_DEBUG (WSM = CW1200's host↔FW protocol).
Repos
| Role | Path |
|---|---|
| This umbrella | git.reauktion.de/marfrit/besser — patches/, scripts/, fw-analysis/, notes/ |
| Mobian DKMS fork (PR target) | git.reauktion.de/marfrit/bes2600-dkms — branches per patch; upstream = salsa.debian.org/Mobian-team/devices/bes2600-dkms |
Patch series
| Patch | Status | Description |
|---|---|---|
| c1 | ✅ MERGED-LOCAL, deployed on ohm | bes2600: use request_firmware() for factory.txt read — kills filp_open / kernel_read in the read path; fixes the (NULL device *) read and check /lib/firmware/bes2600_factory.txt error boot spam |
| c2 | pending | PM handshake gate + retry — fixes bes2600_pwr_enter_lp_mode wait pm ind timeout recurring every 5–10s |
| c3 | pending | bes_chardev removal + nl80211 testmode hookup — clears the second upstream blocker (custom char device); secondary effect on bug #3 |
| c4 | pending | Enable CONFIG_BES2600_TESTMODE=y + route patch_wifi_testMode — exposes hidden firmware testmode features |
| c5 | pending | Investigate factory.txt parse fail — uncovered by c1; original bug masked it; parser chokes on data request_firmware now successfully returns |
| c1.1 | pending follow-up | Drop kernel_write from factory.c + bes_chardev.c + bes_fw.c (/lib/firmware/bes2002_fw_write.bin debug file!) |
| c1.2 | pending follow-up | Thread struct device * through factory API → eliminates (NULL device *) log prefix |
Workflow
- Edit on Mobian fork (
bes2600-dkms) — primary upstream PR target - Topic branch per patch:
bes2600/<short-name> git commit --signoffwith full kernel-style message- checkpatch.pl --no-tree --strict before push (must be clean)
git format-patch -1 -o ../besser/patches/to canonicalize- Push branch to
origin(Gitea), open MR upstream when ready
Build + deploy
See scripts/:
build-bes2600-on-ohm.sh— native aarch64 build on ohm (requireslinux-pinetab2-headers)deploy-c1-to-ohm.sh— install patched modules to/lib/modules/<ver>/extra/+ depmodbackup-ohm-kernel.sh— timestamped tar.zst of /boot + /lib/modules + /lib/firmware/bes2600
Firmware RE state (task d)
Firmware blobs (4 .bin + factory.txt) are not committed here (binary,
ships from Bestechnic). On boltzmann:~/src/besser/firmware-from-ohm/ and
on oppenheimer:/work/besser/ (Ghidra host).
What IS committed under fw-analysis/:
*.strings.txt— full sorted-unique strings extraction per blob*.fnnames.txt— function-name pattern extraction (191 candidates frombest2002_fw_sdio.bin)
Build provenance: Dec 26-27 2023 build from Bestechnic Jenkins
(GCC-10-pipeline), source git commit 8125e20be (NOT public).
Hidden features in firmware (per task d): testmode patch (CONFIG_BES2600_TESTMODE
gates it), ePTA coexistence with bypass (gEptaBypass: %d), DPD per-channel
calibration, hal_trace_crash_dump_register, METAL_ID + patch_version
introspection, RF tone generation (nosignal variant), memory dump (nosignal
variant), DAC/IQ calibration v2, fast-PSM tuning hooks.
Adjacent infrastructure
- oppenheimer (CT131 on data Proxmox): Ghidra 11.3.2 host. SSH via
mfritsche@192.168.88.63. Staging at/work/besser/. - boltzmann (Rock 5 ITX+): primary build/dev, ARM64 native, hub-tools preferred path.
- ohm: target hardware; UART-over-USB-C debug rig also available (Tigard FT2232H Channel A @ 1.8V).
Authors / contacts
- Markus Fritsche
<fritsche.markus@gmail.com>(this fork) - Driver upstream: Dmitry Tarnyagin
<dmitry.tarnyagin@stericsson.com>(CW1200 / BES2600 base) - BT companion: Dang Huynh
<dang.huynh@mainlining.org>(bes2600_btuart.c, 2025) - Mobian DKMS: Julian
<mail@julianfairfax.ch>(current packaging maintainer)