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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 20 additions & 6 deletions devices/gk7202v300_lite_xm-rm1/general/overlay/etc/wireless/usb
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Upgrades leave pan and tilt reversed 🐞 Bug ≡ Correctness

customizer.sh writes the corrected ptz_gpio value with fw_setenv, but the customizer does not
rerun when an existing installation upgrades. Those cameras retain the previous mapping in their
preserved bootloader environment, so the direction fix reaches fresh installations but not ordinary
upgrades.
Agent Prompt
## Issue description
Existing installations preserve the old `ptz_gpio` environment value during upgrades, so changing the first-boot customizer alone does not correct their pan/tilt direction.

## Fix Focus Areas
- devices/gk7202v300_lite_xm-rm1/general/overlay/usr/share/openipc/customizer.sh[20-25]

## Recommended Fix
Add an upgrade-time or boot-time migration that replaces the previous `ptz_gpio` value with the corrected value. Match the old value before changing it so user-customized mappings remain intact.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

fw_setenv ptz_caps 'pan tilt'
#
# Set majestic settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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