From 664cc5fe7014bc8a66026db970393fd5ff8cc7d5 Mon Sep 17 00:00:00 2001 From: Bruno Amui Date: Fri, 16 Oct 2026 18:50:36 -0300 Subject: [PATCH] gk7202v300_lite_xm-rm1: support the RTL8188EUS variant, fix pan/tilt order The same board ships with either an iComm SV6115C or a Realtek RTL8188EUS (0bda:8179) USB Wi-Fi module. Build both drivers and pick one at boot from the enumerated USB vendor (wlandev gk7202v300-xm-rm1). To make room for the second driver, also exclude mac80211/mt7601u/tun: neither Wi-Fi driver uses mac80211 and the board has no VPN packages. Pan and tilt GPIO groups were swapped and both turned the wrong way; ptz_gpio is now verified on hardware. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- .../configs/gk7202v300_lite_xm-rm1_defconfig | 1 + .../general/overlay/etc/wireless/usb | 26 ++++++++++++++----- .../overlay/usr/share/openipc/customizer.sh | 9 ++++--- .../scripts/excludes/gk7202v300_lite.list | 5 ++++ 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index cf7408d8e..1da53ac1a 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ ZTE K543 SSC337DE SC401AI MT7601U_USB NOR_16M done ZTE K545 T31X SC4336 ATBM6012B_USB NOR_16M done 4G Camera XG521 V1.2 GK7202V300 GC1054 EC800E-CN_USB NOR_8M done XM IPG-G3-WR GK7202V300 JXH63 ATBM60321S_USB NOR_8M done -XM IPC-RM1-BLK7202V3 GK7202V300 SC223A SV6115C_USB NOR_8M video-yes, wifi-yes (ssv6x5x#1), pan/tilt+ir+audio untested +XM IPC-RM1-BLK7202V3 GK7202V300 SC223A SV6115C/8188EUS NOR_8M video-yes, wifi-yes (ssv6x5x#1), pan/tilt-yes, ir+audio untested ``` diff --git a/devices/gk7202v300_lite_xm-rm1/br-ext-chip-goke/configs/gk7202v300_lite_xm-rm1_defconfig b/devices/gk7202v300_lite_xm-rm1/br-ext-chip-goke/configs/gk7202v300_lite_xm-rm1_defconfig index a77563d81..08c96fba8 100644 --- a/devices/gk7202v300_lite_xm-rm1/br-ext-chip-goke/configs/gk7202v300_lite_xm-rm1_defconfig +++ b/devices/gk7202v300_lite_xm-rm1/br-ext-chip-goke/configs/gk7202v300_lite_xm-rm1_defconfig @@ -61,6 +61,7 @@ BR2_PACKAGE_MAJESTIC=y BR2_PACKAGE_MBEDTLS_OPENIPC=y BR2_PACKAGE_OPUS_OPENIPC=y BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y +BR2_PACKAGE_RTL8188EUS_OPENIPC=y BR2_PACKAGE_SSV635X_OPENIPC=y BR2_PACKAGE_YAML_CLI=y BR2_PACKAGE_GPIO_MOTORS=y diff --git a/devices/gk7202v300_lite_xm-rm1/general/overlay/etc/wireless/usb b/devices/gk7202v300_lite_xm-rm1/general/overlay/etc/wireless/usb index c70159fd8..bef0091af 100755 --- a/devices/gk7202v300_lite_xm-rm1/general/overlay/etc/wireless/usb +++ b/devices/gk7202v300_lite_xm-rm1/general/overlay/etc/wireless/usb @@ -1,13 +1,27 @@ #!/bin/sh -set_gpio() { - [ "$2" -eq 1 ] && gpio set $1 || gpio clear $1 - sleep 1 -} +# XM IPC-RM1-BLK7202V3-M43A-WIFI ships with either an iComm SV6115C or a +# Realtek RTL8188EUS USB module; pick the driver from the enumerated chip. +if [ "$1" = "gk7202v300-xm-rm1" ]; then + for i in 1 2 3 4 5; do + ids=$(cat /sys/bus/usb/devices/*/idVendor 2>/dev/null) + case "$ids" in + *8065*) modprobe ssv6x5x; exit 0 ;; + *0bda*) modprobe 8188eu; exit 0 ;; + esac + sleep 1 + done + exit 1 +fi if [ "$1" = "ssv6x5x-generic" ]; then - modprobe ssv6x5x - exit 0 + modprobe ssv6x5x + exit 0 +fi + +if [ "$1" = "rtl8188eu-generic" ]; then + modprobe 8188eu + exit 0 fi exit 1 diff --git a/devices/gk7202v300_lite_xm-rm1/general/overlay/usr/share/openipc/customizer.sh b/devices/gk7202v300_lite_xm-rm1/general/overlay/usr/share/openipc/customizer.sh index b109ef3c8..879e63717 100644 --- a/devices/gk7202v300_lite_xm-rm1/general/overlay/usr/share/openipc/customizer.sh +++ b/devices/gk7202v300_lite_xm-rm1/general/overlay/usr/share/openipc/customizer.sh @@ -3,7 +3,7 @@ # Perform basic settings on a known IP camera # # -# XM board IPC-RM1-BLK7202V3-M43A-WIFI (GK7202V300 + SC223A, Wi-Fi SV6115C on USB), +# XM board IPC-RM1-BLK7202V3-M43A-WIFI (GK7202V300 + SC223A, Wi-Fi SV6115C or RTL8188EUS on USB), # pan/tilt dome. GPIOs taken from the stock firmware (loadpublic gpio_pin=, LIBXMVIDEO.json). # # Set custom upgrade url @@ -13,14 +13,15 @@ fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/g # # Set wlan device and credentials if need # -fw_setenv wlandev ssv6x5x-generic +fw_setenv wlandev gk7202v300-xm-rm1 #fw_setenv wlanssid Router #fw_setenv wlanpass 12345678 # -# Pan/tilt: two unipolar steppers driven straight from GPIO (gpio-motors) +# Pan/tilt: two unipolar steppers driven straight from GPIO (gpio-motors). +# Pan coils first, then tilt; phase order checked on hardware for direction. # fw_setenv ptz_control gpio -fw_setenv ptz_gpio '13 15 14 12 55 54 53 52' +fw_setenv ptz_gpio '52 53 54 55 12 14 15 13' fw_setenv ptz_caps 'pan tilt' # # Set majestic settings diff --git a/devices/gk7202v300_lite_xm-rm1/general/scripts/excludes/gk7202v300_lite.list b/devices/gk7202v300_lite_xm-rm1/general/scripts/excludes/gk7202v300_lite.list index 6310cbf89..448a066f1 100644 --- a/devices/gk7202v300_lite_xm-rm1/general/scripts/excludes/gk7202v300_lite.list +++ b/devices/gk7202v300_lite_xm-rm1/general/scripts/excludes/gk7202v300_lite.list @@ -71,3 +71,8 @@ /usr/lib/sensors/libsns_sc500ai.so /usr/lib/sensors/libsns_sp2305.so /usr/lib/sensors/libsns_sp2308.so +# +# Neither Wi-Fi driver (ssv6x5x, 8188eu) uses mac80211; no VPN packages +/lib/modules/4.9.37/kernel/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko +/lib/modules/4.9.37/kernel/net/mac80211/mac80211.ko +/lib/modules/4.9.37/kernel/drivers/net/tun.ko