GitHub - OpenIPC/ipctool: Simple tool (and library) for checking IP camera hardware · GitHub

Текстовая копия страницы; без скриптов и внешних ресурсов. Источник: https://github.com/OpenIPC/ipctool

GitHub - OpenIPC/ipctool: Simple tool (and library) for checking IP camera hardware · GitHub
Skip to content
Navigation MenuSign inAppearance settingsPlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub Copilot appDirect agents from issue to mergeMCP RegistryIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesCode QualityEnforce quality at mergeAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricingSearch/Sign inSign upAppearance settings
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
OpenIPCipctoolRepository navigationCodeIssues5 (5)Pull requests2 (2)ActionsSecurity and qualityInsightsMore items
ipctoolPublicSponsorNotificationsYou must be signed in to change notification settingsFork64 (64)Star258 (258)You must be signed in to star a repositoryAboutSimple tool (and library) for checking IP camera hardwareopenipc.orgTopicsipcameraipctoolopenipcResourcesReadmeMIT licenseCode of conductCode of conductActivityCustom propertiesStars258 starsWatchers7 watchingForks64 forksReport repositorymasterBranchesTagsGo to fileCodeOpen more actions menuLatest commit History960 Commits960 CommitsFolders and filesNameNameLast commit messageLast commit date.github/workflows.github/workflows  cmakecmake  docsdocs  exampleexample  includeinclude  scriptsscripts  srcsrc  toolstools  .clang-format.clang-format  .clang-format-hook-exclude.clang-format-hook-exclude  .gitignore.gitignore  CLAUDE.mdCLAUDE.md  CMakeLists.txtCMakeLists.txt  LICENSELICENSE  README.mdREADME.md  contributors.mdcontributors.md  View all filesRepository files navigationREADMECode of conductMIT licenseMore items
IP camera hardware checking tool
This basic concept belongs to Maxim Chertov (thank you for
your original utility) and Nikita Orlov (for
cute YAML format for describing hardware). A warm welcome also to Igor
Zalatov (for suggestions for new features and
describing ways to do them).
Download
Use the link
to download latest build (even directly to your camera). The build uses musl
C library to work on vast majority of hardware.
Alternative launch methods
Your own NFS server (in case your camera firmware includes NFS client
support, proven to work on XM cameras):
$ mount -o nolock 10.0.0.1:/srv/ro /utils/
$ /utils/ipctool
As an alternative, you may run your own NFS server, putting ipctool on it.
Using UART and rx busybox applet on camera side. This option was described in @themactep blog post.
Using telnet/console and uget utility: basically convert small uget binary
into echo/printf chunks and deploy to /tmp partition. Read
more in documentation
TFTP, since some cameras have tftp clients and/or servers by default. Assuming
you have the ipctool-mips32 binary ready under /directory/to/serve:
On a desktop computer:
$ pip install ptftpd
$ ptftpd -p 6969 en0 /directory/to/serve
Other option, better for Debian/Ubuntu:
$ sudo apt install tftpd-hpa
then edit config /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/directory/to/serve"
TFTP_ADDRESS=":6969"
TFTP_OPTIONS="--secure --create"
and restart the service
sudo systemctl restart tftpd-hpa
On the camera:
# tftp -g -r ipctool-mips32 <your.tftp.server.ip> 6969
46% |**************                 | 61952   0:00:01 ETA
From an SD card, if the camera has a slot and mounts it. Copy the binary
onto the card from a desktop, put the card in the camera and find the mount
point (mount | grep -iE "mmc|sd", commonly /mnt/mmc, /mnt/sdcard or
/media/mmcblk0p1), then copy it to /tmp before running it:
# cp /mnt/mmc/ipctool /tmp/ && chmod +x /tmp/ipctool
# /tmp/ipctool
The copy is not optional in practice. SD cards are nearly always FAT, which
cannot store a permission bit, and the card is often mounted noexec
besides — so running it in place fails with Permission denied however many
times you chmod +x it. /tmp is tmpfs and always executable.
Using telnet/console only: uses a python script to transfer ipctool via
telnet/echo to the camera.
On a desktop computer:
$ tools/telnet_upload.py 192.168.1.10
On the shell:
# transfer
Usage
# ipctool -h
Usage: ipctool [OPTIONS] [COMMANDS]
Where:
-c, --chip-name           read chip name
-s, --sensor-name         read sensor model and control line
-t, --temp                read chip temperature (where supported)
backup <filename>         save backup into a file
upload [--backup [--public] | --no-backup] [--yes]
send this report to openipc.org's board
catalogue; reviewed before publishing.
Asks whether to add a flash backup,
private or public (ipctool upload -h)
restore <filename>        restore from a backup file
[-s, --skip-env]       skip environment
[-f, --force]          enforce
upgrade <bundle>          upgrade to OpenIPC firmware
(experimental! use only on cameras with UART)
[-f, --force]          enforce
printenv                  drop-in replacement for fw_printenv
setenv <key> <value>      drop-in replacement for fw_setenv
dmesg                     drop-in replacement for dmesg
i2cget <device address> <register>
spiget <register>
read data from I2C/SPI device
i2cset <device address> <register> <new value>
spiset <register> <new value>
write a value to I2C/SPI device
i2cdump [--script] [-b, --bus] <device address> <from register> <to register>
spidump [--script] <from register> <to register>
dump data from I2C/SPI device
i2cdetect [-b, --bus]     attempt to detect devices on I2C bus
reginfo [--script]        dump current status of pinmux registers
gpio (scan|mux)           GPIO utilities
trace [--skip=usleep] <full/path/to/executable> [program arguments]
dump original firmware calls and data structures
-h, --help                this help
When run without parameters utility produces YAML with all hardware-specific
information about given IP-camera or DVR:
---
board:
vendor: Xiongmai
model: 50H20L
cloudId: 3beae2b40d84f889
chip:
vendor: HiSilicon
model: 3516CV300
ethernet:
mac: "00:12:89:12:88:e1"
u-mdio-phyaddr: 1
phy-id: 0x001cc816
d-mdio-phyaddr: 0
rom:
- type: nor
block: 64K
chip:
name: "w25q128"
id: 0xef4018
partitions:
- name: boot
size: 0x30000
sha1: 7a7a83e9
contains:
- name: xmcrypto
offset: 0x1fc00
- name: uboot-env
offset: 0x20000
- name: romfs
size: 0x2e0000
path: /,squashfs
sha1: 62529dab
- name: user
size: 0x300000
path: /usr,squashfs
sha1: cbb7e9ca
- name: web
size: 0x160000
path: /mnt/custom/data/Fonts,squashfs
sha1: 48140b3b
- name: custom
size: 0x40000
path: /mnt/custom,cramfs
sha1: fb72a5f5
- name: mtd
size: 0x50000
path: /mnt/mtd,jffs2,rw
size: 8M
addr-mode: 3-byte
ram:
total: 128M
media: 72M
firmware:
u-boot: "2010.06-svn1098 (Jun 11 2018 - 13:17:42)"
kernel: "3.18.20 (Thu Jul 5 14:44:19 CST 2018)"
toolchain: gcc version 4.9.4 20150629 (prerelease) (Hisilicon_v500_20170922)
libc: uClibc 0.9.33.2
sdk: "Hi3516CV300_MPP_V1.0.0.0 B010 Release (Jun 22 2018, 19:22:22)"
main-app: /usr/bin/Sofia
sensors:
- vendor: Sony
model: IMX291
control:
bus: 0
type: i2c
addr: 0x34
params:
bitness: 12
databus: LVDS 4 ch
fps: 30
data:
type: LVDS
lane-id:
- 0
- 1
- 2
- 3
lvds-wdr-en: 0
lvds-wdr-mode: 0
lvds-wdr-num: 0
raw-data-type: RAW_DATA_12BIT
sync-mode: LVDS_SYNC_MODE_SAV
data-endian: LVDS_ENDIAN_BIG
sync-code-endian: LVDS_ENDIAN_BIG
sync-code:
-
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
-
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
-
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
-
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
- 0xab0, 0xb60, 0x800, 0x9d0
clock: 37.125MHz
In your own scripts
Determine chip name:
# ipctool --chip-name
hi3516cv300
Determine sensor model and control line:
# ipctool --sensor-name
imx291_i2c
Get temperature from chip's internal sensor (not all devices supported):
# ipctool --temp
50.69
As backup/restore tool
Save full backup with YAML metadata into specific file:
# mount -o nolock mynfsserver:/srv /var/utils
# ipctool backup /var/utils/mybackup-00:12:17:83:d6:39
# sync
Moving a NOR camera to another layout
upgrade writes a kernel and a rootfs in a new partition layout over the
running system: lite (2 MB kernel, 5 MB rootfs) to ultimate (3 MB, 10 MB) on
16 MB of NOR, for one. The bundle comes from the release archive:
$ tools/upgrade_bundle.py --layout nor16m \
--firmware openipc.hi3516ev300-nor-ultimate.tgz \
--env upgrade=https://github.com/OpenIPC/builder/releases/download/latest/<profile>-nor.tgz \
-o ultimate.bundle
# ipctool upgrade /tmp/ultimate.bundle
What a --layout bundle does on the camera:
keeps every partition in front of the kernel as it is, under this flash's
own names -- the bootloader, its environment and whatever a vendor put
there (wtf on XiongMai);
edits bootargs and bootcmd rather than replacing them: only root=,
mtdparts= and the size of the kernel read change, so a vendor
bootloader's other arguments survive. With OpenIPC's own bootloader the
partitions live in a mtdparts variable that bootargs refers to
(mtdparts=${mtdparts}), and the kernel read in bootcmdnor as well:
those are edited the same way;
carries the settings: the jffs2 overlay is copied, once it is read-only,
into a jffs2 image written where the new rootfs_data starts. The camera
comes back with its passwords, keys and configuration. --wipe-settings
starts it from defaults instead;
sets the U-Boot variables given with --env, such as the address the new
firmware upgrades itself from.
The images are written straight from the bundle, so the bundle itself is
the memory it needs: put it in /tmp (a 10 MB ultimate bundle wants that
much free there), or on an SD card.
Everything that can be refused is refused before any process is stopped:
an image larger than its partition, settings that will not fit the new
rootfs_data, a bootloader environment with no literal mtdparts= or no
single sf read to edit. After that every other process is stopped, the
flash filesystems go read-only, and the camera reboots when done. Keep a
backup and a UART at hand: a power cut mid-write leaves no kernel to boot.
Sending a board to openipc.org
A camera nobody has reported yet reaches the board
catalogue this way:
# ipctool upload
It prints the report, says where it goes, asks whether to send a backup of
the flash with it, sends it, and answers with a receipt address. Nothing
leaves the camera unless you run this. OpenIPC's maintainers review each
report before any of it is published, and the public copy of the report
replaces the MAC, the chip's die ID and the cloud ID with hashes.
The backup is what the people porting OpenIPC to the board start from. It
holds everything the camera stores: settings, Wi-Fi keys, passwords. Answer
no (or just Enter) to send the report alone, private to send the backup
for the maintainers only, or public to let it be published with the report.
A public backup is the flash as it is: the MAC, die ID and cloud ID are in it
in clear, along with everything else. The flash is read only after you answer.
If any partition cannot be read, nothing is sent: a backup missing a partition
is not the whole flash.
Without a terminal, or with --yes, nothing is asked and only the report is
sent. Scripts and agents choose up front:
# ipctool upload --no-backup              # the report only, no question
# ipctool upload --backup                 # private: asks you to type yes
# ipctool upload --backup --public --yes  # public, without asking
As reverse engineering tool
Drop-in replacement of dmesg command:
# ipctool dmesg
Drop-in replacement of fw_printenv and fw_setenv commands:
# ipctool printenv | grep bootargs
# ipctool setenv bootargs "mem=\${osmem} mtdparts=hi_sfc:256k(boot),64k(env),2048k(kernel),5120k(rootfs),-(rootfs_data)"
Drop-in replacement of i2cget, i2cset and i2cdump commands from
i2c-tools package:
# ipctool i2cget 0x34 0x3000
# ipctool i2cset 0x34 0x3000 1
# ipctool i2cdump 0x34 0x3000 0x31ff
# ipctool i2cdump --script 0x34 0x3000 0x31ff
The same approach is to manipulate SPI sensor registers:
# ipctool spiget 0x200
# ipctool spiset 0x200 1
# ipctool spidump 0x200 0x300
# ipctool spidump --script 0x200 0x300
Dump the state of pinmux registers in human- and machine-readable format or
shell script ready to be applied on another system:
# ipctool reginfo
# ipctool --script reginfo
Advanced replacement of strace, with sensor-aware decoding of I2C/SPI
ioctls and HiSilicon MIPI/VI structs:
# ipctool trace --output=/tmp/sofia-trace.log /usr/bin/Sofia
For a complete recipe — building a portable binary, capturing on
OpenIPC/Majestic and XiongMai/Sofia firmwares, and converting the
trace into a buildable sensor driver scaffold — see
docs/sensor-driver-extraction.md.
To help the researcher
On Ingenic devices, the original Sensor I2C address needs to be right shifted by 1bit, example:
IMX335: (0x34 >> 1) = 0x1A
SC2230: (0x60 >> 1) = 0x30
GC2053: (0x6E >> 1) = 0x37
Supported SoCs
Tested on:
Manufacturer
Models
HiSilicon
Hi3516CV100/200/300, Hi3516EV100/200/300, Hi3516DV300, Hi3518EV100
SigmaStar
SSC335
Xiongmai
XM510, XM530, XM550
Rockchip
RV1109
Goke
GK7205v200/210/300
Please test on your device to help us extend the list.
Supported boards
Tested on:
Manufacturer
Models
Xiongmai
Various models
Hankvision
V6202IR-IMX327
Ruision
RS-H649F-A0, RS-H651JAI-AO, RS-H656S-AO
TP-Link
NC210
Supported sensors
Tested on:
Manufacturer
Models
Silicon Optronics, Inc.
JX-F22, JX-F23, JX-F37, JX-H62, JX-H65, JX-K05
Sony
IMX224, IMX290, IMX291, IMX307, IMX322, IMX323, IMX327, IMX335, IMX415, IMX664
ON Semiconductor
AR0130, AR0237
SmartSens
SC2135, SC223A, SC2232, SC2235, SC2235P, SC2239, SC2315e (SC307E, SC4239Р), SC335E (SC5300)
OmniVision
OV9712
GalaxyCore
GC2053
Please test on your device to help us extend the list.
Support
OpenIPC offers two levels of support.
Free support through the community (via chat).
Paid commercial support (from the team of developers).
Please consider subscribing for paid commercial support if you intend to use our product for business.
As a paid customer, you will get technical support and maintenance services directly from our skilled team.
Your bug reports and feature requests will get prioritized attention and expedited solutions. It's a win-win
strategy for both parties, that would contribute to the stability your business, and help core developers
to work on the project full-time.
If you have any specific questions concerning our project, feel free to contact us.
Participating and Contribution
If you like what we do, and willing to intensify the development, please consider participating.
You can improve existing code and send us patches. You can add new features missing from our code.
You can help us to write a better documentation, proofread and correct our websites.
You can just donate some money to cover the cost of development and long-term maintaining of what we believe
is going to be the most stable, flexible, and open IP Network Camera Framework for users like yourself.
You can make a financial contribution to the project at Open Collective.
Thank you.
AboutSimple tool (and library) for checking IP camera hardwareopenipc.orgTopicsipcameraipctoolopenipcResourcesReadmeMIT licenseCode of conductCode of conductActivityCustom propertiesStars258 starsWatchers7 watchingForks64 forksReport repositoryReleasesSponsor this projectUsed byContributorsLanguages
Footer
© 2026 GitHub, Inc.
Footer navigation
Terms
Privacy
Security
Status
Community
Docs
Contact
Manage cookies
Do not share my personal information
You can’t perform that action at this time.

Ссылки источника

https://github.com/

Sign in

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

MCP RegistryIntegrate external tools

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

Why GitHub

Documentation

Blog

Changelog

Marketplace

View all features

Enterprises

Small and medium teams

Startups

Nonprofits

App Modernization

DevSecOps

DevOps

CI/CD

View all use cases

Healthcare

Financial services

Manufacturing

Government

View all industries

View all solutions

AI

Software Development

DevOps

Security

View all topics

Customer stories

Events & webinars

Ebooks & reports

Business insights

GitHub Skills

Documentation

Customer support

Community forum

Trust center

Partners

View all resources

GitHub SponsorsFund open source developers

Security Lab

Maintainer Community

GitHub Stars

Archive Program

Topics

Trending

Collections

Enterprise platformAI-powered developer platform

GitHub Advanced SecurityEnterprise-grade security features

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pricing

Sign in

Sign up

OpenIPC

ipctool

Code

Issues5 (5)

Pull requests2 (2)

Actions

Security and quality

Insights

https://github.com/OpenIPC/ipctool

ipctool

Notifications

Fork64 (64)

Star258 (258)

openipc.org

ipcamera

ipctool

openipc

Code of conduct

Activity

Custom properties

64 forks

Report repository

Branches

Tags

https://github.com/OpenIPC/ipctool/branches

https://github.com/OpenIPC/ipctool/tags

960 Commits

https://github.com/OpenIPC/ipctool/commits/master/

.github/workflows

.github/workflows

cmake

cmake

docs

docs

example

example

include

include

scripts

scripts

src

src

tools

tools

.clang-format

.clang-format

.clang-format-hook-exclude

.clang-format-hook-exclude

.gitignore

.gitignore

CLAUDE.md

CLAUDE.md

CMakeLists.txt

CMakeLists.txt

LICENSE

LICENSE

README.md

README.md

contributors.md

contributors.md

https://camo.githubusercontent.com/ba11e1f5b707cd5a1f1d59119b19ee4cd18a0a99b0fff6a2722b7e7858229c1e/68747470733a2f2f63646e2e7468656d61637465702e636f6d2f696d616765732f6c6f676f5f6f70656e6970632e706e67

https://github.com/OpenIPC/ipctool/actions/workflows/release-arm32.yml

https://github.com/OpenIPC/ipctool/actions/workflows/release-mips32.yml

https://github.com/OpenIPC/ipctool/releases

https://camo.githubusercontent.com/a7b875f67aa2a4518dcb103feca13b3bf79e4be9db6f5c0e6df0b393f69cb0fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f4f70656e4950432f697063746f6f6c

https://camo.githubusercontent.com/3d96d549d47b0b221485fc97a4018f5a07261c263f0b04376a764ca0c9e48bf3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4f70656e4950432f697063746f6f6c

https://camo.githubusercontent.com/e4aced2ab271f1d2e3c6d0554c8710691c3be9b816647ccf49e603710b3bbbde/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f4f70656e4950432f697063746f6f6c

https://opensource.org/licenses/MIT

Maxim Chertov

Nikita Orlov

Igor Zalatov

the link

@themactep blog post

more in documentation

board catalogue

docs/sensor-driver-extraction.md

HiSilicon

SigmaStar

Xiongmai

Rockchip

Goke

chat

Open Collective

https://opencollective.com/openipc/contribute/backer-14335/checkout

openipc.org

ipcamera

ipctool

openipc

Code of conduct

Activity

Custom properties

64 forks

Report repository

https://github.com

Terms

Privacy

Security

Status

Community

Docs

Contact