Skip to content
OpenIPCPublic

About

Motor control tools for IP cameras — pan/tilt/zoom/focus/iris and autofocus across HiSilicon, Ingenic and Xiongmai SoCs

Topics

Resources

Code of conduct

Security policy

Stars

36 stars

Watchers

3 watching

Forks

Repository files navigation

Motors

Various code to manage motor hardware

Common motor service prototype

motorsd is a host-tested prototype for shared motor control. It contains the service, the public socket protocol, libmotors, command-line access, separate driver programs, and architecture tests.

Read the motorsd documentation for the current scope and usage examples.

Anjoy motor control

anjoy-motor drives the zoom/focus/iris lens motors and the pan/tilt head of Anjoy AF camera modules over their motor-MCU UART (Pelco-D-style frames), and decodes the MCU's live position reports. Protocol recovered from a live MTF45-4G_AF.

Zenointel SD-2N-4G pan/tilt

zenointel-sd2n4g drives the pan/tilt stepper head of the Zenointel SD-2N-4G (Goke GK7205V510) directly over memory-mapped PL061 GPIO — no vendor kernel module and no vendor app, so it also runs under OpenIPC. The GPIO map, half-step phase table and per-axis config were reverse-engineered from the stock firmware (motor.ko/gpioStep.ko). The lens is fixed — no motorized zoom/focus on this model.

Bit-banged Pelco-D sender (HI3516D_N81820)

pelco-bb sends Pelco-D frames on the Xiongmai HI3516D_N81820's PTZ port by driving the UART1 pads as GPIOs, either as a complementary pair (a real differential signal on the RS-485 pair) or as a single inverted pad. It is a debugging instrument for when frames on /dev/ttyAMA1 do not reach the head, with a procedure for checking the bus from a USB-RS485 adapter.

Pelco-D configuration TUI

pelcodtui is an ncurses interface for Pelco-D PTZ controller settings and manual movement. Camera profiles describe controller-specific commands without hard-coding them in the application.

UART bridge / validation harness

uart-bridge is a host-side Python tool (run with uv) that sits between a camera board and its PTZ motor board on two USB-UART adapters. It forwards and timestamps every byte, decodes frames, can stand in for the camera, and diffs captures so a reimplemented motor driver can be checked against the stock firmware's traffic.

Some theory behind

Basic autofocus algorithms

Learning approach for autofocus

Improving the accuracy and low-light performance of contrast-based autofocus using supervised machine learning


Various links


Similar projects on Github

About

Motor control tools for IP cameras — pan/tilt/zoom/focus/iris and autofocus across HiSilicon, Ingenic and Xiongmai SoCs

Topics

Resources

Code of conduct

Security policy

Stars

36 stars

Watchers

3 watching

Forks

Sponsor this project

Contributors

Languages