mirror of https://github.com/OpenIPC/wiki.git
translate index, menu
parent
c2dfc1271d
commit
49ea79f16c
|
@ -0,0 +1,163 @@
|
|||
OpenIPC Wiki
|
||||
============
|
||||
|
||||
> "Cải thiện thế giới, một bản vá lỗi mỗi lần."
|
||||
|
||||
|
||||
Bằng tiếng việt
|
||||
----------
|
||||
|
||||
## Mục lục
|
||||
|
||||
### Giới thiệu
|
||||
|
||||
- [Về dự án](vi/menu-index.md)
|
||||
- [Thiết bị được hỗ trợ](vi/guide-supported-devices.md)
|
||||
- [Cảm biến được hỗ trợ theo SoC](vi/guide-supported-sensors.md)
|
||||
- [Lịch sử thay đổi](vi/show-changelog.md)
|
||||
|
||||
### Cài đặt
|
||||
|
||||
- [Hướng dẫn cài đặt chi tiết](vi/installation.md)
|
||||
- [Cài đặt trên Goke](https://openipc.org/cameras/vendors/goke)
|
||||
- [Cài đặt trên HiSilicon](https://openipc.org/cameras/vendors/hisilicon)
|
||||
- [Cài đặt trên Ingenic](https://openipc.org/cameras/vendors/ingenic)
|
||||
- [Cài đặt trên Novatek](https://openipc.org/cameras/vendors/novatek)
|
||||
- [Cài đặt trên SigmaStar](https://openipc.org/cameras/vendors/sigmastar)
|
||||
- [Cài đặt trên XM510/XM530](https://openipc.org/cameras/vendors/xiongmai)
|
||||
- [Hướng dẫn cài đặt cũ](vi/old-installation.md)
|
||||
- [Hướng dẫn đầy đủ rất cũ](vi/old-manual.md)
|
||||
|
||||
### Sử dụng
|
||||
|
||||
- [Cài đặt mạng](vi/network-settings.md)
|
||||
- [Thêm driver wifi vào firmware của bạn](vi/adding-wifi-driver.md)
|
||||
- [Cài đặt không dây](vi/wireless-settings.md)
|
||||
- [Tính năng hệ thống](vi/system-features.md)
|
||||
- [Streamer Majestic](vi/majestic-streamer.md)
|
||||
- [Giao diện web](vi/web-interface.md)
|
||||
- [Nâng cấp firmware](vi/sysupgrade.md)
|
||||
- [Điều chỉnh chất lượng hình ảnh](vi/image-quality-tuning.md)
|
||||
- [Điều chỉnh bộ nhớ](vi/memory-tuning.md)
|
||||
- [Sử dụng ipctool](vi/example-ipctool.md)
|
||||
- [Danh sách cài đặt GPIO cụ thể cho board](vi/gpio-settings.md)
|
||||
- [ACMEv2](vi/acme-v2.md)
|
||||
- [Streaming YouTube](vi/youtube-streaming.md)
|
||||
- [WiFi XM530](vi/wifi-xm530.md)
|
||||
- [Tích hợp HomeKit](vi/homekit-integration.md)
|
||||
- [Chế độ đêm tự động không cần cảm biến ánh sáng](vi/auto-night-mode-without-light-sensor.md)
|
||||
- [Cài đặt ZeroTier](vi/zerotier.md)
|
||||
|
||||
### FPV
|
||||
|
||||
- [Câu hỏi thường gặp (FAQ) về FPV](vi/fpv-faq.md)
|
||||
- [OpenIPC AIO "Mario"](vi/fpv-openipc-aio-mario.md)
|
||||
- [OpenIPC AIO "UltraSight"](vi/fpv-openipc-aio-ultrasight.md)
|
||||
- [Hướng dẫn cấu hình camera FPV và trạm mặt đất](vi/fpv-step-by-step-guide.md)
|
||||
- [Các bước từ mua đến bay](vi/fpv-from-buy-to-fly.md)
|
||||
- [OpenIPC như hệ thống FPV](vi/fpv.md)
|
||||
- [Thiết bị FPV Sigmastar](vi/fpv-sigmastar.md)
|
||||
- [Liên minh OpenIPC cho FPV](vi/fpv-openipc-alliance.md)
|
||||
- [Trạm mặt đất dựa trên Ubuntu](vi/fpv-gs-ubuntu.md)
|
||||
- [Trạm mặt đất dựa trên OrangePI 5 Ubuntu](vi/fpv-ground-orange_pi5.md)
|
||||
- [Một VRX tối thiểu Orange Pi 5 cho Goggles](vi/fpv-orange-pi-5-groundstation.md)
|
||||
- [Một lựa chọn các video OpenIPC trên YouTube](vi/fpv-youtube.md)
|
||||
- [RunCam WiFiLink dựa trên OpenIPC](vi/fpv-runcam-wifilink-openipc.md)
|
||||
|
||||
### Khắc phục sự cố
|
||||
|
||||
- [Mạng không hoạt động trên hi35xx](vi/trouble-network-hi35xx.md)
|
||||
- [Majestic không hoạt động, camera khởi động lại](vi/trouble-majestic.md)
|
||||
- [Hướng dẫn unbrick Sigmastar](vi/sigmastar-unbrick.md)
|
||||
- [Ingenic T31 với thẻ SD](vi/ingenic-t31-unbrick-with-sd-card.md)
|
||||
### Thiết bị
|
||||
|
||||
- [Thiết bị để flash](vi/equipment-flashing.md)
|
||||
- [Sửa lỗi điện áp của chương trình CH341A](vi/hardware-programmer-ch341a-voltage-fix.md)
|
||||
- [Giao tiếp với Chip Flash](vi/flash-chip-interfacing.md)
|
||||
|
||||
### Phát triển
|
||||
|
||||
- [Khởi động thiết bị với NFS](vi/dev-nfs-boot.md)
|
||||
- [Sử dụng FFMPEG](vi/dev-ffmpeg-usage.md)
|
||||
- [Cấu hình Kernel để thêm các nền tảng mới](vi/integration-kernel.md)
|
||||
- [Danh sách các cảm biến được hỗ trợ](vi/firmware-sensors.md)
|
||||
- [Nhận diện cảm biến hình ảnh](vi/visual_sensor_identification.md)
|
||||
- [Danh sách các gói Buildroot của OpenIPC](vi/dev-buildroot-packages.md)
|
||||
- [Mã nguồn](vi/source-code.md)
|
||||
- [Báo cáo lỗi](https://github.com/OpenIPC/firmware/issues)
|
||||
- [Hướng dẫn sử dụng Buildroot](https://buildroot.org/docs.html)
|
||||
- [Tài liệu U-Boot](https://u-boot.readthedocs.io/)
|
||||
|
||||
### Trợ giúp, Mẹo và Thủ thuật
|
||||
|
||||
- [Câu hỏi thường gặp (FAQ)](vi/faq.md)
|
||||
- [Mẹo U-Boot](vi/help-uboot.md)
|
||||
- [Trợ giúp Giao diện web](vi/help-webui.md)
|
||||
- [Phát trực tiếp lên Telegram](vi/howto-streaming-telegram.md)
|
||||
- [Thủ thuật thú vị](vi/dev-tricks.md)
|
||||
- [Thuật ngữ](vi/glossary.md)
|
||||
|
||||
### Phần cứng
|
||||
|
||||
- [Nhà sản xuất SoC](vi/hardware-soc-manufacturers.md)
|
||||
- [Nhà sản xuất cảm biến hình ảnh](vi/hardware-sensor-manufacturers.md)
|
||||
- [Nhà sản xuất bo mạch IPC](vi/hardware-board-manufacturers.md)
|
||||
|
||||
### Camera
|
||||
|
||||
- [Chacon IPCAM-RI01](vi/device-chacon-ipcam-ri01.md)
|
||||
- [Smartwares CIP-37210](vi/device-smartwares-cip-37210.md)
|
||||
- [Foscam X5](vi/device-foscam-x5.md)
|
||||
- [TP-Link Tapo C110](vi/device-tapo-c110.md)
|
||||
- [Xiaomi Mi Camera 2K (MJSXJ03HL)](https://github.com/OpenIPC/device-mjsxj03hl/)
|
||||
- [ATOM Cam / Hualai / Wyze](vi/device-wyze-integration.md)
|
||||
- [Digitus DN-16048 Optizoom](vi/device-digitus-dn16048.md)
|
||||
- [XiongMai IPG-53H20AF](vi/device-ipg-53h20af.md)
|
||||
- [LSC Smart Connect Video Doorbell (2021)](vi/device-lsc-smart-connect-video-doorbell-2021.md)
|
||||
### Phần mềm
|
||||
|
||||
- [Danh sách Phần mềm để Ghi Video](vi/software-video-recording.md)
|
||||
|
||||
### Dự án con
|
||||
|
||||
- [coupler](https://openipc.org/coupler)
|
||||
- [firmware](https://openipc.org/firmware)
|
||||
- [ipctool](https://openipc.org/ipctool)
|
||||
- [telemetry](https://openipc.org/telemetry)
|
||||
- [Tính toán Phân vùng Firmware](https://themactep.com/tools/firmware-partitions-calculation)
|
||||
|
||||
### Các nguồn tài nguyên của chúng tôi
|
||||
|
||||
- [OpenIPC](https://openipc.org/)
|
||||
- [Phiên bản trên GitHub](https://github.com/OpenIPC/firmware/releases/tag/latest)
|
||||
- [Phiên bản trên Telegram](https://t.me/s/openipc_dev)
|
||||
- [OpenCollective](https://opencollective.com/openipc)
|
||||
- [Twitter](https://twitter.com/OpenIPC)
|
||||
- [Telegram](https://t.me/openipc)
|
||||
|
||||
### Lộ trình
|
||||
|
||||
- [Cần làm](vi/todo-all.md)
|
||||
- [Nhà phát triển](vi/contribute.md)
|
||||
- [Ghi chú từ các nguồn cũ](vi/notes-for-resorting.md)
|
||||
|
||||
### Sách tham khảo
|
||||
|
||||
- [Tên công ty](vi/company-names.md)
|
||||
- [Quy tắc đặt tên Dahua](https://dahuawiki.com/Name_Rule)
|
||||
- [Quy ước đặt tên Mô hình Camera IP Hikvision](https://www.vueville.com/home-security/cctv/ip-cameras/hikvision-network-camera-guide/#model-naming-convention)
|
||||
|
||||
### Nguồn tài nguyên để tái chế và tích hợp
|
||||
|
||||
- [https://github.com/OpenIPC/camerasrnd](https://github.com/OpenIPC/camerasrnd)
|
||||
- [https://openwrt.org/docs/techref/hardware/soc/soc.hisilicon.hi35xx](https://openwrt.org/docs/techref/hardware/soc/soc.hisilicon.hi35xx)
|
||||
|
||||
|
||||
#### Đây là một dự án mở, vì vậy bạn cũng có thể giúp đỡ.
|
||||
|
||||
Chúng tôi cố gắng thu thập, tổ chức và chia sẻ càng nhiều thông tin về các khía cạnh khác nhau của dự án càng tốt. Nhưng đôi khi chúng tôi bỏ sót những điều dường như rõ ràng với chúng tôi, những nhà phát triển, nhưng không rõ ràng với người dùng cuối, những người ít quen thuộc với các chi tiết kỹ thuật phía sau hậu trường. Đó là lý do tại sao chúng tôi thiết lập wiki này và cho phép bất kỳ ai có tài khoản GitHub đều có thể thêm vào và cải thiện cơ sở kiến thức. Đọc [Cách đóng góp.](vi/contribute.md)
|
||||
|
||||
[faq1]: https://github.com/OpenIPC/camerasrnd/blob/master/doc/XM-FAQ-ru.md
|
||||
[faq3]: https://alarmsystem-cctv.ru/openipc-%D0%BE%D1%82%D0%BA%D1%80%D1%8B%D1%82%D1%8B%D0%B9-%D0%BA%D0%BE%D0%BB%D0%BB%D0%B5%D0%BA%D1%82%D0%B8%D0%B2/
|
||||
[logo]: images/logo_openipc.png
|
152
README.md
152
README.md
|
@ -197,6 +197,158 @@ In Russian
|
|||
- [Дискуссия по проблемам и поддержке SPI FLASH](ru/discussion-flash.md)
|
||||
- [Темы для дискуссий разработчиков](ru/discussion.md)
|
||||
|
||||
|
||||
|
||||
Bằng tiếng việt
|
||||
----------
|
||||
|
||||
## Mục lục
|
||||
|
||||
### Giới thiệu
|
||||
|
||||
- [Về dự án](vi/menu-index.md)
|
||||
- [Thiết bị được hỗ trợ](vi/guide-supported-devices.md)
|
||||
- [Cảm biến được hỗ trợ theo SoC](vi/guide-supported-sensors.md)
|
||||
- [Lịch sử thay đổi](vi/show-changelog.md)
|
||||
|
||||
### Cài đặt
|
||||
|
||||
- [Hướng dẫn cài đặt chi tiết](vi/installation.md)
|
||||
- [Cài đặt trên Goke](https://openipc.org/cameras/vendors/goke)
|
||||
- [Cài đặt trên HiSilicon](https://openipc.org/cameras/vendors/hisilicon)
|
||||
- [Cài đặt trên Ingenic](https://openipc.org/cameras/vendors/ingenic)
|
||||
- [Cài đặt trên Novatek](https://openipc.org/cameras/vendors/novatek)
|
||||
- [Cài đặt trên SigmaStar](https://openipc.org/cameras/vendors/sigmastar)
|
||||
- [Cài đặt trên XM510/XM530](https://openipc.org/cameras/vendors/xiongmai)
|
||||
- [Hướng dẫn cài đặt cũ](vi/old-installation.md)
|
||||
- [Hướng dẫn đầy đủ rất cũ](vi/old-manual.md)
|
||||
|
||||
### Sử dụng
|
||||
|
||||
- [Cài đặt mạng](vi/network-settings.md)
|
||||
- [Thêm driver wifi vào firmware của bạn](vi/adding-wifi-driver.md)
|
||||
- [Cài đặt không dây](vi/wireless-settings.md)
|
||||
- [Tính năng hệ thống](vi/system-features.md)
|
||||
- [Streamer Majestic](vi/majestic-streamer.md)
|
||||
- [Giao diện web](vi/web-interface.md)
|
||||
- [Nâng cấp firmware](vi/sysupgrade.md)
|
||||
- [Điều chỉnh chất lượng hình ảnh](vi/image-quality-tuning.md)
|
||||
- [Điều chỉnh bộ nhớ](vi/memory-tuning.md)
|
||||
- [Sử dụng ipctool](vi/example-ipctool.md)
|
||||
- [Danh sách cài đặt GPIO cụ thể cho board](vi/gpio-settings.md)
|
||||
- [ACMEv2](vi/acme-v2.md)
|
||||
- [Streaming YouTube](vi/youtube-streaming.md)
|
||||
- [WiFi XM530](vi/wifi-xm530.md)
|
||||
- [Tích hợp HomeKit](vi/homekit-integration.md)
|
||||
- [Chế độ đêm tự động không cần cảm biến ánh sáng](vi/auto-night-mode-without-light-sensor.md)
|
||||
- [Cài đặt ZeroTier](vi/zerotier.md)
|
||||
|
||||
### FPV
|
||||
|
||||
- [Câu hỏi thường gặp (FAQ) về FPV](vi/fpv-faq.md)
|
||||
- [OpenIPC AIO "Mario"](vi/fpv-openipc-aio-mario.md)
|
||||
- [OpenIPC AIO "UltraSight"](vi/fpv-openipc-aio-ultrasight.md)
|
||||
- [Hướng dẫn cấu hình camera FPV và trạm mặt đất](vi/fpv-step-by-step-guide.md)
|
||||
- [Các bước từ mua đến bay](vi/fpv-from-buy-to-fly.md)
|
||||
- [OpenIPC như hệ thống FPV](vi/fpv.md)
|
||||
- [Thiết bị FPV Sigmastar](vi/fpv-sigmastar.md)
|
||||
- [Liên minh OpenIPC cho FPV](vi/fpv-openipc-alliance.md)
|
||||
- [Trạm mặt đất dựa trên Ubuntu](vi/fpv-gs-ubuntu.md)
|
||||
- [Trạm mặt đất dựa trên OrangePI 5 Ubuntu](vi/fpv-ground-orange_pi5.md)
|
||||
- [Một VRX tối thiểu Orange Pi 5 cho Goggles](vi/fpv-orange-pi-5-groundstation.md)
|
||||
- [Một lựa chọn các video OpenIPC trên YouTube](vi/fpv-youtube.md)
|
||||
- [RunCam WiFiLink dựa trên OpenIPC](vi/fpv-runcam-wifilink-openipc.md)
|
||||
|
||||
### Khắc phục sự cố
|
||||
|
||||
- [Mạng không hoạt động trên hi35xx](vi/trouble-network-hi35xx.md)
|
||||
- [Majestic không hoạt động, camera khởi động lại](vi/trouble-majestic.md)
|
||||
- [Hướng dẫn unbrick Sigmastar](vi/sigmastar-unbrick.md)
|
||||
- [Ingenic T31 với thẻ SD](vi/ingenic-t31-unbrick-with-sd-card.md)
|
||||
### Thiết bị
|
||||
|
||||
- [Thiết bị để flash](vi/equipment-flashing.md)
|
||||
- [Sửa lỗi điện áp của chương trình CH341A](vi/hardware-programmer-ch341a-voltage-fix.md)
|
||||
- [Giao tiếp với Chip Flash](vi/flash-chip-interfacing.md)
|
||||
|
||||
### Phát triển
|
||||
|
||||
- [Khởi động thiết bị với NFS](vi/dev-nfs-boot.md)
|
||||
- [Sử dụng FFMPEG](vi/dev-ffmpeg-usage.md)
|
||||
- [Cấu hình Kernel để thêm các nền tảng mới](vi/integration-kernel.md)
|
||||
- [Danh sách các cảm biến được hỗ trợ](vi/firmware-sensors.md)
|
||||
- [Nhận diện cảm biến hình ảnh](vi/visual_sensor_identification.md)
|
||||
- [Danh sách các gói Buildroot của OpenIPC](vi/dev-buildroot-packages.md)
|
||||
- [Mã nguồn](vi/source-code.md)
|
||||
- [Báo cáo lỗi](https://github.com/OpenIPC/firmware/issues)
|
||||
- [Hướng dẫn sử dụng Buildroot](https://buildroot.org/docs.html)
|
||||
- [Tài liệu U-Boot](https://u-boot.readthedocs.io/)
|
||||
|
||||
### Trợ giúp, Mẹo và Thủ thuật
|
||||
|
||||
- [Câu hỏi thường gặp (FAQ)](vi/faq.md)
|
||||
- [Mẹo U-Boot](vi/help-uboot.md)
|
||||
- [Trợ giúp Giao diện web](vi/help-webui.md)
|
||||
- [Phát trực tiếp lên Telegram](vi/howto-streaming-telegram.md)
|
||||
- [Thủ thuật thú vị](vi/dev-tricks.md)
|
||||
- [Thuật ngữ](vi/glossary.md)
|
||||
|
||||
### Phần cứng
|
||||
|
||||
- [Nhà sản xuất SoC](vi/hardware-soc-manufacturers.md)
|
||||
- [Nhà sản xuất cảm biến hình ảnh](vi/hardware-sensor-manufacturers.md)
|
||||
- [Nhà sản xuất bo mạch IPC](vi/hardware-board-manufacturers.md)
|
||||
|
||||
### Camera
|
||||
|
||||
- [Chacon IPCAM-RI01](vi/device-chacon-ipcam-ri01.md)
|
||||
- [Smartwares CIP-37210](vi/device-smartwares-cip-37210.md)
|
||||
- [Foscam X5](vi/device-foscam-x5.md)
|
||||
- [TP-Link Tapo C110](vi/device-tapo-c110.md)
|
||||
- [Xiaomi Mi Camera 2K (MJSXJ03HL)](https://github.com/OpenIPC/device-mjsxj03hl/)
|
||||
- [ATOM Cam / Hualai / Wyze](vi/device-wyze-integration.md)
|
||||
- [Digitus DN-16048 Optizoom](vi/device-digitus-dn16048.md)
|
||||
- [XiongMai IPG-53H20AF](vi/device-ipg-53h20af.md)
|
||||
- [LSC Smart Connect Video Doorbell (2021)](vi/device-lsc-smart-connect-video-doorbell-2021.md)
|
||||
### Phần mềm
|
||||
|
||||
- [Danh sách Phần mềm để Ghi Video](vi/software-video-recording.md)
|
||||
|
||||
### Dự án con
|
||||
|
||||
- [coupler](https://openipc.org/coupler)
|
||||
- [firmware](https://openipc.org/firmware)
|
||||
- [ipctool](https://openipc.org/ipctool)
|
||||
- [telemetry](https://openipc.org/telemetry)
|
||||
- [Tính toán Phân vùng Firmware](https://themactep.com/tools/firmware-partitions-calculation)
|
||||
|
||||
### Các nguồn tài nguyên của chúng tôi
|
||||
|
||||
- [OpenIPC](https://openipc.org/)
|
||||
- [Phiên bản trên GitHub](https://github.com/OpenIPC/firmware/releases/tag/latest)
|
||||
- [Phiên bản trên Telegram](https://t.me/s/openipc_dev)
|
||||
- [OpenCollective](https://opencollective.com/openipc)
|
||||
- [Twitter](https://twitter.com/OpenIPC)
|
||||
- [Telegram](https://t.me/openipc)
|
||||
|
||||
### Lộ trình
|
||||
|
||||
- [Cần làm](vi/todo-all.md)
|
||||
- [Nhà phát triển](vi/contribute.md)
|
||||
- [Ghi chú từ các nguồn cũ](vi/notes-for-resorting.md)
|
||||
|
||||
### Sách tham khảo
|
||||
|
||||
- [Tên công ty](vi/company-names.md)
|
||||
- [Quy tắc đặt tên Dahua](https://dahuawiki.com/Name_Rule)
|
||||
- [Quy ước đặt tên Mô hình Camera IP Hikvision](https://www.vueville.com/home-security/cctv/ip-cameras/hikvision-network-camera-guide/#model-naming-convention)
|
||||
|
||||
### Nguồn tài nguyên để tái chế và tích hợp
|
||||
|
||||
- [https://github.com/OpenIPC/camerasrnd](https://github.com/OpenIPC/camerasrnd)
|
||||
- [https://openwrt.org/docs/techref/hardware/soc/soc.hisilicon.hi35xx](https://openwrt.org/docs/techref/hardware/soc/soc.hisilicon.hi35xx)
|
||||
|
||||
|
||||
#### This is an open project, so you can help, too.
|
||||
|
||||
We try to collect, organize and share as much information regarding different
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
How to install HTTPS certificates on your camera
|
||||
------------------------------------------------
|
||||
|
||||
Make sure your camera is accessible from the Internet on both port 80 (HTTP)
|
||||
and port 443 (HTTPS). You might need to set up port forwarding on your router
|
||||
for that.
|
||||
|
||||
### Create an ACME account:
|
||||
|
||||
__on camera:__
|
||||
|
||||
```bash
|
||||
uacme -y -v new
|
||||
```
|
||||
|
||||
### Give your camera a FQDN
|
||||
|
||||
Secure HTTP (Hypertext Transfer Protocol Secure, HTTPS) cannot be issued to a bare IP address,
|
||||
you need a Fully Qualified Domain Name (FQDN) for your camera. That is how your camera will
|
||||
be accessed over HTTPS.
|
||||
|
||||
Create an account with any Domain Name Register and register a domain name, e.g. _mysuperduperdomain.com_.
|
||||
|
||||
Set up a DNS zone for that domain name and create a record for your camera in that domain zone.
|
||||
|
||||
```console
|
||||
DNS Records
|
||||
mysuperduperdomain.com
|
||||
---------------------------------------
|
||||
Type Host IP Address TTL
|
||||
A ipc-001 75.123.45.555 600
|
||||
```
|
||||
|
||||
where `75.123.45.555` is your public IP address.
|
||||
|
||||
### Set up port forwarding if your camera is behind NAT.
|
||||
|
||||
Add port forwarding from port 80 of WAN interface to port 80 of your camera's local IP address.
|
||||
|
||||
```console
|
||||
75.123.45.555:80 => 192.168.1.10:80
|
||||
```
|
||||
|
||||
If you have several devices on your network serving public HTTP requests then add your
|
||||
camera domain name to HTTP proxy.
|
||||
|
||||
### Issue a certificate for your domain:
|
||||
|
||||
__on camera__:
|
||||
|
||||
```bash
|
||||
uacme -y -v -h /usr/share/uacme/uacme.sh -t EC issue ipc-001.mysuperduperdomain.com
|
||||
```
|
||||
|
||||
### Set up a local DNS record override
|
||||
|
||||
You can add an override record to `/etc/hosts` file on your machine
|
||||
|
||||
```bash
|
||||
echo "192.168.1.10 ipc-001.mysuperduperdomain.com" >> /etc/hosts
|
||||
```
|
||||
|
||||
or you could create a record on your local DNS server like [pi.hole](https://pi-hole.net/)
|
||||
so that anyone using that DNS server could have secure access to the camera, too.
|
||||
|
||||
### Restart majestic and test access
|
||||
|
||||
Open your favorite web browser and go to <https://ipc-001.mysuperduperdomain.com/>
|
|
@ -0,0 +1,136 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Adding a wifi driver to your firmware
|
||||
---
|
||||
Since most cameras have very little flash memory, OpenIPC firmware images don't contain many wifi drivers, as they can easily be 1.5MB+ per driver.
|
||||
This means that in many cases, you will have to add the appropriate wifi driver to your firmware image.
|
||||
|
||||
### Step 1: preparing the build environment
|
||||
You will need a Linux environment. First download the OpenIPC firmware repository:
|
||||
|
||||
```
|
||||
git clone https://github.com/OpenIPC/firmware.git openipc-firmware
|
||||
cd openipc-firmware
|
||||
```
|
||||
|
||||
Install packages required for building:
|
||||
|
||||
```
|
||||
sudo make deps
|
||||
```
|
||||
|
||||
### Step 2: determine the driver package
|
||||
Here are some of the most common wifi driver packages:
|
||||
|
||||
#### AIC:
|
||||
```
|
||||
BR2_PACKAGE_AIC8800_OPENIPC
|
||||
```
|
||||
|
||||
#### Altobeam:
|
||||
*1. Select general ATBM driver:*
|
||||
```
|
||||
BR2_PACKAGE_ATBM60XX
|
||||
```
|
||||
*2. Enable the driver for your specific card:*
|
||||
```
|
||||
BR2_PACKAGE_ATBM60XX_MODEL_601X
|
||||
BR2_PACKAGE_ATBM60XX_MODEL_602X
|
||||
BR2_PACKAGE_ATBM60XX_MODEL_603X
|
||||
BR2_PACKAGE_ATBM60XX_MODEL_6041
|
||||
```
|
||||
|
||||
*3. Set usb or sdio:*
|
||||
```
|
||||
BR2_PACKAGE_ATBM60XX_INTERFACE_USB
|
||||
BR2_PACKAGE_ATBM60XX_INTERFACE_SDIO
|
||||
```
|
||||
|
||||
*Example: to build atbm603x_wifi_usb:*
|
||||
```
|
||||
BR2_PACKAGE_ATBM60XX=y
|
||||
BR2_PACKAGE_ATBM60XX_MODEL_603X=y
|
||||
BR2_PACKAGE_ATBM60XX_INTERFACE_USB=y
|
||||
```
|
||||
|
||||
#### iComm:
|
||||
*SSV615X/SSV625X, USB ID 0x6000:*
|
||||
|
||||
```
|
||||
BR2_PACKAGE_SSV615X_OPENIPC
|
||||
```
|
||||
|
||||
*SSV635X, USB ID 0x6011:*
|
||||
|
||||
```
|
||||
BR2_PACKAGE_SSV635X_OPENIPC
|
||||
```
|
||||
|
||||
#### MediaTek:
|
||||
```
|
||||
BR2_PACKAGE_MT7601U_OPENIPC
|
||||
```
|
||||
|
||||
#### SigmaStar:
|
||||
```
|
||||
BR2_PACKAGE_SSW101B
|
||||
```
|
||||
|
||||
#### Realtek:
|
||||
```
|
||||
BR2_PACKAGE_RTL8188EUS_OPENIPC
|
||||
BR2_PACKAGE_RTL8188FU_OPENIPC
|
||||
BR2_PACKAGE_RTL8189ES_OPENIPC
|
||||
BR2_PACKAGE_RTL8189FS_OPENIPC
|
||||
BR2_PACKAGE_RTL8192EU_OPENIPC
|
||||
BR2_PACKAGE_RTL8733BU_OPENIPC
|
||||
BR2_PACKAGE_RTL8812AU_OPENIPC
|
||||
```
|
||||
|
||||
Take note of the `BR2_PACKAGE` variable for the driver you need. It may
|
||||
be useful to observe the boot messages from the original firmware to
|
||||
determine the network device and interface type since it may not be
|
||||
obvious from looking at the board. Seeing `atbm603x_wifi_usb` in the
|
||||
boot messages suggests that this camera has an `atbm603x` wifi device
|
||||
connected internally over USB.
|
||||
|
||||
### Step 3: add BR2_PACKAGE variable to your firmware configuration
|
||||
The firmware configuration files are ordered per chipset in the `br-ext-chip-*`directories. Navigate to the directory for the chipset you are building for, then navigate to the `/configs/` directory.
|
||||
|
||||
Example: you have a hisilicon chipset:
|
||||
|
||||
`cd br-ext-chip-hisilicon/configs/`
|
||||
|
||||
Inside you will see a number of `_defconfig` files. Open the file for your desired chip and firmware flavor in a text editor.
|
||||
Add the appropriate `BR2_PACKAGE` variable to this file, adding `=y` to the end of the variable.
|
||||
|
||||
Example: you want to add the RTL8188EUS driver:
|
||||
|
||||
`BR2_PACKAGE_RTL8188EUS_OPENIPC=y`
|
||||
|
||||
### Step 4: Build your firmware
|
||||
Return to the root directory of the openipc firmware directory `openipc-firmware/`.
|
||||
Run `make` and select the configuration you have edited in the previous step.
|
||||
|
||||
Alternatively, you can run `make BOARD=<your_config>`, where `<your_config>` is the name of the config file you have just edited, minus the `_defconfig`
|
||||
|
||||
Example: you want to build `ultimate` for `hi3516ev200`:
|
||||
|
||||
`make BOARD=hi3516ev200_ultimate`
|
||||
|
||||
When the build is complete, you will find the output in the `output/images/` directory:
|
||||
|
||||
```
|
||||
./rootfs.hi3516ev200.cpio
|
||||
./openipc.hi3516ev200-nor-ultimate.tgz
|
||||
./rootfs.squashfs.hi3516ev200
|
||||
./rootfs.hi3516ev200.tar
|
||||
./uImage.hi3516ev200
|
||||
```
|
||||
|
||||
You can now use `rootfs.squashfs.*` and `uImage.*` with [sysupgrade](./sysupgrade.md) or your preferred update mechanism.
|
||||
|
||||
*For additional wifi configuration, see [wireless settings](./wireless-settings.md).*
|
||||
|
||||
*For more information about building OpenIPC from source, see [Source code](./source-code.md).*
|
|
@ -0,0 +1,55 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Auto nightmode on devices without a light sensor
|
||||
==============================
|
||||
|
||||
Not all devices have an onboard light sensor to determine whether night mode should be activated or not.
|
||||
For these devices, we can use the image sensor's analog gain value to switch. In low-light conditions, this value will be high, indicating the image sensor is applying gain to boost brightness. In well-lit conditions, this value will be low.
|
||||
|
||||
#### Step 1: determine if IR cut filter is set up correctly
|
||||
This article assumes you have found and entered the correct GPIO pins for your IR cut filter and you are able to toggle the filter using the `IR-cut filter` button in the preview. During daylight conditions, in the preview, the image should not be pink.
|
||||
If it is pink, most likely your pins are in the wrong order and they need to be swapped in `Majestic > Night Mode`.
|
||||
|
||||
#### Step 2: install night mode scripts
|
||||
We need 2 scripts: the actual night mode script and the startup script that enables the night mode script at boot.
|
||||
|
||||
[autonight.sh](https://raw.githubusercontent.com/OpenIPC/device-mjsxj02hl/master/flash/autoconfig/usr/sbin/autonight.sh)
|
||||
|
||||
Copy `autonight.sh` to `/usr/sbin`
|
||||
|
||||
[S96autonight](https://raw.githubusercontent.com/OpenIPC/device-mjsxj02hl/master/flash/autoconfig/etc/init.d/S96autonight)
|
||||
|
||||
Copy `S96autonight` to `/etc/init.d/` and make it executable with `chmod +x /etc/init.d/S96autonight`
|
||||
|
||||
#### Step 3: tweak the sensor analog gain value
|
||||
In `autonight.sh` you will find 3 settings:
|
||||
```
|
||||
again_high_target=14000
|
||||
again_low_target=2000
|
||||
pollingInterval=5
|
||||
```
|
||||
|
||||
`again_high_target` is the gain value at which night mode will be enabled. Similarly, `again_low_target` is the value at which night mode is turned off. You can change these numbers to optimize for your particular setup.
|
||||
`pollingInterval` indicates how often the script checks the sensor analog gain value. Lower values will result in quicker response, but may result in more "nervous" switching behavior in response to brief light flashes, etc.
|
||||
|
||||
**Note:** to restart the `autonight.sh` script, required e.g. if you have changed a setting, use `/etc/init.d/S96autonight restart`. To stop the script, e.g. if you want to observe the analog gain values without switching the IR filter,
|
||||
use `/etc/init.d/S96autonight stop`.
|
||||
After stopping the script, you can run `/usr/sbin/autonight.sh` manually in a terminal to get log output.
|
||||
|
||||
#### Extra: viewing sensor analog gain value and current night mode status
|
||||
Metrics are displayed at the `/metrics` endpoint in the web interface.
|
||||
|
||||
_The current analog gain value is displayed in `isp_again`:_
|
||||
```
|
||||
# HELP isp_again Analog Gain
|
||||
# TYPE isp_again gauge
|
||||
isp_again 2880
|
||||
```
|
||||
|
||||
_The current night mode setting displayed in `night_enabled`:_
|
||||
```
|
||||
# HELP night_enabled Is night mode enabled
|
||||
# TYPE night_enabled gauge
|
||||
night_enabled 0
|
||||
```
|
|
@ -0,0 +1,42 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Notes on installing OpenIPC using Burn
|
||||
--------------------------------------
|
||||
|
||||
### Guideline flash GK7205V210 with locked bootloader
|
||||
|
||||
#### Preamble
|
||||
|
||||
```
|
||||
My opinion is that - instructions for beginners should be written by beginners.
|
||||
As soon as a gentleman end flashing 2-3 boards, his skills increase to 50 level
|
||||
and he does not want to remember the little things that are important for beginners.
|
||||
```
|
||||
|
||||
Before starting work, watch the video on our [YouTube](https://www.youtube.com/@openipc/playlists) channel
|
||||
|
||||
- Download [Burn](https://github.com/OpenIPC/burn)
|
||||
- Install [PUTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) and [TFTP](https://pjo2.github.io/tftpd64/) server
|
||||
- Turn off camera power, Connect USB com FTDI to your camera, specify which COM port on your PC
|
||||
- Enter burn folder and run the following cmd (Focus only serial port, in my case it is COM4, other params dont care, it worked with my GK7205V210):
|
||||
- Use U-Boot loader from the Burn repository **only** !
|
||||
```
|
||||
python burn --chip hi3516ev200 --file=u-boot/gk7205v200.bin -p COM4 --break && putty.exe -serial COM4 -sercfg 115200,8,n,1,N
|
||||
```
|
||||
- Power on your camera with power supply, and wait putty throw out with console
|
||||
- Press enter, then you will see "goke" in the console
|
||||
- Run TFTP server, specify bin file's path
|
||||
- Now follow up as generated instruction which from OpenIPC site:
|
||||
|
||||
```
|
||||
# Enter commands line by line! Do not copy and paste multiple lines at once!
|
||||
setenv ipaddr 192.168.0.10; setenv serverip 192.168.0.40
|
||||
mw.b 0x42000000 0xff 0x800000
|
||||
tftpboot 0x42000000 openipc-FULL-FIRMWARE-IMAGE.bin
|
||||
sf probe 0; sf lock 0;
|
||||
sf erase 0x0 0x800000; sf write 0x42000000 0x0 0x800000
|
||||
reset
|
||||
Ctrl + c quickly during booting
|
||||
# Enter commands line by line! Do not copy and paste multiple lines at once!run setnor8m
|
||||
```
|
|
@ -0,0 +1,24 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
## Company names
|
||||
|
||||
- Hangzhou Ezviz Software Co., Ltd.
|
||||
- Shanghai Fullhan Microelectronics Co., Ltd
|
||||
- Shenzhen Huishi Electronics Co., Ltd.
|
||||
- Shenzhen Topper Vision, Ltd.
|
||||
- Shenzhen Gainstrong Technology Co., Ltd.
|
||||
- Yutong Optical Technology Co.,Ltd.
|
||||
- Shenzhen Hanvision Technology Co., Ltd.
|
||||
- Hangzhou Xiongmai Technology Co., Ltd
|
||||
- Shenzhen Gospell Smarthome Electronic, Ltd.
|
||||
- Shenzhen Zhangwo Technology Co., Ltd.
|
||||
- Sunivision Technology Development Co., Ltd.
|
||||
- Longse Technology Co., Ltd.
|
||||
- Zhejiang Uniview Technologies Co., Ltd.
|
||||
- Shenzhen Zhongwei Century Technology Co., Ltd.
|
||||
- Shenzhen Hichip Vision Technology Co., Ltd.
|
||||
- Chengdu Powerview Science and Technology Co., Ltd.
|
||||
- Nanjing Ajcloud Infotech Co., Ltd
|
||||
- Ajcloud International Inc.
|
||||
- Wansview Technology Co., Ltd.
|
|
@ -0,0 +1,43 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
> "Improving the world, one patch at a time."
|
||||
|
||||
Guidelines
|
||||
---
|
||||
|
||||
### This is an open project, so you can help, too.
|
||||
|
||||
We try to collect, organize and share as much information regarding different
|
||||
aspects of the project as we can. But sometimes we overlook things that seem
|
||||
obvious to us, developers, but are not so obvious to end-users, people who are
|
||||
less familiar with nuts and bolts behind the scene. That is why we set up this
|
||||
wiki and let anyone having a GitHub account to make additions and improvements
|
||||
to the knowledge base.
|
||||
|
||||
### How to contribute.
|
||||
|
||||
Sign in into your GitHub account, or [get yourself one][gh-signup] if you don't
|
||||
have it yet. It's free.
|
||||
|
||||
Go to [the wiki repository](https://github.com/openIPC/wiki/) and fork it.
|
||||
|
||||

|
||||
|
||||
Make changes (correct a typo, add another record into a table, or write a new
|
||||
article) and commit them to your own fork of the repository.
|
||||
|
||||
From your repository, create a pull request, so we could review and incorporate
|
||||
your changes into our version of the wiki.
|
||||
|
||||

|
||||
|
||||
### Small corrections, typos.
|
||||
|
||||
It is even easier to deal with small corrections while using GitHub. Spotted a
|
||||
typo? Have an idea of a better wording? Noticed a broken link? Just hit this
|
||||
pencil-looking button and make corrections.
|
||||
|
||||

|
||||
|
||||
[gh-signup]: https://github.com/signup
|
|
@ -0,0 +1,101 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
## OpenIPC Buildroot packages
|
||||
|
||||
List of OpenIPC Buildroot packages and shadowed original Buildroot packages per releases.
|
||||
|
||||
| OpenIPC | Buildroot 2020.02.12 | Buildroot 2021.02 | Buildroot 2022.08 | Buildroot HEAD |
|
||||
|-------------------------------------|-------------------------|-------------------------|-------------------------|-------------------------|
|
||||
| ambarella-osdrv-s3l | | | | |
|
||||
| ambarella_patcher 0.1 | | | | |
|
||||
| anyka_patcher 0.1 | | | | |
|
||||
| aura-httpd (git) | | | | |
|
||||
| aws-producer (git) | | | | |
|
||||
| aws-webrtc (git) | | | | |
|
||||
| baresip-openipc 1.0.0 | | | | |
|
||||
| busybox | | | | |
|
||||
| busybox-openipc 1.31.1 | busybox 1.31.1 | busybox 1.33.2 | busybox 1.35.0 | busybox 1.35.0 |
|
||||
| dropbear-openipc 2022.82 | dropbear 2019.78 | dropbear 2020.81 | dropbear 2022.82 | dropbear 2022.82 |
|
||||
| f2fs-tools-openipc 1.13.0 | f2fs-tools 1.13.0 | f2fs-tools 1.14.0 | f2fs-tools 1.15.0 | f2fs-tools 1.15.0 |
|
||||
| fdk-aac-openipc (git) | fdk-aac 2.0.1 | fdk-aac 2.0.1 | fdk-aac 2.0.2 | fdk-aac 2.0.2 |
|
||||
| ffmpeg-openipc 4.4.2 | ffmpeg 4.2.4 | ffmpeg 4.3.3 | ffmpeg 4.4.2 | ffmpeg 4.4.2 |
|
||||
| fullhan-osdrv-fh8852v100 | | | | |
|
||||
| fullhan-osdrv-fh8852v200 | | | | |
|
||||
| fullhan_patcher 0.1 | | | | |
|
||||
| fwprintenv-openipc 2020.04 | uboot-tools 2020.01 | uboot-tools 2020.04 | uboot-tools 2021.07 | uboot-tools 2021.07 |
|
||||
| gdbserver-lite (git) | | | | |
|
||||
| goke-osdrv-gk710x | | | | |
|
||||
| goke-osdrv-gk7205v200 | | | | |
|
||||
| goke_patcher 0.1 | | | | |
|
||||
| grainmedia-osdrv-gm8136 | | | | |
|
||||
| grainmedia_patcher 0.1 | | | | |
|
||||
| hisi_gpio | | | | |
|
||||
| hisilicon-opensdk (git) | | | | |
|
||||
| hisilicon-osdrv-hi3516av100 | | | | |
|
||||
| hisilicon-osdrv-hi3516cv100 | | | | |
|
||||
| hisilicon-osdrv-hi3516cv200 | | | | |
|
||||
| hisilicon-osdrv-hi3516cv300 | | | | |
|
||||
| hisilicon-osdrv-hi3516cv500 | | | | |
|
||||
| hisilicon-osdrv-hi3516ev200 | | | | |
|
||||
| hisilicon-osdrv-hi3519v101 | | | | |
|
||||
| hisi_patcher 0.1 | | | | |
|
||||
| i2c-telemetry | | | | |
|
||||
| ingenic-opensdk | | | | |
|
||||
| ingenic-osdrv-t20 | | | | |
|
||||
| ingenic-osdrv-t21 | | | | |
|
||||
| ingenic-osdrv-t31 | | | | |
|
||||
| ingenic_patcher | | | | |
|
||||
| ipctool (git) | | | | |
|
||||
| json-c-openipc json-c-0.15-20200726 | json-c 0.15 | json-c 0.15 | json-c 0.16 | json-c 0.16 |
|
||||
| lame-openipc 3.100 | lame 3.100 | lame 3.100 | lame 3.100 | lame 3.100 |
|
||||
| libcurl-openipc 7.76.0 | libcurl 7.76.0 | libcurl 7.79.1 | libcurl 7.84.0 | lame 3.100 |
|
||||
| libevent-openipc (git) | libevent 2.1.11 | libevent 2.1.12 | libevent 2.1.12 | libevent 2.1.12 |
|
||||
| libhv-openipc 1.1.1 | | | | |
|
||||
| libogg-openipc 1.3.5 | libogg 1.3.4 | libogg 1.3.4 | libogg 1.3.5 | libogg 1.3.5 |
|
||||
| librem-openipc 0.6.0 | | | | |
|
||||
| libre-openipc 1.1.0 | | | | |
|
||||
| libsrt-openipc 1.4.4 | | | | |
|
||||
| libsrtp-openipc (git) | | | | |
|
||||
| libwebsockets-openipc 4.2.2 | libwebsockets 3.2.2 | libwebsockets 4.0.21 | libwebsockets 4.3.2 | libwebsockets 4.3.2 |
|
||||
| linux-firmware-openipc 20190717 | linux-firmware 20190717 | linux-firmware 20201022 | linux-firmware 20220310 | linux-firmware 20220310 |
|
||||
| majestic | | | | |
|
||||
| majestic-fonts | | | | |
|
||||
| mavlink-router | | | | |
|
||||
| mbedtls-openipc 2.25.0 | mbedtls 2.16.10 | mbedtls 2.16.12 | mbedtls 2.28.1 | linux-firmware 20220310 |
|
||||
| memdump | | | | |
|
||||
| microbe-web (git) | | | | |
|
||||
| microsnander (git) | | | | |
|
||||
| mini (git) | | | | |
|
||||
| mini-snmpd-openipc 1.4 | mini-snmpd 1.4 | mini-snmpd 1.6 | mini-snmpd 1.6 | mini-snmpd 1.6 |
|
||||
| motors (git) | | | | |
|
||||
| mt7601u-ap-openipc (git) | | | | |
|
||||
| node-exporter | | | | |
|
||||
| novatek-osdrv-nt9856x | | | | |
|
||||
| novatek_patcher 0.1 | | | | |
|
||||
| opus-openipc 1.3.1 | opus 1.3.1 | opus 1.3.1 | opus 1.3.1 | opus 1.3.1 |
|
||||
| quirc-openipc (git) | | | | |
|
||||
| rockchip-osdrv-rv11xx | | | | |
|
||||
| rockchip_patcher 0.1 | | | | |
|
||||
| rtl8188eus-openipc (git) | | | | |
|
||||
| rtl8188fu-openipc (git) | | | | |
|
||||
| rtl8192eu-openipc (git) | | | | |
|
||||
| rtl8812au-openipc (git) | | | | |
|
||||
| rtptools-openipc | rtptools 1.22 | rtptools 1.22 | rtptools 1.22 | rtptools 1.22 |
|
||||
| rtw-hostapd (git) | | | | |
|
||||
| sigmastar-osdrv-msc313e | | | | |
|
||||
| sigmastar-osdrv-ssc335 | | | | |
|
||||
| sigmastar_patcher 0.1 | | | | |
|
||||
| uacme-openipc 1.2.4 | uacme 1.2.4 | uacme 1.4.1 | uacme 1.7.1 | uacme 1.7.3 |
|
||||
| uqmi-openipc (git) | | | | |
|
||||
| usrsctp (git) | | | | |
|
||||
| vtund-openipc 3.0.2 | | | | |
|
||||
| wifibroadcast (git) | | | | |
|
||||
| wireguard-openipc | | | | |
|
||||
| xiongmai-opensdk-xm510 | | | | |
|
||||
| xiongmai-osdrv-xm510 | | | | |
|
||||
| xiongmai-osdrv-xm530 | | | | |
|
||||
| xiongmai_patcher 0.1 | | | | |
|
||||
| xmdp | | | | |
|
||||
| yaml-cli (git) | | | | |
|
||||
| zerotier-one (git) | | | | |
|
|
@ -0,0 +1,42 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
FFMPEG, RTSP and SRT examples
|
||||
-----------------------------
|
||||
|
||||
```bash
|
||||
# Copy from file to file
|
||||
./ffmpeg -re -i z_input.mp4 -c copy z_output.mp4
|
||||
|
||||
# Grab from RTSP to file
|
||||
./ffmpeg -re -i 'rtsp://172.19.32.179:554/stream=0' -c copy z_output.mp4
|
||||
|
||||
# Grab from SRT to file
|
||||
./ffmpeg -re -i 'srt://172.19.32.189:12345?pkt_size=1316' -c copy z_output.mp4
|
||||
|
||||
# Grab from RTSP to MP4
|
||||
./ffmpeg -re -i 'rtsp://172.19.32.179:554/stream=0' -c copy -listen 1 -seekable 1 -multiple_requests 1 -f mp4 http://localhost:8090
|
||||
|
||||
|
||||
# Stream with capture desktop
|
||||
./ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f mpegts 'srt://172.17.32.18:12345'
|
||||
|
||||
# Stream from file to SRT
|
||||
./ffmpeg -re -i input.mp4 -c copy -f mpegts 'srt://172.17.32.18:12345'
|
||||
|
||||
# Stream from file to RTSP with loop
|
||||
./ffmpeg -re -stream_loop -1 -i input.mp4 -f rtsp -rtsp_transport tcp 'rtsp://localhost:554/stream=0'
|
||||
|
||||
# Stream from file to SRT with re-encode
|
||||
./ffmpeg -re -i input.mp4 -c:v libx264 -b:v 4000k -maxrate 4000k -bufsize 8000k -g 50 -f mpegts 'srt://172.17.32.18:12345'
|
||||
|
||||
# Stream to SRT and copy codec from ipcam with Majestic
|
||||
./ffmpeg -re -i 'rtsp://172.19.32.179:554/stream=0' -c copy -f mpegts 'srt://172.17.32.18:12345'
|
||||
|
||||
# Stream low latency from ipcam with Majestic
|
||||
./ffmpeg -re -fflags nobuffer -i 'rtsp://172.19.32.179:554/stream=0' -c copy -f mpegts 'srt://172.17.32.18:12345?mode=caller&transtype=live&latency=100'
|
||||
|
||||
|
||||
# Receiver, untested
|
||||
ffplay 'srt://172.17.32.18:12345'
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Boot device with NFS
|
||||
--------------------
|
||||
|
||||
Example for HI3516EV200 device
|
||||
|
||||
```
|
||||
bootargsnfs=mem=${osmem:-32M} console=ttyAMA0,115200 panic=20 root=/dev/nfs rootfstype=nfs ip=dhcp nfsroot=192.168.1.254:/media/nfs/hi3516ev200,v3,nolock rw ip=192.168.1.55:192.168.1.254:192.168.1.254:255.255.255.0::eth0
|
||||
|
||||
nfsboot=tftp 0x42000000 uImage;setenv setargs setenv bootargs ${bootargsnfs};run setargs;bootm 0x42000000
|
||||
|
||||
run nfsboot
|
||||
```
|
||||
|
||||
How to boot OpenIPC with NFS and TFTP without replacing stock firmware (russian post):
|
||||
https://habr.com/ru/companies/ruvds/articles/774482/
|
|
@ -0,0 +1,113 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Interesting tricks
|
||||
------------------
|
||||
|
||||
### Sharing output of a command via web
|
||||
|
||||
```bash
|
||||
<command> | nc seashells.io 1337
|
||||
```
|
||||
|
||||
### Adapting syslogd to work with time zones other than GMT
|
||||
|
||||
Some `syslog()` implementations like musl's always send timestamps in UTC.
|
||||
The following code adds a new option to `syslogd`, `-Z`, to assume incoming
|
||||
timestamps are always UTC, and to adjust them to the local timezone
|
||||
(of the syslogd) before logging.
|
||||
|
||||
```diff
|
||||
Signed-off-by: Shiz <hi at shiz.me>
|
||||
---
|
||||
sysklogd/syslogd.c | 23 +++++++++++++++++++----
|
||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
|
||||
index d64ff27..159336e 100644
|
||||
--- a/sysklogd/syslogd.c
|
||||
+++ b/sysklogd/syslogd.c
|
||||
@@ -122,6 +122,7 @@
|
||||
//usage: "(this version of syslogd ignores /etc/syslog.conf)\n"
|
||||
//usage: )
|
||||
//usage: "\n -n Run in foreground"
|
||||
+//usage: "\n -Z Adjust incoming UTC times to local time"
|
||||
//usage: IF_FEATURE_REMOTE_LOG(
|
||||
//usage: "\n -R HOST[:PORT] Log to HOST:PORT (default PORT:514)"
|
||||
//usage: "\n -L Log locally and via network (default is network only if -R)"
|
||||
@@ -233,6 +234,8 @@ typedef struct logRule_t {
|
||||
/*int markInterval;*/ \
|
||||
/* level of messages to be logged */ \
|
||||
int logLevel; \
|
||||
+ /* whether to adjust message timezone */\
|
||||
+ int adjustTimezone; \
|
||||
IF_FEATURE_ROTATE_LOGFILE( \
|
||||
/* max size of file before rotation */ \
|
||||
unsigned logFileSize; \
|
||||
@@ -316,6 +319,7 @@ enum {
|
||||
OPTBIT_outfile, // -O
|
||||
OPTBIT_loglevel, // -l
|
||||
OPTBIT_small, // -S
|
||||
+ OPTBIT_adjusttz, // -Z
|
||||
IF_FEATURE_ROTATE_LOGFILE(OPTBIT_filesize ,) // -s
|
||||
IF_FEATURE_ROTATE_LOGFILE(OPTBIT_rotatecnt ,) // -b
|
||||
IF_FEATURE_REMOTE_LOG( OPTBIT_remotelog ,) // -R
|
||||
@@ -330,6 +334,7 @@ enum {
|
||||
OPT_outfile = 1 << OPTBIT_outfile ,
|
||||
OPT_loglevel = 1 << OPTBIT_loglevel,
|
||||
OPT_small = 1 << OPTBIT_small ,
|
||||
+ OPT_adjusttz = 1 << OPTBIT_adjusttz,
|
||||
OPT_filesize = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_filesize )) + 0,
|
||||
OPT_rotatecnt = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_rotatecnt )) + 0,
|
||||
OPT_remotelog = IF_FEATURE_REMOTE_LOG( (1 << OPTBIT_remotelog )) + 0,
|
||||
@@ -339,7 +344,7 @@ enum {
|
||||
OPT_cfg = IF_FEATURE_SYSLOGD_CFG( (1 << OPTBIT_cfg )) + 0,
|
||||
OPT_kmsg = IF_FEATURE_KMSG_SYSLOG( (1 << OPTBIT_kmsg )) + 0,
|
||||
};
|
||||
-#define OPTION_STR "m:nO:l:S" \
|
||||
+#define OPTION_STR "m:nO:l:SZ" \
|
||||
IF_FEATURE_ROTATE_LOGFILE("s:" ) \
|
||||
IF_FEATURE_ROTATE_LOGFILE("b:" ) \
|
||||
IF_FEATURE_REMOTE_LOG( "R:*") \
|
||||
@@ -815,17 +820,23 @@ static void timestamp_and_log(int pri, char *msg, int len)
|
||||
{
|
||||
char *timestamp;
|
||||
time_t now;
|
||||
+ struct tm nowtm = { .tm_isdst = 0 };
|
||||
|
||||
/* Jan 18 00:11:22 msg... */
|
||||
/* 01234567890123456 */
|
||||
if (len < 16 || msg[3] != ' ' || msg[6] != ' '
|
||||
|| msg[9] != ':' || msg[12] != ':' || msg[15] != ' '
|
||||
) {
|
||||
- time(&now);
|
||||
+ now = time(NULL);
|
||||
timestamp = ctime(&now) + 4; /* skip day of week */
|
||||
} else {
|
||||
- now = 0;
|
||||
- timestamp = msg;
|
||||
+ if (G.adjustTimezone && strptime(msg, "%b %e %T", &nowtm)) {
|
||||
+ now = mktime(&nowtm) - timezone;
|
||||
+ timestamp = ctime(&now) + 4; /* skip day of week */
|
||||
+ } else {
|
||||
+ now = 0;
|
||||
+ timestamp = msg;
|
||||
+ }
|
||||
msg += 16;
|
||||
}
|
||||
timestamp[15] = '\0';
|
||||
@@ -1130,6 +1141,10 @@ int syslogd_main(int argc UNUSED_PARAM, char **argv)
|
||||
if (opts & OPT_loglevel) // -l
|
||||
G.logLevel = xatou_range(opt_l, 1, 8);
|
||||
//if (opts & OPT_small) // -S
|
||||
+ if (opts & OPT_adjusttz) { // -Z
|
||||
+ G.adjustTimezone = 1;
|
||||
+ tzset();
|
||||
+ }
|
||||
#if ENABLE_FEATURE_ROTATE_LOGFILE
|
||||
if (opts & OPT_filesize) // -s
|
||||
G.logFileSize = xatou_range(opt_s, 0, INT_MAX/1024) * 1024;
|
||||
--
|
||||
```
|
||||
|
||||
_from [sysklogd: add -Z option to adjust message timezones](http://lists.busybox.net/pipermail/busybox/2017-May/085437.html)_
|
|
@ -0,0 +1,173 @@
|
|||
# IPC-RM1-BLK7202V3-M43A-WIFI
|
||||
- [Overview](#overview)
|
||||
- [Device info](#Device-info)
|
||||
- [Connectors](#Connectors)
|
||||
- [Front side](#Front-side)
|
||||
- [Back side](#Back-side)
|
||||
- [GPIOs](#GPIOs)
|
||||
- [Muxing](#Muxing)
|
||||
- [SD Card](#SD-Card)
|
||||
- [Speaker](#Speaker)
|
||||
- [Flashing](#Flashing)
|
||||
- [Flash memory layout](#Flash-memory-layout)
|
||||
- [Summary](#Summary)
|
||||
- [TODO](#TODO)
|
||||
|
||||
# Overview
|
||||
Board found in cheap indoor Cootli WiFi PTZ cam. Board looks very similar to [XM IPG-G4-WR-BL](http://baike.xm030.cn:81/%E4%BA%A7%E5%93%81%E5%8F%82%E6%95%B0/English/IPG%E6%A8%A1%E7%BB%84/Parameters%20for%20IPG-G4-WR.pdf) but PCB layout a bit different.
|
||||
|
||||
All tests are complete on [gk7202v300_lite_cootli_camv0103-nor](https://github.com/OpenIPC/builder/releases/download/latest/gk7202v300_lite_cootli_camv0103-nor.tgz) firmware (build Feb 8 2024).
|
||||
|
||||
## Device info
|
||||
| System | Description | Comments |
|
||||
|-|-|-|
|
||||
| SoC | GK7202V300 | |
|
||||
| Flash | XMC XM25QH64CHIQ | 8MB |
|
||||
| Sensor | SmartSens SC223A* | 1920x1080 |
|
||||
| Audio | MIC + SPK | |
|
||||
| Storage | Micro SD | |
|
||||
| LAN | - | - |
|
||||
| WiFi | iComm SV6355 | UF.L (IPX) |
|
||||
| BT | +? | +? |
|
||||
| Motors | 2x Stepper | GPIO + ULN2803A |
|
||||
| Dimensions | 38 x 54 mm | |
|
||||
|
||||
\* - reported by ipctool
|
||||
|
||||
Front side
|
||||

|
||||
|
||||
Back side
|
||||

|
||||
|
||||
PCB markings
|
||||

|
||||
|
||||
# Connectors
|
||||
Connectors type JST 1.25mm
|
||||

|
||||
|
||||
## Front side
|
||||
| Connector | Type |
|
||||
|:-:|:-|
|
||||
| IRCUT | 2pin JST |
|
||||
| LED | 5pin JST |
|
||||
| MIC | 2pin JST |
|
||||
|
||||
## Back side
|
||||
- Micro SD Card Socket
|
||||
- UART (unsoldered, to the left of SPK, pin1 RX, pin2 TX)
|
||||
|
||||
| Connector | Type |
|
||||
|:-:|:-|
|
||||
| SPK | 2pin JST |
|
||||
| H | 5pin JST |
|
||||
| V | 5pin JST |
|
||||
| +5V | 2pin JST |
|
||||
| RF | UF.L (IPX) |
|
||||
|
||||
# GPIOs
|
||||
| GPIO | Connector | Description |
|
||||
|:-:|:-:|:-:|
|
||||
| 0* | - | Reset button |
|
||||
| 4 | LED pin 5 | WLED |
|
||||
| 8 | WiFi module pin 3 | LO - Power ON |
|
||||
| 12 | H pin 5 | Mot H |
|
||||
| 13 | H pin 2 | Mot H |
|
||||
| 14 | H pin 4 | Mot H |
|
||||
| 15 | H pin 3 | Mot H |
|
||||
| 16 | LED pin 4 | IRLED |
|
||||
| 52 | V pin 2 | Mot V |
|
||||
| 53 | V pin 3 | Mot V |
|
||||
| 54 | V pin 4 | Mot V |
|
||||
| 55 | V pin 5 | Mot V |
|
||||
| 56 | IRCUT pin 1 | LO - IRCUT ON |
|
||||
| 57* | LED pin 3 | IRSens |
|
||||
| 58 | IRCUT pin 2 | LO - IRCUT OFF |
|
||||
| 70 | - | SD PWR (LO - Power ON) |
|
||||
| 51 | - | AUDIO AMP |
|
||||
|
||||
\* - unconfirmed.
|
||||
|
||||
## Muxing
|
||||
No muxing required if Majestic takes control over pins. Otherwise, muxing can be done using the following commands.
|
||||
|
||||
Muxing GPIO16 for taking control over IRLED pin:
|
||||
```sh
|
||||
devmem 0x120c0020 32 0x432 # GPIO2_0 (GPIO16)
|
||||
```
|
||||
|
||||
Also for motors.
|
||||
Muxing GPIO12, GPIO14, GPIO15 (motors H connector):
|
||||
```sh
|
||||
devmem 0x120c0010 32 0x1e02 # GPIO1_4 (GPIO12)
|
||||
devmem 0x120c0018 32 0x1d02 # GPIO1_6 (GPIO14)
|
||||
devmem 0x120c001c 32 0x1402 # GPIO1_7 (GPIO15)
|
||||
```
|
||||
|
||||
Shortly after **Loading of kernel modules...** GPIO13 turns to HI (one of motors winding constantly powered), so maybe necesary turn it to LO:
|
||||
```sh
|
||||
gpio clear 13
|
||||
gpio unexport 13
|
||||
```
|
||||
|
||||
## SD Card
|
||||
By default SD Card unpowered, so we need turn GPIO70 to LO somehow.
|
||||
|
||||
To poweron SD CARD from Kernel:
|
||||
```sh
|
||||
gpio clear 70
|
||||
```
|
||||
or
|
||||
```sh
|
||||
devmem 0x120B8400 32 0x40 # turn GPIO8_6 to output mode
|
||||
devmem 0x120B8100 32 0x00 # set GPIO8_6 to LO
|
||||
```
|
||||
And reattach SD card.
|
||||
|
||||
To poweron SD CARD from U-Boot:
|
||||
```sh
|
||||
mw 0x120B8400 0x40 # turn GPIO8_6 to output mode
|
||||
mw 0x120B8100 0x00 # set GPIO8_6 to LO
|
||||
mmc rescan
|
||||
```
|
||||
|
||||
## Speaker
|
||||
Device supports playing PCM signed 16-bit little-endian, 8000 Hz, 1CH by sending data to http://192.168.0.10/play_audio endpoint.
|
||||
|
||||
Audio file can be encoded like this:
|
||||
```sh
|
||||
ffmpeg -i input.wav -f s16le -ar 8000 -ac 1 output.pcm
|
||||
```
|
||||
|
||||
And send to camera's speaker:
|
||||
```sh
|
||||
curl -v -u user:pass -H "Content-Type: application/json" -X POST --data-binary @audio.pcm http://192.168.0.10/play_audio
|
||||
```
|
||||
|
||||
# Flashing
|
||||
Stock firmware is pwd locked and LAN interface does not present, so I'm guessing following methods are available to flash this board:
|
||||
- [burn](https://github.com/OpenIPC/burn) + [u-boot-gk7202v300-universal.bin](https://github.com/OpenIPC/firmware/releases/download/latest/u-boot-gk7202v300-universal.bin) and then upload FW via X/Y/ZMODEM (e.g. **loady**. Tip: use **baud** option for speed up) or from SD card (power supply required, [see above](#SD-Card))
|
||||
- load full image thru stock web interface (untested)
|
||||
- flash programmer
|
||||
- somehow get into stock bootloader
|
||||
|
||||
## Flash memory layout
|
||||
| Offset | Size | Description |
|
||||
|:-|:-|:-|
|
||||
| 0x00000000 | 0x00040000 (262144 bytes) | bootloader |
|
||||
| 0x00040000 | 0x00010000 (65536 bytes) | env |
|
||||
| 0x00050000 | 0x00200000 (2097152 bytes) | kernel |
|
||||
| 0x00250000 | 0x00500000 (5242880 bytes) | rootfs |
|
||||
| 0x00750000 | 0x000B0000 (720896 bytes) | rootfs_data |
|
||||
|
||||
# Summary
|
||||
- [X] WiFi works
|
||||
- [X] Video tested/streamed
|
||||
- [X] Day/night works (IRCUT and IRLED)
|
||||
- [X] MIC works
|
||||
- [X] Speaker works
|
||||
- [ ] PTZ/Motors (GPIO pins found/accessible, driver untested)
|
||||
|
||||
# TODO
|
||||
- somehow patch/adapt camhi-motor.ko, so make it works on this board.
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
### Links
|
||||
|
||||
* [IP Video Door Bell - Atz-dbv01p](https://www.domoticz.com/forum/viewtopic.php?p=232840&sid=8346f7c7fd45358a7846858622c33d66#p232840)
|
||||
|
|
@ -0,0 +1,795 @@
|
|||
# Chacon IPCAM-RI01
|
||||
|
||||

|
||||
|
||||
[Product datasheet](https://chacon.com/datasharing/doc/IPCAM-RI01/ipcam-ri01_user_manual.pdf)
|
||||
|
||||
This camera is a rebranding of a manufacturing company identified by "PPStrong".
|
||||
I'm sure there are other cameras out there that are using the same hardware (or similar with minor changes).
|
||||
|
||||
## Hardware
|
||||
|
||||
| System | Description |
|
||||
|--------|--------------------------------------|
|
||||
| SoC | HI3518EV300 |
|
||||
| Sensor | JXF23 |
|
||||
| Flash | 16Mb (XM25QH128A) or 8Mb (XM25QH64A) |
|
||||
| WiFi | RTL8188FU |
|
||||
|
||||
### OpenIPC status
|
||||
|
||||
| Component | Status |
|
||||
|---------------|----------------------------------------------------------|
|
||||
| WiFi | [Working](https://github.com/OpenIPC/firmware/issues/48) |
|
||||
| Motors | [Working](#motor-driver) (patched driver) |
|
||||
| Red/Blue LEDs | [Working](#leds) |
|
||||
| IR LED | Working |
|
||||
| IR Cut | Working |
|
||||
|
||||
|
||||
### Hardware details
|
||||
|
||||
The camera mainboard is identified by "SPEED5S-H1MB_F23".
|
||||
|
||||

|
||||
At the top of the mainboard:
|
||||
- a micro sdcard slot on the right
|
||||
- connector labeled "IR" powers the IR LED, a red LED and a blue LED
|
||||
- connector "ICR" powers the IR cut filter
|
||||
- non-identified connector is an input for the microphone
|
||||
- SPI NOR flash chip (QH128A)
|
||||
|
||||
|
||||

|
||||
At the bottom of the mainboard:
|
||||
- SoC Hi3518EV300
|
||||
- WiFi module RTL8188FTV
|
||||
- Reset switch
|
||||
- Connectors (top to bottom):
|
||||
- Power (5V from a micro usb connector)
|
||||
- Tilt/vertical stepper motor
|
||||
- Pan/horizontal stepper motor
|
||||
- Speaker
|
||||
- UART pins at the lower left
|
||||
|
||||
### SoC
|
||||
[Hi35218EV300](https://www.hisilicon.com/en/products/smart-vision/consumer-camera/IOTVision/Hi3518EV300)
|
||||
- ARM Cortex-A7@ 900 MHz
|
||||
- 64Mb DDR2
|
||||
|
||||

|
||||
|
||||
|
||||
### Wifi
|
||||
[RTL8188FTV](https://www.realtek.com/en/products/communications-network-ics/item/rtl8188ftv)
|
||||
- 802.11b/g/n 2.4G
|
||||
- USB interface
|
||||
|
||||

|
||||
|
||||
|
||||
### SPI NOR flash
|
||||
[XM25QH128A](https://www.xmcwh.com/en/site/product_con/200)
|
||||
- 16Mb SPI NOR Flash
|
||||
|
||||

|
||||
|
||||
|
||||
### UART pins (serial port)
|
||||
|
||||

|
||||
|
||||
|
||||
### GPIOs
|
||||
|
||||
| nr | Description |
|
||||
|-----------|---------------|
|
||||
| 0x0f (15) | irCut_1 |
|
||||
| 0x0c (12) | irCut_2 |
|
||||
| 0x28 (40) | IR LED |
|
||||
| 0x33 (51) | Red LED |
|
||||
| 0x32 (50) | Blue LED |
|
||||
| 0x0d (13) | wlan power |
|
||||
| 0x00 (0) | AcShdn |
|
||||
| 0x09 (9) | Reset button |
|
||||
| 0x3b (59) | Tilt motor A1 |
|
||||
| 0x3a (58) | Tilt motor A2 |
|
||||
| 0x39 (57) | Tilt motor B1 |
|
||||
| 0x38 (56) | Tilt motor B2 |
|
||||
| 0x47 (71) | Pan motor A1 |
|
||||
| 0x45 (69) | Pan motor A2 |
|
||||
| 0x46 (70) | Pan motor B1 |
|
||||
| 0x44 (68) | Pan motor B2 |
|
||||
|
||||
### Mods
|
||||
#### USB Serial port
|
||||
|
||||
There is a micro usb connector to power the camera and with some soldering this connector can be also be used for a serial to usb converter.
|
||||
If you find it hard to solder the wires on the camera micro usb connector get a [micro usb breakout board](https://www.google.com/search?q=micro+usb+breakout+board&tbm=isch).
|
||||
|
||||

|
||||
|
||||
1. Get a 3.3V TTL to USB converter (using a cheap pl2303hx one)
|
||||
2. Remove the USB-A connector and pins
|
||||
3. Connect the camera micro usb port to the converter
|
||||
4. Connect the camera uart to the converter
|
||||
|
||||
|
||||
## Original firmware
|
||||
|
||||
The camera uBoot is password protected with "pps_password".
|
||||
|
||||
### Creating a backup
|
||||
To back up the original firmware you need a USB serial adapter connected to the board and a sdcard.
|
||||
|
||||
Find out your flash chip size:
|
||||
```
|
||||
pps # getinfo spi
|
||||
Block:64KB Chip:8MB*1
|
||||
D:0x20 0x70 0x17
|
||||
Name:"XM25QH64AHIG"
|
||||
```
|
||||
|
||||
uBoot commands to back up the entire flash memory on the sdcard (**all sdcard contents will be lost**).
|
||||
Depending on your camera flash memory size replace \<size1\>/\<size2\> with:
|
||||
- 0x800000/0x4000 for 8M flash
|
||||
- 0x1000000/0x8000 for a 16Mb flash
|
||||
(size2 = size1 / 512)
|
||||
|
||||
```
|
||||
sf probe
|
||||
sf read 0x40000000 0 <size1>
|
||||
mmc write 0 0x40000000 0 <size2>
|
||||
```
|
||||
|
||||
Example output (8Mb flash):
|
||||
```
|
||||
pps # sf probe
|
||||
pps # sf read 0x40000000 0 0x800000
|
||||
device 0 whole chip
|
||||
|
||||
SF: 8388608 bytes @ 0x0 Read: OK
|
||||
pps # mmc write 0 0x40000000 0 0x4000
|
||||
had init
|
||||
|
||||
MMC write: dev # 0, block # 0, count 16384 ... had init
|
||||
16384 blocks written: OK
|
||||
pps #
|
||||
```
|
||||
|
||||
This will write the entire flash to the mmc card in "raw mode" (no filesystem).
|
||||
|
||||
**WARNING**: if you leave the card inserted in the camera, and it boots the original FW, the card will be formated and the backup lost!
|
||||
|
||||
Then to save the dump to a file, insert the card in a system running linux and:
|
||||
```
|
||||
dd if=/dev/mmcblk0 of=./flash_backup.bin bs=512 count=<size2>
|
||||
```
|
||||
|
||||
|
||||
### cat /proc/mtd
|
||||
|
||||
8Mb flash version
|
||||
```
|
||||
dev: size erasesize name
|
||||
mtd0: 00030000 00010000 "bld" 196608 0
|
||||
mtd1: 00010000 00010000 "env" 65536 196608
|
||||
mtd2: 00010000 00010000 "enc" 65536 262144
|
||||
mtd3: 00010000 00010000 "sysflg" 65536 327680
|
||||
mtd4: 00310000 00010000 "sys" 3211264 393216
|
||||
mtd5: 00420000 00010000 "app" 4325376 3604480
|
||||
mtd6: 00070000 00010000 "cfg" 458752 7929856 - 8388608
|
||||
```
|
||||
|
||||
16Mb flash version
|
||||
```
|
||||
dev: size erasesize name
|
||||
mtd0: 00060000 00010000 "bld" 393216 0
|
||||
mtd1: 00010000 00010000 "env" 65536 393216
|
||||
mtd2: 00010000 00010000 "enc" 65536 458752
|
||||
mtd3: 00010000 00010000 "sysflg" 65536 524288
|
||||
mtd4: 00380000 00010000 "sys" 3670016 589824
|
||||
mtd5: 00680000 00010000 "app" 6815744 4259840
|
||||
mtd6: 00180000 00010000 "cfg" 1572864 11075584
|
||||
mtd7: 00100000 00010000 "recove" 1048576 12648448
|
||||
mtd8: 002d0000 00010000 "user" 2949120 13697024
|
||||
mtd9: 00020000 00010000 "oeminfo" 131072 16646144 - 16777216
|
||||
```
|
||||
|
||||
|
||||
### dmesg
|
||||
```
|
||||
Booting Linux on physical CPU 0x0
|
||||
Linux version 4.9.37
|
||||
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
|
||||
CPU: div instructions available: patching division code
|
||||
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
|
||||
OF: fdt:Machine model: Hisilicon HI3518EV300 DEMO Board
|
||||
Memory policy: Data cache writeback
|
||||
On node 0 totalpages: 9472
|
||||
free_area_init_node: node 0, pgdat c0565e98, node_mem_map c24a9000
|
||||
Normal zone: 74 pages used for memmap
|
||||
Normal zone: 0 pages reserved
|
||||
Normal zone: 9472 pages, LIFO batch:1
|
||||
CPU: All CPU(s) started in SVC mode.
|
||||
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
|
||||
pcpu-alloc: [0] 0
|
||||
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 9398
|
||||
Kernel command line: mem=37M console=ttyAMA0,115200n8 mtdparts=hi_sfc:192k(bld)ro,64k(env)ro,64k(enc)ro,64k(sysflg)ro,3136k(sys),4224k(app),448k(cfg) ppsAppParts=5 ppsWatchInitEnd
|
||||
PID hash table entries: 256 (order: -2, 1024 bytes)
|
||||
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
|
||||
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
Memory: 31728K/37888K available (3575K kernel code, 121K rwdata, 904K rodata, 888K init, 146K bss, 6160K reserved, 0K cma-reserved)
|
||||
Virtual kernel memory layout:
|
||||
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
|
||||
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
|
||||
vmalloc : 0xc2800000 - 0xff800000 ( 976 MB)
|
||||
lowmem : 0xc0000000 - 0xc2500000 ( 37 MB)
|
||||
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
|
||||
.text : 0xc0008000 - 0xc0386068 (3577 kB)
|
||||
.init : 0xc046a000 - 0xc0548000 ( 888 kB)
|
||||
.data : 0xc0548000 - 0xc05664e0 ( 122 kB)
|
||||
.bss : 0xc0568000 - 0xc058ca60 ( 147 kB)
|
||||
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
|
||||
NR_IRQS:16 nr_irqs:16 16
|
||||
Gic dist init...
|
||||
arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (phys).
|
||||
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
|
||||
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
|
||||
Switching to timer-based delay loop, resolution 20ns
|
||||
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
|
||||
Console: colour dummy device 80x30
|
||||
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=500000)
|
||||
pid_max: default: 32768 minimum: 301
|
||||
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
CPU: Testing write buffer coherency: ok
|
||||
Setting up static identity map for 0x40008240 - 0x40008298
|
||||
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
|
||||
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
|
||||
futex hash table entries: 256 (order: -1, 3072 bytes)
|
||||
pinctrl core: initialized pinctrl subsystem
|
||||
NET: Registered protocol family 16
|
||||
DMA: preallocated 256 KiB pool for atomic coherent allocations
|
||||
Serial: AMBA PL011 UART driver
|
||||
watchdo uboot init end
|
||||
12040000.uart: ttyAMA0 at MMIO 0x12040000 (irq = 21, base_baud = 0) is a PL011 rev2
|
||||
console [ttyAMA0] enabled
|
||||
12041000.uart: ttyAMA1 at MMIO 0x12041000 (irq = 22, base_baud = 0) is a PL011 rev2
|
||||
12042000.uart: ttyAMA2 at MMIO 0x12042000 (irq = 23, base_baud = 0) is a PL011 rev2
|
||||
usbcore: registered new interface driver usbfs
|
||||
usbcore: registered new interface driver hub
|
||||
usbcore: registered new device driver usb
|
||||
clocksource: Switched to clocksource arch_sys_counter
|
||||
NET: Registered protocol family 2
|
||||
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
TCP: Hash tables configured (established 1024 bind 1024)
|
||||
UDP hash table entries: 256 (order: 0, 4096 bytes)
|
||||
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|
||||
NET: Registered protocol family 1
|
||||
workingset: timestamp_bits=30 max_order=13 bucket_order=0
|
||||
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
|
||||
io scheduler noop registered
|
||||
io scheduler deadline registered (default)
|
||||
io scheduler cfq registered
|
||||
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
|
||||
hisi-sfc hisi_spi_nor.0: The ID: 0x20 isn't in the BP table, Current device can't not protect
|
||||
hisi-sfc hisi_spi_nor.0: xm25qh64a (Chipsize 8 Mbytes, Blocksize 64KiB)
|
||||
7 cmdlinepart partitions found on MTD device hi_sfc
|
||||
7 cmdlinepart partitions found on MTD device hi_sfc
|
||||
Creating 7 MTD partitions on "hi_sfc":
|
||||
0x000000000000-0x000000030000 : "bld"
|
||||
0x000000030000-0x000000040000 : "env"
|
||||
0x000000040000-0x000000050000 : "enc"
|
||||
0x000000050000-0x000000060000 : "sysflg"
|
||||
0x000000060000-0x000000370000 : "sys"
|
||||
0x000000370000-0x000000790000 : "app"
|
||||
0x000000790000-0x000000800000 : "cfg"
|
||||
dwc3 10030000.hidwc3: Configuration mismatch. dr_mode forced to host
|
||||
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
|
||||
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
|
||||
xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6c hci version 0x110 quirks 0x20010010
|
||||
xhci-hcd xhci-hcd.0.auto: irq 54, io mem 0x10030000
|
||||
hub 1-0:1.0: USB hub found
|
||||
hub 1-0:1.0: 1 port detected
|
||||
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
|
||||
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
|
||||
usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
|
||||
hub 2-0:1.0: USB hub found
|
||||
hub 2-0:1.0: hub can't support USB3.0
|
||||
i2c /dev entries driver
|
||||
hibvt-i2c 12060000.i2c: hibvt-i2c0@100000hz registered
|
||||
hibvt-i2c 12061000.i2c: hibvt-i2c1@100000hz registered
|
||||
hibvt-i2c 12062000.i2c: hibvt-i2c2@100000hz registered
|
||||
sdhci: Secure Digital Host Controller Interface driver
|
||||
sdhci: Copyright(c) Pierre Ossman
|
||||
sdhci-pltfm: SDHCI platform and OF driver helper
|
||||
mmc0: SDHCI controller on 10010000.sdhci [10010000.sdhci] using ADMA in legacy mode
|
||||
mmc1: SDHCI controller on 10020000.sdhci [10020000.sdhci] using ADMA in legacy mode
|
||||
Initializing XFRM netlink socket
|
||||
NET: Registered protocol family 17
|
||||
NET: Registered protocol family 15
|
||||
Key type dns_resolver registered
|
||||
PM: Hibernation image not present or could not be loaded.
|
||||
uart-pl011 12040000.uart: no DMA platform data
|
||||
Freeing unused kernel memory: 888K (c046a000 - c0548000)
|
||||
This architecture does not have kernel memory protection.
|
||||
random: S80network: uninitialized urandom read (4 bytes read)
|
||||
Strnio: loading out-of-tree module taints kernel.
|
||||
pcbversion:,S4S_H1_V10
|
||||
pcb____S4S_H1_V10
|
||||
sensor:,soif23mipi
|
||||
pcbname:,S5S_H1_V10_F23
|
||||
factoryname:,PPSTRONG
|
||||
platform:,C5
|
||||
viewmirrow:,vertical_horizontal
|
||||
mem:,37
|
||||
flash:,8
|
||||
mmz:,27
|
||||
###cfg gpio OK name:redLed
|
||||
cfg gpio err name:syncRedLed
|
||||
cfg gpio err name:syncBlueLed
|
||||
==============led init finished
|
||||
###cfg gpio OK name:irRed
|
||||
###cfg gpio OK name:irCut_1
|
||||
###cfg gpio OK name:irCut_2
|
||||
###cfg gpio OK name:Restbutton
|
||||
cfg gpio err name:doorbell_key
|
||||
###cfg gpio OK name:wlanPwr
|
||||
cfg gpio err name:4GPwr
|
||||
wlanPwr,open pwr
|
||||
###cfg gpio OK name:AcShdn
|
||||
AcShdn,close pwr
|
||||
cfg gpio err name:MicShdn
|
||||
cfg gpio err name:4GPowOn
|
||||
cfg gpio err name:4GCheck
|
||||
cfg gpio err name:4GReset
|
||||
cfg gpio err name:Uart1Rxd
|
||||
cfg gpio err name:Uart1Txd
|
||||
cfg gpio err name:GarageDoorOpen
|
||||
cfg gpio err name:GarageDoorClose
|
||||
cfg gpio err name:GarageDoorStop
|
||||
###cfg gpio OK name:si7020_SDA
|
||||
###cfg gpio OK name:si7020_SCL
|
||||
usb 1-1: new high-speed USB device number 2 using xhci-hcd
|
||||
###cfg gpio OK name:4wir_Tain1
|
||||
###cfg gpio OK name:4wir_Tain2
|
||||
###cfg gpio OK name:4wir_Tbin1
|
||||
###cfg gpio OK name:4wir_Tbin2
|
||||
cfg gpio err name:motor_shared
|
||||
###cfg gpio OK name:4wir_Pain1
|
||||
###cfg gpio OK name:4wir_Pain2
|
||||
###cfg gpio OK name:4wir_Pbin1
|
||||
###cfg gpio OK name:4wir_Pbin2
|
||||
rtw_pps_set_runsta ok
|
||||
USB_SPEED_HIGH
|
||||
random: fast init done
|
||||
usbcore: registered new interface driver rtl8188fu
|
||||
======online_flag = 0, cmos_yuv_flag = 0, sensor=soif23mipi, chip=hi3518ev300, board=meari======
|
||||
meari init success!
|
||||
Module himedia: init ok
|
||||
Hisilicon Media Memory Zone Manager
|
||||
hi_osal 1.0 init success!
|
||||
hi3516ev200_base: module license 'Proprietary' taints kernel.
|
||||
Disabling lock debugging due to kernel taint
|
||||
load sys.ko for Hi3516EV200...OK!
|
||||
load tde.ko for HI3516EV200...OK!
|
||||
load region.ko for Hi3516EV200...OK!
|
||||
load vgs.ko for Hi3516EV200...OK!
|
||||
load vi.ko for Hi3516EV200...OK !
|
||||
ISP Mod init!
|
||||
load vpss.ko for Hi3516EV200...OK!
|
||||
load rc.ko for Hi3516EV200...OK!
|
||||
load venc.ko for Hi3516EV200...OK!
|
||||
load chnl.ko for Hi3516EV200...OK!
|
||||
load vedu.ko for Hi3516EV200...OK!
|
||||
load h264e.ko for Hi3516EV200...OK!
|
||||
load h265e.ko for Hi3516EV200...OK!
|
||||
load jpege.ko for Hi3516EV200...OK!
|
||||
load ive.ko for Hi3516EV200...OK!
|
||||
load mipi_rx driver successful!
|
||||
close app check
|
||||
###cfg gpio OK name:blueLed
|
||||
Strnio_ioctl
|
||||
recfgcodec
|
||||
start recfgcodec
|
||||
0xCC----ff031a00
|
||||
0xCC----aa031a00
|
||||
packets in tx buffer - 0x204=e9000c, 0x200=e9000c
|
||||
sys irq:30
|
||||
cfg gpio err name:PirInput
|
||||
____set essid
|
||||
____set essid
|
||||
```
|
||||
|
||||
### Starting telnetd
|
||||
|
||||
The camera original FW runs a REST server with authentication (user: PpStRoNg, password: #%&wL1@\*tU123zv).
|
||||
|
||||
One of the most interesting features is the "runcmd" function (replace \<your_cam_ip\> with your camera IP address):
|
||||
|
||||
Send request (note the \\ escaping the & for the password):
|
||||
```
|
||||
curl -u PpStRoNg:#%\&wL1@*tU123zv -i http://<your_cam_ip>:80/devices/runcmd --request POST --data '{"cmd":"ls"}'
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 0
|
||||
```
|
||||
|
||||
Get output (json format):
|
||||
```
|
||||
curl -u PpStRoNg:#%\&wL1@*tU123zv -i http://<your_cam_ip>:80/devices/runcmd
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 129
|
||||
{
|
||||
"value": "usr\nsys\netc\nmnt\nlib\nproc\nboot\nopt\nlinuxrc\nbin\ndev\ninit\nhome\nsbin\nnfsroot\nroot\ntmp\nvar\ndevinfo\n"
|
||||
}
|
||||
```
|
||||
|
||||
In the latest FW they have removed the "telnetd" binary, so you need to place it on the sdcard:
|
||||
[telnetd.zip](https://github.com/ljalves/wiki/files/7875319/telnetd.zip)
|
||||
|
||||
|
||||
To start the server copy the telnetd binary to the sdcard and run:
|
||||
```
|
||||
curl -u PpStRoNg:#%\&wL1@*tU123zv -i http://<your_cam_ip>:80/devices/runcmd --request POST --data '{"cmd":"echo 'anyone::0:0:root:/:/bin/sh' >> /etc/passwd"}'
|
||||
curl -u PpStRoNg:#%\&wL1@*tU123zv -i http://<your_cam_ip>:80/devices/runcmd --request POST --data '{"cmd":"/mnt/mmc01/telnetd &"}'
|
||||
```
|
||||
|
||||
At this point you should be able to telnet to the camera:
|
||||
```
|
||||
$ telnet <your_cam_ip>
|
||||
Trying <your_cam_ip>...
|
||||
Connected to <your_cam_ip>.
|
||||
Escape character is '^]'.
|
||||
(none) login: anyone
|
||||
|
||||
|
||||
BusyBox v1.26.2 (2019-04-16 05:35:27 PDT) built-in shell (ash)
|
||||
|
||||
/ #
|
||||
```
|
||||
|
||||
|
||||
### [ipctool](https://github.com/OpenIPC/ipctool) output (8Mb flash):
|
||||
|
||||
```
|
||||
/mnt/mmc01 # ./ipctool
|
||||
---
|
||||
chip:
|
||||
vendor: HiSilicon
|
||||
model: 3518EV300
|
||||
id: 022c40074e0038f1ee70030a0d73b5d32549ab0c81a025e3
|
||||
mdio busy
|
||||
mdio busy
|
||||
ethernet:
|
||||
mac: "c4:3a:35:75:bf:71"
|
||||
u-mdio-phyaddr: 0
|
||||
phy-id: 0x00000000
|
||||
d-mdio-phyaddr: 0
|
||||
rom:
|
||||
- type: nor
|
||||
block: 64K
|
||||
partitions:
|
||||
- name: sys
|
||||
size: 0x310000
|
||||
sha1: c890f4a1
|
||||
- name: app
|
||||
size: 0x420000
|
||||
sha1: 32c12243
|
||||
- name: cfg
|
||||
size: 0x70000
|
||||
path: /home/cfg,jffs2,rw
|
||||
size: 7M
|
||||
addr-mode: 3-byte
|
||||
ram:
|
||||
total: 64M
|
||||
media: 27M
|
||||
firmware:
|
||||
kernel: "4.9.37 (Mon Jul 22 00:51:54 PDT 2019)"
|
||||
libc: uClibc 0.9.33.2
|
||||
sdk: "Hi3516EV200_MPP_V1.0.1.0 B050 Release (May 9 2019, 22:51:50)"
|
||||
main-app: ./ppsapp
|
||||
sensors:
|
||||
- vendor: Silicon Optronics
|
||||
model: JXF23
|
||||
control:
|
||||
bus: 0
|
||||
type: i2c
|
||||
addr: 0x80
|
||||
data:
|
||||
type: MIPI
|
||||
input-data-type: DATA_TYPE_RAW_10BIT
|
||||
lane-id:
|
||||
- 0
|
||||
- 1
|
||||
image: 1920x1080
|
||||
clock: 27MHz
|
||||
/mnt/mmc01 #
|
||||
```
|
||||
|
||||
|
||||
## OpenIPC firmware
|
||||
|
||||
## Flashing OpenIPC
|
||||
(soon...)
|
||||
|
||||
### Boot dump
|
||||
```
|
||||
Uncompress Ok!
|
||||
|
||||
U-Boot 2016.11-g059901b-dirty (Oct 13 2021 - 20:14:30 +0300)hi3518ev300
|
||||
|
||||
Relocation Offset is: 0374a000
|
||||
Relocating to 43f4a000, new gd at 43f09ef0, sp at 43f09ed0
|
||||
SPI Nor: hifmc_ip_ver_check(44): Check Flash Memory Controller v100 ...hifmc_ip_ver_check(50): Found
|
||||
hifmc_spi_nor_probe(1709): SPI Nor ID Table Version 1.0
|
||||
hifmc_spi_nor_probe(1734): SPI Nor(cs 0) ID: 0x20 0x70 0x18
|
||||
hifmc_spi_nor_probe(1799): Block:64KB hifmc_spi_nor_probe(1800): Chip:16MB hifmc_spi_nor_probe(1801): Name:"XM25QH128A"
|
||||
hifmc100_spi_nor_probe(147): SPI Nor total size: 16MB
|
||||
NAND: 0 MiB
|
||||
MMC: hisi-sdhci: 0 (SD)
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
Net: eth0
|
||||
Warning: eth0 (eth0) using random MAC address - 6e:9f:f3:d7:33:35
|
||||
|
||||
Hit any key to stop autoboot: 0
|
||||
device 0 offset 0x50000, size 0x200000
|
||||
|
||||
SF: 2097152 bytes @ 0x50000 Read: OK
|
||||
## Booting kernel from Legacy Image at 42000000 ...
|
||||
Image Name: Linux-4.9.37-hi3518ev300
|
||||
Image Type: ARM Linux Kernel Image (uncompressed)
|
||||
Data Size: 1891696 Bytes = 1.8 MiB
|
||||
Load Address: 40008000
|
||||
Entry Point: 40008000
|
||||
Loading Kernel Image ... OK
|
||||
|
||||
Starting kernel ...
|
||||
|
||||
Booting Linux on physical CPU 0x0
|
||||
Linux version 4.9.37 (runner@fv-az241-255) (gcc version 7.5.0 (Buildroot -g29dde73) ) #1 Sun Jan 9 03:44:04 UTC 2022
|
||||
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
|
||||
CPU: div instructions available: patching division code
|
||||
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
|
||||
OF: fdt:Machine model: Hisilicon HI3518EV300 DEMO Board
|
||||
cmz zone is not set!
|
||||
Memory policy: Data cache writeback
|
||||
CPU: All CPU(s) started in SVC mode.
|
||||
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
|
||||
Kernel command line: mem=32M console=ttyAMA0,115200 panic=20 rootfstype=squashfs root=/dev/mtdblock3 init=/init mtdparts=hi_sfc:256k(boot),64k(env),2048k(kernel
|
||||
),5120k(rootfs),-(rootfs_data) mmz_allocator=hisi
|
||||
PID hash table entries: 128 (order: -3, 512 bytes)
|
||||
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
|
||||
Memory: 27104K/32768K available (3861K kernel code, 141K rwdata, 872K rodata, 188K init, 179K bss, 5664K reserved, 0K cma-reserved)
|
||||
Virtual kernel memory layout:
|
||||
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
|
||||
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
|
||||
vmalloc : 0xc2800000 - 0xff800000 ( 976 MB)
|
||||
lowmem : 0xc0000000 - 0xc2000000 ( 32 MB)
|
||||
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
|
||||
.text : 0xc0008000 - 0xc03cd778 (3862 kB)
|
||||
.init : 0xc04a9000 - 0xc04d8000 ( 188 kB)
|
||||
.data : 0xc04d8000 - 0xc04fb520 ( 142 kB)
|
||||
.bss : 0xc04fd000 - 0xc0529fe4 ( 180 kB)
|
||||
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
|
||||
NR_IRQS:16 nr_irqs:16 16
|
||||
Gic dist init...
|
||||
arm_arch_timer: Architected cp15 timer(s) running at 50.00MHz (phys).
|
||||
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
|
||||
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
|
||||
Switching to timer-based delay loop, resolution 20ns
|
||||
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
|
||||
Console: colour dummy device 80x30
|
||||
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=500000)
|
||||
pid_max: default: 32768 minimum: 301
|
||||
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
CPU: Testing write buffer coherency: ok
|
||||
Setting up static identity map for 0x40008200 - 0x40008258
|
||||
devtmpfs: initialized
|
||||
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
|
||||
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
|
||||
futex hash table entries: 256 (order: -1, 3072 bytes)
|
||||
pinctrl core: initialized pinctrl subsystem
|
||||
NET: Registered protocol family 16
|
||||
DMA: preallocated 256 KiB pool for atomic coherent allocations
|
||||
Serial: AMBA PL011 UART driver
|
||||
12040000.uart: ttyAMA0 at MMIO 0x12040000 (irq = 21, base_baud = 0) is a PL011 rev2
|
||||
console [ttyAMA0] enabled
|
||||
12041000.uart: ttyAMA1 at MMIO 0x12041000 (irq = 22, base_baud = 0) is a PL011 rev2
|
||||
ssp-pl022 12070000.spi: ARM PL022 driver, device ID: 0x00800022
|
||||
ssp-pl022 12070000.spi: mapped registers from 0x12070000 to c286b000
|
||||
ssp-pl022 12071000.spi: ARM PL022 driver, device ID: 0x00800022
|
||||
ssp-pl022 12071000.spi: mapped registers from 0x12071000 to c286f000
|
||||
usbcore: registered new interface driver usbfs
|
||||
usbcore: registered new interface driver hub
|
||||
usbcore: registered new device driver usb
|
||||
clocksource: Switched to clocksource arch_sys_counter
|
||||
NET: Registered protocol family 2
|
||||
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
TCP: Hash tables configured (established 1024 bind 1024)
|
||||
UDP hash table entries: 256 (order: 0, 4096 bytes)
|
||||
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|
||||
NET: Registered protocol family 1
|
||||
RPC: Registered named UNIX socket transport module.
|
||||
RPC: Registered udp transport module.
|
||||
RPC: Registered tcp transport module.
|
||||
RPC: Registered tcp NFSv4.1 backchannel transport module.
|
||||
workingset: timestamp_bits=30 max_order=13 bucket_order=0
|
||||
squashfs: version 4.0 (2009/01/31) Phillip Lougher
|
||||
jffs2: version 2.2 (NAND) (ZLIB) (RTIME) (c) 2001-2006 Red Hat, Inc.
|
||||
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
|
||||
io scheduler noop registered
|
||||
io scheduler deadline registered (default)
|
||||
pl061_gpio 120b0000.gpio_chip: PL061 GPIO chip @0x120b0000 registered
|
||||
pl061_gpio 120b1000.gpio_chip: PL061 GPIO chip @0x120b1000 registered
|
||||
pl061_gpio 120b2000.gpio_chip: PL061 GPIO chip @0x120b2000 registered
|
||||
pl061_gpio 120b4000.gpio_chip: PL061 GPIO chip @0x120b4000 registered
|
||||
pl061_gpio 120b5000.gpio_chip: PL061 GPIO chip @0x120b5000 registered
|
||||
pl061_gpio 120b6000.gpio_chip: PL061 GPIO chip @0x120b6000 registered
|
||||
pl061_gpio 120b7000.gpio_chip: PL061 GPIO chip @0x120b7000 registered
|
||||
pl061_gpio 120b8000.gpio_chip: PL061 GPIO chip @0x120b8000 registered
|
||||
brd: module loaded
|
||||
loop: module loaded
|
||||
hisi-sfc hisi_spi_nor.0: SPI Nor ID Table Version 1.2
|
||||
hisi-sfc hisi_spi_nor.0: The ID: 0x20 isn't in the BP table, Current device can't not protect
|
||||
@spi_nor_scan(), no "m25p,fast-read".
|
||||
@spi_nor_scan(), modes->rd_modes:0xd.
|
||||
hisi-sfc hisi_spi_nor.0: (Fast) Read: opcode=BBh, protocol=122, mode=0, wait=8
|
||||
hisi-sfc hisi_spi_nor.0: nor->read_opcode[3: Read; 0B: Fast Read; 3B: Dual; BB: Dual IO; 6B: Quad; EB: Quad IO]: 0xbb.
|
||||
hisi-sfc hisi_spi_nor.0: xm25qh128a (Chipsize 16 Mbytes, Blocksize 64KiB)
|
||||
5 cmdlinepart partitions found on MTD device hi_sfc
|
||||
5 cmdlinepart partitions found on MTD device hi_sfc
|
||||
Creating 5 MTD partitions on "hi_sfc":
|
||||
0x000000000000-0x000000040000 : "boot"
|
||||
0x000000040000-0x000000050000 : "env"
|
||||
0x000000050000-0x000000250000 : "kernel"
|
||||
0x000000250000-0x000000750000 : "rootfs"
|
||||
0x000000750000-0x000001000000 : "rootfs_data"
|
||||
SPI Nand ID Table Version 2.7
|
||||
Cannot found a valid SPI Nand Device
|
||||
hisi_spi_nand_probe(175): Error: driver probe, result: -19
|
||||
No OTP data, festa PHY use default ATE parameters!
|
||||
festa PHY wait autotrim done timeout!
|
||||
libphy: hisi_femac_mii_bus: probed
|
||||
libphy: Fixed MDIO Bus: probed
|
||||
hisi-femac 10040000.ethernet: connect to PHY failed!
|
||||
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
|
||||
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
|
||||
xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6c hci version 0x110 quirks 0x20010010
|
||||
xhci-hcd xhci-hcd.0.auto: irq 116, io mem 0x10030000
|
||||
hub 1-0:1.0: USB hub found
|
||||
hub 1-0:1.0: 1 port detected
|
||||
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
|
||||
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
|
||||
usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
|
||||
hub 2-0:1.0: USB hub found
|
||||
hub 2-0:1.0: hub can't support USB3.0
|
||||
hibvt_rtc 120e0000.rtc: rtc core: registered 120e0000.rtc as rtc0
|
||||
hibvt_rtc 120e0000.rtc: RTC driver for hibvt enabled
|
||||
i2c /dev entries driver
|
||||
hibvt-i2c 12060000.i2c: hibvt-i2c0@100000hz registered
|
||||
hibvt-i2c 12061000.i2c: hibvt-i2c1@100000hz registered
|
||||
hibvt-i2c 12062000.i2c: hibvt-i2c2@100000hz registered
|
||||
sdhci: Secure Digital Host Controller Interface driver
|
||||
sdhci: Copyright(c) Pierre Ossman
|
||||
sdhci-pltfm: SDHCI platform and OF driver helper
|
||||
mmc0: SDHCI controller on 10010000.sdhci [10010000.sdhci] using ADMA in legacy mode
|
||||
mmc1: SDHCI controller on 10020000.sdhci [10020000.sdhci] using ADMA in legacy mode
|
||||
NET: Registered protocol family 10
|
||||
NET: Registered protocol family 17
|
||||
hibvt_rtc 120e0000.rtc: setting system clock to 1970-01-01 00:00:00 UTC (0)
|
||||
VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
|
||||
devtmpfs: mounted
|
||||
Freeing unused kernel memory: 188K (c04a9000 - c04d8000)
|
||||
This architecture does not have kernel memory protection.
|
||||
mmc0: new high speed SDHC card at address 1234
|
||||
mmcblk0: mmc0:1234 SA08G 7.21 GiB
|
||||
mmcblk0: p1
|
||||
Starting syslogd: OK
|
||||
Starting klogd: OK
|
||||
Running sysctl: OK
|
||||
Loading modules:Initializing random number generator: OK
|
||||
Saving random seed: OK
|
||||
Starting rngd: OK
|
||||
Starting mdev...
|
||||
F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 1th superblock
|
||||
F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 2th superblock
|
||||
F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 1th superblock
|
||||
F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 2th superblock
|
||||
Starting network: OK
|
||||
Starting ntpd: OK
|
||||
Starting dropbear sshd: OK
|
||||
Starting httpd: OK
|
||||
Starting mini-snmpd: DISABLED, OK
|
||||
Starting telnetd: DISABLED, OK
|
||||
Starting crond: OK
|
||||
mmz_start: 0x42000000, mmz_size: 32M
|
||||
hisilicon: Get data from environment and set SENSOR as jxf23
|
||||
insert audio
|
||||
Bringing wlan0 up...
|
||||
Successfully initialized wpa_supplicant
|
||||
rfkill: Cannot open RFKILL control device
|
||||
udhcpc: started, v1.31.1
|
||||
udhcpc: sending discover
|
||||
udhcpc: sending discover
|
||||
udhcpc: sending discover
|
||||
udhcpc: sending select for 192.168.1.112
|
||||
udhcpc: lease of 192.168.1.112 obtained, lease time 86400
|
||||
deleting routers
|
||||
adding dns 8.8.8.8
|
||||
adding dns 8.8.4.4
|
||||
hisilicon: Check MAC for Xiongmai devices
|
||||
hisilicon: The eth0 interface has a correct MAC -
|
||||
hisilicon: Loading of kernel modules and initialization of the video system has started
|
||||
Starting majestic: OK
|
||||
|
||||
Welcome to OpenIPC v2.1
|
||||
openipc-hi3518ev300 login:
|
||||
```
|
||||
|
||||
|
||||
(soon...)
|
||||
|
||||
### rtl8188fu
|
||||
(soon...)
|
||||
|
||||
### Motor driver
|
||||
|
||||
The camera has 2 stepper motors to control the tilt (up/down) and pan (left/right).
|
||||
|
||||
Replace the motor driver at /lib/modules/4.9.37/hisilicon/camhi-motor.ko with the one included below.
|
||||
|
||||
The .zip file also includes a slightly modified build of the [sample control code](https://github.com/OpenIPC/motors) that you can copy to /bin.
|
||||
|
||||
[camhi-motor.zip](https://github.com/ljalves/wiki/files/7873614/camhi-motor.zip)
|
||||
|
||||
Usage:
|
||||
```
|
||||
motor_ctrl -d u # move/tile up (by default 20 steps)
|
||||
motor_ctrl -d d # move/tilt down
|
||||
motor_ctrl -d l # move/pan left
|
||||
motor_ctrl -d r -s 50 # move/pan right by 50 steps
|
||||
```
|
||||
|
||||
### Majestic sensor/pin configuration
|
||||
|
||||
```
|
||||
image:
|
||||
mirror: true
|
||||
flip: true
|
||||
(...)
|
||||
nightMode:
|
||||
irCutPin1: 15
|
||||
irCutPin2: 12
|
||||
backlightPin: 40
|
||||
|
||||
```
|
||||
|
||||
### LEDs
|
||||
The camera has a dual color LED (red/blue) connected to GPIO's 50 and 51.
|
||||
To control those LEDs you can use the /sys api:
|
||||
```
|
||||
# make the GPIOs accessible
|
||||
echo 50 > /sys/class/gpio/export
|
||||
# and set direction (only need to do once)
|
||||
echo out > /sys/class/gpio50/direction
|
||||
echo out > /sys/class/gpio51/direction
|
||||
|
||||
# turn on blue LED
|
||||
echo 1 > /sys/class/gpio50/value
|
||||
# turn off blue LED
|
||||
echo 0 > /sys/class/gpio50/value
|
||||
|
||||
# turn on red LED
|
||||
echo 1 > /sys/class/gpio51/value
|
||||
# turn off red LED
|
||||
echo 0 > /sys/class/gpio51/value
|
||||
```
|
|
@ -0,0 +1,289 @@
|
|||
# Digitus DN-16048 Optizoom PTZ
|
||||
Pan, Tilt, Focus and Zoom (via command line ssh)
|
||||
|
||||
## Flashing OpenIPC:
|
||||
|
||||
Opening the case, it turns out, that the SoC is **hi3518cv100**, **16MB**, and the camera sensor is **mt9p006**. Install a TFTP server at the PC and follow the installation instructions: https://github.com/OpenIPC/wiki/blob/master/en/installation.md Download the correct image (16MB, Lite) from here https://openipc.org/cameras/vendors/hisilicon/socs/hi3518cv100 and put it into the directory of the TFTP server (in case the image is not packed, the "unpacking" step can be skipped). As described, connect a UART adapter to the pins on the SoC board and start a terminal at the PC:
|
||||
|
||||
```sh
|
||||
screen -L -Logfile ipcam-$(date +%s).log /dev/ttyUSB0 115200
|
||||
```
|
||||
|
||||
Follow the instructions that are generated by the OpenIPC web page. To access UBOOT, press Ctrl-C immediately after plugging in the power supply. To make the network work later on in Linux: Before the final "reset" command in UBOOT, enter the following commands, according to: https://github.com/OpenIPC/wiki/blob/master/en/network-perversions.md
|
||||
|
||||
```sh
|
||||
setenv extras 'hieth.phyaddru=3 hieth.mdioifu=0'
|
||||
saveenv
|
||||
```
|
||||
|
||||
Finally enter:
|
||||
|
||||
```sh
|
||||
reset
|
||||
```
|
||||
|
||||
Logon to Linux using "root" and "12345". In Linux enter:
|
||||
|
||||
```sh
|
||||
firstboot
|
||||
```
|
||||
|
||||
Login to Linux again. The sensor will not be detected automatically. Therefore enter the following commands in Linux on the camera:
|
||||
|
||||
```sh
|
||||
fw_setenv soc hi3518cv100
|
||||
fw_setenv sensor mt9p006
|
||||
```
|
||||
|
||||
Find out the IP address of the camera via
|
||||
|
||||
```sh
|
||||
ip a
|
||||
```
|
||||
|
||||
## Change password and MAC address:
|
||||
Access the web interface using a browser via port 85 and change the password and the MAC address.
|
||||
|
||||
## Configure night mode switching:
|
||||
Via ipctool (ipctool gpio scan) one can find out easily, that the light sensor input (for automatic switching between day and night) is number 2. The IR cutoff is controlled by 1 and 0.
|
||||
|
||||
* Preview-NightMode-Settings:
|
||||
|
||||
```
|
||||
Enable Night mode: on
|
||||
GPIO pin of signal from IR sensor: 2
|
||||
GPIO pin1 of signal for IRcut filter: 1
|
||||
GPIO pin2 of signal for IRcut filter: 0
|
||||
```
|
||||
|
||||
## Configure the camera resolution:
|
||||
|
||||
* Mainstream Video (Video0):
|
||||
|
||||
```
|
||||
Video resolution: 1280x720
|
||||
Video framerate: 10
|
||||
```
|
||||
When using RTSP you might want to increase the frame rate at Video0 to 15. Higher frame rates might be possible, but above 15 memory runs low and suddenly the web gui might not be reachable anymore (and probably other unwanted effects will occur).
|
||||
|
||||
* RTSP:
|
||||
|
||||
```
|
||||
RTSP enable output: on
|
||||
```
|
||||
|
||||
* MJPEG:
|
||||
|
||||
```
|
||||
Video resolution: 1280x720
|
||||
```
|
||||
|
||||
* JPEG:
|
||||
|
||||
```
|
||||
Snapshot size: 1280x720
|
||||
```
|
||||
|
||||
## Configure the Image Signal Processor:
|
||||
|
||||
* Image Signal Processor (ISP):
|
||||
|
||||
```
|
||||
Path to sensor configuration file: /etc/sensors/mt9p006_i2c_dc_720p.ini
|
||||
Block count: 4
|
||||
```
|
||||
|
||||
## Configure web admin:
|
||||
|
||||
* System:
|
||||
|
||||
```
|
||||
Serve Web Admin via Majestic: off
|
||||
```
|
||||
|
||||
## Configure the watchdog:
|
||||
|
||||
* Watchdog:
|
||||
|
||||
```
|
||||
Enable watchdog: on
|
||||
Watchdog timeout: 120
|
||||
```
|
||||
|
||||
## Test the MJPEG stream:
|
||||
For example, using a browser or the Android app "IPCamViewer" (replace IP with your current one).
|
||||
|
||||
```sh
|
||||
192.168.1.188/mjpeg
|
||||
```
|
||||
|
||||
## Test the RTSP stream:
|
||||
For example, using "mpv" on Linux or the Android app "IPCamViewer". When using "IPCamViewer" select "Generic RTSP over UDP" (replace the password and IP with your current ones).
|
||||
|
||||
```sh
|
||||
mpv rtsp://root:12345@192.168.1.188:554/stream=0
|
||||
```
|
||||
|
||||
## Test pan, tilt, zoom and focus:
|
||||
It turns out, that the camera uses the pelco-d protocol via the serial port ttyAMA1, so logon to the camera via ssh (use your ip):
|
||||
|
||||
```sh
|
||||
ssh root@192.168.1.188
|
||||
```
|
||||
|
||||
The serial port can be configured via the following stty command:
|
||||
|
||||
```sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
```
|
||||
|
||||
Create the following scripts with the editor "vi" or copy the files via tftp. Use chmod to make the files executable. For example:
|
||||
|
||||
```sh
|
||||
chmod +x ./right
|
||||
```
|
||||
|
||||
|
||||
### Script ./right
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x02\x20\x00\x23' >/dev/ttyAMA1
|
||||
sleep 0.1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./left
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x04\x20\x00\x25' >/dev/ttyAMA1
|
||||
sleep 0.1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./up
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' > /dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x08\x20\x00\x29' > /dev/ttyAMA1
|
||||
sleep 0.1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' > /dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./down
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x10\x20\x00\x31' >/dev/ttyAMA1
|
||||
sleep 0.1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./in (Zoom)
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x20\x00\x00\x21' >/dev/ttyAMA1
|
||||
sleep 1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./out (Zoom)
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x40\x00\x00\x41' >/dev/ttyAMA1
|
||||
sleep 1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./near (Focus)
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x01\x00\x00\x00\x02' >/dev/ttyAMA1
|
||||
sleep 0.1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./far (Focus)
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x80\x00\x00\x81' >/dev/ttyAMA1
|
||||
sleep 0.1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./scanh
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
sleep 0.5
|
||||
printf '\xFF\x01\x00\x04\x08\x00\x0d' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./scanv
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
sleep 0.5
|
||||
printf '\xFF\x01\x00\x08\x08\x00\x11' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
### Script ./stop
|
||||
The following script stops every action including horizontal and vertical scan). It is a workaround, because the normal pelco-d "stop" command did not always work. It turned out that "up", "down", "left", "right" always stops the scan commands, so short left+right commands are included in this script:
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
stty -F /dev/ttyAMA1 2400
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x02\x20\x00\x23' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x04\x20\x00\x25' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x04\x20\x00\x25' >/dev/ttyAMA1
|
||||
printf '\xFF\x01\x00\x00\x00\x00\x01' >/dev/ttyAMA1
|
||||
```
|
||||
|
||||
|
||||
## Possible further improvements:
|
||||
|
||||
- The camera seems to have a PoE board, but it does not seem to work. Maybe there are two versions (one with 12V and one with PoE) that mainly differ from each other by the cable. So maybe the camera can be modified to use the PoE board.
|
||||
|
||||
- There is a SDCard slot (although only accessible when opening the case). It does not work at the moment. Although there had been an update of the stock firmware addressing explicitly the SDCard functionality, it is not sure whether it ever worked with stock firmware.
|
||||
|
||||
- The camera has got a Wifi module. Probably this could be activated via OpenIPC.
|
||||
|
||||
- The camera has got a zoom and focus board. Documentation for this board exists in Chinese (can be translated via google translate). There seems to be a "factory calibration" procedure to assign "standard" focus settings for the zoom levels.
|
|
@ -0,0 +1,70 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Foscam X5 / Acculenz R5 / Assark X3E
|
||||
---
|
||||
|
||||
#### Preparation
|
||||
Format an sdcard to FAT32 and copy the content of the following archive to the card:
|
||||
- [foscam-openipc.zip][1]
|
||||
|
||||
Update your wireless credentials on autostart.sh:
|
||||
```diff
|
||||
#!/bin/sh
|
||||
+WLAN_SSID="Router"
|
||||
+WLAN_PASS="12345678"
|
||||
```
|
||||
|
||||
#### Flashing
|
||||
- Make sure the camera is powered off, put the prepared sdcard into the device.
|
||||
- Power the device on and wait at least 4 minutes.
|
||||
- Shortly after an OpenIPC camera should appear on your wlan.
|
||||
|
||||
---
|
||||
|
||||
### GPIO
|
||||
IRLed | IRCut | Speaker | Reset | IRSensor
|
||||
-|-|-|-|-
|
||||
GPIO0 | GPIO3 | GPIO14 | GPIO66 | GPIO80
|
||||
|
||||
```
|
||||
cli -s .nightMode.irSensorPin 80
|
||||
cli -s .nightMode.irCutPin1 3
|
||||
cli -s .nightMode.irCutSingleInvert true
|
||||
cli -s .nightMode.backlightPin 0
|
||||
cli -s .audio.speakerPin 14
|
||||
cli -s .audio.speakerPinInvert true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Wireless
|
||||
```
|
||||
fw_setenv wlandev rtl8188fu-ssc337de-foscam
|
||||
fw_setenv wlanssid Router
|
||||
fw_setenv wlanpass 12345678
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Camera disassembly
|
||||
<details>
|
||||
<summary>Expand pictures</summary>
|
||||
<img src="../images/device-foscam-01.webp" width=50% height=50%>
|
||||
<img src="../images/device-foscam-02.webp" width=50% height=50%>
|
||||
<img src="../images/device-foscam-03.webp" width=50% height=50%>
|
||||
<img src="../images/device-foscam-04.webp" width=50% height=50%>
|
||||
<img src="../images/device-foscam-05.webp" width=50% height=50%>
|
||||
<img src="../images/device-foscam-06.webp" width=50% height=50%>
|
||||
<img src="../images/device-foscam-07.webp" width=50% height=50%>
|
||||
<img src="../images/device-foscam-08.webp" width=80% height=80%>
|
||||
<img src="../images/device-foscam-09.webp" width=80% height=80%>
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
### Other
|
||||
- Labels: X3/R3/R5/X3E
|
||||
- https://fccid.io/ZDER3
|
||||
|
||||
[1]: https://github.com/openipc/wiki/files/13301107/foscam-openipc.zip
|
|
@ -0,0 +1,396 @@
|
|||
# XiongMai IPG-53H20AF
|
||||
|
||||
2.0M Autofocal Module
|
||||

|
||||
|
||||
## Hardware
|
||||
|
||||
| System | Description |
|
||||
|--------|--------------------------------------|
|
||||
| SoC | HI3516CV100 |
|
||||
| Sensor | IMX322 |
|
||||
| Flash | 16Mb (MX25L12835F) |
|
||||
|
||||
### Network
|
||||
Ethernet working only with these parameters
|
||||
```
|
||||
setenv phyaddru 1
|
||||
setenv phyaddrd 2
|
||||
setenv mdio_intf rmii
|
||||
saveenv
|
||||
```
|
||||
|
||||
### GPIOs
|
||||
|
||||
WARNING!!! Motor gpio pin states incorrect after boot, motor windings may burn out, init with [these](#motor-test) asap, or unplug motors connector before powering up.
|
||||
|
||||
| Nr | Description | Color |
|
||||
|-----------|---------------|---------|
|
||||
| 38 | irCut_1 | |
|
||||
| 39 | irCut_2 | |
|
||||
| 9 | Zoom motor A1 | Green |
|
||||
| 48 | Zoom motor A2 | Orange |
|
||||
| 51 | Zoom motor B1 | Yellow |
|
||||
| 43 | Zoom motor B2 | Violet |
|
||||
| 52 | Foc motor A1 | Black |
|
||||
| 55 | Foc motor A2 | Blue |
|
||||
| 53 | Foc motor B1 | White |
|
||||
| 54 | Foc motor B2 | Red |
|
||||
|
||||
### Motor test
|
||||
|
||||
Very slow movement due sysfs gpio manipulation
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
# motor test for ipg-53h20af
|
||||
|
||||
gpio_WT_Am=9
|
||||
gpio_WT_Ap=48
|
||||
gpio_WT_Bm=51
|
||||
gpio_WT_Bp=43
|
||||
|
||||
gpio_FN_Am=52
|
||||
gpio_FN_Ap=55
|
||||
gpio_FN_Bm=53
|
||||
gpio_FN_Bp=54
|
||||
|
||||
|
||||
sleep_time=100
|
||||
|
||||
mux() {
|
||||
ipctool gpio mux $gpio_WT_Am
|
||||
ipctool gpio mux $gpio_WT_Ap
|
||||
ipctool gpio mux $gpio_WT_Bm
|
||||
ipctool gpio mux $gpio_WT_Bp
|
||||
ipctool gpio mux $gpio_FN_Am
|
||||
ipctool gpio mux $gpio_FN_Ap
|
||||
ipctool gpio mux $gpio_FN_Bp
|
||||
ipctool gpio mux $gpio_FN_Bm
|
||||
}
|
||||
|
||||
unexport() {
|
||||
echo "$gpio_WT_Am" >/sys/class/gpio/unexport
|
||||
echo "$gpio_WT_Ap" >/sys/class/gpio/unexport
|
||||
echo "$gpio_WT_Bm" >/sys/class/gpio/unexport
|
||||
echo "$gpio_WT_Bp" >/sys/class/gpio/unexport
|
||||
echo "$gpio_FN_Am" >/sys/class/gpio/unexport
|
||||
echo "$gpio_FN_Ap" >/sys/class/gpio/unexport
|
||||
echo "$gpio_FN_Bp" >/sys/class/gpio/unexport
|
||||
echo "$gpio_FN_Bm" >/sys/class/gpio/unexport
|
||||
}
|
||||
|
||||
export_() {
|
||||
echo "$gpio_WT_Am" >/sys/class/gpio/export
|
||||
echo "$gpio_WT_Ap" >/sys/class/gpio/export
|
||||
echo "$gpio_WT_Bm" >/sys/class/gpio/export
|
||||
echo "$gpio_WT_Bp" >/sys/class/gpio/export
|
||||
echo "$gpio_FN_Am" >/sys/class/gpio/export
|
||||
echo "$gpio_FN_Ap" >/sys/class/gpio/export
|
||||
echo "$gpio_FN_Bp" >/sys/class/gpio/export
|
||||
echo "$gpio_FN_Bm" >/sys/class/gpio/export
|
||||
}
|
||||
|
||||
dir() {
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_WT_Am/direction
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_WT_Ap/direction
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_WT_Bm/direction
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_WT_Bp/direction
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_FN_Am/direction
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_FN_Ap/direction
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_FN_Bp/direction
|
||||
echo "out" >/sys/class/gpio/gpio$gpio_FN_Bm/direction
|
||||
}
|
||||
|
||||
init() {
|
||||
mux
|
||||
unexport
|
||||
export_
|
||||
dir
|
||||
}
|
||||
|
||||
set_zero_FN() {
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
}
|
||||
set_zero_WT() {
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
}
|
||||
set_zero() {
|
||||
set_zero_FN
|
||||
set_zero_WT
|
||||
}
|
||||
|
||||
far() {
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
}
|
||||
|
||||
near() {
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
}
|
||||
|
||||
tele() {
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
}
|
||||
|
||||
wide() {
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Am/value
|
||||
# echo "1" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
# echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "usage : ./motor <direction> [step]"
|
||||
echo " -i init gpio"
|
||||
echo " -f far"
|
||||
echo " -n near"
|
||||
echo " -w wide"
|
||||
echo " -t tele"
|
||||
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "-i" ]; then
|
||||
init
|
||||
set_zero
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "-f" ]; then
|
||||
direction="far"
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
elif [ $1 = "-w" ]; then
|
||||
direction="wide"
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
elif [ $1 = "-n" ]; then
|
||||
direction="near"
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_FN_Ap/value
|
||||
elif [ $1 = "-t" ]; then
|
||||
direction="tele"
|
||||
echo "1" >/sys/class/gpio/gpio$gpio_WT_Ap/value
|
||||
fi
|
||||
|
||||
if [ $# -eq 2 ]; then
|
||||
max=$2
|
||||
else
|
||||
max=10
|
||||
fi
|
||||
|
||||
echo $max
|
||||
|
||||
i=0
|
||||
while [ $i -lt $max ]
|
||||
do
|
||||
$direction >/dev/null
|
||||
true $(( i++ ))
|
||||
done
|
||||
|
||||
|
||||
# turn to full step and disable motor
|
||||
if [ $1 = "-f" ]; then
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bm/value
|
||||
usleep $sleep_time
|
||||
set_zero_FN
|
||||
elif [ $1 = "-w" ]; then
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bp/value
|
||||
usleep $sleep_time
|
||||
set_zero_WT
|
||||
elif [ $1 = "-n" ]; then
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_FN_Bp/value
|
||||
usleep $sleep_time
|
||||
set_zero_FN
|
||||
elif [ $1 = "-t" ]; then
|
||||
echo "0" >/sys/class/gpio/gpio$gpio_WT_Bm/value
|
||||
usleep $sleep_time
|
||||
set_zero_WT
|
||||
fi
|
||||
```
|
|
@ -0,0 +1,46 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
For LifeSmart cameras: LS179
|
||||
|
||||
## BOM
|
||||
|
||||
SoC: HI3518EV200
|
||||
Flash: ENQH127A (16MB NOR)
|
||||
Sensor: soif23 (???)
|
||||
|
||||
## Installation
|
||||
|
||||
Follow the [instructions](help-uboot.md#bypassing-password-protected-bootloader) to get access to U-boot.
|
||||
|
||||
Back up the flash and install OpenIPC according to the [instructions](https://openipc.org/cameras/vendors/hisilicon/socs/hi3518ev200).
|
||||
|
||||
Select a 16MB NOR flash, and use the Ultimate firmware if you want to use WiFi.
|
||||
|
||||
## WiFi
|
||||
|
||||
In order to connect to WiFi, you need to configure the [wireless device](wireless-settings.md#initial-configuration) with `rtl8188fu-hi3518ev200-lifesmart`
|
||||
|
||||
```
|
||||
fw_setenv wlandev rtl8188fu-hi3518ev200-lifesmart
|
||||
# also configure your WiFi
|
||||
fw_setenv wlanssid "MySSID"
|
||||
fw_setenv wlanpass "password"
|
||||
# and then...
|
||||
reboot
|
||||
```
|
||||
|
||||
This will power up the USB WiFi module (GPO #54), and load the appropriate Kernel driver (`8188fu`).
|
||||
|
||||
## LEDs
|
||||
|
||||
The LEDs are controlled by the GPO #2.
|
||||
|
||||
```bash
|
||||
# turn on
|
||||
gpio set 2
|
||||
|
||||
# turn off
|
||||
gpio clear 2
|
||||
```
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
# LSC Smart Connect Video Doorbell (2021 edition)
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
The hardware and software setup is very identical to: [chacron ipcam](device-chacon-ipcam-ri01.md)
|
||||
|
||||
## Hardware
|
||||
|
||||
| System | Description |
|
||||
|--------|--------------------------------------|
|
||||
| SoC | HI3518EV300 |
|
||||
| Sensor | JXF23 |
|
||||
| Flash | 8Mb (XM25QH64A) |
|
||||
| WiFi | RTL8188FU |
|
||||
|
||||
### OpenIPC status
|
||||
|
||||
| Component | Status |
|
||||
|---------------|----------------------------------------------------------|
|
||||
| WiFi | [Working] |
|
||||
| Red/Blue LEDs | [Working](#leds) |
|
||||
| IR LED | Working |
|
||||
| IR Cut | Working |
|
||||
|
||||
|
||||
### Serial connection
|
||||
|
||||

|
||||
|
||||
### Wifi
|
||||
* RTL8188FU
|
||||
|
||||
### Nor flash
|
||||
[XM25QH64A](https://datasheet.lcsc.com/lcsc/XMC-XM25QH64AHIG_C328461.pdf)
|
||||
- 8MB NOR Flash
|
||||
|
||||
### GPIOs
|
||||
|
||||
| nr | Description |
|
||||
|-----------|---------------|
|
||||
| 0x0f (15) | irCut_1 |
|
||||
| 0x0c (12) | irCut_2 |
|
||||
| 0x28 (40) | IR LED |
|
||||
| 0x33 (51) | Red LED |
|
||||
| 0x32 (50) | Blue LED |
|
||||
| 0x0d (13) | wlan power |
|
||||
| 0x3B (59) | Doorbell btn |
|
||||
|
||||
### [ipctool](https://github.com/OpenIPC/ipctool) output (8Mb flash):
|
||||
|
||||
```
|
||||
---
|
||||
chip:
|
||||
vendor: HiSilicon
|
||||
model: 3518EV300
|
||||
id: 022c40875e0038e9a770030ad8188d942567d818418e29e3
|
||||
board:
|
||||
vendor: OpenIPC
|
||||
version: 2.3.12.28
|
||||
possible-IR-cut-GPIO: 12,15
|
||||
ethernet:
|
||||
mac: ""
|
||||
u-mdio-phyaddr: 1
|
||||
phy-id: 0x00000000
|
||||
d-mdio-phyaddr: 0
|
||||
rom:
|
||||
- type: nor
|
||||
block: 64K
|
||||
partitions:
|
||||
- name: boot
|
||||
size: 0x40000
|
||||
sha1: e959aa47
|
||||
- name: env
|
||||
size: 0x10000
|
||||
sha1: 0d98dab2
|
||||
contains:
|
||||
- name: uboot-env
|
||||
offset: 0x0
|
||||
- name: kernel
|
||||
size: 0x200000
|
||||
sha1: 4fbf4879
|
||||
- name: rootfs
|
||||
size: 0x500000
|
||||
sha1: d90b9fb5
|
||||
- name: rootfs_data
|
||||
size: 0xb0000
|
||||
path: /overlay,jffs2,rw
|
||||
size: 8M
|
||||
addr-mode: 3-byte
|
||||
ram:
|
||||
total: 64M
|
||||
media: 32M
|
||||
firmware:
|
||||
kernel: "4.9.37 (Thu Dec 28 11:19:02 UTC 2023)"
|
||||
toolchain: buildroot-gcc-12.3.0
|
||||
sdk: "Hi3516EV200_MPP_V1.0.1.2 B030 Release (Oct 18 2019, 18:21:00)"
|
||||
sensors:
|
||||
- vendor: GalaxyCore
|
||||
model: GC2053
|
||||
control:
|
||||
bus: 0
|
||||
type: i2c
|
||||
addr: 0x6e
|
||||
data:
|
||||
type: MIPI
|
||||
input-data-type: DATA_TYPE_RAW_10BIT
|
||||
lane-id:
|
||||
- 0
|
||||
- 1
|
||||
image: 1920x1080
|
||||
clock: 27MHz
|
||||
```
|
||||
|
||||
## Flashing OpenIPC
|
||||
|
||||
Flashed using a CH341A programmer
|
||||
|
||||
### LEDs
|
||||
|
||||
The camera has a dual color LED (red/blue) connected to GPIO's 50 and 51.
|
||||
To control those LEDs you can use the /sys api:
|
||||
```
|
||||
# make the GPIOs accessible
|
||||
echo 50 > /sys/class/gpio/export
|
||||
# and set direction (only need to do once)
|
||||
echo out > /sys/class/gpio50/direction
|
||||
echo out > /sys/class/gpio51/direction
|
||||
|
||||
# turn on blue LED
|
||||
echo 1 > /sys/class/gpio50/value
|
||||
# turn off blue LED
|
||||
echo 0 > /sys/class/gpio50/value
|
||||
|
||||
# turn on red LED
|
||||
echo 1 > /sys/class/gpio51/value
|
||||
# turn off red LED
|
||||
echo 0 > /sys/class/gpio51/value
|
||||
```
|
||||
|
||||
### Homeassistant support
|
||||
|
||||
A custom MQTT Client has been written to handle the doorbell event and send it to Home assistant using MQTT.
|
||||
Project can be found here: [lscdoorbellmqtt](https://github.com/berobloom/lscdoorbellmqtt)
|
||||
|
||||
## Sources:
|
||||
|
||||
* https://github.com/OpenIPC/wiki/blob/master/en/device-chacon-ipcam-ri01.md
|
||||
* https://github.com/berobloom/lscdoorbellmqtt
|
|
@ -0,0 +1,76 @@
|
|||
MS-J10 MS-J10B
|
||||

|
||||
|
||||
## Hardware
|
||||
|
||||
|
||||
| Name | pins |Description| GPIO | Usage |
|
||||
| --- | --- | --- |---|---|
|
||||
|**c1** |1| ICR|
|
||||
||2|ICR |
|
||||
||
|
||||
|**c2** |1| CDS IN|
|
||||
||2|GND |
|
||||
||3|12V out |
|
||||
||4|GND |
|
||||
||5|IR LED out | pwm1 |echo 20000 > /sys/class/pwm/pwmchip0/pwm1/period123
|
||||
|||||echo 30 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
|
||||
|||||echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable
|
||||
||6|White LED out | pwm0 | echo 30 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
|
||||
||
|
||||
|**j3** |1| GND|
|
||||
||2|D+ |
|
||||
||3|D- |
|
||||
||4|VCC | gpio46 | need 2 transistors for 3.3V
|
||||
||
|
||||
|**c4** |1| 12V IN|
|
||||
||2|GND |
|
||||
||3|RJ 6 |
|
||||
||4|RJ 3 |
|
||||
||5|RJ 2
|
||||
||6|RJ 1
|
||||
||7|link led
|
||||
||8|link led|
|
||||
||
|
||||
|**c5** |1| reset|
|
||||
||2|GND |
|
||||
||3|uart TX | ttyS2 | 9600; echo 234 > /dev/ttyS2
|
||||
||4|uart RX |ttyS2 | 9600; cat /dev/ttyS2
|
||||
||5|uart TX | ttyS1 | 9600; echo 234 > /dev/ttyS1
|
||||
||6|uart RX| ttyS1 | 9600; cat /dev/ttyS1
|
||||
||7|mute audio | gpio80 |echo 1 > /sys/class/gpio/gpio80/value
|
||||
||
|
||||
|**c6** |1| Audio out|
|
||||
||2|Audio In |
|
||||
||3|GND |
|
||||
||
|
||||
|**c7** |1| 3.3V|
|
||||
||2| 3.3V |
|
||||
||3|3.3V |
|
||||
||4|
|
||||
||5
|
||||
||6
|
||||
||7
|
||||
||8
|
||||
||9|GND
|
||||
||10
|
||||
||11|GND
|
||||
||12
|
||||
||13
|
||||
||14
|
||||
||15|AlarmIn | gpio44 | cat /sys/class/gpio/gpio44/value
|
||||
||16|AlarmOut | gpio45
|
||||
||
|
||||
|**j8** |1|uart TX|ttyS0
|
||||
||2|uart RX |ttyS0
|
||||
||
|
||||
|
||||
## Additional
|
||||
|desc|use|
|
||||
|---|---|
|
||||
cpu temp| cat /sys/class/mstar/msys/TEMP_R|
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,252 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Smartwares CIP-37210
|
||||
--------------------
|
||||
|
||||
### Device info
|
||||
|
||||
| System | Description |
|
||||
|--------|--------------------------------------|
|
||||
| SoC | HI3518EV200 |
|
||||
| Sensor | OmniVision OV9732 |
|
||||
| Flash | 16Mb (Winbond 25Q128JVSQ) |
|
||||
| WiFi | RTL8188FU |
|
||||
|
||||
### Step-by-step flashing guide
|
||||
|
||||
Beside the camera you'll need the following tools:
|
||||
- PH0 screwdriver or bit
|
||||
- Small blade screwdriver, e.g. 0.6 × 3.5 mm
|
||||
- A USB to TTL adapter for UART communication. (I used a CP2102 based device, but there are [many other good options](https://github.com/OpenIPC/wiki/blob/master/en/equipment-flashing.md))
|
||||
- A microSD card (I used an old 2 GB one)
|
||||
- Some jumper wires
|
||||
- A multimeter
|
||||
- A computer running GNU/Linux
|
||||
|
||||
The preferred method to flash an OpenIPC camera is via tftp, but the CIP-37210 does not have an ethernet port. Another problem is that the stock u-boot is password protected and fatload (reading access to a FAT filesystem) does not work.
|
||||
|
||||
Because of that we will need to combine two methods deviating from the standard procedure to flash the Smartwares CIP-37210: [The burn utility](https://github.com/OpenIPC/burn) to directly boot into a u-boot bootloader compiled by the OpenIPC project to be able to flash from a microSD card and of course the [flashing from a microSD card](https://paulphilippov.com/articles/flashing-ip-camera-with-full-openipc-binary-firmware-from-sd-card).
|
||||
|
||||
#### Opening the device
|
||||
|
||||
Unscrew the visbile phillips screw on the back of the camera's stand with the PH0 screwdriver.
|
||||

|
||||
|
||||
Use the blade screwdriver to pry open the camera's case, where the stand was attached:
|
||||

|
||||
|
||||
#### Establishing the UART connection
|
||||
|
||||
After opening the device, it's time to establish the UART connection. Power on the open camera with the included micro USB power supply. Now it's time to check the suspicious 4 pin holes on top of the pcb: Measure the voltage of the pin holes with your multimeter, by connecting them to GND (I used one of the pads around the screws in the middle).
|
||||
|
||||
I found two pin holes with 3.3 V, one pin hole with slightly less than 3.3 V and one pin hole with 0 V. Now it's time to watch the 3.3 V pins during boot – the one with oscillating voltage is the TX pin and the stable 3.3 V pin is the Vcc.
|
||||
|
||||
**In summary:** The pin hole closest to the black screw is RX, the one next to it is TX, the one next to it is GND. Connect GND to GND, TX to RX and RX to TX.
|
||||
|
||||

|
||||
|
||||
I used simple male-to-female DuPont jumper wires to connect to the pin holes. There are of course better solutions like soldering a connector onto the pin holes or using test hooks, but as long the jumper wires don't touch, it will work fine.
|
||||
|
||||

|
||||
|
||||
#### Saving the stock firmware
|
||||
|
||||
Before flashing OpenIPC it might be clever to save the stock firmware, in case you don't like OpenIPC and want to roll back or brick something. Since tftp is not possible we will save the contents of the flash to a microSD card. Since the device runs Linux you don't need to worry about formatting the microSD card now. Boot the camera while connected to your USB to TTL adapter and start screen:
|
||||
|
||||
```sh
|
||||
sudo screen -L /dev/ttyUSB0 115200
|
||||
```
|
||||
|
||||
Now it's time to login as root with the password `I81ou812` I found [on the internet](https://gist.github.com/gabonator/74cdd6ab4f733ff047356198c781f27d). The microSD card got mounted automatically to the mount point `/mnt/sd/`, so lets make a new directory on the sd card and dump the contents of the flash:
|
||||
|
||||
```sh
|
||||
mkdir /mnt/sd/image
|
||||
for mtd in $(ls /dev/mtdblock*); do dd if=${mtd} of=/mnt/sd/image/${mtd##/*/}.bin; done
|
||||
```
|
||||
You may want to repeat this step with another folder and compare the md5 checksums of the binary files to assure that the dump was successful. Exit screen with `C-a` followed by `d`, insert the microSD card back into your computer and backup the binaries.
|
||||
|
||||
#### Flashing OpenIPC
|
||||
|
||||
Time to format the microSD card, so u-boot will be able to fatload the image. Those steps may vary depending on your Linux distribution. [There is already a script which works on Debian Sid](https://gist.github.com/themactep/d0b72f4c5d5f246e2551622e95bc9987), but sadly not on my machine. (Different fdisk version and different naming of the device and partitions). Those are the commands I ran:
|
||||
|
||||
```sh
|
||||
# create the partition table
|
||||
sudo parted /dev/mmcblk0 mklabel msdos
|
||||
# create first partition
|
||||
sudo parted /dev/mmcblk0 mkpart primary fat32 1MB 64MB
|
||||
sudo mkfs.vfat -F32 /dev/mmcblk0p1
|
||||
# create second partition
|
||||
sudo parted /dev/mmcblk0 mkpart primary fat32 64MB 128MB
|
||||
sudo mkfs.vfat -F32 /dev/mmcblk0p2
|
||||
```
|
||||
|
||||
Now it's time to mount the first partition and [download the correct firmware](https://openipc.org/cameras/vendors/hisilicon/socs/hi3518ev200/download_full_image?flash_size=16&flash_type=nor&fw_release=ultimate) and copy it on the mounted partition. Umount the partition and insert the microSD card into the camera.
|
||||
|
||||
Next, the burn utility needs to be set up:
|
||||
```sh
|
||||
git clone https://github.com/OpenIPC/burn
|
||||
cd burn
|
||||
sudo pip install -r requirements.txt
|
||||
```
|
||||
Now we need to download the correct uboot-binary
|
||||
```sh
|
||||
wget -P ./u-boot/ https://github.com/OpenIPC/firmware/releases/download/latest/u-boot-hi3518ev200-universal.bin
|
||||
```
|
||||
|
||||
Make sure, that no process is blocking your USB to TTL adapter:
|
||||
```sh
|
||||
sudo lsof /dev/ttyUSB0
|
||||
```
|
||||
Kill the process if necessary:
|
||||
```sh
|
||||
sudo kill 230002
|
||||
```
|
||||
Power off the camera and also disconnect and reconnect your USB to TTL adapter. Now enter the following command and power on the camera:
|
||||
```sh
|
||||
./burn --chip hi3518ev200 --file=./u-boot/u-boot-hi3518ev200-universal.bin --break && screen -L /dev/ttyUSB0 115200
|
||||
```
|
||||
Hit any key to stop autoboot and you are greeted by the OpenIPC u-boot shell!
|
||||
```sh
|
||||
OpenIPC #
|
||||
```
|
||||
First we need to check, if our microSD card is ready to use:
|
||||
```sh
|
||||
fatls mmc 0
|
||||
```
|
||||
The following output is expected:
|
||||
```text
|
||||
16777216 openipc-hi3518ev200-ultimate-16mb.bin
|
||||
|
||||
1 file(s), 0 dir(s)
|
||||
```
|
||||
Nice! Now it's time to load the binary into the memory. The variables are environment variables the OpenIPC u-boot knows to resolve, so you just need to copy and paste:
|
||||
```sh
|
||||
mw.b ${baseaddr} 0xff 0x1000000; fatload mmc 0:1 ${baseaddr} openipc-${soc}-ultimate-16mb.bin
|
||||
```
|
||||
This should result in the following output:
|
||||
```text
|
||||
reading openipc-hi3518ev200-ultimate-16mb.bin
|
||||
|
||||
16777216 bytes read
|
||||
```
|
||||
Now it's time to write and keep your fingers crossed:
|
||||
```sh
|
||||
sf probe 0; sf erase 0x0 0x1000000; sf write ${baseaddr} 0x0 ${filesize}
|
||||
```
|
||||
The expected output looks like this:
|
||||
```text
|
||||
16384 KiB hi_fmc at 0:0 is now current device
|
||||
Erasing at 0x1000000 -- 100% complete.
|
||||
Writing at 0x1000000 -- 100% complete.
|
||||
```
|
||||
|
||||
It anything goes wrong here, don't power off the device and ask the mentioned [Telegram group](https://t.me/openipc) for help! Otherwise enter `reset` and get into the freshly flashed u-boot by hitting any key to stop autoboot. Run the following command and you are done:
|
||||
```sh
|
||||
run setnor16m
|
||||
```
|
||||
Now remove the SD cards and reboot, by entering `reset` again and you'll be greeted like this:
|
||||
```text
|
||||
Welcome to OpenIPC
|
||||
openipc-hi3518ev200 login: root
|
||||
|
||||
/###### /###### /####### /######
|
||||
/##__ ## |_ ##_/ | ##__ ## /##__ ##
|
||||
| ## \ ## /###### /###### /####### | ## | ## \ ## | ## \__/
|
||||
| ## | ## /##__ ## /##__ ## | ##__ ## | ## | #######/ | ##
|
||||
| ## | ## | ## \ ## | ######## | ## \ ## | ## | ##____/ | ##
|
||||
| ## | ## | ## | ## | ##_____/ | ## | ## | ## | ## | ## ##
|
||||
| ######/ | #######/ | ####### | ## | ## /###### | ## | ######/
|
||||
\______/ | ##____/ \_______/ |__/ |__/ |______/ |__/ \______/
|
||||
| ##
|
||||
| ## build
|
||||
|__/ master+01a1348a, 2023-03-05
|
||||
|
||||
Please help the OpenIPC Project to cover the cost of development and
|
||||
long-term maintenance of what we believe is going to become a stable,
|
||||
flexible Open IP Network Camera Framework for users worldwide.
|
||||
|
||||
Your contributions could help us to advance the development and keep
|
||||
you updated on improvements and new features more regularly.
|
||||
|
||||
Please visit https://openipc.org/sponsor/ to learn more. Thank you.
|
||||
```
|
||||
|
||||
The root password is `12345`. Don't forget to change it with `passwd` after the first login!
|
||||
|
||||
If you are struggling with this tutorial and still want to try OpenIPC on a Smartwares CIP-37210, you can [buy it with OpenIPC v2.2 firmware pre-installed at open collective](https://opencollective.com/openipc/contribute/wifi-camera-showme-by-openipc-44355).
|
||||
|
||||
## Connecting to wifi
|
||||
Now it's time to connect the camera to your 2.4 GHz Wi-Fi network. First of all, make sure that the firmware environment variables are set correctly.
|
||||
|
||||
First set the network driver:
|
||||
|
||||
```sh
|
||||
fw_setenv wlandev rtl8188fu-generic
|
||||
```
|
||||
|
||||
Then the correct values according to your needs, for example:
|
||||
```sh
|
||||
fw_setenv wlanssid guest
|
||||
fw_setenv wlanpass guest-password
|
||||
```
|
||||
|
||||
You can check the settings as folows:
|
||||
```sh
|
||||
fw_printenv wlandev
|
||||
fw_printenv wlanssid
|
||||
fw_printenv wlanpass
|
||||
```
|
||||
|
||||
The last step is to configure the wlan0 interface:
|
||||
```sh
|
||||
cat <<EOF > /etc/network/interfaces.d/wlan0
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 3 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio3/direction
|
||||
pre-up echo 1 > /sys/class/gpio/gpio3/value # GPIO3 is the WIFI power
|
||||
pre-up modprobe mac80211
|
||||
pre-up sleep 1
|
||||
pre-up modprobe 8188fu
|
||||
pre-up sleep 1
|
||||
pre-up wpa_passphrase "\$(fw_printenv -n wlanssid)" "\$(fw_printenv -n wlanpass)" > /tmp/wpa_supplicant.conf
|
||||
pre-up sed -i 's/#psk.*/scan_ssid=1/g' /tmp/wpa_supplicant.conf
|
||||
pre-up ifconfig wlan0 up
|
||||
pre-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 0 > /sys/class/gpio/gpio3/value
|
||||
post-down echo 3 > /sys/class/gpio/unexport
|
||||
EOF
|
||||
```
|
||||
|
||||
Now it's time to check whether it's working:
|
||||
```sh
|
||||
ifup wlan0
|
||||
ip addr
|
||||
```
|
||||
Check whether you can ping and ssh into the camera. Reboot and check, if the camera connects automatically to your wifi network. Reassamble the camera, now it's time so say goodbye to UART and use ssh and the web interface. (The credentials are root and the password you set earlier.)
|
||||
|
||||
Finally, you should look at `/etc/majestic.yaml` and in particular set this sections as follows in order to have a correct GPIO mapping for nighmode and audio.
|
||||
|
||||
```yaml
|
||||
audio:
|
||||
enabled: true
|
||||
volume: 70
|
||||
srate: 8000
|
||||
codec: alaw
|
||||
outputEnabled: true
|
||||
outputVolume: 30
|
||||
speakerPin: 51
|
||||
speakerPinInvert: true
|
||||
nightMode:
|
||||
enabled: true
|
||||
irSensorPin: 62
|
||||
irSensorPinInvert: true
|
||||
irCutPin1: 64
|
||||
backlightPin: 63
|
||||
dncDelay: 30
|
||||
nightAPI: true
|
||||
irCutSingleInvert: false
|
||||
```
|
|
@ -0,0 +1,25 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
TP-Link Tapo C110
|
||||
---
|
||||
|
||||
### GPIO
|
||||
IRLed | WhiteLed | RedLed | GreenLed | Speaker | Reset | IRCut
|
||||
-|-|-|-|-|-|-
|
||||
GPIO14 | GPIO15 | GPIO46 | GPIO47 | GPIO61 | GPIO66 | GPIO78
|
||||
|
||||
```
|
||||
cli -s .nightMode.irCutPin1 78
|
||||
cli -s .nightMode.backlightPin 14
|
||||
cli -s .audio.speakerPin 61
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Wireless
|
||||
```
|
||||
fw_setenv wlandev ssw101b-ssc333-tapo-c110
|
||||
fw_setenv wlanssid Router
|
||||
fw_setenv wlanpass 12345678
|
||||
```
|
|
@ -0,0 +1,72 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Wyze integration
|
||||
----------------
|
||||
This is where we'll be writing down our guide to flashing new devices and reports on our experiments. The tables below also include some "clones" manufactured by Hualai, the ODM vendor for Wyze for reference.
|
||||
|
||||
### Known camera revisions:
|
||||
|
||||
| MODEL | IC 25466- | FCC ID | PCB VER | SoC | WIFI | MAC PREFIX | SUPPORTED | NOTES |
|
||||
|-----------|-----------|----------------|-----------------------------------|----------|-----------------------|------------|-----------|-----------------------------------------------------------|
|
||||
| WYZEC2 | | 2ANJHWYZEC2 | 2019-06-38 | T20X BGA | SDIO: Realtek 8189FTV | 2C:AA:8E | YES | https://gist.github.com/csev1755/e60abe15d8708e0d2b0a592e808b2022 |
|
||||
| WYZECP1 | | 2ANJHHWYZECP1 | DF3-IFPM01 V1.4 | T20X BGA | SDIO: Realtek 8189ES | 2C:AA:8E | YES | |
|
||||
| WYZEC3 | WYZEC3 | 2AUIUWYZEC3 | WYZEV3_T31GC2053 V1.4_20201010 | T31ZX | SDIO: Realtek 8189FTV | 7C:78:B2 | YES | https://t.me/openipc/49957 https://youtu.be/t7Nzo-KXTH0 |
|
||||
| WYZEC3 | WYZEC3A | 2AUIUWYZEC3A | WYZEV3_T31GC2053 V1.2_20200715 | T31X | SDIO: Realtek 8189FTV | 7C:78:B2 | YES | https://youtu.be/jm4wze_HY78 |
|
||||
| WYZEC3 | WYZEC3A | 2AUIUWYZEC3A | WYZEV3_T31GC2053 V2.02_20210523 | T31ZX | SDIO: AltoBeam 6031 | D0:3F:27 | YES | https://t.me/openipc/49049 https://t.me/openipc/49050 |
|
||||
| WYZEC3 | WYZEC3A | 2AUIUWYZEC3A | WYZEV3_T31GC2053 V2.03_20211206 | T31X | SDIO: AltoBeam 6031 | D0:3F:27 | YES | https://t.me/openipc/45444 https://t.me/openipc/48942 |
|
||||
| WYZEC3 | WYZEC3B | 2AUIUWYZEC3B | WYZEV3_T31GC2053 V2.02_20210523 | T31ZX | SDIO: Realtek 8189FTV | D0:3F:27 | YES | https://t.me/openipc/38728 https://t.me/openipc/38753 |
|
||||
| WYZEC3 | WYZEC3B | 2AUIUWYZEC3B | WYZEV3_T31GC2053 V2.03_20211206 | T31X | SDIO: Realtek 8189FTV | D0:3F:27 | YES | https://t.me/openipc/76036 |
|
||||
| WYZEC3 | WYZEC3F | 2AUIUWYZEC3F | WYZEV3_T31AGC2053 V3.2_20210714 | T31A BGA | SDIO: AltoBeam 6031 | D0:3F:27 | YES | https://t.me/openipc/43299 https://t.me/openipc/38755 https://t.me/openipc/38757 |
|
||||
| WYZEC3 | WYZEC3F | 2AUIUWYZEC3F | WYZEV3_T31AGC2053 V3.2_20210714 | T31A BGA | SDIO: AltoBeam 6031 | D0:3F:27 | YES | https://youtu.be/VkqX9yg0odU |
|
||||
| WVDBV1 | WVDB1A | 2AUIUWVDB1A | WYZEDB3_MB_T31_2.2 | T31X | SDIO: Realtek 8189FTV | 7C:78:B2 | YES | |
|
||||
| WYZECP2 | WYZECP2A | 2AUIUWYZECP2 | DF3-MCU-S01-V2.2 | T31X | SDIO: AltoBeam 6031 | 7C:78:B2 | YES | |
|
||||
| WYZECPAN3 | WYZECPAN3 | 2AUIUWYZECPAN3 | WYZE PAN V3 MB V 1.3 | T31X | SDIO: AltoBeam 6031 | D0:3F:27 | NO | NOT SUPPORTED - Secure Boot ENABLED |
|
||||
| WYZEC3P | WYZEC3P | 2AUIUWYZEC3P | WYZEV3PRO_T40GC4653_v2.2_20220228 | T40XP | SDIO: Realtek 8192FS | D0:3F:27 | UNTESTED | UNTESTED |
|
||||
| WVOD2 | WVOD2 | 2AUIUWVOD2 | HL_WCO2 MAIN01 V1.0 | T31ZX | SDIO: BCM43438 | D0:3F:27 | UNTESTED | UNTESTED - Ingenic Zeratul Battery Platform |
|
||||
| ATOMCAM2 | | | V3C_T31GC2063 V1.1_202001110 | T31ZX | SDIO: AltoBeam 6031 | 7C:DD:E9 | YES | AtomCam 2 Japan http://www.atomtech.co.jp |
|
||||
| PERSONALCAM | | | | T31?? | SDIO: AltoBeam 6031 | ??:??:?? | YES | Camera Personal Wifi https://tienda.personal.com.ar |
|
||||
|
||||
|
||||
GPIO:
|
||||
|
||||
| MODEL | IRCUT1 | IRCUT2 | IR LED1 | IR LED2 | WIFI | LED1 | LED2 | SPEAKER | TF_EN | TF_CD | SD_ABLE | SD_PWR |BUTTON1 | BUTTON2 | SUB1G | USB |
|
||||
|-----------|--------|--------|---------|---------|--------|--------|--------|---------|--------|--------|---------|--------|--------|---------|--------|--------|
|
||||
| WYZEC2 | GPIO25 | GPIO26 | GPIO49 | | GPIO62 | GPIO38 | GPIO39 | GPIO63 | GPIO43 | GPIOXX | GPIO48 | | GPIO46 | | | GPIO47 |
|
||||
| WYZECP1 | GPIO26 | GPIO25 | GPIO49 | | GPIO62 | GPIO38 | GPIO39 | GPIO63 | GPIO43 | GPIOXX | GPIO48 | | GPIO46 | | | GPIO47 |
|
||||
| WYZEC3 | GPIO53 | GPIO52 | GPIO47 | GPIO49 | GPIO57 | GPIO38 | GPIO39 | GPIO63 | GPIO50 | GPIO62 | GPIO48 | | GPIO51 | | | |
|
||||
| WYZEDBV1 | GPIO53 | GPIO52 | PWM2 | | GPIO57 | GPIO38 | GPIO39 | GPIO58 | | | GPIO62 | | GPIO06 | GPIO07 | GPIO61 | |
|
||||
| WYZECP2 | GPIO49 | GPIO50 | GPIO60 | | GPIO58 | GPIO38 | GPIO39 | GPIO07 | GPIO47 | GPIO48 | GPIO54 | | GPIO06 | | | |
|
||||
| WYZECPAN3 | | | | | | | | | | | | | | | | |
|
||||
| WYZEC3PRO | GPIO118| GPIO119| GPIO66 | GPIO67 | GPIO57 | GPIO105| GPIO106| GPIO63 | GPIO58 | GPIO70 | GPIO71 | GPIO121| GPIO107| | | |
|
||||
| WVOD2 | | | | | | | | | | | | | | | | |
|
||||
| ATOMCAM2 | GPIO53 | GPIO52 | GPIO26 | | GPIO57 | GPIO38 | GPIO39 | GPIO63 | GPIO50 | GPIO59 | GPIO48 | | GPIO51 | | | GPIO47 |
|
||||
| PERSONALCAM | | | GPIO14 | | GPIO57 | GPIO47 | GPIO48 | GPIO63 | GPIO50 | GPIO59 | GPIO39 | | | | | |
|
||||
|
||||
|
||||
MOTORS:
|
||||
| MODEL | HST1 | HST2 | HST3 | HST4 | VST1 | VST2 | VST3 | VST4 | HMAX | VMAX | MAX SPEED |
|
||||
|-----------|--------|--------|--------|--------|--------|--------|--------|--------|------|-------|-----------|
|
||||
| WYZECP1 | GPIO54 | GPIO53 | GPIO52 | GPIO51 | GPIO75 | GPIO76 | GPIO79 | GPIO80 | 2590 | 720 | 900 |
|
||||
| WYZECP2 | GPIO52 | GPIO53 | GPIO57 | GPIO51 | GPIO59 | GPIO61 | GPIO62 | GPIO63 | 2540 | 720 | 900 |
|
||||
| WYZECPAN3 | | | | | | | | | | | |
|
||||
| PERSONALCAM | GPIO49 | GPIO57 | GPIO54 | GPIO51 | GPIO60 | GPIO61 | GPIO62 | GPIO63 | 2130 | 1600 | 900 |
|
||||
|
||||
---
|
||||
|
||||
## Wyze Cam Pan v3 cameras have hardware lock in secureboot and cannot be upgraded to OpenIPC!
|
||||
|
||||
---
|
||||
|
||||
### OpenIPC installation
|
||||
|
||||
> [!CAUTION]
|
||||
> The link below no longer works, Please replace the link with one that works or is updated.
|
||||
|
||||
[Use these scripts](https://github.com/themactep/device-wyze-v3/blob/master/installation.md) to convert your Wyze Cam V3 to OpenIPC.
|
||||
|
||||
### Current issues
|
||||
|
||||
* ~~Exposure does not work well https://github.com/OpenIPC/majestic/issues/102~~
|
||||
* ~~SD card does not work in the U-Boot (power is available)~~ fixed
|
||||
* ~~Problem with loading u-boot from an microSD card. It doesn't reach the promt. Not only on wyze v3 (https://t.me/openipc_modding/179369), but also on another board T31L (https://t.me/openipc/47739). Most likely it will be IMPOSSIBLE, because in the camera there is a microSD power management MOSFET, which must be turned on BEFORE booting from the card (the experiment with not fully loaded u-boot was possible due to direct power supply to the microSD card, bypassing the transistor). Please confirm my version if it is not possible otherwise.~~ impossible without modification (direct 3.3V power supply to the microSD card reader)
|
|
@ -0,0 +1,49 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Equipment for flashing
|
||||
----------------------
|
||||
|
||||
### A rework station with accessories.
|
||||
|
||||
While some hardened technicians would insist on getting things done
|
||||
with a grandfather's kilowatt soldering iron, we suggest you to buy
|
||||
a modern [soldering station with a hot air](https://www.aliexpress.com/premium/soldering-station-hot-air.html)
|
||||
and temperature control. You don't need to be fancy, an entry level
|
||||
soldering station like YIHUA 882D, or JCD 8898, or YOUYUE 8586 would
|
||||
do, and it won't break the bank with its price tag of $50-70, more
|
||||
or less.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
Throw in a silicone mat, a tube of no-clean flux, a can of solder paste,
|
||||
de-soldering copper wick, ceramic tweezers, nonwoven swabs and a bottle
|
||||
of isopropyl alcohol. Many of these things can be already included as
|
||||
perks with the soldering station.
|
||||
|
||||
### A programmer for flashing memory chips.
|
||||
|
||||
Again, some would say that you need a multi-thousand dollar branded
|
||||
programmer but in real life the [cheapest CH341A USB programmer](https://www.aliexpress.com/w/wholesale-ch341a-programmer.html)
|
||||
works like a charm, especially after you [fix the voltage bug][1].
|
||||
|
||||

|
||||
|
||||
Or you can buy an improved model, version 1.7 and higher, where that
|
||||
problem has already been fixed in design.
|
||||
|
||||

|
||||
|
||||
Add a [SOP8 208mil to DIP8 socket adapter](https://www.aliexpress.com/w/wholesale-SOP8-208mil-to-DIP8-socket-adapter.html).
|
||||
|
||||

|
||||
|
||||
Also, it's a good idea to have a bunch of spare [flash memory chips](https://www.aliexpress.com/w/wholesale-25Q128-SOP8.html).
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
[1]: hardware-programmer-ch341a-voltage-fix.md
|
|
@ -0,0 +1,59 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Run ipctool
|
||||
-----------
|
||||
|
||||
```bash
|
||||
root@ipcam:/# ipctool
|
||||
```
|
||||
|
||||
```yaml
|
||||
---
|
||||
board:
|
||||
vendor: OpenIPC
|
||||
version: 2020.02
|
||||
chip:
|
||||
vendor: Xiongmai
|
||||
model: XM530
|
||||
ethernet:
|
||||
mac: "00:12:41:xx:xx:xx"
|
||||
rom:
|
||||
- type: nor
|
||||
block: 64K
|
||||
partitions:
|
||||
- name: boot
|
||||
size: 0x40000
|
||||
sha1: e2c7973d
|
||||
contains:
|
||||
- name: uboot-env
|
||||
offset: 0x30000
|
||||
- name: env
|
||||
size: 0x10000
|
||||
sha1: fb6f2de6
|
||||
- name: kernel
|
||||
size: 0x200000
|
||||
sha1: 1130ee7a
|
||||
- name: rootfs
|
||||
size: 0x500000
|
||||
path: /,squashfs
|
||||
sha1: 890552b4
|
||||
- name: rootfs_data
|
||||
size: 0xb0000
|
||||
path: /overlay,jffs2,rw
|
||||
size: 8M
|
||||
ram:
|
||||
total: 64M
|
||||
media: 32M
|
||||
firmware:
|
||||
kernel: "3.10.103+ (SMP Fri Apr 23 21:29:40 UTC 2021)"
|
||||
toolchain: gcc version 7.5.0 (Buildroot 2020.02-gb5b7c71)
|
||||
god-app: ipctool
|
||||
sensors:
|
||||
- vendor: SmartSens
|
||||
model: SC2315E
|
||||
control:
|
||||
bus: 0
|
||||
type: i2c
|
||||
addr: 0x30
|
||||
```
|
|
@ -0,0 +1,302 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Frequently Asked Questions
|
||||
---------------------------
|
||||
|
||||
### I have a camera which is not on the list of supported devices. Will you make it work for me?
|
||||
|
||||
The short answer is no.
|
||||
|
||||
If you have the skills and desire to make OpenIPC to work on the new hardware, we can share the knowledge we have.
|
||||
If not, get yourself a supported camera.
|
||||
|
||||
### How can I tell what hardware is inside the camera before I buy it?
|
||||
|
||||
Most of the time you can't. Especially if it is a cheap Chinese clone of a clone of a rebranded camera.
|
||||
For reputable name brands that go through certification of the hardware, there is a chance to look at the
|
||||
inside the camera in the certification documents. Look for the FCC ID on the camera's box or case
|
||||
and then look it up in the [FCC ID database](https://fccid.io/).
|
||||
|
||||
### Differences between Lite and Ultimate
|
||||
|
||||
- Amazon server support
|
||||
- QR code recognition support (basic)
|
||||
- iptables support (firewall)
|
||||
- ZeroTier tunnel support
|
||||
- MQTT (telemetry) support
|
||||
- WiFi support
|
||||
- lame (mp3) and libwebsockets support
|
||||
|
||||
|
||||
### How to strip U-Boot Image wrapper header from a binary image
|
||||
|
||||
Sometimes vendor's firmware consists of binary images intended
|
||||
for use with U-Boot image loader and prepended with headers in
|
||||
[U-Boot Image wrapper format](https://formats.kaitai.io/uimage/).
|
||||
The header should be stripped off before you can use such an image
|
||||
as a raw binary file. Here's how you can strip the first 64 bytes
|
||||
from a file:
|
||||
|
||||
```bash
|
||||
dd if=inputfile.img of=outputfile.bin bs=64 skip=1
|
||||
```
|
||||
|
||||
alternatively
|
||||
|
||||
```bash
|
||||
tail -c +65 inputfile.img > outputfile.bin
|
||||
```
|
||||
|
||||
### How to get into bootloader shell?
|
||||
|
||||
[There is a handful of ways to get access to a locked bootloader shell](help-uboot.md#bypassing-password-protected-bootloader)
|
||||
|
||||
### How to reset camera settings from U-Boot
|
||||
|
||||
Sometimes improper settings make the camera unstable to the point where it is
|
||||
impossible to log in or not enough time before rebooting to fix the settings.
|
||||
Here's how to completely erase the overlay partition in the OpenIPC firmware,
|
||||
right from the bootloader shell, to bring the camera back to its pristine state:
|
||||
|
||||
> __only for 8MB flash partitioning__
|
||||
|
||||
```
|
||||
sf probe 0; sf erase 0x750000 0xb0000; reset
|
||||
```
|
||||
|
||||
> __only for 16MB flash partitioning__
|
||||
|
||||
```
|
||||
sf probe 0; sf erase 0xd50000 0x2b0000; reset
|
||||
```
|
||||
|
||||
### How to sign in into camera via SSH?
|
||||
|
||||
`ssh root@<camera_ip_address>`
|
||||
|
||||
There is _12345_ password by default.
|
||||
|
||||
### How to sign in into camera Web UI?
|
||||
|
||||
Open http://<camera_ip_address> and sign in using default username _root_
|
||||
and default password _12345_. You will be asked to change the password after
|
||||
successful login.
|
||||
|
||||
__Please note, it will also change your ssh root password!__
|
||||
|
||||
### How to reset password for SSH/Web UI?
|
||||
|
||||
Create a serial connection to the camera using a UART adapter and a terminal
|
||||
program. After turning on the camera, press Ctrl-C to interrupt the boot
|
||||
sequence and enter the bootloader shell.
|
||||
|
||||
For a camera with 8MB flash chip, run
|
||||
|
||||
```bash
|
||||
sf probe 0; sf erase 0x750000 0xb0000; reset
|
||||
```
|
||||
|
||||
For a camera with 16MB flash chip, run
|
||||
|
||||
```bash
|
||||
sf probe 0; sf erase 0xd50000 0x2b0000; reset
|
||||
```
|
||||
|
||||
### How to find information about the camera hardware and software?
|
||||
|
||||
Sign in on camera via `ssh` and run `ipctool`.
|
||||
|
||||
### I don't see ipctool on camera. Why?
|
||||
|
||||
You don't see it because initially it is not there, but there is a shell
|
||||
command of the same name.
|
||||
|
||||
_(Since it's a shell command, it won't work from Web Console in web UI.
|
||||
Sign in to the camera via SSH and run the command in there.)_
|
||||
|
||||
When you run this command, the latest available version of `ipctool` utility
|
||||
gets downloaded into `/tmp/` directory and runs from there. Since the utility
|
||||
resides in `/tmp/`, it won't survive a reboot, thus won't take any useful space
|
||||
on the camera afterwards.
|
||||
|
||||
If you need to know what is in the command, search for `ipctool` in the
|
||||
`/etc/profile` file.
|
||||
|
||||
### Replace the bootloader from Linux
|
||||
|
||||
Commands are executed separately by each line with a wait for the end of execution.
|
||||
The full name of the replacement bootloader and its availability can be checked [here][3]
|
||||
|
||||
Before running the commands, don't forget to enter the correct bootloader name!
|
||||
|
||||
```
|
||||
FILE=u-boot-SOC-TYPE.bin
|
||||
curl -k -L https://github.com/OpenIPC/firmware/releases/download/latest/${FILE} -o /tmp/${FILE}
|
||||
flashcp -v /tmp/${FILE} /dev/mtd0
|
||||
flash_eraseall /dev/mtd1
|
||||
```
|
||||
|
||||
Save wireless credentials:
|
||||
```
|
||||
FILE=/usr/share/openipc/wireless.sh
|
||||
echo "#!/bin/sh" > ${FILE}
|
||||
echo "fw_setenv wlandev $(fw_printenv -n wlandev)" >> ${FILE}
|
||||
echo "fw_setenv wlanssid $(fw_printenv -n wlanssid)" >> ${FILE}
|
||||
echo "fw_setenv wlanpass $(fw_printenv -n wlanpass)" >> ${FILE}
|
||||
chmod 755 ${FILE}
|
||||
```
|
||||
|
||||
### How to update ancient OpenIPC firmware?
|
||||
|
||||
Commands are executed separately by each line with a wait for the end of execution.
|
||||
The first command updates a utility whose algorithm was changed in February 2023.
|
||||
If you need to update the utility on T31 processors, please add the -mips suffix to the URL of the downloaded utility.
|
||||
The second command updates the firmware components themselves.
|
||||
|
||||
```
|
||||
curl -L -o /tmp/ipcinfo https://github.com/OpenIPC/ipctool/releases/download/latest/ipcinfo && chmod +x /tmp/ipcinfo; /tmp/ipcinfo -csF
|
||||
curl -s https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade | sh -s -- -k -r -n
|
||||
```
|
||||
|
||||
### Is it possible to switch from “lite” to “ultimate” via “Over the Air”?
|
||||
|
||||
On Ingenic and Sigmastar it is possible to split the ultimate rootfs.squashfs and flash it to the rootfs (mtd3) and overlay (mtd4) partition.
|
||||
|
||||
```
|
||||
dd if=rootfs.squashfs of=mtd3.bin bs=1k count=5120
|
||||
dd if=rootfs.squashfs of=mtd4.bin bs=1k skip=5120
|
||||
flashcp mtd3.bin /dev/mtd3 -v
|
||||
flashcp mtd4.bin /dev/mtd4 -v
|
||||
```
|
||||
|
||||
### How to dump full firmware to an NFS share
|
||||
|
||||
This could work if you are lucky, you gained access into Linux shell on stock
|
||||
firmware, and it does support NFS mounting:
|
||||
|
||||
```bash
|
||||
fw=$(mktemp -t)
|
||||
nfs=$(dirname $fw)/nfs
|
||||
mkdir -p $nfs
|
||||
mount -t nfs -o tcp,nolock 192.168.1.123:/path/to/nfs/share $nfs
|
||||
cat /dev/mtdblock? > $fw
|
||||
mv $fw ${nfs}/firmware_full.bin
|
||||
```
|
||||
|
||||
Make sure to use your own IP address and path to the NFS share!
|
||||
|
||||
### How to find original MAC address in a firmware dump
|
||||
|
||||
```bash
|
||||
strings dumpfile.bin | grep ^ethaddr
|
||||
```
|
||||
|
||||
### How to configure ssh session authorization by key
|
||||
|
||||
__On the camera__: Sign in into web UI on port 85 of your camera.
|
||||
|
||||
```bash
|
||||
passwd
|
||||
```
|
||||
|
||||
__On the desktop__: Copy the public key to the camera by logging in with the
|
||||
password created above.
|
||||
|
||||
```bash
|
||||
ssh-copy-id root@192.168.1.66
|
||||
```
|
||||
|
||||
__On the camera__: Create a `.ssh` folder in the root user's home directory
|
||||
and copy the file with the authorized keystore into it.
|
||||
|
||||
```bash
|
||||
mkdir ~/.ssh
|
||||
cp /etc/dropbear/authorized_keys ~/.ssh/
|
||||
```
|
||||
|
||||
__On the desktop__: Open a new session to verify that the authorization is
|
||||
passed using the public key not requesting a password.
|
||||
|
||||
```bash
|
||||
ssh root@192.168.1.66
|
||||
```
|
||||
|
||||
### Majestic
|
||||
|
||||
#### How to get a memory dump for debugging?
|
||||
|
||||
Enable and configure Core Dump in the menu **Majestic** > **Majestic Debugging**.
|
||||
|
||||
#### Camera image has a pink tint
|
||||
|
||||
You need to specify GPIO pins to control the infrared filter.
|
||||
Settings for some cameras can be found in [this table][1].
|
||||
If your camera is not in the table then you need to use [ipctool utility][2].
|
||||
|
||||
The OpenIPC firmware will automatically download the latest version of the
|
||||
utility to the /tmp directory when `ipctool` is invoked first time.
|
||||
|
||||
On stock firmware, you will need to download the utility to the camera yourself
|
||||
using any tools available in the system: wget, curl, tftp etc.
|
||||
|
||||
For example, download the ipctool utility to TFTP server on the local network,
|
||||
then download it to the camera:
|
||||
|
||||
```bash
|
||||
tftp -g -r ipctool -l /tmp/ipctool 192.168.1.1
|
||||
chmod +x /tmp/ipctool
|
||||
/tmp/ipctool
|
||||
```
|
||||
|
||||
If the camera has access to the internet, you can try to mount a public NFS
|
||||
sharing and run the utility from it, without downloading to the camera:
|
||||
|
||||
```bash
|
||||
mkdir -p /tmp/utils
|
||||
mount -o nolock 95.217.179.189:/srv/ro /tmp/utils/
|
||||
/tmp/utils/ipctool
|
||||
```
|
||||
|
||||
After the utility is downloaded to the camera, run the `ipctool gpio scan`
|
||||
command in the terminal and open-close the camera lens a couple of times with
|
||||
your palm.
|
||||
|
||||
Watch the output of ipctool to determine the pins responsible for controlling
|
||||
the IR filter curtain.
|
||||
|
||||
Enter the values obtained in the settings for the night mode Majestic. If the
|
||||
pink tint still persists, you may need to enable sensor signal inversion.
|
||||
|
||||
Don't forget to add the camera model and found GPIO values to the table!
|
||||
|
||||
#### Is it possible to display the data for setting the auto focus of lenses
|
||||
instead of the current sample_af in the standard /metrics?
|
||||
|
||||
No, this is a difficult algorithm, it does not have a sense to run it this way.
|
||||
|
||||
#### Copy files from Linux system to camera
|
||||
|
||||
Sometimes you need to transfer files to the camera. In addition to the above
|
||||
method using NFS (Network File System) you can use the standard Linux `scp`
|
||||
command to copy files over an SSH connection:
|
||||
```bash
|
||||
scp ~/myfile root@192.168.1.65:/tmp/
|
||||
```
|
||||
This command will copy `myfile` from the home directory to the `/tmp/`
|
||||
directory on the camera.
|
||||
|
||||
On recent Linux systems the following error may occur:
|
||||
```console
|
||||
sh: /usr/libexec/sftp-server: not found
|
||||
scp: Connection closed
|
||||
```
|
||||
In this case, add `-O` option to the command:
|
||||
```bash
|
||||
scp -O ~/myfile root@192.168.1.65:/tmp/
|
||||
```
|
||||
|
||||
|
||||
[1]: https://openipc.org/wiki/en/gpio-settings.html
|
||||
[2]: https://github.com/OpenIPC/ipctool/releases/download/latest/ipctool
|
||||
[3]: https://github.com/OpenIPC/firmware/releases/tag/latest
|
|
@ -0,0 +1,35 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Install Image Sensors
|
||||
-----------------------
|
||||
|
||||
If an image sensor driver is not included in the firmware image, you can install it manually.
|
||||
|
||||
As an example the image sensor "sc223a" will be installed to a gk7205v210 board (with openipc-gk7205v210-fpv-8mb.bin flashed).
|
||||
|
||||
You need a [sensor library](https://github.com/OpenIPC/firmware/raw/master/general/package/goke-osdrv-gk7205v200/files/sensor/libsns_sc223a.so) and one [sensor configuration file](https://github.com/OpenIPC/firmware/raw/master/general/package/goke-osdrv-gk7205v200/files/sensor/config/sc223a_i2c_1080p.ini).
|
||||
|
||||
The needed files for other sensors can be found following [this list](firmware-sensors.md).
|
||||
|
||||
Install the files by downloading them directly from github to your device:
|
||||
```sh
|
||||
curl -s -L -o /usr/lib/sensors/libsns_sc223a.so https://github.com/OpenIPC/firmware/raw/master/general/package/goke-osdrv-gk7205v200/files/sensor/libsns_sc223a.so
|
||||
curl -s -L -o /etc/sensors/sc223a_i2c_1080p.ini https://github.com/OpenIPC/firmware/raw/master/general/package/goke-osdrv-gk7205v200/files/sensor/config/sc223a_i2c_1080p.ini
|
||||
```
|
||||
|
||||
Adjust the fps value in /etc/majestic.yaml according to your sensor specs.
|
||||
Search for "Isp_FrameRate" in your sensor configuration file [/etc/sensors/sc223a_i2c_1080p.ini](https://github.com/OpenIPC/firmware/raw/master/general/package/goke-osdrv-gk7205v200/files/sensor/config/sc223a_i2c_1080p.ini).
|
||||
|
||||
```sh
|
||||
cli -s .video0.fps 30
|
||||
```
|
||||
|
||||
(Re)start streamer:
|
||||
|
||||
```sh
|
||||
killall majestic
|
||||
majestic
|
||||
```
|
||||
|
||||
[more info about sensor `sc223a`](https://github.com/RoboSchmied/Documentation/blob/main/sc223a.md)
|
|
@ -0,0 +1,39 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Supported Sensors
|
||||
-----------------
|
||||
|
||||
Sensors are supported on per SoC family (per SDK) basis.
|
||||
To look up the list of supported sensors for your SoC you first need to detemine your SoC family, then check out the corresponding package.
|
||||
|
||||
__Please note, that even if you see the driver that matches your sensor, it does not guarantee that the driver works as intended,
|
||||
or even that it will be included with the final binary for that SoC. Some additional testing and tweaking may be needed.__
|
||||
|
||||
- [Ambarella S3L](https://github.com/OpenIPC/firmware/tree/master/general/package/ambarella-osdrv-s3l/files/sensor)
|
||||
- [Fullhan FH8852V100](https://github.com/OpenIPC/firmware/tree/master/general/package/fullhan-osdrv-fh8852v100/files/sensor)
|
||||
- [Fullhan FH8852V200](https://github.com/OpenIPC/firmware/tree/master/general/package/fullhan-osdrv-fh8852v200/files/sensor)
|
||||
- [Goke GK710x](https://github.com/OpenIPC/firmware/tree/master/general/package/goke-osdrv-gk710x/files/sensor)
|
||||
- [Goke GK7205V200](https://github.com/OpenIPC/firmware/tree/master/general/package/goke-osdrv-gk7205v200/files/sensor)
|
||||
- [Grainmedia GM8136](https://github.com/OpenIPC/firmware/tree/master/general/package/grainmedia-osdrv-gm8136/files/sensor)
|
||||
- [Hisilicon HI3516AV100](https://github.com/OpenIPC/firmware/tree/master/general/package/hisilicon-osdrv-hi3516av100/files/sensor)
|
||||
- [Hisilicon HI3516CV100](https://github.com/OpenIPC/firmware/tree/master/general/package/hisilicon-osdrv-hi3516cv100/files/sensor)
|
||||
- [Hisilicon HI3516CV200](https://github.com/OpenIPC/firmware/tree/master/general/package/hisilicon-osdrv-hi3516cv200/files/sensor)
|
||||
- [Hisilicon HI3516CV300](https://github.com/OpenIPC/firmware/tree/master/general/package/hisilicon-osdrv-hi3516cv300/files/sensor)
|
||||
- [Hisilicon HI3516CV500](https://github.com/OpenIPC/firmware/tree/master/general/package/hisilicon-osdrv-hi3516cv500/files/sensor)
|
||||
- [Hisilicon HI3516EV200](https://github.com/OpenIPC/firmware/tree/master/general/package/hisilicon-osdrv-hi3516ev200/files/sensor)
|
||||
- [Hisilicon HI3519V101](https://github.com/OpenIPC/firmware/tree/master/general/package/hisilicon-osdrv-hi3519v101/files/sensor)
|
||||
- [Ingenic T20](https://github.com/OpenIPC/firmware/tree/master/general/package/ingenic-osdrv-t20/files/kmod)
|
||||
- [Ingenic T30](https://github.com/OpenIPC/firmware/tree/master/general/package/ingenic-osdrv-t30/files/kmod)
|
||||
- [Ingenic T31](https://github.com/OpenIPC/firmware/tree/master/general/package/ingenic-osdrv-t31/files/kmod)
|
||||
- [Novatek NT9865x](https://github.com/OpenIPC/firmware/tree/master/general/package/novatek-osdrv-nt9856x/files/sensor)
|
||||
- [Rockchip RV11xx](https://github.com/OpenIPC/firmware/tree/master/general/package/rockchip-osdrv-rv11xx/files/sensor)
|
||||
- [Sigmastar MSC313E](https://github.com/OpenIPC/firmware/tree/master/general/package/sigmastar-osdrv-msc313e/files/sensor)
|
||||
- [Sigmastar SSC335](https://github.com/OpenIPC/firmware/tree/master/general/package/sigmastar-osdrv-ssc335/files/sensor)
|
||||
- [Xiongmai XM510](https://github.com/OpenIPC/firmware/tree/master/general/package/xiongmai-osdrv-xm510/files/sensor)
|
||||
- [Xiongmai XM530](https://github.com/OpenIPC/firmware/tree/master/general/package/xiongmai-osdrv-xm530/files/sensor)
|
||||
|
||||
Sensor Driver Installation Example
|
||||
----------------------------------
|
||||
|
||||
- [Install sensor sc223a to soc gk7205v210](firmware-sensor-install-sc223a.md)
|
|
@ -0,0 +1,182 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Flash Chip Interfacing
|
||||
--------------------
|
||||
|
||||
This is an advanced topic regarding identifying, reading, writing, verifying and
|
||||
erasing flash chips by interfacing directly with the flash chip using a programmer.
|
||||
This is not the preferred method of flashing the firmware, but it certainly can be useful
|
||||
when other methods fail.
|
||||
|
||||
If you are just getting started, you are probably in the wrong place: check out
|
||||
[Installation](installation.md) and [Burn Example](burn-example.md) for better starting points.
|
||||
|
||||
|
||||
SOIC8 Chips
|
||||
--------------------
|
||||
SOIC8 is a common package for flash chips. It is a small package with 8 pins, and
|
||||
the pins are spaced 1.27mm apart. The pins are numbered counter-clockwise starting
|
||||
from the top left corner with the dot marking. The top left pin is pin 1, the top right pin is pin 2,
|
||||
|
||||
As mentioned in [Help: U-Boot](help-uboot.md) the SOIC8 flash chip can sometimes be tricked
|
||||
into going straight to u-boot mode, and the following diagram is shown:
|
||||

|
||||

|
||||
|
||||
|
||||
SOIC8 Clips
|
||||
--------------------
|
||||
|
||||
SOIC8 clips are a convenient way to interface with SOIC8 chips. They are cheap and somewhat easy to use.
|
||||
Remember though, that the clip requires a programmer to act as interface between the clip and your computer.
|
||||
|
||||
It can be confusing when looking at the ribbon cable of the clip, because the two rows of pins -- how does it map?
|
||||
Look at the following image of a ribbon cable, there is a red wire that indicates pin 1, and the pins are numbered
|
||||
relative to the cable key notch. Don't be confused in thinking that red should be voltage, in this case it should
|
||||
map to pin one of the SOIC8 chip and pin-cable adapter. This way you can visualize the pins of the adapter are identical
|
||||
to that of the SOIC8 flash chip specification.
|
||||
|
||||

|
||||
|
||||
Here is an example of a SOIC8 clip wired to a Raspberry Pi Pico:
|
||||
|
||||

|
||||
|
||||
**Warning:** Often camera boards have other SOIC8 style chips besides the flash chip,
|
||||
and you need to be sure to identify the correct chip before you begin your work.
|
||||
|
||||
|
||||
Picking a Programmer
|
||||
--------------------
|
||||
|
||||
|
||||
### CH341A
|
||||
There are many programmers available, and they all have their pros and cons. The most popular
|
||||
programmers are boards leveraging the CH341A, which is a cheap and easy to use chipset. For more details about the CH341A,
|
||||
see [CH341A Hardware Programmer](hardware-programmer.md).
|
||||
|
||||
|
||||
### Raspberry Pi Pico
|
||||
The Raspberry Pi Pico is a microcontroller board with a USB port and a several GPIO pins. It is also cheap and easy to use,
|
||||
and maybe you already have one lying around. Doesn't matter if it is a wireless version or not, they both work the same.
|
||||
In order to use the Pico as a programmer, you will need to put the pico into bootloader mode by holding down the BOOTSEL button
|
||||
while plugging it into your computer. The Pico will show up as a USB drive, and you can drag and drop the uf2 file onto the drive.
|
||||
Currently, the best pico-serprog library to use is a fork of [pico-serprog](https://github.com/opensensor/pico-serprog)
|
||||
which fixed a number of issues encountered with the original.
|
||||
|
||||
There are more instructions the pico-serprog Github, however pico-serprog firmware will grant you
|
||||
an extra USB COM port that maps to the following GPIOs.
|
||||
|
||||
| Pin | Function |
|
||||
|-----|----------|
|
||||
| 7 | CS |
|
||||
| 6 | MISO |
|
||||
| 5 | MOSI |
|
||||
| 4 | SCK |
|
||||
|
||||
Since most SOIC8 flash chips are 3.3v, you will need to connect to the 3.3 V rail of the PICO which is pin 36,
|
||||
and remember to connect the GND pin as well, there are many GND pins on the pico, such as pin 38.
|
||||
* Note: if for some reason your chip needs 5V, you can use VSYS which is pin 40 instead of 3.3V, but make sure you read the specification of your specific flash chip.
|
||||
|
||||
|
||||
|
||||
Flashrom program
|
||||
--------------------
|
||||
Flashrom is a program that can be used to read, write, erase, and verify flash chips. It is available for Linux, Windows, and Mac.
|
||||
Generally these days, you need to compile it for the platform that you intend to use it on. It is a command line program, and
|
||||
there are many options available. The following are some examples of how to use flashrom.
|
||||
|
||||
This guide focusing on using flashrom and does not currently explain building flashrom, but you can find instructions on the [flashrom website](https://flashrom.org/).
|
||||
|
||||
### Determine your COM port
|
||||
|
||||
For windows, you can use the device manager to determine the COM port that your programmer is connected to.
|
||||
|
||||
For Linux, you can use the `dmesg` command to determine the COM port that your programmer is connected to.
|
||||
|
||||
### Reading a flash chip
|
||||
|
||||
To read a flash chip, you sometimes need to know the type of flash chip that you are reading.
|
||||
|
||||
Try running simple probe to verify you get connectivity with the programmer. pico-serprog is a serprog (or serial programmer) and that needs to be specified to flashrom.
|
||||
In this example, the programmer is connected to COM23, and the baud rate is 2000000 which is known to work well and can read a 16MB flash chip in 2-3 minutes.
|
||||
```bash
|
||||
./flashrom.exe -p serprog:dev=COM23:2000000 -V
|
||||
```
|
||||
|
||||
Here is an example of reading a flash chip. In this example, flashrom had told us we had to pick between three different chips, and we picked the "GD25B128B/GD25Q128B".
|
||||
```bash
|
||||
# ./flashrom.exe -p serprog:dev=COM23:2000000 -c "GD25B128B/GD25Q128B" -r gokev300-camera-12242023.bin -VV --force
|
||||
flashrom 1.4.0-devel (git:v1.2-1386-g5106287e) on Windows 10.0 (x86_64)
|
||||
flashrom is free software, get the source code at https://flashrom.org
|
||||
|
||||
Using clock_gettime for delay loops (clk_id: 1, resolution: 100ns).
|
||||
flashrom was built with GCC 13.2.0, little endian
|
||||
Command line (8 args): C:\msys64\home\matte\flashrom\flashrom.exe -p serprog:dev=COM23:2000000 -c GD25B128B/GD25Q128B -r gokev300-camera-12242023.bin -VV --force
|
||||
Initializing serprog programmer
|
||||
Baud rate is 2000000.
|
||||
serprog: connected - attempting to synchronize
|
||||
.
|
||||
serprog: Synchronized
|
||||
serprog: Interface version ok.
|
||||
serprog: Bus support: parallel=off, LPC=off, FWH=off, SPI=on
|
||||
serprog: Maximum write-n length is 32
|
||||
serprog: Maximum read-n length is 32
|
||||
serprog: Programmer name is "pico-serprog"
|
||||
serprog: Serial buffer size is 64
|
||||
Warning: Automatic command availability check failed for cmd 0x07 - won't execute cmd
|
||||
Warning: NAK to query operation buffer size
|
||||
serprog: operation buffer size is 300
|
||||
serprog: Warning: Programmer does not support toggling its output drivers
|
||||
The following protocols are supported: SPI.
|
||||
Probing for GigaDevice GD25B128B/GD25Q128B, 16384 kB: compare_id: id1 0xc8, id2 0x4018
|
||||
Added layout entry 00000000 - 00ffffff named complete flash
|
||||
Found GigaDevice flash chip "GD25B128B/GD25Q128B" (16384 kB, SPI) on serprog.
|
||||
Chip status register is 0x00.
|
||||
Chip status register: Status Register Write Disable (SRWD, SRP, ...) is not set
|
||||
Chip status register: Block Protect 4 (BP4) is not set
|
||||
Chip status register: Block Protect 3 (BP3) is not set
|
||||
Chip status register: Block Protect 2 (BP2) is not set
|
||||
Chip status register: Block Protect 1 (BP1) is not set
|
||||
Chip status register: Block Protect 0 (BP0) is not set
|
||||
Chip status register: Write Enable Latch (WEL) is not set
|
||||
Chip status register: Write In Progress (WIP/BUSY) is not set
|
||||
This chip may contain one-time programmable memory. flashrom cannot read
|
||||
and may never be able to write it, hence it may not be able to completely
|
||||
clone the contents of this chip (see man page for details).
|
||||
===
|
||||
This flash part has status UNTESTED for operations: WP
|
||||
The test status of this chip may have been updated in the latest development
|
||||
version of flashrom. If you are running the latest development version,
|
||||
please email a report to flashrom@flashrom.org if any of the above operations
|
||||
work correctly for you with this flash chip. Please include the flashrom log
|
||||
file for all operations you tested (see the man page for details), and mention
|
||||
which mainboard or programmer you tested in the subject line.
|
||||
Thanks for your help!
|
||||
serprog_delay used, but programmer doesn't support delays natively - emulating
|
||||
Block protection is disabled.
|
||||
Reading flash... read_flash: region (00000000..0xffffff) is readable, reading range (00000000..0xffffff).
|
||||
done.
|
||||
```
|
||||
|
||||
### Writing a flash chip
|
||||
|
||||
Writing a flash chip is quite similar to reading it. You need to specify the COM port, the baud rate, and possibly the chip type.
|
||||
Simply change your arguments to flashrom to include the -w option and the file that you want to write to the flash chip.
|
||||
|
||||
```bash
|
||||
./flashrom.exe -p serprog:dev=COM23:2000000 -c "GD25B128B/GD25Q128B" -w openipc-hi3516ev300-ultimate-16mb.bin -VV --force
|
||||
```
|
||||
|
||||
During a write operation, flashrom will first read the entire chip, then erase and write the chip, and then re-read it to verify.
|
||||
Always make sure you successfully back up and complete a read cycle before attempting to write to a chip.
|
||||
|
||||
|
||||
### Conclusion
|
||||
This guide is not meant to be a complete guide to using flashrom, but rather a starting point for those who are interested in using it,
|
||||
and also inspiration for those who have raspberry picos lying around and want to use them for something useful.
|
||||
|
||||
If you liked the pico-serprog example, you probably will also really like the [pico-uart-bridge](https://github.com/Noltari/pico-uart-bridge)
|
||||
which gives multiple COM ports over a single USB connection, for the purpose of connecting UART terminals.
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
## Audio on FPV
|
||||
|
||||
### Overview
|
||||
Everything has been tested using steamdeck (PC x86) and ssc338q-imx415 Anjoy board and choice of decoders and similar may reflect this.
|
||||
Currently there is ~50-100ms latency, much imprroved from first trials ~200msec. The improvement comes mainy from using "pipewiresink" on client side, but it requires you to have a working pipewire audio backend on your GS. It could also be possible to use jack audio backend for similar or better result.
|
||||
There was also an update to use a mixed RTP video/audio stream on the output port (standard 5600) which neccesitates a different approach for the gst pipeline (see below). The pipelines need to be disconnected in order to not block each other.
|
||||
A small warning; if enabling audio and not adapting your pipeline to sort out payload=97 (H265) the RTP payload=98 will cause visual artifacts in your video. rtpjitterbuffer will help to manage out of order packets (will not work without it).
|
||||
Video using OPUS 16000 OPUS samplerate: https://youtu.be/Z0KxSS24j7o
|
||||
|
||||
### Majestic and general settings
|
||||
Audio settings (majestic.yaml):
|
||||
```
|
||||
cli -s .audio.enabled true
|
||||
cli -s .audio.srate 8000 (8000 pretty crap, 16000 usable and 48000 really good)
|
||||
```
|
||||
|
||||
### Working sound, video & save to file
|
||||
```
|
||||
gst-launch-1.0 udpsrc port=5600 ! tee name=videoTee ! queue ! tee name=t t. ! queue ! application/x-rtp,payload=97, clock-rate=90000, encoding-name=H265 ! rtpjitterbuffer latency=20 ! rtph265depay ! mpegtsmux name=ts ! filesink location=/run/media/deck/170a3e7f-325f-4567-8580-0e01dda76973/video/record-$(date +%y%m%d_%H%M%S).tsn sync=false t. ! queue leaky=1 ! tee name=audioTee ! queue ! application/x-rtp, payload=98, encoding-name=OPUS ! rtpjitterbuffer latency=22 do-lost=true drop-on-latency=true ! rtpopusdepay ! ts. audioTee. ! queue leaky=1 ! application/x-rtp, payload=98, encoding-name=OPUS ! rtpjitterbuffer latency=22 ! rtpopusdepay ! opusdec ! audioconvert ! audioresample ! pipewiresink blocksize=128 mode=render processing-deadline=0 sync=false async=false videoTee. ! queue ! application/x-rtp,payload=97, clock-rate=90000, encoding-name=H265 ! rtpjitterbuffer latency=20 ! rtph265depay ! vaapih265dec ! fpsdisplaysink fps-update-interval=200 video-sink=xvimagesink sync=false
|
||||
```
|
||||
Nothing more to do, it just works :-)
|
|
@ -0,0 +1,59 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Instructions for Using BL-M8812EU2 (or other RTL8812EU-based) Wi-Fi Module in FPV Firmware
|
||||
---
|
||||
[LB-LINK's BL-M8812EU2 module](https://www.lb-link.com/product_36_183.html)
|
||||
Another FPV Wi-Fi adaptor choice with high TX power (>29dBm) and low cost.
|
||||

|
||||
|
||||
|
||||
### Hardware
|
||||
#### Where to buy
|
||||
Since the RTL8812EU chip is fairly new, there are no sellers on Aliexpress now.
|
||||
But when considering that it comes from the same supplier as the widely sold BL-R8812AF1, it's only a matter of time before it becomes readily available.
|
||||
However, you can still find any Taobao agent and buy the module from [here](https://item.taobao.com/item.htm?id=764510955987).
|
||||
|
||||
#### Wiring
|
||||

|
||||
|
||||
Connect ```USB2.0+DP```, ```USB2.0-DM``` with a twisted wire pair to the IPC's USB. A GND connection to IPC is also required.
|
||||
Connect ```GND``` and ```VDD5.0``` to a 5V/>3A power supply to power the module.
|
||||
Connect two 5GHz antennas to the IPEX connector J0 and J1 before transmission.
|
||||
The Pin 9~18 are GND and can be left floating.
|
||||
|
||||
Ref.: https://oshwhub.com/libc0607/bl-m8812eu2-demoboard-v1p0
|
||||
|
||||
### Add the Driver to OpenIPC Firmware
|
||||
Because of the very limited flash space, the driver is disabled by default.
|
||||
You need to compile firmware from source code to enable it.
|
||||
|
||||
#### Step 1. Prepare
|
||||
Follow the guide in [source-code.md](https://github.com/libc0607/openipc-wiki/blob/master/en/source-code.md) till you successfully build your firmware.
|
||||
|
||||
#### Step 2. Add BR2_PACKAGE to Board Config
|
||||
Find your target board config in ```br-ext-chip-*/config```, then add ```BR2_PACKAGE_RTL88X2EU_OPENIPC=y``` to it.
|
||||
If your IPC has an 8M/16M NOR Flash, you may need to disable other drivers (e.g. RTL8812AU) to save space.
|
||||
|
||||
#### Step 3. Check CONFIG_WIRELESS_EXT in Kernel Config
|
||||
The driver needs ```CONFIG_WIRELESS_EXT``` enabled in kernel config, which can be found at ```br-ext-chip-*/board/*/kernel/*-fpv.config```.
|
||||
This macro has been set in SigmaStar, but you should check it when using Hisilicon or GOKE.
|
||||
|
||||
#### Step 4. Build the firmware
|
||||
```
|
||||
make
|
||||
```
|
||||
Then you can use ```output/images/rootfs.squashfs.*``` and ```output/images/uImage.*``` with ```sysupgrade```.
|
||||
|
||||
### Usage
|
||||
It's almost the same as RTL8812AU adaptors.
|
||||
|
||||
#### Set TX Power
|
||||
There are two ways to set TX power.
|
||||
- ```driver_txpower_override``` in ```/etc/wfb.conf```. The range is ```0~63```
|
||||
- ```iw dev <wlan0> set txpower fixed <mBm>```. The range is ```0~3150```, and can be set dynamically when transmitting.
|
||||
|
||||
For the BL-M8812EU2 module, I recommend setting ```driver_txpower_override``` to ```40~50``` as a higher value causes the amplifier to be saturated.
|
||||
The power consumption of a BL-M8812EU2 module can reach 5V/2.xA when ```driver_txpower_override > ~40```.
|
||||
Use a proper 5V power supply and a HEAT SINK WITH FAN.
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of contents](../README.md)
|
||||
|
||||
Development of 38x38 expansion board for FPV systems
|
||||
--------------------------------
|
||||
|
||||
Colleagues !
|
||||
|
||||
Who flies and who held in his hands boards of standard 38x38 video cameras, send your wishes, based on real experience, on the expansion module for FPV.
|
||||
Examples of homemade boards, that- to realize what we are talking about, you can see at the very bottom of the page (for other areas of OpenIPC use).
|
||||
|
||||
|
||||
### Formalization of requirements
|
||||
|
||||
- dimensions and materials
|
||||
- standard 38x38 expansion board used in video surveillance ("sandwich")
|
||||
- double-sided glass-textolite, thickness (?)
|
||||
- interfaces
|
||||
- pitch of all connectors 1.25, board mounting through metallized hole (NOT SMD!)
|
||||
- connector type, jst-gh 1.25 or df13 1.25 or something else, optionally installed
|
||||
- connector pins are duplicated with metallized holes for soldering wires
|
||||
- components
|
||||
- external power supply for wifi whistle ~2-3A
|
||||
- connectors (heels) for soldering under UART (flight controller)
|
||||
- heels (connectors) for whistle connection
|
||||
- additional heels (5-12) for suspension power supply
|
||||
- indication of voltage presence by LEDs (?)
|
||||
|
||||
### A selection of photos
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-extension-old.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
### References on the topic
|
||||
|
||||
* https://oshwhub.com/libc0607/xm-ext-board-fpv
|
|
@ -0,0 +1,29 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Frequently Asked Questions for FPV
|
||||
----------------------------------
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-logo.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
### Why doesn't anyone write in this section ?
|
||||
|
||||
This section has just been created and will be filled with information.
|
||||
|
||||
### Who will be the first publicist of information ?
|
||||
|
||||
Of course it will be our friend Mario from Foggy Albion.
|
||||
|
||||
### What’s the lowest possible latency ?
|
||||
|
||||
Reply...
|
||||
|
||||
### What’s the maximum achievable range ?
|
||||
|
||||
Reply...
|
||||
|
||||
### How much does it weigh ?
|
||||
|
||||
Reply...
|
|
@ -0,0 +1,36 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
## Steps from buy to fly (for beginners)
|
||||
---------------------------------------------------
|
||||
|
||||
<p align="center">
|
||||
<img src="../images/fpv-from-buy-to-fly.png" alt="Diagram"/>
|
||||
</p>
|
||||
|
||||
---------------------------------------------------
|
||||
### STEP 1
|
||||
### STEP 2
|
||||
### STEP 3
|
||||
### STEP 4
|
||||
- [OpenIPC FPV - Camera flashing SSC338Q](https://www.youtube.com/watch?v=94QiUDmGFZI)
|
||||
### STEP 5
|
||||
- [OpenIPC FPV - NVR Ground Station](https://www.youtube.com/watch?v=vSJiUanWA9I)
|
||||
- [Introducing OpenIPC VRX Ground Station, the cheapest digital long range FPV system in the world](https://www.youtube.com/watch?v=aXJQIoBKjVE)
|
||||
- [OpenIPC FPV - Prepare GroundStation: Ubuntu + QGroundControl](https://www.youtube.com/watch?v=JMtRAsOm0Dc)
|
||||
### STEP 6
|
||||
- [OpenIPC FPV - connections](https://www.youtube.com/watch?v=LOD5xsAJu5o)
|
||||
### STEP 7
|
||||
### STEP 8
|
||||
- [OpenIPC SSC338Q-IMX415, DVR in h265 with the World’s Cheapest 120fps Digital FPV System](https://www.youtube.com/watch?v=avXbcvqNKWM)
|
||||
- [25km in a windy and cloudy day with OpenIPC.](https://www.youtube.com/watch?v=-AeKldKGVhg)
|
||||
- [OpenIPC FPV - Test Flight](https://www.youtube.com/watch?v=-4f7XHnu3mY)
|
||||
|
||||
## Examples
|
||||
<p align="center">
|
||||
<img src="../images/fpv-newcomer-bundle.jpg" alt="NewComers"/>
|
||||
</p>
|
||||
<p align="center">
|
||||
<img src="../images/fpv-cheapskate-bundle.jpg" alt="Cheapskate"/>
|
||||
</p>
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
# OpenIPC Wiki
|
||||
|
||||
[Table of Content](../README.md)
|
||||
|
||||
## Quick Setup of Ground Station for OrangePi 5 Ubuntu 22.04
|
||||
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<img src="../images/pi5-plus.png?raw=true" alt="Logo" style="height:400px;"/>
|
||||
<img src="../images/pi-5.png?raw=true" alt="Logo" style="height:400px;"/>
|
||||
</p>
|
||||
|
||||
### Prepare
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||
### Download and install the Linux kernel headers for rockchip rk3588
|
||||
|
||||
[https://drive.google.com/drive/folders/1R7VmAeo3_LpFDQvYSEG9ymAC-DvaLt47](https://drive.google.com/drive/folders/1R7VmAeo3_LpFDQvYSEG9ymAC-DvaLt47)
|
||||
|
||||
```
|
||||
sudo dpkg -i linux-headers-legacy-rockchip-rk3588_1.1.2_arm64.deb
|
||||
sudo dpkg -i linux-image-legacy-rockchip-rk3588_1.1.2_arm64.deb
|
||||
```
|
||||
|
||||
### Wifi card driver
|
||||
|
||||
To disable add it to the blacklist:
|
||||
|
||||
```
|
||||
sudo bash -c "cat > /etc/modprobe.d/wfb.conf <<EOF
|
||||
# blacklist stock module
|
||||
blacklist 88XXau
|
||||
blacklist 8812au
|
||||
blacklist rtl8812au
|
||||
blacklist rtl88x2bs
|
||||
EOF"
|
||||
```
|
||||
|
||||
Compile the driver from source:
|
||||
|
||||
```
|
||||
git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git
|
||||
cd rtl8812au/
|
||||
sudo ./dkms-install.sh
|
||||
```
|
||||
|
||||
### Installing WFB-NG
|
||||
|
||||
Using the "nmcli" command, we find out the name of your wifi adapter and substitute $WLAN in the place
|
||||
|
||||
```
|
||||
git clone -b stable https://github.com/svpcom/wfb-ng.git
|
||||
cd wfb-ng
|
||||
sudo ./scripts/install_gs.sh $WLAN
|
||||
```
|
||||
|
||||
and enable auto-upload
|
||||
|
||||
```
|
||||
sudo systemctl enable wifibroadcast
|
||||
```
|
||||
|
||||
### Channel configuration
|
||||
|
||||
```
|
||||
sudo vi /etc/wifibroadcast.cfg
|
||||
```
|
||||
|
||||
### Copying the encryption key from an IP camera
|
||||
|
||||
```
|
||||
sudo scp root@192.168.1.10:/etc/drone.key /etc/gs.key
|
||||
```
|
||||
|
||||
and restarting wfb-ng:
|
||||
|
||||
```
|
||||
sudo systemctl restart wifibroadcast@gs
|
||||
```
|
||||
|
||||
### Start WFB CLI
|
||||
|
||||
```
|
||||
wfb-cli gs
|
||||
```
|
||||
|
||||
### Video decoding
|
||||
|
||||
h265
|
||||
|
||||
```
|
||||
gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec ! xvimagesink sync=false
|
||||
```
|
||||
|
||||
h264
|
||||
|
||||
```
|
||||
gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' ! rtph264depay ! h264parse ! mppvideodec ! xvimagesink sync=false
|
||||
```
|
||||
|
||||
###GS IS READY FOR USE###
|
||||
|
||||
### DVR (Digital Video Recorder)
|
||||
|
||||
Create a file **gst_start** with the following content and assign the rights to execute **chmod +x gst_start**.
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
current_date=$(date +'%Y%d%m_%H%M%S')
|
||||
cd ~/Videos
|
||||
|
||||
if [[ $1 == "save" ]]
|
||||
then
|
||||
gst-launch-1.0 -e udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265' ! rtph265depay ! h265parse ! tee name=t ! queue ! mppvideodec ! xvimagesink sync=false t. ! queue ! matroskamux ! filesink location=record_${current_date}.mkv
|
||||
else
|
||||
gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec ! xvimagesink sync=false
|
||||
fi
|
||||
|
||||
```
|
||||
|
||||
When running with the **save** option, the video will be saved to the **/home/Video folder/**
|
||||
|
||||
### Start, stop, restart service
|
||||
|
||||
```
|
||||
systemctl status wifibroadcast@gs
|
||||
systemctl stop wifibroadcast@gs
|
||||
systemctl start wifibroadcast@gs
|
||||
```
|
||||
|
||||
### Get last logs from service
|
||||
|
||||
```
|
||||
journalctl -u wifibroadcast@gs -f
|
||||
journalctl -xu wifibroadcast@gs -n 100
|
||||
```
|
||||
|
||||
### Useful commands
|
||||
|
||||
```
|
||||
# Checking the operation of the wfb-ng
|
||||
/usr/bin/wfb_rx -p 0 -c 127.0.0.1 -u 5600 -K /etc/gs.key -i 7669206 $WLAN
|
||||
|
||||
# Find out the name of the wifi adapter
|
||||
nmcli
|
||||
ifconfig
|
||||
iw
|
||||
|
||||
# Displays the possible parameters of the wifi adapter
|
||||
iw list
|
||||
|
||||
# Displays the current settings of the Wifi adapter
|
||||
iw dev
|
||||
|
||||
# Outputs the current frequency and power parameters
|
||||
sudo iw reg get
|
||||
|
||||
# Set a new region
|
||||
sudo iw reg set RU
|
||||
https://hackware.ru/?p=17978 - Solves the problem of channel selection
|
||||
|
||||
# Viewing running wfb-ng processes
|
||||
ps -aux | grep wfb
|
||||
|
||||
# Set the power
|
||||
sudo ip link set $WLAN down
|
||||
sudo iw dev $WLAN set txpower fixed 30mBm
|
||||
sudo ip link set $WLAN up
|
||||
|
||||
# View available plugins for decoding
|
||||
gst-inspect-1.0 | grep 265
|
||||
|
||||
# Shows a list of downloaded drivers/modules
|
||||
lsmod
|
||||
|
||||
# Displays a list of connected USB devices and related drivers
|
||||
usb-devices
|
||||
```
|
|
@ -0,0 +1,81 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Step by step commands to run GroundStation on Ubuntu 22.04
|
||||
---------------------------------------------------------
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-logo.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
Video version: - [OpenIPC - Prepare GroundStation: Ubuntu + QGroundControl](https://www.youtube.com/watch?v=JMtRAsOm0Dc)
|
||||
|
||||
### Prepare
|
||||
```
|
||||
sudo apt update
|
||||
```
|
||||
```
|
||||
sudo apt install dkms git python3-all-dev net-tools virtualenv fakeroot debhelper python3-twisted
|
||||
libpcap-dev python3-pyroute2 python3-future python3-configparser python3-all libsodium-dev
|
||||
```
|
||||
|
||||
### Libsodium
|
||||
```
|
||||
git clone https://github.com/jedisct1/libsodium --branch stable
|
||||
cd libsodium
|
||||
./configure
|
||||
make && make check
|
||||
sudo make install
|
||||
```
|
||||
|
||||
### Wifi card driver
|
||||
```
|
||||
git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git
|
||||
cd rtl8812au/
|
||||
sudo ./dkms-install.sh
|
||||
```
|
||||
|
||||
### WFB-NG
|
||||
```
|
||||
git clone -b stable https://github.com/svpcom/wfb-ng.git
|
||||
cd wfb-ng
|
||||
sudo ./scripts/install_gs.sh wlan0
|
||||
```
|
||||
|
||||
### Channel configuration
|
||||
```
|
||||
vi /etc/wifibroadcast.cfg
|
||||
```
|
||||
|
||||
### Start WFB CLI
|
||||
```
|
||||
wfb-cli gs
|
||||
```
|
||||
###GS IS READY FOR USE###
|
||||
|
||||
### Start, stop, restart service
|
||||
```
|
||||
systemctl status wifibroadcast@gs
|
||||
systemctl stop wifibroadcast@gs
|
||||
systemctl start wifibroadcast@gs
|
||||
```
|
||||
|
||||
### Qground control manual
|
||||
|
||||
- https://docs.qgroundcontrol.com/master/en/getting_started/download_and_install.html
|
||||
|
||||
### Get last logs from service
|
||||
```
|
||||
journalctl -xu wifibroadcast@gs -n 100
|
||||
```
|
||||
|
||||
### Useful commands
|
||||
```
|
||||
nmcli
|
||||
ifconfig
|
||||
iwconfig
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of contents](../README.md)
|
||||
|
||||
How to build OpenIPC with RTL8812EU driver
|
||||
--------------------------------
|
||||
|
||||
More details about rtl8812eu can be found here https://github.com/OpenIPC/wiki/blob/master/en/fpv-bl-m8812eu2-wifi-adaptors.md
|
||||
|
||||
- Boot into Ubuntu
|
||||
- Open Terminal
|
||||
|
||||
```
|
||||
sudo apt-get install -y automake autotools-dev bc build-essential curl fzf git libtool rsync unzip
|
||||
```
|
||||
|
||||
```
|
||||
rm -r -f yourOpenipc #remove any old firmware build directory (optional)
|
||||
git clone --depth=1 https://github.com/OpenIPC/firmware.git yourOpenipc
|
||||
cd yourOpenipc
|
||||
make clean
|
||||
cd br-ext-chip-sigmastar
|
||||
cd configs
|
||||
ls
|
||||
sudo nano yourSelectconfig
|
||||
```
|
||||
|
||||
```
|
||||
Then under Wireless add the line
|
||||
BR2_PACKAGE_RTL88X2EU_OPENIPC=y
|
||||
Save the file
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
make
|
||||
```
|
||||
|
||||
- Select your board and type eg ssc338q fpv and build the firmware
|
||||
- Navigate to /home/YourUser/yourOpenipc/output/images
|
||||
- Find your appropriate output .tgz archive ie openipc.ssc338q-nor-fpv.tgz and extract the rootfs and uboot files
|
||||
- Copy those 2 files to the OpenIPC camera /tmp
|
||||
- ssh to the camera
|
||||
`cd /tmp`
|
||||
|
||||
`sysupgrade --kernel=uImage.ssc338q --rootfs=rootfs.squashfs.ssc338q`
|
||||
or
|
||||
`sysupgrade --kernel=uImage.ssc30kq --rootfs=rootfs.squashfs.ssc30kq`
|
|
@ -0,0 +1,30 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Selecting hardware to complete OpenIPC FPV kits
|
||||
-----------------------------------------------
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-logo.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
|
||||
### FPV kit 1
|
||||
|
||||
- IPCam board GK7205V200 + IMX307
|
||||
- RTL8812AU x 2 (the board is debatable, maybe need an antenna connector, not a bare module) | [var.1](https://aliexpress.com/item/32830016946.html), [var.2](https://aliexpress.com/item/1005005262601564.html)
|
||||
- DC-DC Mini560 5V
|
||||
- lens, IR filter, mounting stands and screws and other accessories
|
||||
|
||||
|
||||
### FPV kit 2
|
||||
|
||||
- IPCam board GK7205V300 + IMX307
|
||||
- ....
|
||||
|
||||
### Q&A
|
||||
|
||||
- Will it be possible to have the product in warehouses in Europe and North America ?
|
||||
- Yes, in the future it is planned to ship from the Netherlands, Italy, Canada, Hong Kong.
|
||||
- Will it be possible to order expedited shipment by courier service ?
|
||||
- Yes, in the future such an opportunity will be provided
|
|
@ -0,0 +1,31 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
OpenIPC FPV mode testing
|
||||
------------------------
|
||||
|
||||
Saving values obtained from user research of OpenIPC FPV firmware.
|
||||
|
||||
It is necessary to supplement the table with other devices and sensors. including Goge, HiSilicon, Ingenic.
|
||||
|
||||
|
||||
#### SSC338Q + IMX415
|
||||
|
||||
| Size | FPS | Delay, ms |
|
||||
|:---------:|:---:|:---------:|
|
||||
| 1280x720 | 120 | |
|
||||
| 1600x900 | 90 | |
|
||||
| 1920x1080 | 60 | |
|
||||
| 3200x1800 | 30 | |
|
||||
| 3840x2160 | 20 | |
|
||||
|
||||
|
||||
#### SSC30KQ + IMX335
|
||||
|
||||
| Size | FPS | Delay, ms |
|
||||
|:---------:|:---:|:---------------------------------------:|
|
||||
| 1280x720 | 117 | avg = 28.3 ms, min = 16 ms, max = 34 ms |
|
||||
| 1600x900 | 80 | |
|
||||
| 1920x1080 | 60 | |
|
||||
|
||||
* _testing on radxa 3w fpvue_
|
|
@ -0,0 +1,41 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
OpenIPC FPV ground station
|
||||
--------------------------
|
||||
|
||||
|
||||
#### News roundup
|
||||
|
||||
- It is now possible to record video to a connected SSD or USB stick
|
||||
- Both HDMI and VGA outputs now work, there are no limitations in connected displays
|
||||
- A lot of different things ;)
|
||||
|
||||
|
||||
#### Upgrade from original HI3536DV100 NVR board firmware to OpenIPC FPV firmware
|
||||
|
||||
- Install [PUTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) and [TFTP](https://pjo2.github.io/tftpd64/) server
|
||||
- Download actual [image](https://openipc.org/cameras/vendors/hisilicon/socs/hi3536dv100/download_full_image?flash_size=16&flash_type=nor&fw_release=fpv) for NVR from OpenIPC site
|
||||
- Upload this image to your TFTP server
|
||||
- Turn off NVR power, connect USB adapter to your NVR UART, specify which COM port on your PC
|
||||
- Go to U-Boot with quick press Ctrl+C at power on
|
||||
- Execute a set of commands each line separately
|
||||
|
||||
```
|
||||
# Сhanging the ip address of the NVR board and the ip address of your TFTP server
|
||||
setenv ipaddr 192.168.1.10; setenv serverip 192.168.1.254
|
||||
mw.b 0x82000000 0xff 0x1000000
|
||||
tftp 0x82000000 openipc-hi3536dv100-fpv-16mb.bin
|
||||
sf probe 0; sf lock 0;
|
||||
sf erase 0x0 0x1000000; sf write 0x82000000 0x0 0x1000000
|
||||
reset
|
||||
```
|
||||
|
||||
#### The result
|
||||
|
||||

|
||||
|
||||
#### Buy a device
|
||||
|
||||
- [https://www.aliexpress.com/item/1005004023376532.html](https://www.aliexpress.com/item/1005004023376532.html)
|
||||
- [https://www.aliexpress.com/item/1005002358182146.html](https://www.aliexpress.com/item/1005002358182146.html)
|
|
@ -0,0 +1,143 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
OpenIPC AIO "Mario"
|
||||
-------------------
|
||||
|
||||
https://store.openipc.org/OpenIPC-AIO-Mario-v1-0-p633320808
|
||||
|
||||

|
||||
|
||||
Remove the lens cover film befor use
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
The Mario camera case with 4x M1.2 screws.
|
||||
|
||||
Side mount holes are M2 x2 screw thread.
|
||||
|
||||
Install atennas for AIO.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### LED function
|
||||
|
||||
Red glimmering Power on with Battery
|
||||
|
||||
Red Wired linked
|
||||
|
||||
Blue flash RF transmitter
|
||||
|
||||
Green TBD
|
||||
|
||||
Board Size 30mmx32mm with 4*M2 mount holes.
|
||||
|
||||
Heat Sink with 20mmx20mm mount holes.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
### Power Section
|
||||
|
||||
Power input:
|
||||
|
||||
2S-6S
|
||||
|
||||
The on board dualway BEC Capacity:
|
||||
|
||||
RF BEC on board is up to 3A 5V output
|
||||
|
||||
MSIC BEC on board is up to 2A 5V output
|
||||
|
||||
enter uboot use uart device connect to top of AIO board(R0,T0)pad.
|
||||
|
||||
|
||||
### Connect usb debug port
|
||||
|
||||
Power on AIO with Battery connector(GH1.25* 6 pin), after the blue LED flashing, plug in usb cable and connect to PC
|
||||
|
||||
in windows:
|
||||
|
||||
go to control panel- internet -network:
|
||||
|
||||
find a usb2.0 to fast Ethernet Adapter
|
||||
|
||||
set this card ipv4 address to 192.168.1.11 mask:255.255.255.0
|
||||
|
||||
apply
|
||||
|
||||
then open ssh to connect AIO address:192.168.1.10
|
||||
|
||||
user:root password:12345
|
||||
|
||||
|
||||
### Upgrade furmware
|
||||
|
||||
Update firmware possible via SD card or just use win scp drug the rootfs and kernel files to /tmp
|
||||
|
||||
```
|
||||
sysupgrade -n -z --kernel=/tmp/uImage.ssc338q --rootfs=/tmp/rootfs.squashfs.ssc338q
|
||||
```
|
||||
|
||||
You can [download](https://github.com/OpenIPC/wiki/blob/master/en/fpv-openipc-aio-ultrasight.md#software) firmware via the link that is used for online updates.
|
||||
|
||||
|
||||
Or just use the configurator - https://github.com/OpenIPC/configurator
|
||||
|
||||
|
||||
### RF section
|
||||
|
||||
RF antenna characteristics
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
Default Antenna is ANT1 for 1T1R, ANT0+ANT1 is 2T2R
|
||||
|
||||
Reconmand RF setting
|
||||
|
||||
RF Power max 18dbm for onbard PA. 0~-25dbm setting
|
||||
|
||||
MCS index 1,3(0-7 is 1T1R, 8+ is 2T2R)
|
||||
|
||||
stbc=1,ldpc=1
|
||||
|
||||
Video biterate:4096 /8192/12688(mcs 3+)
|
||||
|
||||
Keep RF poweroff or power=1 when on bench test(when only usb connect)
|
||||
|
||||
|
||||
### SD solt for Air camera record
|
||||
|
||||
on bench test or debug is disable the record function defaultly
|
||||
|
||||
To enable the recording function set (record value)true in majestic.yaml
|
||||
|
||||
|
||||
On board heat sink and cooling fan:
|
||||
|
||||
cooling fan out put power up to 500mA max
|
||||
|
||||
all heat sink mount holes are M2 screws thread.
|
||||
|
||||
|
||||
### Extend connector**
|
||||
|
||||

|
||||
|
||||
|
||||
### Todo
|
||||
|
||||
USB only for debug mode
|
||||
|
||||
Power limited 5W input.
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
OpenIPC AIO "UltraSight"
|
||||
---
|
||||
<a href="https://store.openipc.org"><img src="../images/fpv-openipc-aio.webp"></a>
|
||||
|
||||
## What's in the box
|
||||
<a href="https://raw.githubusercontent.com/OpenIPC/wiki/master/images/fpv-openipc-aio-content-1.webp"><img src="../images/fpv-openipc-aio-content-1.webp" width="60%"></a>
|
||||
<a href="https://raw.githubusercontent.com/OpenIPC/wiki/master/images/fpv-openipc-aio-content-2.webp"><img src="../images/fpv-openipc-aio-content-2.webp" width="60%"></a>
|
||||
|
||||
## First steps overview
|
||||
- Connect the Wireless antennas and install the heatsink (see Heatsink section).
|
||||
- Connect the Debug PCB and connect a network cable or USB-C cable.
|
||||
- Ensure proper cooling, airflow will be necessary to protect the board from overheating.
|
||||
- Power the board (see Power section) and either check your DHCP-Server (often your router) for a new device and it's IP address, the board will try to get an IP assigned through DHCP.
|
||||
- You can login to the WebUI of OpenIPC using the username **admin** and the password **12345** to check for connectivity.
|
||||
|
||||
## Heatsink
|
||||
- The package comes with a heatsink and thermal pad. The thermal pad is covered in 3M double sided tape on both sides. Two screws are included with the set that can be used to mount the heatsink.
|
||||
- The heatsinks purpose is to dissipate heat from the Wireless components on the PCB. The thermal pad and heatsink therefore need to be placed on the side that has the Wireless chipset on it (e.g. antenna connectors, Realtek chip and power amplifiers).
|
||||
|
||||
## PCB Overview
|
||||
<a href="https://raw.githubusercontent.com/OpenIPC/wiki/master/images/fpv-openipc-aio-manual.webp"><img src="../images/fpv-openipc-aio-manual.webp" width="80%"></a>
|
||||
|
||||
### Powering up the board
|
||||
- Before powering on AIO board, the power pad must be soldered or connected to a reliable **3A at 5V DC** power source or BEC. This amperage figure will be higher if higher RF power levels are selected.
|
||||
- Make sure that cooling is adequate while the board is powered on. a fan is essential, a heatsink is also advised when possible. failure to provide enough cooling to the board will most likely cause damage to the board.
|
||||
- When there is not enough load capacitance on the BEC, it is recommended to add a 470uF electrolytic capacitor (included in the set) between the BEC and AIO board to protect the AIO board from surge damage and provide decoupling. Install the capacitor as close to the AIO-PCB as possible.
|
||||
- For additional protection a Zener Diode with 1W capacity and a maximum Voltage of 5.1V (ZMY5V1, BZX55C5V1, BZT52C5V1, 1N5338B) can be soldered to the output of the BEC before the capacitor, the following diagram shows how to solder the components:
|
||||

|
||||
|
||||
### Debug/Ethernet
|
||||
- A Ethernet/Debug adapter is included. The flat-flex cable is used to connect it to the AIO-PCB. The connectors pins are located on the PCB side of the connector, pay attention to connect the flat flex cable with the exposed connections towards the PCB. The "handle" strips on the flat-flex cable will point towards the heatsink side on the AIO-PCB and away from the RJ45 connector on the Debugger PCB.
|
||||
|
||||
### Camera
|
||||
- The MIPI connector can be pushed into the corresponding socket on the AIO-PCB vertically. No great force is needed and there are no levers to move or clips to disengage. For removal, the connector has two little prongs on the sides to aid with gripping it.
|
||||
|
||||
## Software
|
||||
|
||||
### Automatic system upgrade
|
||||
- Connect your device to a network with the debug ethernet board.
|
||||
- Log into the system (root:12345).
|
||||
- Run the following commands:
|
||||
```
|
||||
fw_setenv upgrade https://github.com/OpenIPC/builder/releases/download/latest/ssc338q_fpv_openipc-urllc-aio-nor.tgz
|
||||
sysupgrade -k -r -n
|
||||
```
|
||||
|
||||
### Manual system update
|
||||
- Prepare a sdcard formatted in FAT32 with 1GB size.
|
||||
- Download and extract [this package](https://github.com/openipc/builder/releases/download/latest/ssc338q_fpv_openipc-urllc-aio-nor.tgz).
|
||||
- Copy uImage.ssc338q and rootfs.squashfs.ssc338q to the sdcard.
|
||||
- Interrupt uboot by holding the enter key.
|
||||
- Run the following commands:
|
||||
```
|
||||
run setsdcard
|
||||
run uknor
|
||||
run urnor
|
||||
```
|
||||
|
||||
### Connect to wireless router
|
||||
- Upgrade the firmware to the newest version.
|
||||
- Log into the system (root:12345).
|
||||
- Run the following commands:
|
||||
|
||||
```
|
||||
fw_setenv wlandev rtl8812au-generic
|
||||
fw_setenv wlanssid Router
|
||||
fw_setenv wlanpass Password
|
||||
network restart
|
||||
```
|
||||
|
||||
### Update bootloader
|
||||
- Log into the system (root:12345).
|
||||
- Run the following commands:
|
||||
```
|
||||
curl -L -o /tmp/uboot.bin https://github.com/openipc/firmware/releases/download/latest/u-boot-ssc338q-nor.bin
|
||||
flashcp -v /tmp/uboot.bin /dev/mtd0
|
||||
```
|
||||
|
||||
### Custom GPIO
|
||||
- Button input:
|
||||
```
|
||||
echo 107 > /sys/class/gpio/export
|
||||
echo in > /sys/class/gpio/gpio107/direction
|
||||
cat /sys/class/gpio/gpio107/value
|
||||
```
|
||||
- Led control:
|
||||
```
|
||||
gpio clear 108
|
||||
gpio set 108
|
||||
```
|
||||
|
||||
### Third party cables compatibility
|
||||
- DJI Pocket2 cable - COMPATIBLE with OpenIPC AIO
|
||||
- DJI O3 mipi cable - NOT suitable for OpenIPC AIO
|
||||
- RunCam mipi cable - NOT suitable for OpenIPC AIO
|
|
@ -0,0 +1,22 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
OpenIPC Alliance for FPV
|
||||
------------------------
|
||||
|
||||
### Introduction
|
||||
|
||||
The OpenIPC team has decided to create an Alliance to promote and implement certain open circuit design standards for FPV system components.
|
||||
|
||||
On this page we will inform everyone about all members of the Alliance and report on changes and supplement links to projects.
|
||||
|
||||
|
||||
### Interface connector for the sensor
|
||||
|
||||
The first component to be standardized will be the connector between the any OpenIPC AIO main board ("UltraSight", "Thinker", "Mario") and the any OpenIPC sensor module (IMX307, IMX335, IMX347, IMX415).
|
||||
|
||||
We draw your attention to the fact that other modules of the other companies are **INCOMPATIBLE** and will definitely cause damage to your devices.
|
||||
|
||||
<p align="left">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-openipc-alliance/openipc-alliance-fpv-sensor-pinout.jpg?raw=true"/>
|
||||
</p>
|
|
@ -0,0 +1,479 @@
|
|||
|
||||
<h3>* A preinstalled image is now available here -- https://github.com/JohnDGodwin/OpenIPC_Groundstations/releases/tag/OrangePi5Plus</h3>
|
||||
|
||||
***
|
||||
|
||||
Download Ubuntu Server ISO and flash to device -- `https://github.com/Joshua-Riek/ubuntu-rockchip`
|
||||
|
||||
`sudo apt update`
|
||||
|
||||
`sudo apt upgrade`
|
||||
|
||||
Go ahead and pull some packages we will need, too.
|
||||
|
||||
`sudo apt install dkms python3-all-dev fakeroot cmake meson`
|
||||
|
||||
Set system local timezone - replace region and city with your usecase
|
||||
|
||||
`ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime`
|
||||
|
||||
set hostname
|
||||
|
||||
`sudo nano /etc/hostname`
|
||||
|
||||
|
||||
***
|
||||
|
||||
Gsteamer setup with MPP
|
||||
|
||||
|
||||
Download and install gstreamer
|
||||
|
||||
`sudo apt --no-install-recommends install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-gl`
|
||||
|
||||
|
||||
|
||||
Download and install rockchip mpp, rga, and gstreamer plugin from an included custom PPA, for hardware accelerated decoding.
|
||||
|
||||
`sudo apt install gstreamer1.0-rockchip1 librga-dev librga2 librockchip-mpp-dev librockchip-mpp1 librockchip-vpu0 libv4l-rkmpp rockchip-multimedia-config libgl4es libgl4es-dev libdri2to3`
|
||||
|
||||
|
||||
|
||||
test with:
|
||||
|
||||
`gst-inspect-1.0 | grep 265`
|
||||
|
||||
`gst-inspect-1.0 | grep mpp`
|
||||
|
||||
|
||||
|
||||
***
|
||||
|
||||
rtl8812au drivers installation
|
||||
|
||||
|
||||
enter the following line-by-line
|
||||
|
||||
sudo bash -c "cat > /etc/modprobe.d/wfb.conf <<EOF
|
||||
# blacklist stock module
|
||||
blacklist 88XXau
|
||||
blacklist 8812au
|
||||
blacklist rtl8812au
|
||||
blacklist rtl88x2bs
|
||||
EOF"
|
||||
|
||||
|
||||
|
||||
`git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git`
|
||||
|
||||
``cd rtl8812au/``
|
||||
|
||||
`sudo ./dkms-install.sh`
|
||||
|
||||
|
||||
***
|
||||
|
||||
|
||||
reboot device
|
||||
|
||||
TODO: or figure out how to load the driver without a full reboot. Try "modprobe 88xxau"
|
||||
|
||||
|
||||
***
|
||||
|
||||
WFB-ng installation
|
||||
|
||||
|
||||
find wifi device name using iwconfig and substitute it for $WLAN in the script install
|
||||
|
||||
`git clone -b stable https://github.com/svpcom/wfb-ng.git`
|
||||
|
||||
`cd wfb-ng`
|
||||
|
||||
`sudo ./scripts/install_gs.sh $WLAN`
|
||||
|
||||
|
||||
after install:
|
||||
|
||||
|
||||
`sudo systemctl enable wifibroadcast`
|
||||
|
||||
|
||||
then
|
||||
|
||||
|
||||
`sudo nano /etc/wifibroadcast.cfg`
|
||||
|
||||
|
||||
change the channel to match the vtx
|
||||
|
||||
change the region from 'BO' to '00'
|
||||
|
||||
|
||||
|
||||
|
||||
Copy drone.key from the wfb-ng directory to the vtx's /etc directory
|
||||
|
||||
example using scp, replace x.x.x.x with the camera's ip address
|
||||
|
||||
`scp drone.key root@x.x.x.x:/etc`
|
||||
|
||||
|
||||
Make sure gs.key was automatically put in /etc on the VRX side
|
||||
|
||||
`ls /etc/gs.key`
|
||||
|
||||
|
||||
|
||||
***
|
||||
|
||||
|
||||
reboot device again
|
||||
|
||||
|
||||
***
|
||||
|
||||
test the connection:
|
||||
|
||||
on the groundstation run
|
||||
|
||||
`sudo systemctl enable wifibroadcast@gs`
|
||||
|
||||
`sudo systemctl start wifibroadcast@gs`
|
||||
|
||||
`wfb-cli gs`
|
||||
|
||||
|
||||
Plug in the camera and watch the packets come in, xlost should stay near zero while xrecv should go up
|
||||
|
||||
|
||||
***
|
||||
|
||||
|
||||
graphical environment for gstreamer playback
|
||||
|
||||
|
||||
`sudo apt install --no-install-recommends xorg lightdm-gtk-greeter lightdm openbox`
|
||||
|
||||
Then edit
|
||||
|
||||
`sudo nano /etc/lightdm/lightdm.conf`
|
||||
|
||||
|
||||
insert:
|
||||
|
||||
[Seat:*]
|
||||
autologin-user=ubuntu
|
||||
xserver-command = X -nocursor
|
||||
|
||||
|
||||
|
||||
***
|
||||
|
||||
TODO:
|
||||
At this point, reboot and you will have to login with a keyboard at least once, but after it will auto login the ubuntu user to an openbox session with no cursor
|
||||
|
||||
|
||||
***
|
||||
|
||||
|
||||
|
||||
let's set the desktop wallpaper and write some startup scripts
|
||||
|
||||
|
||||
`sudo apt install --no-install-recommends libimlib2-dev libx11-dev libxinerama-dev pkg-config make`
|
||||
|
||||
`git clone https://github.com/himdel/hsetroot.git`
|
||||
|
||||
`cd hsetroot`
|
||||
|
||||
`make`
|
||||
|
||||
`sudo make install`
|
||||
|
||||
|
||||
|
||||
Save your desired background image to /home/ubuntu/desktop.png
|
||||
|
||||
Make a scripts directory:
|
||||
|
||||
`mkdir /home/ubuntu/scripts`
|
||||
|
||||
a script to set the display resolution to 1280x720
|
||||
|
||||
|
||||
`sudo nano /home/ubuntu/scripts/setdisplay.sh`
|
||||
|
||||
|
||||
insert:
|
||||
|
||||
|
||||
#/bin/bash
|
||||
export DISPLAY=:0
|
||||
|
||||
#set your desired screen resolution here
|
||||
MODE=1280x720
|
||||
|
||||
|
||||
if [[ $(xrandr | awk '/HDMI-1/ {print $2}') == "connected" ]]; then
|
||||
xrandr --output HDMI-1 --mode $MODE
|
||||
fi
|
||||
if [[ $(xrandr | awk '/HDMI-2/ {print $2}') == "connected" ]]; then
|
||||
xrandr --output HDMI-2 --mode $MODE
|
||||
fi
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
|
||||
a script to start/stop the video stream and save DVR to the ~/Videos directory
|
||||
|
||||
note: This script relies on a push button connected between pin 5 and GND. You will have to install one for this to work.
|
||||
|
||||
Make Videos directory
|
||||
|
||||
`sudo mkdir /home/ubuntu/Videos`
|
||||
|
||||
Make the script
|
||||
|
||||
`sudo nano /home/ubuntu/scripts/dvr.sh`
|
||||
|
||||
insert:
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
xset s off -dpms
|
||||
|
||||
GPIO_PIN=5
|
||||
RUNNING=0
|
||||
gpio mode $GPIO_PIN up
|
||||
|
||||
cd /home/ubuntu/Videos
|
||||
|
||||
while true; do
|
||||
if [ $(gpio read $GPIO_PIN) -eq 0 ]; then
|
||||
if [ $RUNNING -eq 0 ]; then
|
||||
current_date=$(date +'%m-%d-%Y_%H-%M-%S')
|
||||
|
||||
gst-launch-1.0 -e \
|
||||
udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265' ! \
|
||||
rtph265depay ! \
|
||||
h265parse ! \
|
||||
tee name=t ! \
|
||||
queue ! \
|
||||
mppvideodec ! \
|
||||
videoconvert ! \
|
||||
autovideosink sync=false t. ! \
|
||||
queue ! \
|
||||
matroskamux ! \
|
||||
filesink location=record_${current_date}.mkv &
|
||||
|
||||
RUNNING=$!
|
||||
else
|
||||
kill $RUNNING
|
||||
RUNNING=0
|
||||
fi
|
||||
sleep 0.2
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
|
||||
Make the scripts executable with chmod +x.
|
||||
|
||||
`sudo chmod +x /home/ubuntu/scripts/dvr.sh /home/ubuntu/scripts/setdisplay.sh`
|
||||
|
||||
|
||||
Finally:
|
||||
|
||||
`sudo nano /etc/xdg/openbox/autostart`
|
||||
|
||||
add:
|
||||
|
||||
bash /home/ubuntu/scripts/setdisplay.sh
|
||||
|
||||
hsetroot -cover /home/ubuntu/desktop.png &
|
||||
|
||||
sudo /home/ubuntu/scripts/dvr.sh &
|
||||
|
||||
To display the video stream to the screen borderless we do the following.
|
||||
|
||||
`sudo nano /etc/xdg/openbox/rc.xml`
|
||||
|
||||
locate the line `<keepBorder>yes</keepBorder>` and replace it with `<keepBorder>no</keepBorder>`
|
||||
|
||||
then at the end of the file add:
|
||||
|
||||
<applications>
|
||||
<application class="*">
|
||||
<decor>no</decor>
|
||||
</application>
|
||||
</applications>
|
||||
|
||||
|
||||
***
|
||||
|
||||
Pulling the DVR over IP -- a basic media server using nginx
|
||||
|
||||
|
||||
`sudo apt install nginx-light`
|
||||
|
||||
|
||||
give permissions up the file tree to our video directory
|
||||
|
||||
|
||||
`sudo chmod o+x /home /home/ubuntu /home/ubuntu/Videos`
|
||||
|
||||
|
||||
|
||||
backup the default loading page and replace it with our own
|
||||
|
||||
`sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.old`
|
||||
|
||||
`sudo nano /etc/nginx/sites-available/default`
|
||||
|
||||
Add the following, but replace x.x.x.x with your system's network IP address:
|
||||
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
listen [::]:8080;
|
||||
|
||||
server_name x.x.x.x;
|
||||
|
||||
root /home/ubuntu/Videos;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
|
||||
restart nginx to initate the changes
|
||||
|
||||
`sudo systemctl restart nginx`
|
||||
|
||||
Your DVR is now available for download at x.x.x.x:8080 in a browser
|
||||
|
||||
***
|
||||
|
||||
Automatic transcoding of the mkv DVR to hevc mp4
|
||||
|
||||
If you wish to make an apple pie from scratch, you must first invent the universe -- Our gstreamer packages don't handle muxing of mp4 h265 video, and our apt-get ffmpeg package does not include rkmpp hardware acceleration.... so we're going to build ffmpeg with mpp support with the help of https://github.com/nyanmisaka/ffmpeg-rockchip
|
||||
|
||||
We can do this with 3 simple installation scripts.
|
||||
|
||||
First we build MPP from sources, as our current MPP package is older.
|
||||
|
||||
Second we build RGA from sources for the same reason.
|
||||
|
||||
Third we build ffmpeg with rkmpp and rkrga support.
|
||||
|
||||
`sudo nano buildMPP.sh`
|
||||
|
||||
mkdir -p ~/MPP && cd ~/MPP
|
||||
git clone -b jellyfin-mpp --depth=1 https://github.com/nyanmisaka/mpp.git rkmpp
|
||||
pushd rkmpp
|
||||
mkdir rkmpp_build
|
||||
pushd rkmpp_build
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TEST=OFF \
|
||||
..
|
||||
make -j $(nproc)
|
||||
sudo make install
|
||||
|
||||
|
||||
`sudo nano buildRGA.sh`
|
||||
|
||||
mkdir -p ~/RGA && cd ~/RGA
|
||||
git clone -b jellyfin-rga --depth=1 https://github.com/nyanmisaka/rk-mirrors.git rkrga
|
||||
meson setup rkrga rkrga_build \
|
||||
--prefix=/usr \
|
||||
--libdir=lib \
|
||||
--buildtype=release \
|
||||
--default-library=shared \
|
||||
-Dcpp_args=-fpermissive \
|
||||
-Dlibdrm=false \
|
||||
-Dlibrga_demo=false
|
||||
meson configure rkrga_build
|
||||
sudo ninja -C rkrga_build install
|
||||
|
||||
`sudo nano buildFFMPEG.sh`
|
||||
|
||||
mkdir -p ~/ffmpeg && cd ~/ffmpeg
|
||||
git clone --depth=1 https://github.com/nyanmisaka/ffmpeg-rockchip.git ffmpeg
|
||||
cd ffmpeg
|
||||
./configure --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga
|
||||
make -j $(nproc)
|
||||
|
||||
./ffmpeg -decoders | grep rkmpp
|
||||
./ffmpeg -encoders | grep rkmpp
|
||||
./ffmpeg -filters | grep rkrga
|
||||
|
||||
sudo make install
|
||||
|
||||
|
||||
Make the scripts executable
|
||||
|
||||
`sudo chmod +x buildMPP.sh buildRGA.sh buildFFMPEG.sh`
|
||||
|
||||
And run them one at a time:
|
||||
|
||||
`./buildMPP.sh`
|
||||
|
||||
`./buildRGA.sh`
|
||||
|
||||
`./buildFFMPEG.sh`
|
||||
|
||||
Now we can use ffmpeg to hardware transcode the mkv video files to hevc mp4. We can have this automatically happen at the end of each recording by augmenting the dvr.sh script. Open the dvr.sh script in your /home/ubuntu/scripts directory, find the line `kill $RUNNING` and add the following two lines below it.
|
||||
|
||||
sleep 0.2
|
||||
ffmpeg -hwaccel rkmpp -i record_${current_date}.mkv -c:v hevc_rkmpp record_${current_date}.mp4
|
||||
|
||||
The full script should look like this:
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
xset s off -dpms
|
||||
|
||||
GPIO_PIN=5
|
||||
RUNNING=0
|
||||
gpio mode $GPIO_PIN up
|
||||
|
||||
cd /home/ubuntu/Videos
|
||||
|
||||
while true; do
|
||||
if [ $(gpio read $GPIO_PIN) -eq 0 ]; then
|
||||
if [ $RUNNING -eq 0 ]; then
|
||||
current_date=$(date +'%m-%d-%Y_%H-%M-%S')
|
||||
|
||||
gst-launch-1.0 -e \
|
||||
udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265' ! \
|
||||
rtph265depay ! \
|
||||
h265parse ! \
|
||||
tee name=t ! \
|
||||
queue ! \
|
||||
mppvideodec ! \
|
||||
videoconvert ! \
|
||||
autovideosink sync=false t. ! \
|
||||
queue ! \
|
||||
matroskamux ! \
|
||||
filesink location=record_${current_date}.mkv &
|
||||
|
||||
RUNNING=$!
|
||||
else
|
||||
kill $RUNNING
|
||||
RUNNING=0
|
||||
sleep 0.2
|
||||
ffmpeg -hwaccel rkmpp -i record_${current_date}.mkv -c:v hevc_rkmpp record_${current_date}.mp4
|
||||
fi
|
||||
sleep 0.2
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
***
|
|
@ -0,0 +1,21 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
RunCam WiFiLink based on OpenIPC
|
||||
--------------------------------
|
||||
|
||||
### Q&A with RunCam Dev
|
||||
|
||||
- What changes have you made compared to the original OpenIPC firmware ?
|
||||
- We optimized the IQ sensor and added the /etc/user_config.sh script to implement the WiFi card configuration function.
|
||||
|
||||
|
||||
### Links
|
||||
|
||||
- https://shop.runcam.com/runcam-wifilink-based-on-openipc/
|
||||
- https://store-m8o52p.mybigcommerce.com/product_images/img_runcma_wifilink/runcma-wifilink-manual-en.pdf
|
||||
- https://www.runcam.com/download/runcamwifilink
|
||||
-
|
||||
- https://runcam.world.taobao.com
|
||||
- https://item.taobao.com/item.htm?id=823103143737&skuId=5704904774133
|
||||
- https://fr.aliexpress.com/item/1005007532941097.html?gatewayAdapt=glo2fra
|
|
@ -0,0 +1,75 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Instructions for installing OpenIPC firmware on SigmaStar devices
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-logo.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
### SSC338Q + IMX415 + NAND flash, board from CamHi vendor
|
||||
#### Quick note on experiments, will be revised and updated
|
||||
|
||||
#### Summary
|
||||
The Sigmastar IPL (pre-bootloader) allows to boot a custom U-Boot from the sdcard.
|
||||
With this temporary OpenIPC firmware you can create a backup of the nand and flash the permanent firmware afterwards.
|
||||
|
||||
#### Prepare
|
||||
- Connect your sdcard to your computer, create a 1 GB partition and format it as FAT32 / VFAT.
|
||||
- [Download ssc338q-initramfs.zip][1]
|
||||
- Copy all files to the root directory of the sdcard, update your wireless credentials on autostart.sh:
|
||||
```diff
|
||||
#!/bin/sh
|
||||
+WLAN_SSID="Router"
|
||||
+WLAN_PASS="12345678"
|
||||
```
|
||||
- Put the sdcard into the camera module, start it and wait until it connects to your router.
|
||||
- Use ssh to connect to the camera:
|
||||
```
|
||||
ssh root@192.168.1.100
|
||||
12345
|
||||
```
|
||||
|
||||
#### Backup
|
||||
- /dev/mtd0 uses the complete partition size of the nand flash.
|
||||
- This might take some time, the backup to the sdcard is rather slow.
|
||||
```
|
||||
nanddump -f /mnt/mmcblk0p1/backup-nand.bin /dev/mtd0
|
||||
```
|
||||
|
||||
- Alternatively the flash content can be uploaded via tftp.
|
||||
```
|
||||
cd /dev
|
||||
tftp 192.168.1.10 -pr mtd0
|
||||
```
|
||||
|
||||
#### Install
|
||||
```
|
||||
flash_eraseall /dev/mtd0
|
||||
nandwrite -k /dev/mtd0 /mnt/mmcblk0p1/ssc338q-fpv.bin
|
||||
rm /mnt/mmcblk0p1/UBOOT
|
||||
reboot -f
|
||||
```
|
||||
|
||||
#### Buying a device (CamHi vendor)
|
||||
- https://aliexpress.com/item/1005002879158570.html
|
||||
- https://aliexpress.com/item/1005005750013595.html
|
||||
|
||||
---
|
||||
|
||||
### SSC338Q + IMX415 + NOR flash, board from Anjoy vendor
|
||||
#### Information collection continues
|
||||
Information collection continues
|
||||
|
||||
#### Buying a device (Anjoy vendor)
|
||||
- https://aliexpress.com/item/1005003738087454.html
|
||||
|
||||
---
|
||||
|
||||
### Other notes
|
||||
For testing please use the [MPV](https://mpv.io/) player, in which the Shift+I key combination can be used to get debugging information.
|
||||
|
||||
[1]: https://github.com/OpenIPC/wiki/files/13382282/ssc338q-initramfs.zip
|
|
@ -0,0 +1,681 @@
|
|||
# A step-by-step installation guide for an FPV setup
|
||||
|
||||
When considering installing OpenIPC for FPV use, we can basically break the process down into 6 key steps.
|
||||
|
||||
1. Flashing the Camera and groundstation with OpenIPC
|
||||
2. Connecting additional hardware (wifi adapters and BECS)
|
||||
3. Generating and installing the key pairing for WFB-NG
|
||||
4. Editing wfb.conf to set the correct wifi channel
|
||||
5. Configuring vdec.conf on the groundstation
|
||||
6. Configuring the majestic.yaml file on the camera
|
||||
7. Testing out the configuration
|
||||
8. Video tutorial and next steps
|
||||
|
||||
Parts 1 and 2 covers the setup of the hardware - although there are many substeps involved, so you can consider this the "hard bit". Although the software side of things (steps 3 - 6) has more steps, it's essentially editing some files and thus we can consider that the "easy bit"
|
||||
|
||||
### Hardware Requirements
|
||||
For this step-by-step guide, I'm using specific hardware, and although the procedure to flash cameras and groundstations are broadly the same, each one can be quite different in terms of the UART connection you can use, as well as the chip set and memory being different - so make sure you check this carefully for your devices. On a basic level, you'll need a groundsation, a camera, 2 wifi adapters, up to 4 UBECS and an FTDI board.
|
||||
|
||||
As a reference for my camera, I ordered an SSC338 based board with a Sony IMX415 sensor.
|
||||
|
||||

|
||||
|
||||
I ordered this with a 2.8mm lens (which seems a bit narrow for FPV, but it's the widest that was available) and with the 12V Lan cable. This cable is very important for flashing the camera. This camera was chosen as it could do a range of frame rates and resolutions, and also had a decent sensor. I bought this from AliExpress, the specific URL for the link is [here](https://www.aliexpress.com/item/1005004350557805.html)
|
||||
|
||||
For the groundstation I chose an Nvr board - which seems to be fairly popular in the OpenIPC community and is very low cost. Again, the specific model I bought is [here](https://www.aliexpress.com/item/1005004023376532.html)
|
||||
|
||||

|
||||
|
||||
Both the camera and groundstaion need a wifi adapter in order to send your FPV signal over the air, so another low-cost solution was the RTL8812AU. Specifically, I ordered 2 of [these](https://www.aliexpress.com/item/1005005638445796.html)
|
||||
|
||||

|
||||
|
||||
Because we will need to run the camera and Nvr at 12v, and the wifi adapters on 3.3v, I ordered some simple BECS that could be configured to put out either 3.3v, 12v, or anything in between. Lots of options are available here. I picked up 4 of [these](https://www.ebay.co.uk/itm/254153188189) from my local eBay site.
|
||||
|
||||

|
||||
|
||||
The FTDI adapter is essential for being able to get a console on the device in order to start the flashing process. These are widely available on eBay quite cheaply [here's an example](https://www.ebay.co.uk/itm/203581591537?hash=item2f66688ff1) You should make sure the FTDI adapter you chose has a jumper that can move it between 5v and 3.3v though
|
||||
|
||||

|
||||
|
||||
Aside from this, there are obviously a few general requirements - wire to connect things up, a soldering iron, your chosen connector for supplying power (most probably an XT60 - but the choice is yours here)
|
||||
|
||||
### Step 1: Flashing the Camera and groundstation with OpenIPC
|
||||
We're going to break this down into a few substeps and separate out the camera and the groundstation. So let's start with the the trickier part.
|
||||
|
||||
### Step 1.1: Flashing the Camera
|
||||
|
||||
First, let's examine the camera and all its various points of connection.
|
||||
|
||||

|
||||
|
||||
To flash OpenIPC we need to use the FTDI adapter to open up a console connection on the camera, and then break into the bootloader. This sounds more complex than it is - all we have to do is solder up a few wires and press RETURN at the right point.
|
||||
|
||||
One thing that makes this more challenging on this particular camera is the location of the pins we need to connect to. It is, of course, the 2 very small solder pads on the right hand side of the board (as pictured) You can, very carefully, solder directly to these pads - but be very careful about not using too much heat as these pads can easily be lifted off!
|
||||
|
||||
An alternative to soldering, if you aren't confident about it, is to use some pogo pins in order to make a temporary connection whilst you do the flashing. I designed a simple 3D printable tool in order to achieve this which can be downloaded from Thingiverse [here](https://www.thingiverse.com/thing:6358225) You will also need some pogo pins to complete this tool. I ordered [these](https://www.amazon.co.uk/dp/B08NT88C3G) from Amazon (only available in 100!) Note: Solder the wires to the pogo pins before you push them into the 3D print. If you solder them whilst in the print, the PLA will melt and it's a hassle getting the pins right again.
|
||||
|
||||
You need to push the pogo pins in just enough so you have to flex the tool a little to place it over the board, and when you let go the pins should come down and make good contact with the solder pads (note: this picture was taken whilst I was testing it for fit - at this stage, you should have soldered wires to the pogo pins already)
|
||||
|
||||

|
||||
|
||||
Ok, so whether you've soldered or used the tool, you now want to connect up to your FTDI adapter. First, set the jumper on your FTDI adapter to 3.3v and then connect from the TX pad on the camera to the RX pin on the FTDI adapter, the RX pad on the camera to the TX pin on the FTDI adapter, and any ground connection on the camera to the ground pin on the FDTI adapter.
|
||||
|
||||
If you are now thinking "Hang about, which ground pin?". Let me show you my slightly refined pin-out diagram of the camera which I call the "useful pins"
|
||||
|
||||

|
||||
|
||||
What we have here are the pins that actually have some relevance to us when wiring up this camera. We've already connected the TX/RX, so if you have an old 3 pins connector from an FPV camera it may be just the right size to put into the socket containing the GND on the left of the pictured board. This is what I did at least. If you don't have any JST connectors like this - get some. Where possible I like to avoid soldering around these tiny components as much as possible.
|
||||
|
||||
You'll need to also connect the camera to your wired network via the ethernet port in the cable it should have come with (hence ordering the 12V Lan cable) and this is where you'd also need to power it - using a 12v barrel plug.
|
||||
|
||||
With everything connected, it should look something like this. But just before we go ahead and plug in the 12v power need to have the software available to open up a serial console so we can break into the bootloader and actually run some commands.
|
||||
|
||||

|
||||
|
||||
On a Mac (or Linux) this is pretty easy as we have all the commands built in. I'm just going to cover MacOS and Windows in the step-by-step documentation. Linux should be very similar to MacOS, but if you are running Linux as your primary OS, then I'd kind of expect you to know the commands already!
|
||||
|
||||
### Step 1.2 Setting up serial terminal emulation
|
||||
|
||||
**MacOS**
|
||||
|
||||
First up, plug in your FTDI adapter (but keep the camera powered off for now) this will allow the FDTI adapter to be identified by the system. First off, we'll need to open up a terminal. You can find this in your Applications folder inside the Utilities sub directory. Once you have this terminal open we need to find out which device out FTDI adapter is. To do this type
|
||||
|
||||
```
|
||||
$ ls -l /dev/tty.usbserial*
|
||||
crw-rw-rw- 1 root wheel 9, 10 20 Dec 10:31 /dev/tty.usbserial-A50285BI
|
||||
```
|
||||
|
||||
As you can see, my device is called /dev/tty.usbserial-A50285BI. But yours maybe different, we need the name of this device to use in the next command which actually opens up a serial emulator on that device and will allow us to communicate with the camera. Do do this, we can use the screen command. On your command line, type
|
||||
|
||||
`$ screen /dev/tty.usbserial-A50285BI 115200`
|
||||
|
||||
115200 is the baud rate we're using. Ok, we should now have a blank screen with a cursor up the top waiting for something to appear. You can skip over to section 1.3
|
||||
|
||||
**Windows**
|
||||
|
||||
Windows needs a bit of extra software installed as it has nothing in the base OS that can get the job done. For both serial terminal emulation as well as ssh and scp (we'll use these latter two later on) I'd suggest using Putty which you can download [here](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) Once you have this downloaded, installed and running - plug in the FTDI adapter, but keep the camera powered off for now. First off, we need to find which COM port Windows has allocated the FTSI adapter, to check this you can go into Device Manager to find this out (just type device manager in the search bar)
|
||||
|
||||

|
||||
|
||||
In my case, you can see that the FTDI adapter was configured as COM6. Back in the Putty screen change the connection type to Serial, put the COM port you see for you FTDI adapter into the Serial Line text box, and set the Speed to 115200. It's useful to save this so it can just be double clicked to open up this terminal in the future. So if you type Serial OpenIPC (or whatever you want to call it) in the Saved Session text box and click on Save.
|
||||
|
||||

|
||||
|
||||
Now if we double click that saved session, it will open up a new screen ready to talk to the camera.
|
||||
|
||||
### Step 1.3 Setting up a tftp server
|
||||
|
||||
tftp stands for "Trivial file transfer protocol". You've probably used the more full functioned ftp protocol in the past. tftp has traditionally been used in the past to "net booting" remote workstations. On bootup, all these clients would know how to do is ask and server on a specific ip address for a boot file, and it would download and run that. There's no passwords involved or any other commands to run, it's just a case of "give me this file" hence it's trivial. The normal worry for people when running any sort of server on their system is will it compromise the security of your system? The answer is no, it shouldn't do. You only need to receive connections on your local network, and besides - this protocol is very old and understood. Any security exploits that may have been there have been found years ago and patched.
|
||||
|
||||
**MacOS**
|
||||
|
||||
MacOS has its own tftp server ready to run, but it's not started by default. To start it up, type
|
||||
|
||||
`$ sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
|
||||
`
|
||||
|
||||
The sudo command means run as root, so you will get prompted here to type in your root password in order for the command to run successfully. MacOS will use the /private/tftpboot directory to serve files from, so we'll be putting our bootimage in this directory later on.
|
||||
|
||||
**Windows**
|
||||
|
||||
As you might expect, Windows needs more software installed to run a tftp server. There are a lot of options out there, I used from the company Solarwinds which you can get to [here](https://www.solarwinds.com/free-tools/free-tftp-server?) While it is a free download, the company asks for registration information. What you choose to put in the registration information is, of course, entirely up to you - as it has no bearing on actually getting the download link to get the software. Once you have the software and have installed and run it you should get a window like this.
|
||||
|
||||

|
||||
|
||||
The server will use the C:\TFTP-Root directory to serve files from, so we'll be putting our bootimage in this directory later.
|
||||
|
||||
### Step 1.4 Getting the correct firmware image
|
||||
|
||||
The SOC for this particular camera is a SigmaStar SSC338Q. Identifying exactly what SOC is on your camera is obviously very important as the firmware is specific to each SOC. Happily, in the case of my camera (and if you look at the pinout diagram above) you can see it written on the board. To find the firmware for your camera, from the main OpenIPC [webpage](https://openipc.org/) go to the Precompiled binary files link, which will take you to this [page](https://openipc.org/supported-hardware/featured) from here, we can see the SigmaStar SSC338Q on the featured page, but depending on the model of SOC you have, you can show pick the appropriate manufacturer in the links along the top of the page. Whichever one you have, the next move is to click on Generate an installation guide. In this case, it takes us to [this](https://openipc.org/cameras/vendors/sigmastar/socs/ssc338q) page
|
||||
|
||||
The picture shows this page **after** I've changed the options for the specific firmware version I need.
|
||||
|
||||

|
||||
|
||||
A few notes about these changes. When you first come to this page, the MAC address field will be blank - so click on generate a valid MAC address to populate this. For the camera IP address, we need to give it an unused address on the same subnet that our PC is running on. In most cases, your home network will be on a 192.168.0.x or 192.168.1/x network. If you are not sure about what your subnet is, then we need to also find the address of our PC for the tftpserver, so that's one way of finding out.
|
||||
|
||||
On MacOS I can simply use
|
||||
|
||||
```
|
||||
$ ifconfig en0
|
||||
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|
||||
options=50b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV,CHANNEL_IO>
|
||||
ether 3c:cd:36:5b:d4:80
|
||||
inet6 fe80::c78:ab18:b66d:b615%en0 prefixlen 64 secured scopeid 0x4
|
||||
inet 192.168.0.10 netmask 0xffffff00 broadcast 192.168.0.255
|
||||
nd6 options=201<PERFORMNUD,DAD>
|
||||
media: autoselect (1000baseT <full-duplex,flow-control,energy-efficient-ethernet>)
|
||||
status: active
|
||||
```
|
||||
|
||||
On Windows you can use a similar command from the command prompt (type cmd in the search bar)
|
||||
|
||||
```
|
||||
C:\>ipconfig
|
||||
|
||||
Windows IP Configuration
|
||||
|
||||
|
||||
Ethernet adapter Ethernet0:
|
||||
|
||||
Connection-specific DNS Suffix . : localdomain
|
||||
Link-local IPv6 Address . . . . . : fe80::e34e:48bb:9e79:90b2%12
|
||||
IPv4 Address. . . . . . . . . . . : 192.168.0.10
|
||||
Subnet Mask . . . . . . . . . . . : 255.255.255.0
|
||||
Default Gateway . . . . . . . . . : 192.168.0.1
|
||||
|
||||
Ethernet adapter Bluetooth Network Connection:
|
||||
|
||||
Media State . . . . . . . . . . . : Media disconnected
|
||||
Connection-specific DNS Suffix . :
|
||||
```
|
||||
|
||||
From this command, we can see that my PC's IP address is 192.168.0.10 and my subnet is 192.168.0. So I can fill in my TFTP server IP address field, and for the Camera IP address field, I just need to pick one that's not already being used. I used the 192.168.0.123 because it wasn't being used. If you are not sure, you can try pinging this address to check.
|
||||
|
||||
```
|
||||
$ ping 192.168.0.123
|
||||
PING 192.168.0.123 (192.168.0.123): 56 data bytes
|
||||
Request timeout for icmp_seq 0
|
||||
Request timeout for icmp_seq 1
|
||||
Request timeout for icmp_seq 2
|
||||
```
|
||||
|
||||
These timeouts generally indicate that there's no host at that address, and it should be safe to use.
|
||||
|
||||
For the rest of the options, this camera has 16MB of flash RAM (we can see how to verify this later), I've changed the Firmware Version to FPV, and the Network interface and SD card slot are the default values. So now, let's click on Generate Installation Guide. Which will show you a guide like this.
|
||||
|
||||

|
||||
|
||||
The idea of this installation guide is once you have the console on the camera open, you can simply cut and paste the commands into the console window to perform the backup and the firmware flash. There's only one issue with this, and that's a few errors in the guide. To be fair since I did my flash, it's improved, but there are still a few errors that need to be sorted out.
|
||||
|
||||
First off, the entire section of Save the original firmware will not work. This is because there's neither a tftpput command or a tftp command on the cameras limited OS, so we have no way of moving the backup of the camera off of the camera itself. It means that we have to ignore this entire section. I'm told that the devs have this backup somewhere - just in case you need to restore it. If you really want to create a backup there is a [working method](help-uboot.md#saving-original-firmware-without-using-tftp), but it will take a couple of hours to transfer the data.
|
||||
|
||||
Happily, the actual flashing should work, but before we start, we need to click on the *Download OpenIPC Firmware (Fpc) image* link. In the case of this example, we'll download the openipc-ssc338q-fpv-16mb.bin file. As per the tftp server guide, on MacOS you need to place this file in /private/tftpboot and on Windows, put it in the C:\TFTP-Root directory. On MacOS the OS will give you a permission denied when attempting to copy this over as your own user, so you'll most likely need to use the sudo command again.
|
||||
|
||||
`$ sudo cp $HOME/Downloads/openipc-ssc338q-fpv-16mb.bin /private/tftpboot/`
|
||||
|
||||
Windows blocks all incoming connections by default with its Microsoft Defender Firewall, so we need to temporarily disable this. If you type Windows Security into the search bar and run the Windows Security app, and then choose Firewall & Network Protection. The next part is down to how you've configured Windows. If you have configured your local network as private, then you can click on Private Network and disable the Microsoft Defender Firewall. I've left my own Windows 10 (Virtual Machine) as defaults and so it doesn't have a private network configured and treats everything as a public network, so in my case I click Public Network and siable the firewall.
|
||||
|
||||

|
||||
|
||||
### Step 1.5 Opening a console and doing the flash!
|
||||
|
||||
It's finally time to get this camera flashed. So if you still have your FTDI adapter connected to your PC and the camera, along with a serial console open you are good to go (if not go back to 1.2 and get the serial terminal open) All you should need to do know is plug in the 12v power to the camera and you should see a lot of boot up messages appearing on the serial console. The idea here is that you hit the return key lots of times as soon as the boot messages appear. If you miss it and the camera continues to boot you'll eventually see a login prompt like this.
|
||||
|
||||

|
||||
|
||||
While it does mean you were too slow on your return key bashing, it does show that the console is working and the camera is booting up as normal. Not to worry, just recycle power to the camera and try again. If you were fast enough this time, you should see something like this.
|
||||
|
||||

|
||||
|
||||
Ok, now we're cooking! But wait, what if you didn't get anything on the console and you are looking at a completely blank screen? Well, the most likely place to get wrong here is getting your TX/RX connections crossed over on the FTDI board. As long as the camera appears to boot up (there's an LED or two, and my one even made a little noise on boot up) then try swapping over your TX/RX leads on the FTDI board and see if that cures the problem. For the rest of us, it's time to start feeding in the commands from the installation guide.
|
||||
|
||||
These are the lines the guide shows us to run one at a time. I'll show you the response you are likely to get and which parts to not run.
|
||||
|
||||
```
|
||||
# Enter commands line by line! Do not copy and paste multiple lines at once!
|
||||
setenv ipaddr 192.168.0.123; setenv serverip 192.168.0.10
|
||||
mw.b 0x21000000 0xff 0x1000000
|
||||
tftpboot 0x21000000 openipc-ssc338q-fpv-16mb.bin
|
||||
# if there is no tftpboot but tftp then run this instead
|
||||
tftp 0x21000000 openipc-ssc338q-fpv-16mb.bin
|
||||
sf probe 0; sf lock 0;
|
||||
sf erase 0x0 0x1000000; sf write 0x21000000 0x0 0x1000000
|
||||
reset
|
||||
```
|
||||
|
||||
Let's run the first few lines. On my camera I know that the tftpboot command does exist, so we can ignore the next command using tftp
|
||||
|
||||
```
|
||||
Anjoy # setenv ipaddr 192.168.0.123; setenv serverip 192.168.0.10
|
||||
Anjoy # mw.b 0x21000000 0xff 0x1000000
|
||||
Anjoy # tftpboot 0x21000000 openipc-ssc338q-fpv-16mb.bin
|
||||
Using sstar_emac device
|
||||
TFTP from server 192.168.0.10; our IP address is 192.168.0.123
|
||||
Filename 'openipc-ssc338q-fpv-16mb.bin'.
|
||||
Load adress: 0x21000000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#######################################
|
||||
2.3 MiB/s
|
||||
|
||||
done
|
||||
Bytes transferred = 16777216 (1000000 hex)
|
||||
```
|
||||
|
||||
Once you run the tftpboot command, you should see rows of #'s appearing as the file is pulled from your server. But what if it doesn't work? On a Mac, the most common issue would be the file permissions - does the file have world read permissions so it can be read with the tftp daemon. We can set open permission on the file by running
|
||||
|
||||
`$ sudo chmod 777 /private/tftpboot/openipc-ssc338q-fpv-16mb.bin`
|
||||
|
||||
On Windows, the SolarWinds TFTP server will log connections and any attempts to get files in its window, so you can examine this to help determine the issue. If there's nothing in it at all, then the request isn't getting to the server. Did you turn off that pesky firewall? (if the IP addresses in this image look weird, it's because I'm running Windows in a virtual machine which creates its own network connection that bridges to the hosts)
|
||||
|
||||

|
||||
|
||||
The next command, according to the instructions is to run
|
||||
|
||||
`sf probe 0; sf lock 0;`
|
||||
|
||||
This won't work, as the 'lock' part of the command isn't implemented. So what we do need to run here is simply the first part of the command.
|
||||
|
||||
```
|
||||
Anjoy # sf probe 0
|
||||
Flash is detected (0x0B05, 0xC8, 0x40, 0x18)
|
||||
SF: Detected nor0 with total size 16Mib
|
||||
```
|
||||
|
||||
If you weren't sure how large the flash on your camera is, then running sf probe 0 is a great way to check that. If it's anything different to what you'd put into the Create Install Guide page, then you can simply return to that page, and put the correct information in to generate new instructions and a new install guide. Reboot your camera and start again.
|
||||
|
||||
```
|
||||
Anjoy # sf erase 0x0 0x1000000; sf write 0x21000000 0x0 0x1000000
|
||||
_spi_flash_erase: addr 0x0, len 0x10000000 100%(cost 25076 ms)
|
||||
SF: 16777216 bytes @ 0x0 Erased: OK
|
||||
_spi_flash_write to 0x0, len 0x1000000 from 0x21000000 100%(cost 14084 ms)
|
||||
SF: 16777216 bytes @ 0x0 Written: OK
|
||||
```
|
||||
|
||||
This action takes a few minutes, but this is the actual exciting flashing part down. If all went well all you need to do now is reboot the board by typing the last command.
|
||||
|
||||
`Anjoy # reset`
|
||||
|
||||
At this point, the camera will reboot several times. You will see lots of messages on the console until it all stops, probably with the message
|
||||
|
||||
`No usb wifi card detected. Check wifi stick connection, usb power or possible bad soldering.`
|
||||
|
||||
This is expected. We get no login prompt here, as part of the OpenIPC install turns off being able to login over this serial connection (although it's simple to turn back on) However, a better way to login now is via SSH as we camera should have asked your DHCP server (usually your router) fo ran IP address. If you look for lines on the console starting with uhdcpc, you should be able to see which IP address the camera has been allocated. In my case, I could see
|
||||
|
||||
```
|
||||
udhcpc: started, v1.36.1
|
||||
udhcpc: broadcasting discover
|
||||
udhcpc: broadcasting select for 192.168.0.50, server 192.168.0.1
|
||||
udhcpc: lease of 192.168.0.50 obtained from 192.168.0.1, lease time 86400
|
||||
```
|
||||
|
||||
This tells us that our ip address is 192.168.0.50, so let's now connect to it over the network. On MacOS use
|
||||
|
||||
`$ ssh root@192.168.0.50`
|
||||
|
||||
On Windows, use Putty. It's a useful idea to create a saved session so you can just double click on it to open the ssh window - as pictured here.
|
||||
|
||||

|
||||
|
||||
You'll be prompted for the root password when ssh'ing to the camera, it's 12345 After you enter the password and everything has gone right, you should be greeted with a screen like this
|
||||
|
||||

|
||||
|
||||
The first thing you need to do here is change the root password. You can do it on the command like entering the command passwd This will prompt for the current root password, and then ask you to type the new one in and confirm it. Alternatively, you can use the web interface. To do this go to a browser on your PC and type the IP address of the camera, so in the case of the address I've got for my camera 192.168.0.50:85. You will be prompted for the user name (root) and the password (12345 if you haven't changed it)
|
||||
|
||||
If you haven't yet changed the password, then it will ask you to do so - just type your new password in the Save Changes
|
||||
|
||||

|
||||
|
||||
Once you change your password (or if it's already been changed via the command line, the web interface will change. You'll notice the option to change your MAC address - you can go ahead and do this, but see the warning about your IP address likely changing. Once again, you can look for this in the console boot messages. At this point, the flashing of the OpenIPC software to the camera is complete - well done. We will need to return to the camera for some more config changes, which we can do via an ssh session, but for now, you can unplug the camera and disconnect the FTDI adapter as we now have to repeat this process with the groundstation.
|
||||
|
||||
### Step 1.6 Flashing the groundstation
|
||||
|
||||
Now that you've gone through the act of flashing the camera, you should find the Nvr board much more straightforward in comparison. First off, we've already got our tftp server running and are now familiar with using the serial emulation software, so all we really need to do is repeat the process of getting a console login in order to tftp the new firmware over and install it!
|
||||
|
||||
The connections for the console are much easier to work with on the Nvr board and are even labeled for us.
|
||||
|
||||

|
||||
|
||||
These connections are a lot more robust than the solder pads on the camera, so I didn't feel any sort of tool using pogo pins was needed. They are still quite small, and it can be easy to short the pads together - but easily workable for soldering a few wires on. This is precisely what we need to do. Solder the GND/TX/RX from these connections so you can attach them to your FTDI board - once again remembering to cross over the wires so that TX on the board goes to RX on the FTDI and visa versa.
|
||||
|
||||
At this point, we are just about ready to go. You'll need to plug the FTDI adapter in, attach the ethernet cable we used before, and get ready to attach the 12v power. If you want to, you can also plug an HDMI connector into the Nvr board and connect it to a monitor. You can't see console messages via the HDMI connection, but it will display some stuff on the screen. Once ready, you will need to open up the same serial terminal emulator we used to flash the camera (screen command on MacOS, Putty on Windows)
|
||||
|
||||

|
||||
|
||||
Once you plug the power in you need to start hitting CTRL-C on the console screen (not RETURN as we did for the camera - caught me out on my first try). If you are too late, the last message you'll see on the console is "Starting Kernel", but if you catch it correctly, you should see something like
|
||||
|
||||

|
||||
|
||||
The Nvr flashing is documented in a separate document [here](https://github.com/OpenIPC/wiki/blob/master/en/fpv-nvr.md) While it doesn't go into great detail, all the commands work, and there's a single image to download as the Nvr board is well known piece of hardware with a single configuration. Download the firmware file [here](https://openipc.org/cameras/vendors/hisilicon/socs/hi3536dv100/download_full_image?flash_size=16&flash_type=nor&fw_release=fpv) or grab it from the page I previously linked to and place this in your tftpserver directory (/private/tftpboot on MacOS and C:\TFTP-Root on Windows)
|
||||
|
||||
The instructions on the OpenIPC website are as follows.
|
||||
|
||||
```
|
||||
# Сhanging the ip address of the NVR board and the ip address of your TFTP server
|
||||
setenv ipaddr 192.168.1.10; setenv serverip 192.168.1.254
|
||||
mw.b 0x82000000 0xff 0x1000000
|
||||
tftp 0x82000000 openipc-hi3536dv100-fpv-16mb.bin
|
||||
sf probe 0; sf lock 0;
|
||||
sf erase 0x0 0x1000000; sf write 0x82000000 0x0 0x1000000
|
||||
reset
|
||||
```
|
||||
|
||||
It mentions changing the IP addresses for the Nvr board and that of your tftp server, so I'll be using the same addresses as previously used for the camera. Obviously subsitute these with your own ones. What I'll show you next is the commands typed in, along with the responses you should expect from running all these commands.
|
||||
|
||||
```
|
||||
hisilicon # setenv ipaddr 192.168.0.123; setenv serverip 192.168.0.10
|
||||
hisilicon # mw.b 0x82000000 0xff 0x1000000
|
||||
hisilicon # tftp 0x82000000 openipc-hi3536dv100-fpv-16mb.bin
|
||||
Hisilicon ETH net controller
|
||||
MAC: 00-0B-3F-00-00-01
|
||||
eth0 : phy status change : LINK=DOWN : DUPLEX=FULL : SPEED=100M
|
||||
eth0 : phy status change : LINK=UP : DUPLEX = FULL : SPEED=100M
|
||||
TFTP from server 192.168.0.10; our IP address is 192.168.0.123
|
||||
Download Filename 'openipc-hi3536dv100-fpv-16mb.bin'.
|
||||
Download to address: 0x82000000
|
||||
Downloading: #################################################
|
||||
done
|
||||
Bytes transferred = 16777216 (100000 hex)
|
||||
hisilicon # sf probe 0; sf lock 0;
|
||||
16384 KiB hi_fmc at 0:0 is now current device
|
||||
unlock all block
|
||||
at XmSpiNor_disableWps() <Enter>.
|
||||
@XmSpiNor_printWps(), WPS Not Enabled!
|
||||
Current level[0], lock_level_max:7.
|
||||
unlock all.
|
||||
hisilicon # sf erase 0x0 0x1000000; sf write 0x82000000 0x0 0x1000000
|
||||
Erasing at 0x10000 -- 0% complete.stMaxRect.u32Width:1024, stMaxRect.u32Height:768.
|
||||
DVR_HDMI_ProdCrgAllResetSet udelay(20000).
|
||||
HDMI_INFO:DispFmt2HdmiTiming[419] ,Non CEA video timing:17
|
||||
HDMI_INFO:Hdmi_PixelFreqSearch[163] ,u32Fmt17.
|
||||
Erasing at 0x1000000 -- 100% complete.
|
||||
Writing at 0x1000000 -- 100% complete.
|
||||
hisilicon # reset
|
||||
```
|
||||
|
||||
After the reset command, the Nvr board will reboot and give you a login prompt. You should be able to login again with the user root and the password 12345. Take note as well of the udhcpc lines in the console messages as you will be able to see what IP address the Nvr board now has. In the case of the image below, you can see it's 192.168.0.51
|
||||
|
||||

|
||||
|
||||
What you should do at this point is change the root password. Type the `passwd` command and the system will prompt you to put in the current password, your new password, and then confirmation of your new password. If you have connected to a monitor via an HDMI connection you should also see an exciting OpenIPC OSD display
|
||||
|
||||

|
||||
|
||||
Ok, that's the Nvr flashed!! At this point, you shouldn't need your tftp server any longer, so Windows users can turn their firewall back on.
|
||||
|
||||
|
||||
### Step 2 Connecting additional hardware (wifi adapters and BECs)
|
||||
|
||||
Our camera and groundstation need a wifi connection in order to talk to each other, so in this step, we'll connect the little wifi modules up. The important point about these modules is they are powered by 3.3v and not 5v. This means we can't simply power the wifi module via the USB connector on the Nvr, and although there is a 3.3v pin on the camera, it apparently doesn't provide power, so we must use BECs to do this
|
||||
|
||||
### Step 2.1 Configuring the BECs
|
||||
|
||||
If you've already bought specific BECs that work on 12v and 3.3v, then there's nothing to do here - other than add the appropriate wire/connectors so you can add power and connect to the wifi board. If you went ahead and purchased the BECs that I listed in the hardware requirements, then they require some configuration before you use them.
|
||||
|
||||
You'll need to solder in ground and power wires to both the inputs and output terminals. Connect up a battery to the input and a multimeter to the outputs. There is a small screw on the BEC that can be turned to configure the BEC to a specific voltage. It's quite sensitive, but with a little patience, you can get the voltage pretty accurate. I let these run for 20 minutes and then tried powering on the next day to see if there was any difference in the voltage, but they do hold pretty accurately.
|
||||
|
||||

|
||||
|
||||
We'll need a total of 4 BECs, both the camera and groundstation will need one at 12v and another at 3.3v - so it's a good idea to configure all of these at this stage.
|
||||
|
||||
### Step 2.2 Wiring up the Wifi Modules
|
||||
|
||||
If we take another look at our wifi board picture, this time with some pinouts labeled up.
|
||||

|
||||
You will be able to see the wiring is fairly trivial and the soldering is pretty easy, we're attaching our 3.3v and GND from the BEC. For wiring this to the camera, if you take a look at the camera pin-out in section 1.1 (specifically the one I call the "useful pins") you'll see at the bottom of the board we have a USB D+, USB D- and a GND. These are the pins we have left over on the wifi board, so you'll need a jst connection to plug into the camera and then connect up USB D+ on the camera to USB D+ on the wifi board, USB D- on the camera to USB D- on the wifi board, and connect the 2 grounds together.
|
||||
|
||||
The following image shows my completed air side wired up with the wifi adapter (although as this is for testing on the bench, I'm using a temporary connection to an XT60 adapter) You will see my 3.3v BEC connected to the wifi adapter, with the USB wiring connected to a JST connector ready to plug into the camera board. Also, note that you must have antennas connected to the wifi board when you power it on. Failure to do so can cause damage to the wifi board. I've just found a few 5.8Ghz antennas with a UFL connector on. In this picture, I've also added the 12V BEC to the power source which is connected to another jst connected ready to power the camera.
|
||||
|
||||

|
||||
|
||||
On the ground side, it's a very similar story in terms of wiring - but because the Nvr board has actual USB connectors I used part of an old USB cable I had lying around (amongst the 100's of USB cables I seem to accumulate) and simply snipped the end off to wire up. This also has the advantage of being a cable that's also nicely shielded. If you are unaware of the USB pinout, here's a picture to help. Usually, you'll find that the cables are coloured in a sensible way, so red is 5v and black is ground, so it's just a case of using a multimeter to work out which colour is D+ and D-
|
||||
|
||||

|
||||
|
||||
As mentioned, the wifi board uses 3.3v power, so we need to make sure we snip the 5v wire off and just connect the ground/D+/D- between the wifi board and the USB connector and power the wifi board separately via the 3.3v BEC. This is illustrated in the following image. unlike the previous example, I've not attached the 12V BEC for powering the Nvr board. Because I was doing this on the bench, I carried on using the 12V mains adapter, although obviously, this will change when I do a "real" test.
|
||||
|
||||

|
||||
|
||||
### Step 2.3 Checking the WiFi modules are recognised
|
||||
|
||||
It should go without saying that before powering on for the first time, check your connections, check them again, make sure you have the right power going to the right device, and ensure you have antennas on the wifi boards. I would also suggest using a small desk fan to point a the wifi boards, as these are prone get get fairly hot without airflow.
|
||||
|
||||
Ok, so at this point you can power on. Now if you've left the serial connection attached to either the camera or the Nvr board, you may notice messages about the board flying by. But another simple way of checking if things are working is to ssh in and run a few commands (obviously you will need the physical ethernet cable attached for this). Once you ssh in, type the following commands.
|
||||
|
||||
`root@openipc# wifibroadcast stop`
|
||||
|
||||
Depending on whether your card is recognised or not will show some different messages, so just ignore these and focus on the output from the next command.
|
||||
|
||||
`root@openipc# wifibroadcast start`
|
||||
|
||||
If you get output similar to
|
||||
|
||||
```
|
||||
Loading modules and wifi card driver...
|
||||
Detecting wifi card vendor...
|
||||
Detected: realtek
|
||||
Awaiting interface wlan0 in system...
|
||||
Preparing interface wlan...
|
||||
drone key exist...
|
||||
Starting Wifibroadcast service...
|
||||
Done.
|
||||
Using data frames
|
||||
Listen on 5600 for wlan0
|
||||
Loading MAVLink telemetry server...
|
||||
Done.
|
||||
Using data frames
|
||||
Listen on 14550 for wlan0
|
||||
```
|
||||
|
||||
Then the board has been detected and is working (this is the output from the air side, the ground side is very similar though). In either case, if the board is not detected, the error is the same, so if you have output similar to.
|
||||
|
||||
```
|
||||
Loading modules and wifi card driver...
|
||||
Detecting wifi card vendor...
|
||||
No usb wifi card detected. Check wifi stick connection, usb power or possible bad soldering.
|
||||
```
|
||||
|
||||
Then something is wrong. The usual culprit is having D-/D+ crossed over, so if you are confident you have power to the wifi module, then switching over the wires would be the first thing to try.
|
||||
|
||||
### Step 3 Generating and installing the key pairing for WFB-NG
|
||||
|
||||
What is WFB-NG? Well, WFB is wifibroadcast... you may remember that command from the previous step. It was the project that really started off OpenSoure HD FPV. WFB-NG is Wifibroadcast Next Generation - a new and improved version of wifibroadcast, then OpenIPC uses for FPV. WFB-NG also uses encryption when sending/receiving data between the ground/air so it's necessary for us to generate some keys to use and then move them into the correct places for WFB-NG to work.
|
||||
|
||||
Default keys will be automatically installed after groundstation and camera was flashed, so video link will work without generating new key pair. Howewer defaut keys is not secure (it is ok to leave it for bench testing or if you dont care about encryption). If you want to setup individual true encryption follow next instruction.
|
||||
|
||||
Login to your groundstation via ssh and run the command
|
||||
|
||||
`root@openipc# wfb_keygen`
|
||||
|
||||
Which should give you the output
|
||||
|
||||
```
|
||||
Drone keypair (drone sec + gs pub) saved to drone.key
|
||||
GS keypair (gs sec + drone pub) saved to gs.key
|
||||
```
|
||||
|
||||
What we need to do with these keys is move the drone.key to the /etc directory of the camera and the gs.key to the /etc directory of the groundstation. As we are already on the groundstation, this is s simple case of typing in the command
|
||||
|
||||
`root@openipc# cp gs.key /etc`
|
||||
|
||||
(you won't get any response from this command unless you've made an error in typing it) The question is how we get the drone.key file over to the camera. This is where the command called scp comes in. If we leave the groundstation powered on, and go back to your PC to type the command
|
||||
|
||||
`scp root@192.168.0.51:/root/drone.key .`
|
||||
|
||||
I'm using 192.168.0.51 as an example here, don't forget to substitute this IP address with the one for your groundstation. scp is a built in command for MacOS users. on Windows, installing Putty will have also installed the scp command, so this is just a case of opening up a CMD window and typing the command. It will prompt you for the root password for the root user of the groundstation. In both cases, the dot (.) at the end of the command means the drone.key will copy to your current directory - just in case you are wondering where it's been stored. Keep that window open, as we're going to copy it back from the PC to the camera. But to do this, you'll want to power up your camera and connect this to your ethernet cable (there's no need to have the groundstation powered up for this part)
|
||||
|
||||
Once the camera is powered up (you can check this by connecting via ssh) back on your PC use the command
|
||||
|
||||
`scp ./drone.key root@192.168.0.50:/etc`
|
||||
|
||||
Again, the IP address used here is just an example - and you'll be prompted to enter the password for the root user of the camera in. To double check the files are in the right place, you can ssh to both the camera and groundstation and run
|
||||
|
||||
`root@openipc# ls -l /etc`
|
||||
|
||||
and look for the drone.key on the camera and gs.key on the groundstation
|
||||
|
||||
### Step 4 Editing wfb.conf to set the correct wifi channel
|
||||
|
||||
There's a bit more to the wifibroadcast configuration than just getting the keys correct. There's a config file to edit on both the camera and the groundstation. To do this it's necessary to use the text editor called vi. This might be a bit new and strange for Windows users as it's not your typical editor and has a few commands for you to delete characters, insert, append things, and save the file. There's a basic vi tutorial [here](https://www.guru99.com/the-vi-editor.html) that will hopefully help you new users through. Luckily we don't have a huge amount of edits to make in this file.
|
||||
|
||||
```
|
||||
You need this vi commands
|
||||
press i on keyboard to enter edit mode
|
||||
press esc on keyboard to exit edit mode after edited parameters
|
||||
press shift+zz to save file and exit vi
|
||||
```
|
||||
|
||||
You'll open up the file for editing on both the camera and groundstation with the command
|
||||
|
||||
`root@openipc# vi /etc/wfb.conf`
|
||||
|
||||
At this point I have to say that there are things I don't know about this file that I'd like to - so consider this very much a work in process. The other things that look interesting in this file relate to the transmission power, suck as txpower and driver_txpower_override. What I would like (and like to present here) is an explanation of what each line is used for and what are the relevant ones we might want to change. One that we definitely have to change is the channel number, you will see in the file this is listed as its default
|
||||
|
||||
`channel=14`
|
||||
|
||||
Channel refers to the wifi channel that we will use. Channel 14 is in the 2.4Ghz spectrum. Whilst the wifi module I'm using as an example in this case does support both 2.4Ghz and 5.8Ghz, I want to use a 5.8 channel as I have antennas that support this. The one I've chosen is channel 161, which is equivalent to the frequency 5805Mhz - which should be nicely tuned for the 5.8 antennas you may have lying around. So in the case on both the groundstation and the camera, I changed this line to read
|
||||
|
||||
`channel=161`
|
||||
|
||||
#### Configuring the TX power
|
||||
|
||||
In the same wfb.conf file you will see 2 parameters with txpower setting. Availiable range for this paramaters is 20-58. Be carefull do not set maximum power when testing on bench as you can simply burn your wifi cards! Use fan for testing.
|
||||
|
||||
txpower - for atheros wifi card
|
||||
|
||||
tx_power_owerride - for 8812au card
|
||||
|
||||
### Step 5 Configuring vdec.conf on the groundstation
|
||||
|
||||
At this point, if you were to test the video stream, you would see on the groundstation the number of RX packets received, along with the data rate. What you wouldn't see is an actual picture from the camera. The reason for this is yet more files we have to edit to set the camera up as we like and tell the groundstation what to expect. The first of these we do on the groundstation with the vdec.conf file.
|
||||
|
||||
This is a fairly small file where it's pretty obvious what most of the options mean. Although there are some options about the osd here where I'd like to understand how to design my custom one. For the camera we are using here, there's just one change to make. By default, you'll see the line
|
||||
|
||||
`codec=h264`
|
||||
|
||||
Change this to
|
||||
|
||||
`codec=h265`
|
||||
|
||||
You'll also see some video modes to expect the incoming stream to be in. We're going to stick here to
|
||||
|
||||
`mode=720p60`
|
||||
|
||||
Ok, this file is done. On to the next one.
|
||||
|
||||
|
||||
### Step 6 Configuring the majestic.yaml file on the camera
|
||||
|
||||
Majestic Streamer is the video streaming application used by OpenIPC. If you ssh to the camera and look at the /etc/majestic.full file you will find a long and extensive list of configuration options. Whilst a good number of these will make sense - there's also a lot more that need more extensive documentation and perhaps a list to let us know which ones are the more relevant to FPV. The file we actually edit is called majestic.yaml As it's not too large I'm going to show you my version of the file with all the changes that were made. This will at least let us get our video streaming from the camera to the groundstation.
|
||||
|
||||
```
|
||||
system:
|
||||
webAdmin: disabled
|
||||
buffer: 1024
|
||||
image:
|
||||
mirror: false
|
||||
flip: false
|
||||
rotate: none
|
||||
contrast: 70
|
||||
hue: 50
|
||||
saturation: 70
|
||||
luminance: 50
|
||||
osd:
|
||||
enabled: false
|
||||
template: "%a %e %B %Y %H:%M:%S %Z"
|
||||
nightMode:
|
||||
enabled: false
|
||||
records:
|
||||
enabled: false
|
||||
path: /mnt/mmcblk0p1/%F/%H.mp4
|
||||
maxUsage: 95
|
||||
video0:
|
||||
enabled: true
|
||||
bitrate: 12288
|
||||
codec: h265
|
||||
rcMode: cbr
|
||||
gopSize: 1.5
|
||||
size: 1280x720
|
||||
fps: 60
|
||||
video1:
|
||||
enabled: false
|
||||
jpeg:
|
||||
enabled: false
|
||||
mjpeg:
|
||||
size: 640x360
|
||||
fps: 5
|
||||
bitrate: 1024
|
||||
audio:
|
||||
enabled: false
|
||||
volume: auto
|
||||
srate: 8000
|
||||
rtsp:
|
||||
enabled: false
|
||||
port: 554
|
||||
hls:
|
||||
enabled: false
|
||||
youtube:
|
||||
enabled: false
|
||||
motionDetect:
|
||||
enabled: false
|
||||
visualize: true
|
||||
debug: true
|
||||
ipeye:
|
||||
enabled: false
|
||||
watchdog:
|
||||
enabled: true
|
||||
timeout: 10
|
||||
isp:
|
||||
exposure: 60
|
||||
drc: 350
|
||||
IPQPDelta: -8
|
||||
outgoing:
|
||||
enabled: true
|
||||
server: udp://127.0.0.1:5600
|
||||
```
|
||||
|
||||
If you were to look at the differences between the original file and this one, you'd see that the most important changes are in the video0 section, where we define our stream settings from the camera - and ties up with what we told the groundstation to expect in the previous section.
|
||||
|
||||
### Step 7 Testing out the configuration
|
||||
|
||||
Ok, we've done all our basic configuration at this point so we should be able to send video from the camera and have the groundstation show it on a screen. to test it we just need to plug everything in and power it on. So we'll need the groundstation connected to its wifi module and via HDMI to a screen and the camera connected to it's wifi module. That should be it.
|
||||
|
||||
If you've been following along with the same config as me, then odds on your desk now looks something like this - although I should say there's no need to have the FTDI adapter connected to the camera, or the ethernet cable attached to the Nvr board, these were purely to debug things.
|
||||
|
||||

|
||||
|
||||
What you should get now is a live video image - hopefully not with my face in it as per the following screen shot.
|
||||
|
||||

|
||||
|
||||
Ok, but what if you don't? Well, there's things in this image that might point us to different things to check. For example, if you have no image but you do see the RX packets increase, then it's likely an issue with your majestic.yaml and/or the vdec.conf file. If the packet count isn't going up at all then take a step back and check Steps 3 & 4. If that checks out keep moving backwards through the steps provided here - log into the devices and check if the wifi module has been detected.
|
||||
|
||||
### Step 8 Video tutorial and next steps
|
||||
|
||||
I write this step-by-step guide after filming a YouTube tutorial which you can see [here](https://www.youtube.com/watch?v=libsusKy6zc&lc=Ugx2sDfGe3gd_vaeqXZ4AaABAg) This video has me making many mistakes and so there's a bit more problem solving in there as well, but it's quite a lengthy thing to watch. But it may be useful to some to use both and see extra visuals that this guide can't give you.
|
||||
|
||||
This is the basic setup that gives you streaming video. It's not ready for FPV yet - we need to connect our telemetry so the OSD gets populated and think about how to stuff that large camera in a model. I'll be tackling this at a later date.
|
||||
|
||||
|
||||
### Powering camera by 5 volt
|
||||
|
||||
To power your camera by 5 volts power supply, you should solder wire as shown on picture below.
|
||||
|
||||

|
||||
|
||||
|
||||
### Utilizing 2nd UART for telemetry
|
||||
|
||||
It is not so convenient to use those small pads for telemetry. Here is instruction how to enable 2nd UART port.
|
||||
|
||||
1. edit /etc/init.d/S95majestic, insert next strings like on screenshot
|
||||
|
||||
```
|
||||
devmem 0x1F207890 16 0x8
|
||||
stty -F /dev/ttyS2 115200 raw -echo -onlcr
|
||||
```
|
||||
|
||||

|
||||
|
||||
2. edit /etc/telemetry.conf Change ttyS0 to ttyS2 (see the screenshot)
|
||||
|
||||

|
||||
|
||||
Make sure you set mavlink telemetry with 115200 boudrate in your FC
|
|
@ -0,0 +1,100 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
A selection of OpenIPC videos on YouTube
|
||||
----------------------------------------
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-logo.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
|
||||
### Let's Drone Out
|
||||
|
||||
- [LDO EP426 - w/ Special Guest MARIOFPV of OpenIPC](https://www.youtube.com/watch?v=af1LuUxZ5dY)
|
||||
|
||||
|
||||
### From Mario
|
||||
|
||||
- [OpenIPC SSC338Q-IMX415, DVR in h265 with the World’s Cheapest 120fps Digital FPV System](https://www.youtube.com/watch?v=avXbcvqNKWM)
|
||||
- [Introducing OpenIPC SSC338Q-IMX415, the World’s Cheapest 120fps Digital FPV System](https://www.youtube.com/watch?v=tXwiZFD6-yc)
|
||||
- [Introducing OpenIPC, the cheapest digital long range FPV system in the world](https://youtu.be/Z_41Dko-Iok?si=cdGWDcFss9WrvPPN)
|
||||
- [OpenIPC Latency and Range Test with ExpressLRS and INAV 6.1](https://www.youtube.com/watch?v=4tlPJSQA6HA)
|
||||
- [Introducing OpenIPC VRX Ground Station, the cheapest digital long range FPV system in the world](https://www.youtube.com/watch?v=aXJQIoBKjVE)
|
||||
- [World’s Cheapest VRX with H265 compatible with all goggles! OpenIPC FPV with VENC/VDEC](https://www.youtube.com/watch?v=wZAHkWHfBF4)
|
||||
- [New OpenIPC hardware that is ideal for 3” or 2” micro quadcopters. Stay tuned for full video!](https://www.youtube.com/watch?v=ozZwKt6Z-UQ)
|
||||
- [OpenIPC Video Tutorial - How to setup OpenDHCP server and how to backup files](https://www.youtube.com/watch?v=aO_4LU8rnws)
|
||||
- [World's Smallest OpenIPC FPV Hardware that can fit in a 3" Micro Quadcopter with INAV 7 ExpressLRS](https://www.youtube.com/watch?v=_IPkt78QZwY)
|
||||
|
||||
|
||||
### From TipoMan
|
||||
|
||||
- [DIY FPV FullHD with OpenIPC, wfb-ng, qOpenHD](https://www.youtube.com/watch?v=MwcEvywzslA)
|
||||
- [25km with OpenIPC+wfb-ng, qOpenHD. goke7205v200+imx307,3.6mm. H265 7Mbit/s. ARWing900](https://www.youtube.com/watch?v=c7XtKujrzSg)
|
||||
- [Clouds with OpenIPC and Lidl Glider. 1366x768 video.](https://www.youtube.com/watch?v=1LavYm6jbL0)
|
||||
- [15 km flight with DIY FPV sytem, based on OpenIPC, wfb-ng, qOpenHD](https://www.youtube.com/watch?v=6__OMDvJ6o0)
|
||||
- [OpenIPC and wfb-ng in a windy day, imx335, mcs1, 7mbit/s, h265](https://www.youtube.com/watch?v=lUyhilWK1dE)
|
||||
|
||||
|
||||
### From Petru Soroaga
|
||||
|
||||
- [What's new in Ruby version 8.0: OpenIPC cameras](https://www.youtube.com/watch?v=XQCte-eTD9U)
|
||||
|
||||
|
||||
### From Egor NiKO
|
||||
|
||||
- [WFB-NG-OpenIPC Плохая связи, высокая задержка. Что такое MCS?](https://www.youtube.com/watch?v=JEqai5JKZws)
|
||||
- [Девайс для ИЗМЕРЕНИЕ задержки FPV-СИСТЕМ и КАМЕР](https://www.youtube.com/watch?v=69uGeqPZ3CI)
|
||||
- [Делаю FPV FullHD линк из китайской IP-камеры ДЕШЕВЫЙ АНАЛОГ OpenHD Digital FPV](https://www.youtube.com/watch?v=NOW99dwKbzI)
|
||||
- [Инструкция по прошивке камеры Goke7205v200|v210](https://www.youtube.com/watch?v=pA6xQ5fcZ6Q)
|
||||
|
||||
|
||||
### From CurryKitten
|
||||
|
||||
- [The OpenIPC build part 1: What is OpenIPC, and what am I using to build it?](https://www.youtube.com/watch?v=1CDIukf8AJw)
|
||||
- [The OpenIPC build part 2: Flashing firmware and getting the video stream working](https://www.youtube.com/watch?v=libsusKy6zc)
|
||||
|
||||
|
||||
### From Cinematic FPV - QD Channel
|
||||
|
||||
- [Trải nghiệm hệ thống truyền dẫn video mới OpenIPC - Trải nghiệm không thể ngờ hihi - QD Channel](https://www.youtube.com/watch?v=dC32p0hxEAs)
|
||||
|
||||
|
||||
### From TAI
|
||||
|
||||
- [Flashing GK7205V200+IMX307 to firmware from OpenIPC, memory chip replacement](https://www.youtube.com/watch?v=M69JiBtuqq8)
|
||||
|
||||
|
||||
### From Antonio Silva
|
||||
|
||||
- [Test with Openipc goke7205v200 and NVR](https://www.youtube.com/watch?v=7GKyCo6Ezmw)
|
||||
- [OpenIPC my first test flight recorded with NVR](https://www.youtube.com/watch?v=Sj7UduKbtXs)
|
||||
|
||||
|
||||
### From Zipray
|
||||
|
||||
- [OpenIPC with ez-wifibroadcast](https://www.youtube.com/watch?v=Rg2W8xQ3RTA)
|
||||
|
||||
|
||||
### From HKR
|
||||
|
||||
- [OpenIPC FPV - Prepare GroundStation: Ubuntu + QGroundControl](https://www.youtube.com/watch?v=JMtRAsOm0Dc)
|
||||
- [OpenIPC FPV - NVR Ground Station](https://www.youtube.com/watch?v=vSJiUanWA9I)
|
||||
- [OpenIPC FPV - Camera flashing SSC338Q](https://www.youtube.com/watch?v=94QiUDmGFZI)
|
||||
- [OpenIPC FPV - Test Flight](https://www.youtube.com/watch?v=-4f7XHnu3mY)
|
||||
- [OpenIPC FPV - Old laptop screeen as Ground Station](https://www.youtube.com/watch?v=OwUh8RkmJ24)
|
||||
- [OpenIPC FPV - connections](https://www.youtube.com/watch?v=LOD5xsAJu5o)
|
||||
- [OpenIPC FPV - key configuration](https://www.youtube.com/watch?v=1_t_HDdHPho)
|
||||
- [OpenIPC FPV - upgrade firmware offline](https://www.youtube.com/watch?v=JF5auLHaPiw)
|
||||
|
||||
|
||||
### Joshua Bardwell
|
||||
|
||||
- [OpenIPC - FPV DRONE NEWS AUG 29 2023](https://www.youtube.com/watch?v=MRxxOGuZUq8&t=2298s)
|
||||
|
||||
### Yuji Inoue
|
||||
- [OpenIPC FieldTest2](https://www.youtube.com/watch?v=fJDmGjyDB8I&t=8s)
|
||||
- [2K(2560x1440),60FPS ,OpenIPC](https://www.youtube.com/watch?v=F5DM_pRZzpM&t=75s)
|
||||
- [OpenIPC FieldTest3](https://www.youtube.com/watch?v=U0aIkhm9TdM)
|
||||
- [OpenIPC FieldTest4](https://www.youtube.com/watch?v=4iRVPW_Vqng)
|
||||
|
|
@ -0,0 +1,391 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Using OpenIPC as a budget video link for FPV system
|
||||
---------------------------------------------------
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-logo.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
In 2015, German enthusiast Befi [pitched the idea of an OpenSource drone](https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/), where he proposed to use ordinary WiFi adapters, the number of which has already reached several billion pieces worldwide, and the price has dropped so much that they have become the most affordable types of digital transceivers.
|
||||
|
||||
The key idea was not the WiFi adapters themselves, but an unconventional method of using them: refusing to establish a network connection and switching to broadcast mode, when one adapter acts as a transmitter of a digital signal, while the second one is a receiver.
|
||||
|
||||
It was suggested to take a budget SBC Raspberry Pi, connect a camera to it via MIPI interface and a USB WiFi dongle from among the recommended ones, and on the other side on the receiver - a similar WiFi module with HDMI monitor. In this case, instead of the traditional UDP protocol for low-latency video transmission, a lower-level protocol was used for flexible data management: bandwidth control, transmitter power, and the ability to recover data if the packet was [partially corrupted](https://en.wikipedia.org/wiki/Error_detection_and_correction) during transmission. One of the technical problems is that not every WiFi adapter is able to work in this low-level mode, moreover: you almost always have to install special drivers that exist only for Linux.
|
||||
|
||||
The receiver in this mode operates in the so-called `monitor mode`, where it receives and transmits to the operating system each packet of a given WiFi channel, where it decides whether to decode or discard it. The WiFi transmitter adapter must operate in `injection mode`, where the operating system kernel does not actually participate in the network packet generation prescribed by the ISO network model. Some adapters support both modes, some support only some one, so may only stand on the transmitter or receiver side.
|
||||
|
||||
<p align="center">
|
||||
<img src="https://befinitiv.files.wordpress.com/2015/04/dscf11161.jpg" alt="The first ever drone controlled by Wifibroadcast" />
|
||||
</p>
|
||||
|
||||
|
||||
## Advice for newcomers
|
||||
<span style="color:red;">
|
||||
OpenIPC FPV is still under development. Linux skills are required for installing and using/testing it.
|
||||
If there are no such skills available or a person who does not want to learn, then it is better for the person to buy and use professional FPV Equipment which works out of the box.
|
||||
</span>
|
||||
|
||||
You should have the following skills:
|
||||
* Connect to the IPcamera / NVR with SSH (Secure Shell)
|
||||
* Exchage files over SCP (Secure Copy)
|
||||
* Using [VIM Editor](https://github.com/vim/vim)
|
||||
* View the contents of a file using the CAT command
|
||||
* Skills in adapting or creating a bash script
|
||||
|
||||
|
||||
There are good books, websites and videos available which can be used to learn.
|
||||
|
||||
* [Linux Basics Course](https://github.com/kodekloudhub/linux-basics-course)
|
||||
* [Video: Introduction to Linux – Full Course for Beginners](https://www.youtube.com/watch?v=sWbUDq4S6Y8)
|
||||
|
||||
|
||||
|
||||
## Revolution from OpenIPC
|
||||
|
||||
The classic set-up in the [OpenHD](https://openhdfpv.org/) project (and other similar projects) consists of a MIPI or USB camera connected to a Raspberry Pi, which act as a video encoder and router for the airborne system and in turn are connected to a WiFi adapter via USB and to the flight controller via UART. The ground station usually consists of the same WiFi adapter, a second Raspberry Pi or an x86 linux laptop and a high-contrast monitor or goggles.
|
||||
|
||||
Sometimes a MIPI or USB camera is swapped for an IP camera, which is both more powerful (has its own hardware encoder) and cheaper with similar characteristics. Most modern video cameras are typical devices with Linux on board (but much more modest in RAM and flash memory size compared to the Raspberry Pi), which allows you to recompile and run almost any portable software on them.
|
||||
|
||||
While working with this technology, the idea of simplifying the flight system and porting all the necessary software directly to the IP camera came up. Technically FPV firmware of OpenIPC project is a special assembly with two types of drivers of popular WiFi adapters, Majestic streamer (which performs the role of GStreamer in the classical scheme on the transmitter system) and [WFB-ng](https://github.com/svpcom/wifibroadcast).
|
||||
|
||||
### Benefits
|
||||
|
||||
* Reduces system cost (H.265 IP camera vs. H.264 MIPI camera with Raspberry Pi)
|
||||
* Reduces overall consumption and increases system reliability by simplifying the circuitry
|
||||
* Reduces video latency: in our Glass-to-Glass tests, we got about 80ms latency for 1080p@60 (on mid-budget cameras), and about 60 ms for 720p@60 and about 100 ms for 1080p@30 (for the most budget cameras).
|
||||
* There is a possibility of tuning hardware encoder, for example, more frequent formation of I frame (the specifics depend on the vendor of IP camera)
|
||||
* The community has accumulated a lot of experience in [repairing IP cameras](https://t.me/ExIPCam), which makes it possible to further reduce the cost of operation of the system.
|
||||
|
||||
### Disadvantages
|
||||
|
||||
* Due to limited resources (installed RAM and permanent memory), most of the trendy programming languages (such as Java, Python, NodeJS) will not be supported by the camera. If you like to write in these languages (or want to port software written in these languages to the camera), you will have to use additionally a NanoPi and use the OpenIPC camera as a regular IP camera connected to the NanoPi(https://www.aliexpress.com/item/1005004679805441.html).
|
||||
Replacing flash memory with a larger one is another option:
|
||||
* You'll have to do some soldering to replace the onboard memory, but I'm sure nobody in the FPV world will be intimidated by this
|
||||
* In most systems the Linux kernel version is limited by the IP camera vendor due to the fact that some modules are shipped in binary form. Developing kernel drivers for new WiFi adapters or specific peripherals can be time-consuming.
|
||||
* On budget cameras (for which FPV firmware was primarily developed) there are very limited resources, so at the time of writing this text there are no possibilities to run neural networks. The situation should change in the near future.
|
||||
|
||||
### Ingredients
|
||||
|
||||
* IP Camera. Considering the popularity among FPV community of [VEYE 307](http://www.veye.cc/en/product/cs-mipi-imx307/) model, we recommend you to buy the board IVG-G2S IP camera manufactured by XiongMai company with exactly the same sensor IMX307, but [at a more pleasant price](https://aliexpress.com/item/1005003386137528.html) (or even [more pleasant](https://item.taobao.com/item.htm?id=660122799616), if there is a possibility to buy on Taobao, for example, [through an intermediary](https://www.youcanbuy.ru/)). When ordering the board, specify the focal length of the lens that the seller will set for your order (more focal length - more magnification, but less angle of view).
|
||||
In the future, the lens can be changed to another with the same thread, or immediately buy several models to choose from (the standard in the world of video surveillance is considered 3.6mm).
|
||||
IP-camera board is powered from 12V (actually 5V is enough, if you do not use it as a video camera with backlight) and for initial tests it is desirable to take a combined power-Ethernet cable, which is of two types: 12V with [power supply via jack](https://aliexpress.com/item/32961238897.html) and active PoE 48V (choose depending on the capabilities of your network switch).
|
||||
|
||||
* WiFi adapter. At the moment FPV firmware supports two types of drivers for RT8812au and AR9271 chips (but in principle nobody prevents to add other adapters). It is highly recommended to use the same adapters on both sides of the link (moreover, take them from the same batch in pairs) and use only 5GHz frequencies due to the complete overload of 2.4GHz. The firmware is tested with two adapters on [RT8812au](https://aliexpress.ru/item/32664378094.html) and [AR9271](https://aliexpress.co/item/32884675724.html) (the last mentioned chip works only on 2.4GHz frequency).
|
||||
|
||||
* [UART-USB adapter](https://aliexpress.com/item/1005001625391776.html) at 3.3V. Note that using a 5V adapter can burn your camera. Do not buy/use adapters based on [PL2303](https://aliexpress.com/item/704553060.html), although they are cheaper, they will not work with this SoC. The programmer mentioned in the previous paragraph can work with UART adapter, so if you have one, you don't need to buy a separate one.
|
||||
|
||||
* [Connectors with JST 1.25 type connectors](https://aliexpress.com/item/32863841787.html) in `3 Pin` and `8 Pin` configuration to connect to the UART port of the camera and replace the standard power-Ethernet cable in the flight version.
|
||||
|
||||
Optional:
|
||||
|
||||
* SPI NOR flash memory chip of 16 megabytes or more to replace the standard 8 megabyte one. We recommend [W25Q128FVIQ](https://www.aliexpress.com/item/1005003093500630.html) or [any other](https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=en&selected=128Mb#Density) compatible with the firmware (new modules can also be added to the project by chip ID). Please note that there are a lot of Winbond knockoffs on the market and you should choose your seller carefully.
|
||||
|
||||
* [SPI NOR programmer for flash memory](https://aliexpress.com/item/32902635911.html). In principle you can do without it by using of the project [burn][github_burn], which allows you to flash the system file into an empty/killed flash (see the section [Fill image to empty/killed flash](https://github.com/OpenIPC/burn). section [Flashing image to empty flash with burn](#pour-the-image-onto-an-empty-flash-using-burn-if-you-dont-have-a-programmer)). Note that although many programmers have a "clothespin" in the kit, it is absolutely impossible to dump/program flash memory directly on the board, because of the fact that the programmer besides the chip will also power the rest of the board (there is a way to overcome this problem by cutting the VCC leg).
|
||||
|
||||
* [SoC radiators](https://aliexpress.com/item/32859349038.html) are welcome (as usual not installed by the manufacturer due to cheapening).
|
||||
|
||||
* [F0.95 fast lens](https://aliexpress.com/item/32876034491.html) (other options are [one](https://aliexpress.com/item/32957334039.html) and [two](https://aliexpress.com/item/4000142214594.html)) to fully utilize the Sony IMX307 sensor and enjoy flying at night.
|
||||
|
||||
* [Zoom Lens 2.8-12mm](https://aliexpress.com/item/32809397197.html). Please note that the kit comes with an outdated HiSilicon 3516EV100 based IP camera board, which can also be reflashed to OpenIPC. Since the board controlling the motors communicates with the main board via UART, you will have to creatively solve the issue with multiplexing the two UART ports or outputting unsoldered pins.
|
||||
|
||||
* [16 pin FPC connector](https://aliexpress.com/item/33013766973.html) for better soldering of connection to USB adapter and corresponding [cable](https://aliexpress.com/item/32958943450.html).
|
||||
|
||||
There are two variants of using OpenIPC firmware on the board under consideration: with replacement of flash memory with a higher capacity one (for installing your own programs) and without replacement (it is easier, but in this case further expansion possibilities of the new system will be very limited). Both of these options will be discussed step by step below:
|
||||
|
||||
### Installation on the camera (common start)
|
||||
|
||||
* Connect the cable to the camera and check that it works (default IP address is 192.168.1.10, link for VLC `"rtsp://192.168.1.10/user=admin&password=&channel=0&stream=0"`).
|
||||
* Solder the three-wire UART connector to the free pads on the camera board
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-imx307-uart.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
* Connect the UART-USB adapter to the computer (port speed 115200N1, flow control disabled, adapter should be set to 3.3V, not 5V) and check that when the camera is turned on, data is being output and you can abort the download via `Ctrl-C` (both RX and TX lines are working).
|
||||
|
||||
### Installation using IP Cam DMS (no flash soldering)
|
||||
|
||||
* Download, unzip the archive and run the [IP Cam DMS](https://team.openipc.org/ipcam_dms/IPCam_DMS_20201121_EN.zip) program, which allows you to control the camera using the camera manufacturer's protocol.
|
||||
* Download the [special archive](https://github.com/OpenIPC/coupler/releases/download/latest/000659A7_fpv_IPC_GK7205V200_50H20AI_S38.bin) and perform a firmware upgrade, which will effectively make a seamless transition from the original firmware to OpenIPC.
|
||||
|
||||
> Note! Despite the fact it is the easiest way to flash firmware it has few disadvantages:
|
||||
> * It won't backup a stock firmware. There are chances you need the backup to extract some important parameters from the stock firmware. So even if you are 100% sure you don't need the stock firmware it's still a good idea to have a backup.
|
||||
> * In fact there is a prebuild fpv version only for IPC_GK7205V200_50H20AI_S38 board. For other boards you need to find and flash the lite version first. So that makes no sense using this installation type for other than IPC_GK7205V200_50H20AI_S38 boards.
|
||||
|
||||
### Installation using burn (no flash soldering)
|
||||
|
||||
This will work even in case you have locked bootloader or flashed wrong bootloader to the SPI flash.
|
||||
* On the workstation, install a TFTP server
|
||||
* Find your SoC on [openIPC][supported_hardware] and Generate `Installation Guide` (note: select NOR 8M memory chip even if you have 16M or 32M chip since there is no fpv versions for those configurations. Don't worry after the first boot the overlay fs will be expanded.)
|
||||
* There is a video tutorial for the [burn][github_burn] utility: [OpenIPC BURN Utility Playlist][youtube_burn] . Just select the video for your OS and follow the guide.
|
||||
* At the end of the video tutorial you will be at the terminal with unlocked bootloader. Don't close it, you will need it further.
|
||||
* Make sure the TFTP server is run and you downloaded OpenIPC firmware from the `Installation Guide` to the proper place
|
||||
* Follow the `Installation Guide` from the second step to:
|
||||
- Save the original firmware
|
||||
- Flash full OpenIPC Firmware image
|
||||
|
||||
### Installation on camera (flash replacement)
|
||||
|
||||
* Turn off the camera, unsolder the original 8 megabyte SPI NOR flash chip and dump it with a programmer just in case. It is desirable to unsolder the chip with [hot air soldering gun](https://aliexpress.com/item/32980690787.html), but if you really want you can use a regular soldering iron [as Alexey Tolstov suggests](https://www.youtube.com/watch?v=M69JiBtuqq8) or [like this](https://www.youtube.com/watch?v=dspjVDv7hck). After unsoldering of the chip, the pads should be well cleaned from solder residue with a piece of copper cable.
|
||||
When working with a hot air soldering gun it is desirable to remove the lens and insulate the other components, especially the plastic connectors with [kapton tape](https://aliexpress.com/item/1005003563721341.html) (in extreme case with chocolate bar foil). Never [use Rose alloy](https://habr.com/ru/post/437778/). If you're not very good with a finger, it's easier to go to the nearest cell phone repair service and show the master a part of this manual.
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-imx307-spinor.jpg?raw=true" alt="Logo"/>
|
||||
</p>
|
||||
|
||||
* Fill [U-Boot](https://github.com/OpenIPC/firmware/releases/download/latest/u-boot-gk7205v200-universal.bin) into a new 16 megabyte flash (at the beginning of the memory) and solder it to the board. Verify that U-Boot starts and you get to the prompt.
|
||||
* On the workstation, install a TFTP server, download and unzip to the [archive](https://github.com/OpenIPC/firmware/releases/download/latest/openipc.gk7205v200-nor-fpv.tgz) directory with the FPV firmware
|
||||
* Give commands in U-Boot (where `192.168.1.17` is your TFTP server and `192.168.1.33` is the temporarily assigned address to the camera):
|
||||
|
||||
```
|
||||
setenv ipaddr 192.168.1.33; setenv serverip 192.168.1.17; saveenv
|
||||
run setnor16m
|
||||
#
|
||||
run uknor16m; run urnor16m
|
||||
```
|
||||
|
||||
### Installation on the camera (general finalization)
|
||||
|
||||
* After booting the system, verify that it has obtained an IP address via Ethernet (it can be accessed via SSH via root@<IP address of the camera> without a password or password: 12345). Using a modern operating system and the name `openipc.local` you can find the camera within the local network without knowing its IP address.
|
||||
* Solder GND, DP and DM to the USB pads (USB 5V power supply should not be connected to the board due to the high power consumption of the adapter), and separately 5V and GND to power the WiFi adapter (possibly via an additional DC-DC converter depending on your circuit). The USB wire that comes to the board should be secured with a cable tie to avoid breaking off the pins on the contact pad:
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-pinout.jpg?raw=true" width="50%/">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-usb-colors.jpg?raw=true" width="50%/">
|
||||
</p>
|
||||
|
||||
* Check that a new device has appeared after booting via `lsusb` command
|
||||
* Check that the `free -m` command gives __at least__ 34 megabytes of system RAM (the rest is video memory), otherwise you may get an OOM killer on the fly (fixable via `fw_printenv bootargs / fw_setenv` with osmem=40M correction):
|
||||
|
||||
```
|
||||
root@openipc-gk7205v200:~# free -m
|
||||
total used free shared buff/cache available
|
||||
Mem: 34 21 2 0 9 9
|
||||
Swap: 0 0 0
|
||||
```
|
||||
|
||||
### Check the ground station operation (on the desktop)
|
||||
|
||||
* Connect the second adapter to the desktop and compile a driver that works in monitoring mode (see the relevant project documentation) and load it via `insmod` if necessary.
|
||||
* Activate the interface (in this example `wlan0` and specify [channel](https://en.wikipedia.org/wiki/List_of_WLAN_channels)) (in this example `14`):
|
||||
```
|
||||
sudo ip link set wlan0 down
|
||||
sudo iw wlan0 set monitor control
|
||||
sudo iwconfig wlan0 channel 14
|
||||
sudo ip link set wlan0 up
|
||||
```
|
||||
* Make sure that the same frequency is set on the camera and desktop WiFi adapters via `iwconfig` command, if necessary change the frequency by editing `/etc/wfb.conf` on the camera (`channel` parameter) or `sudo iwconfig <adapter name> channel <number>` on the desktop.
|
||||
* Compile from source [WFB-ng](https://github.com/svpcom/wifibroadcast), __must use brunch stable__, copy the `./etc/gs.key` from the IP camera to the desktop and run receive `sudo ./wfb_rx -p 0 -u 5600 -K gs.key -i 7669206 wlan0`.
|
||||
* Check that the console output
|
||||
```
|
||||
32168228 PKT 0:0:0:0:0:0
|
||||
32169229 PKT 0:0:0:0:0:0
|
||||
32170230 PKT 0:0:0:0:0:0
|
||||
32171231 PKT 0:0:0:0:0:0
|
||||
32172232 PKT 0:0:0:0:0:0
|
||||
32173233 PKT 0:0:0:0:0:0
|
||||
```
|
||||
change to
|
||||
```
|
||||
32178236 ANT 1 282:-54:-52:-50
|
||||
32178236 ANT 0 282:-48:-46:-44
|
||||
32178236 PKT 283:0:283:2:0:0
|
||||
32179236 ANT 1 244:-54:-52:-50
|
||||
32179236 ANT 0 244:-48:-45:-44
|
||||
32179236 PKT 245:0:245:0:0:0
|
||||
32180236 ANT 1 250:-54:-52:-50
|
||||
32180236 ANT 0 250:-48:-45:-44
|
||||
```
|
||||
* Run Gstreamer `gst-launch-1.0 -vvvv udpsrc port=5600 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! autovideosink sync=false -e` and check the image quality
|
||||
|
||||
### Ground station development, telemetry
|
||||
|
||||
It is assumed that the Linux machine has wfb-ng installed according to the instructions from [quick-start-using-ubuntu](https://github.com/svpcom/wfb-ng#quick-start-using-ubuntu-ground-station). The following examples use Hubuntu 18.04 LTS and wfb-ng 22.09.
|
||||
|
||||
* Run wfb-ng, start the wfb-cli console:
|
||||
```
|
||||
sudo systemctl restart wifibroadcast@gs
|
||||
wfb-cli gs
|
||||
```
|
||||
* Make sure that video packets are streaming. Here you can also see the RSSI values of the WiFi adapter antennas:
|
||||
|
||||

|
||||
|
||||
If the recv value remains zero and the d_err value increases, the camera and ground station keys probably do not match. Make sure that /etc/gs.key is copied to the ground station. If no packages are present - make sure that `channel=xx` in /etc/wfb.conf on the camera and `wifi_channel=xx` in /etc/wifibroadcast.cfg on the ground have the same values. For the 5.8 GHz range of the RTL8812AU adapter, channels 60 and above are recommended.
|
||||
|
||||
* Configure the flight controller under ArduPilot to output telemetry in mavlink1 format at speed 115200 on e.g. port Serial1. In case of one-way telemetry (downlink only), make sure that the FC outputs the required telemetry stream by default, without connection to the ground station. This is accomplished through setting the SR1_xxx parameters, see [mavlink SR_ parameters]. [mavlink SR_ parameters](https://ardupilot.org/dev/docs/mavlink-requesting-data.html).
|
||||
* Connect Serial1 of the FC to the UART of the camera, rx to tx, tx to rx. In case of modern FCs on STM32F4/7 the voltage levels are the same (3.3V), in case of 5V APM a level conversion will be required. The subtlety is the camera U-Boot boot loader stops on boot after receiving any bytes on the UART input. The PC should start outputting telemetry c delayed by a few seconds, through setting the TELEM_DELAY parameter. On the table it is easier to provide a break in the line from the FC to the camera.
|
||||
* On the camera in /etc/datalink.conf file set the `telemetry=true` parameter, in /etc/telemetry.conf file set the `one_way=true` parameter for one-way or `one_way=false` for two-line telemetry respectively. The simplest way to edit files on the camera is Shell Link in Midnight Commander:
|
||||
*
|
||||

|
||||
* Restart the camera and the wfb-ng service. The second data stream - telemetry - should appear in wfb-cli:
|
||||
|
||||

|
||||
|
||||
* Install QGroundControl. Version 4.0.11 is used here because the latest versions do not work properly with video in 18.04 LTS. No new Comm Links need to be created. QGC should see the PC connection and display the telemetry input stream:
|
||||
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
In the case of two-way telemetry, the QGC should download parameters, allow them to be changed, allow flight modes to be switched, and missions to be loaded and unloaded:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
You can see that QGS is also already displaying video. The delay in 4.0.11 is quite significant due to purely software stream processing, it is wise to try modern versions under Ubuntu 20.04 and newer.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
* Via the command `sudo tcpdump -i wlan0` on the desktop without running WFG-ng, you can verify that the transmitter is actually sending packets over the air:
|
||||
|
||||

|
||||
|
||||
### Pour the image onto an empty flash using burn (if you don't have a programmer)
|
||||
|
||||
Run [burn](https://github.com/OpenIPC/burn) with the board turned off:
|
||||
```
|
||||
./burn --chip gk7205v200 --file=u-boot-gk7205v200-universal.bin -d ; screen -L /dev/ttyUSB0 115200
|
||||
```
|
||||
|
||||
turn on the board power and wait for U-Boot to be filled and the command line to appear. Then we execute the following commands, where `192.168.0.8` is the TFTP server address and `192.168.0.200` is the temporary IP address of the camera.
|
||||
|
||||
```
|
||||
setenv ipaddr 192.168.0.200
|
||||
setenv serverip 192.168.0.8
|
||||
|
||||
sf probe 0; sf lock 0
|
||||
mw.b 0x42000000 ff 1000000; tftpboot 0x42000000 u-boot-gk7205v200-universal.bin; sf probe 0
|
||||
sf erase 0x0 0x50000; sf write 0x42000000 0x0 ${filesize}
|
||||
reset
|
||||
|
||||
run setnor16m
|
||||
|
||||
setenv ipaddr 192.168.0.200
|
||||
setenv serverip 192.168.0.8
|
||||
|
||||
run uknor16m ; run urnor16m
|
||||
|
||||
saveenv
|
||||
reset
|
||||
```
|
||||
|
||||
### Further refinements
|
||||
|
||||
#### Development of the adapter board
|
||||
|
||||
Taking into account that according to the text above we finalized the board from an ordinary budget video surveillance camera and the installation of USB connector was made without factory connectors, it is suggested to make an additional special board (similar to [board with built-in WiFi adapter](https://aliexpress.com/item/1005002369013873.html), which will have connectors for USB (possibly with an additional hub) and SD card. This would allow video to be broadcast with minimal latency in 720p, while simultaneously recording the original in 1080p for later publication on YouTube). If you have the ability to design such a board and share the circuit with the community, it would be greatly appreciated.
|
||||
|
||||
### FAQ
|
||||
|
||||
#### How much does the camera consume during its operation?
|
||||
|
||||
Consumption depends on whether the sensor is turned on (which is itself one of the big consumers) and according to our measurements is 1.7W in active mode and y 1.1W when the sensor is turned off (but the main system is running). From this we can conclude that if necessary, we can programmatically turn off/on the streamer to further reduce the system consumption at times when it is necessary.
|
||||
|
||||
Additionally worth considering:
|
||||
* The ability to programmatically shut down the Ethernet adapter N minutes after system startup (composing the operation immediately after startup to allow for configuration changes and debugging)
|
||||
* Put all unused GPIOs into input mode
|
||||
* [Check the datasheet](https://drive.google.com/file/d/1zGBJ_SIazFqJ8d8bguURVVwIvF4ybFs1/view) and disable all unused functional blocks of the chip using registers.
|
||||
|
||||
#### Is WDR supported?
|
||||
|
||||
For WDR to work properly on IP cameras, both the main chip and the sensor must support the same WDR standard (there are several types). In this case, usually the sensor starts working at double frequency (for example, 60FPS instead of 30FPS), making one frame with a long shutter speed, the second - with a short shutter speed. Then ISP (Image Signal Processor) hardware produces a gluing of two frames of one, taking dark areas from the frame with a long shutter speed and light - with a short shutter speed, forming an image with an extended color range.
|
||||
Unfortunately, to get a WDR image the whole system must work at least twice as fast (or to put it another way have more transistors, doing twice as much work at a moment in time), so the Goke V200 processor does not have this mode. If WDR support is fundamental to you, consider the next in the line of V300 processors, which is also supported by the project.
|
||||
|
||||
#### Can I use an LTE adapter instead of WiFi?
|
||||
|
||||
Yes, but firmware modification will be required. We recommend that you ask questions about adapting specific hardware [in the official group](https://t.me/openipc_modding).
|
||||
|
||||
#### Can I connect SD card for video recording?
|
||||
|
||||
Yes, you can. Photo from a subscriber:
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-sd-card.jpg?raw=true" width="50%"/>
|
||||
</p>
|
||||
|
||||
Pinout table for the auxiliary connector:
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-usb-sd.jpg?raw=true" width="50%"/>
|
||||
</p>
|
||||
|
||||
#### What additional peripherals can be connected?
|
||||
|
||||
Based on the pinout of the unsoldered FC connector shown above, you can see that it is used for additional expansion cards with WiFi (via USB) and SD card. Unused pins can be reassigned as follows:
|
||||
|
||||
|Function|Additional|
|
||||
|---|---|
|
||||
|SD_CLK|GPIO32|
|
||||
|SD_CMD|GPIO33|
|
||||
|SD_DATA0|GPIO34|
|
||||
|SD_DATA1|GPIO35|
|
||||
|SD_DATA2|GPIO36|
|
||||
|SD_DATA3|GPIO37|
|
||||
|ALARM2_GPIO82||
|
||||
|KEY_SET||
|
||||
|BAT||
|
||||
|ALARM_OUT||
|
||||
|
||||
D/N (day/night) can only be used as an input GPIO15 (due to the transistor installed). To the left of it on the same connector is GND and GPIO16 (which can be used as a GPIO in bi-directional mode or a PWM port).
|
||||
|
||||
There are two GPIOs on the power-network connector (ETH_STA - GPIO14, ETH_ACT - GPIO12), which are typically used to indicate active Ethernet physical connectivity and data transfer activity. They can also be used for normal two-way GPIOs, with GPIO12 being able to be set to UART2_RXD mode and realize an additional one-way UART port (for data reception only). This board has 330ohm resistors on these pins, but this should not affect UART operation.
|
||||
|
||||
Taking into account that the SoC case is made in QFN88 format, it is possible to solder a thin wire to almost any leg of the chip and use additional ports. The chip pinout and a photo of the real board without the chip are presented below:
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-v200-pinout.png?raw=true" width="50%"/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/OpenIPC/wiki/blob/master/images/fpv-pcb-part.jpg?raw=true" width="50%"/>
|
||||
</p>
|
||||
|
||||
Note that this solution is far from industrial (ideally you should make your own board) and if it cannot be avoided, sawing off the chip body for a more secure contact is recommended.
|
||||
|
||||
#### Can I use another IP camera?
|
||||
|
||||
If you have skills of an advanced Linux user, you can join our project and adapt FPV firmware to any processor [supported by OpenIPC](https://openipc.org/supported-hardware). In most cases, no programming skills are required (or you will get them naturally as you get to know and learn the system).
|
||||
|
||||
#### How can I reduce video latency even more?
|
||||
|
||||
To get the lowest possible latency, our firmware uses the low latency mode available in HiSilicon/Goke processors. Specific values depend on the SoC model, sensor, its resolution, current frame exposure and even chip heating during operation. The main contributor to the delay is the FPS of the system (60FPS without any tuning will be better than 30FPS with the maximum settings), so if you need low latency pay attention to more expensive hardware. To get even lower latency it is possible to disable intermediate blocks at the expense of deteriorating picture quality or switch to more modern chipsets.
|
||||
|
||||
Our team has extensive experience in low latency media transmission (some projects have achieved latency figures of 45ms). If you are interested in commercial services (consulting, hardware and software development, reverse engineering) [contact us](mailto:d.ilyin@openipc.org).
|
||||
|
||||
### Quick insertion of some links
|
||||
|
||||
**Please use the translator, there is a lot of interesting stuff on FPV here:**
|
||||
|
||||
- https://github.com/openipc/sandbox-fpv
|
||||
- https://github.com/OpenIPC/silicon_research
|
||||
- [OpenIPC for building FPV systems, chat in telegram messenger](https://t.me/+BMyMoolVOpkzNWUy)
|
||||
- [WFB-ng Data Transport Standard (Draft)](https://github.com/svpcom/wfb-ng/blob/master/doc/wfb-ng-std-draft.md)
|
||||
|
||||
**And our general resources:**
|
||||
|
||||
- https://OpenIPC.org
|
||||
- https://github.com/OpenIPC
|
||||
|
||||
### Usefull links
|
||||
|
||||
#### From Krzysztof Kuczek
|
||||
|
||||
- [Building OpenIPC FVP Gears](https://qczek.beyondrc.com/building-openipc-fvp-gears/)
|
||||
- [Goke Gk7205V200 camera FPV case by qczek](https://www.printables.com/model/579791-goke-gk7205v200-camera-fpv-case)
|
||||
|
||||
|
||||
#### Example board of SigmaStar equipment from TaoBao
|
||||
|
||||
- [Anjoy MC800S, SSC338Q+IM415, ~24$](https://demo.otcommerce.com/item?id=655383131557#0)
|
||||
- [Anjoy MCL12, SSC30KQ+IMX335, ~11$](https://demo.otcommerce.com/item?id=600618143992)
|
||||
- [Anjoy MC-A35, SSC337+?, ~4$](https://demo.otcommerce.com/item?id=708324402303#0)
|
||||
|
||||
|
||||
[youtube_burn]: https://youtube.com/playlist?list=PLh0sgk8j8CfsMPq9OraSt5dobTIe8NXmw
|
||||
[github_burn]: https://github.com/OpenIPC/burn
|
||||
[supported_hardware]: https://openipc.org/supported-hardware/featured
|
|
@ -0,0 +1,69 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
IPC Glossary
|
||||
------------
|
||||
|
||||
- 3D-DNR - 3D Digital Noise Reduction
|
||||
- AE - Automatic Exposure
|
||||
- AF - Automafic Focus
|
||||
- AHD - Analog High Definition
|
||||
- AI - Artificial Intellect
|
||||
- AWB - Automatic White Balance
|
||||
- B&W - Black and White
|
||||
- BLC - Back Light Compensation
|
||||
- CCTV - Closed-circuit Television
|
||||
- CMOS - Complementary Metal–Oxide Semiconductor
|
||||
- DC - Direct Current
|
||||
- DDNS - Dynamic Domain Name Service
|
||||
- DHCP - Dynamic Host Configuration Protocol
|
||||
- DNR - Digital Noise Reduction
|
||||
- DNS - Domain Name Service
|
||||
- DRC - Dynamic Range Compression
|
||||
- DVR - Digital Video Recorder
|
||||
- FTP - File Transfer Protocol
|
||||
- HDR - High Dynamic Range
|
||||
- HLS - HTTP Live Streaming (protocol)
|
||||
- LED - Light-Emitting Diode
|
||||
- NVR - Network Video Recorder
|
||||
- HD - High Definition
|
||||
- HTTP - Hypertext Transfer Protocol
|
||||
- IC - Integrated Circuit
|
||||
- ICR - Infrared Cutfilter Removal
|
||||
- IP - Internet Protocol
|
||||
- IPC - IP Camera
|
||||
- IQ - Image Quality
|
||||
- IR - Infrared
|
||||
- ISP - Image Signal Processor
|
||||
- JPEG - Joint Photographic Experts Group (file format)
|
||||
- MJPEG - Motion JPEG (video format)
|
||||
- NTP - Network Time Protocol
|
||||
- ONVIF - Open Network Video Interface Forum (standard)
|
||||
- PCB - Printed Circuit Board
|
||||
- PiP - Picture-in-Picture
|
||||
- PIR - Passive infrared (sensor)
|
||||
- PoE - Power over Ethernet
|
||||
- PPPoE - Point-to-Point Protocol over Ethernet
|
||||
- PTZ - Pan–Tilt–Zoom
|
||||
- ROI - Region of Interest
|
||||
- RTCP - Real-Time Transport Control Protocol
|
||||
- RTP - Real-time Transport Protocol
|
||||
- RTMP - Real-Time Messaging Protocol
|
||||
- RTSP - Real Time Streaming Protocol
|
||||
- SMD - Surface-mount Device
|
||||
- SMT - Surface-mount Technology
|
||||
- SMTP - Simple Mail Transfer Protocol
|
||||
- SoC - System on a Chip
|
||||
- TCP - Transmission Control Protocol
|
||||
- TFTP - Trivial File Transfer Protocol
|
||||
- UART - Universal Asynchronous Receiver-Transmitter
|
||||
- UPnP - Universal Plug and Play
|
||||
- USB - Universal Serial Bus
|
||||
- WDR - Wide Dynamic Range
|
||||
|
||||
### ffmpeg/ffplay
|
||||
|
||||
- PTS - Presentation Time Stamp
|
||||
- fps - Average frame rate in frames per second (`AVStream.avg_frame_rate`)
|
||||
- tbr - Real base framerate of the stream (`AVStream.r_frame_rate`)
|
||||
- tbn - Timescale in ticks per second (`AVStream.time_base`)
|
|
@ -0,0 +1,236 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Board specific GPIO settings list
|
||||
---------------------------------
|
||||
|
||||
### Anjoy / Anjvision boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | LIGHT | RESET | I/O | USB_ENA | TESTED BOARDS | AUDIO OUTPUT |
|
||||
|-------------|--------|--------|-------|-------|-----|---------|------------------|-----------------|
|
||||
| SSC30KQ | 23 | 24 | 60/59 | 10 | | | MC-L12, MC-L12B | 9 |
|
||||
| SSC335 | 78 | 79 | 61/53 | 66 | 52 | | MS-J10, YM200J10 | 80 |
|
||||
| SSC337 | 78 | 79 | 61 | 66 | 52 | | MC-F40, YM-J10D | |
|
||||
| SSC337DE | 78 | 79 | 61 | 66 | | | MC500L8 | |
|
||||
| SSC338Q | 23 | 24 | 60 | 10 | | 8 | MC800S-V3 | 39 |
|
||||
|
||||
### CamHi / Xin boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | USB_ENA | UART2_RTS/RS485_DE | UART2_RXD/RS485_RO | UART2_TXD/RS485_DI | AUDIO_ENA | RESET | PWM | SD_VCC | BOARD |
|
||||
|-------------|--------|--------|----------|-------|---------|--------------------|--------------------|--------------------|-----------|-------|-----|--------|----------|
|
||||
| Gk7205v200 | 14 | 15 | 8 | 4 | 9i | 54 | 12 | 13 | 12 | 50 | | | 2M-M2103 |
|
||||
| Gk7205v200 | 13 | 15 | 8 | 4 | 9i | 54 | 12 | 13 | 12 | 50 | | | 2G-M3072 |
|
||||
| Gk7205v300 | 10 | 11 | 8 | 72 | 7i | | | | 52 | 42 |
|
||||
| | | | | | |
|
||||
| Hi3516Cv100 | | | | | |
|
||||
| Hi3516Cv200 | | | | | |
|
||||
| Hi3516Cv300 | | | | | |
|
||||
| Hi3516Ev100 | | | | | |
|
||||
| Hi3516Ev200 | | | | | 9i |
|
||||
| Hi3516Ev300 | 10 | 11 | | | 7i | 63 | | | | 42 |
|
||||
| Hi3518Ev100 | 43 | | 74 | | |
|
||||
| Hi3518Ev200 | 1 | 2 | 48 | | |
|
||||
| Hi3518Ev300 | | | | | |
|
||||
| | | | | | |
|
||||
| T31 | 58 | 57 | | 49 | 61i | 53 | 55 | 56 | 63 | 11 | 50 | 62 |
|
||||
|
||||
> _i - inverted value_
|
||||
|
||||
```
|
||||
Tested on GK7205V200 for /dev/ttyАМА1:
|
||||
mux 12->UART2_RXD/RS485_RO: devmem 0x112c0070 32 2
|
||||
mux 13->UART2_TXD/RS485_DI: devmem 0x112c0074 32 2
|
||||
```
|
||||
```
|
||||
Tested on GK7205V300 for /dev/ttyАМА1:
|
||||
mux 72->UART1_TXD: devmem 0x112c0078 32 1
|
||||
mux 73->UART1_RXD: devmem 0x112c007c 32 1
|
||||
```
|
||||
|
||||
|
||||
### CCDCAM / Hankvision boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | USB_ENA | Description |
|
||||
|-------------|--------|--------|----------|-------|---------|-------------|
|
||||
| GK7205V200 | 68 | 70 | 9 | | | |
|
||||
| GK7205V200 | 50 | 51 | | | | Old plastic domophone |
|
||||
| GK7205V300 | 68 | 70 | 9 | | | |
|
||||
|
||||
> _Yes, it's amazing but it really matches on two Goke processors_
|
||||
|
||||
### GSA boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | USB_ENA |
|
||||
|-------------|--------|--------|----------|-------|---------|
|
||||
| T31L | 58 | 57 | | | |
|
||||
|
||||
|
||||
### Herospeed/Longse/Cantonk boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | ALM_IN | ALM_OUT | USB_ENA |
|
||||
|-------------|--------|--------|----------|-------|--------|---------|---------|
|
||||
| Gk7205v200 | 12 | 13 | | 4 | 15 | 14 | |
|
||||
| | | | | | | | |
|
||||
| Hi3516Cv100 | 18 | 19 |
|
||||
| Hi3516Cv200 |
|
||||
| Hi3516Dv100 | 3 | 4 | 85 |
|
||||
| Hi3516Cv300 | 1 | 2 | 24 |
|
||||
| Hi3518Ev200 | 65 | 64 | 63 |
|
||||
| Hi3516Ev200 | 12 | 13 | | 4 |
|
||||
| Hi3516Av300 | 5 | 6 |
|
||||
|
||||
|
||||
### Huishi / Vatilon boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS |
|
||||
|-------------|--------|--------|----------|
|
||||
| SSC377 | 80 | 81 | |
|
||||
| SSC378DE | 80 | 81 | |
|
||||
|
||||
|
||||
### Jabsco boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS |
|
||||
|-------------|--------|--------|----------|
|
||||
| Hi3516Ev200 | 52 | 53 | 9 |
|
||||
|
||||
### Jovision boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | LIGHT | TESTED BOARDS |
|
||||
|-------------|--------|--------|-------|------------------------------------|
|
||||
| Hi3516Ev200 | 53 | 52 | 4 | |
|
||||
| Hi3516Cv100 | 42 | 43 | 6 | IPG5020A-H-V1.0, 5013A-CF/5020A-FF |
|
||||
|
||||
### JUAN boards (Sannce)
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | TESTED BOARDS | DEVICE ID |
|
||||
|-------------|--------|--------|---------------|---------------|-----------|
|
||||
| Hi3518Ev200 | 65 | 64 | 62 (inverted) | 18EV200_V205P | N18EV2W |
|
||||
|
||||
### JVT boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | LIGHT |
|
||||
|-------------|--------|--------|-------|
|
||||
| Hi3516Cv100 |
|
||||
| Hi3516Cv200 | 64 | 65 | 62 |
|
||||
| Hi3516Cv300 |
|
||||
| Hi3516Ev200 |
|
||||
| Hi3518Ev200 | 64 | 65 | 47 |
|
||||
|
||||
### iSNATCH (HeySmart) mini "cube" camera
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRLED | RESET |
|
||||
|-------------|--------|--------|----------|----------|---------
|
||||
| T10 | 25 | 26 | - | 19 | 60i |
|
||||
|
||||
### Netcam NVT boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRLED | RED_LED | BOARD |
|
||||
|-------------|--------|--------|----------|----------|---------|-----------------|
|
||||
| T10 | 25 | 26 | | 19 | 20 | |
|
||||
| T10 | 25 | 26 | 81 | 80 | | |
|
||||
| T31L | 58 | 57 | | | | T31L_F37_V1.1 |
|
||||
|
||||
### Qihoo 360 Security cam D603
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRLED | WIFI | LED |
|
||||
|-------------|--------|--------|----------|----------|-------|-------|
|
||||
| T20 | 25 | 26 | - | 61 | 62 | 82 |
|
||||
|
||||
### Rostelecom IPC2122SR3-RU04
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 |
|
||||
|-------------|--------|--------|
|
||||
| Hi3516Cv300 | 58 | 59 |
|
||||
|
||||
### Rotek Switcam E200/T200 JXF23 sensor
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS |
|
||||
|-------------|--------|--------|----------|
|
||||
| Hi3518Ev200 | 63 | 64 | 65 |
|
||||
|
||||
### SJG boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | BOARD |
|
||||
|-------------|--------|--------|---------------|---------------------------|
|
||||
| Hi3518Ev200 | 64 | | 62 (inverted) | SJG_HI38_GW2M02_V1.3 |
|
||||
|
||||
> For the `SC2135` sensor on the `SJG_HI38_GW2M02_V1.3` board, it was necessary to change the `ComMsk0` mask from `fff0000` to `3ff0000` in the sensor configuration (`/etc/sensors/sc2135_i2c_1080p.ini`) to eliminate the pink tint of the picture in daytime mode.
|
||||
|
||||
### Tiandy boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | RESET |
|
||||
|-------------|--------|--------|----------|-------|-------|
|
||||
| SSC335 | 78 | 79 | --- | 37 | |
|
||||
|
||||
### Uniview boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | RESET | IRCTL | IRLED | WiFi | DEVICE ID |
|
||||
|-------------|--------|--------|-------|-------|-------|------|---------------------------------------|
|
||||
| Hi3516Ev300 | 63 | 67 | 64 | | 72 | 7 | Rostelecom IPC8232SWC-WE, C1L-2WN-G |
|
||||
| SSC335DE | 61 | 79 | | 4 | | | Rostelecom IPC8232SWC-WE-B |
|
||||
| SSC335 | 61 | 79 | | | 76 | | Uniarch UV-IPC-D122-PF28 |
|
||||
|
||||
### Wansview
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IR LEDs | RESET | ETH_GR_BL | ETH_ORANGE| DEVICE ID |
|
||||
|-------------|--------|--------|---------|-------|-----------|-----------|-----------------------------|
|
||||
| T21 | 80 | 79 | 49 | 50 | 73 | 72 | Wansview W5/W6/Q5(1080p) |
|
||||
|
||||
### Xiaomi boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IR LEDs | DEVICE ID | ORANGE_LED | BLUE_LED | RESET | AUDIO_ENA |
|
||||
|-------------|--------|--------|---------|---------------|------------|----------|-------|-----------|
|
||||
| SSC325 | 78 | 79 | 52 | CMSXJ25A | | | | |
|
||||
| Hi3518Ev300 | 70 | 68 | 54 | MJSXJ02HL | 52 | 53 | 0 | 55 |
|
||||
| T31N | 49 | 50 | 60 | MJSXJ03HL | 38 | 39 | | |
|
||||
|
||||
### XiongMai, XM boards
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | ALM_IN | ALM_OUT | ETH_ACT | ETH_STA | RESET | USB_ENA | AUDIO_POW | RS485_CTL | W_LED | NOTES |
|
||||
|-----------------|--------|--------|----------|-------|--------|---------|---------|---------|-------|---------|-----------|-----------|-------|-------|
|
||||
| GK7205V200 | 8 | 9 | 15 | 16 | 4, 53 | 55 | 14 | 12 | 0 | | 40 |
|
||||
| GK7205V210 | 8 | 9 | 15 | 16 | 4, 53 | 55 | 14 | 12 | 0 | | 40/53 |
|
||||
| GK7205V300 | 11 | 10 | 66 | 52 | 4 | | 30 | 31 | 0 | | 60 | 24 |
|
||||
| GK7205V300[^4] | 11 | 10 | 65 | 52 | | | 30 | 31 | 67 | | 64/65 | 24 | 4 | |
|
||||
| GK7605V100 | 10 | 11 | 66 | 52 | 4 | | 30 | 31 | 0 | | 60 | 24 |
|
||||
| | | | | | | | | | | |
|
||||
| Hi3516Cv100 | 38 | 39 | 24 | | 49 | 26 | | | | |
|
||||
| Hi3516Dv100[^1] | 14 | 15 | 3 | | | | | | | |
|
||||
| Hi3516Dv100[^2] | 121 | 120 | 3 | | | | | | | |
|
||||
| Hi3516Cv200 | | | | | | | | | | |
|
||||
| Hi3516Cv300 | 53 | 54 | 64 | 66 | 55 | 1 | | | 2 | 63 |
|
||||
| Hi3516Ev100 | 53 | 54 | 64 | | | | | | | |
|
||||
| Hi3516Ev200 | 8 | 9 | 15 | 16 | 4, 53 | 55 | 14 | 12 | 0 | |
|
||||
| Hi3516Ev300 | 11 | 10 | 66 | 52 | 4, 67 | 65 | 30 | 31 | 0 | |
|
||||
| Hi3518Ev100 | 39 | 38 | 24 | | 49 | 26 | | | | |
|
||||
| Hi3518Ev200 | 33 | 34 | 24 | | 61 | 35 | | | | | 3 | | IPG-50HV20PET-S |
|
||||
| Hi3518Ev300[^3] | 8 | | 55 | | 13 | | | | 15 | | 3 |
|
||||
|
||||
> There is a map between table's columns and parameters in `nightMode` section in `majestic.yaml`<br>
|
||||
> IRCUT1 is an irCutPin1<br>
|
||||
> IRCUT2 is an irCutPin1<br>
|
||||
> IRCTL is a backlightPin<br>
|
||||
> IRSTATUS is an irSensorPin
|
||||
|
||||
[^1]: HI3516D_N81820, 00014914 firmware
|
||||
[^2]: Hi3516Dv100 for IPC_HI3516D_83H20 00014911
|
||||
[^3]: Hi3518EV300 for 50H20L
|
||||
[^4]: IPC_GK7205V300_G6S (000699Q3 firmware)
|
||||
|
||||
|
||||
### Zenotech/Videopark
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRLED | DEVICE ID |
|
||||
|-------------|--------|--------|-------|--------------------------|
|
||||
| GK7205V200 | 58 | 59 | 8 | ZN-CM-GK200S1L-P |
|
||||
| | | | | |
|
||||
| Hi3516Ev300 | 14 | 12 | | ZN-CM-HSC500S1L-PZ |
|
||||
| Hi3516Ev300 | 40 | 41 | 65 | unknown |
|
||||
|
||||
|
||||
### Zosi
|
||||
|
||||
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | DEVICE ID |
|
||||
|-------------|--------|--------|--------------|---------------|
|
||||
| Hi3518Ev200 | 61 | 60 | 1 (inverted) | ZG2622MW |
|
|
@ -0,0 +1,125 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Supported devices
|
||||
-----------------
|
||||
|
||||
Unfortunately, we cannot provide you a long list of devices that are undoubtedly
|
||||
compatible with our firmware. Camera manufacturers tend to change hardware
|
||||
design and swap components even within the same model line, without any notice.
|
||||
|
||||
Below, we listed some of the cameras we had in our possession, but again, there
|
||||
is no guarantee that if you'll buy one of those cameras today you won't end up
|
||||
with an unsupported hardware on your hands.
|
||||
|
||||
Somewhat working method to determine if your camera is supported by the recent
|
||||
version of our firmware is to open[^1] the camera case and take a look at the
|
||||
chip markings. Then look up your chip in the [list of supported hardware][1]
|
||||
and check its development status.
|
||||
|
||||
If you still have your doubts, take hi-res pictures of the hardware close-ups
|
||||
and ask for help in one of our Telegram groups.
|
||||
|
||||
[^1]: Attention! Doing so, you are taking full responsibility for your actions.
|
||||
Most likely, opening the case will void the warranty of the device. We cannot
|
||||
be held liable for any damage to the camera, yourself, your house, your pets,
|
||||
or anything else. If you don't feel comfortable around hardware, this project
|
||||
may not be right for you.
|
||||
|
||||
You can also view the list of adapted devices in a special Builder project -
|
||||
https://github.com/OpenIPC/builder
|
||||
|
||||
_If you have another supported device to add, please do it [here][2]._
|
||||
|
||||
| Brand | Model | Processor | Sensor | Flash Memory | LAN | WLAN | USB | Card |
|
||||
|------------|--------------------|-------------|--------|--------------|-----|----------------|------|------|
|
||||
| | | | | | | | | |
|
||||
| Anjoy | MS-J10 | SSC335 | IMX307 | | Yes | No | Yes | No |
|
||||
| Anjoy | YM-J10D | SSC337 | IMX307 | | Yes | No | Yes | No |
|
||||
| Amorvue | NC1080AW | HI3518EV200 | SC2135 | MX25L6405D | Yes | RTL8188EUS[^2] | No | No |
|
||||
| Chacon | [IPCAM-RI01][3] | HI3518EV300 | JXF23 | XM25QH128A | No | RTL8188FTV | WiFi | Yes |
|
||||
| | | | | | | | | |
|
||||
| LTV | CNE-724 48 | HI3516EV200 | | | Yes | No | No | Yes |
|
||||
| | | | | | | | | |
|
||||
| Rotek | Switcam HS303 (v1) | HI3518EV200 | | | No | RTL8188FU | WiFi | Yes |
|
||||
| Rotek | Switcam HS303 (v2) | HI3518EV200 | OV9732 | GD25Q128CSIG | No | RTL8188EU | WiFi | Yes |
|
||||
| Rotek | Switcam HS303 (v3) | HI3518EV200 | | | No | RTL8188EU | WiFi | Yes |
|
||||
| | | | | | | | | |
|
||||
| Smartwares | [CIP-37210][4] | HI3518EV200 | | | No | RTL8188FU | WiFi | Yes |
|
||||
| | | | | | | | | |
|
||||
| TOP | TOP-201/MCO-720P Mini Camera | HI3518EV100 | OV9712 | | Yes | No | No | No |
|
||||
| | | | | | | | | |
|
||||
| Xiaomi | [MJSXJ02HL][7] | HI3518EV300 | | | No | | | Yes |
|
||||
| Xiaomi | [MJSXJ03HL][6] | T31N | JXQ03 | QH128A-104HIP | No | RTL8189FTV | No | Yes |
|
||||
| Xiaomi | [CMSXJ25A] | SSC325 | GC2053 | QH128A-104HIP| Yes | MT7603UN | No | Yes |
|
||||
| | | | | | | | | |
|
||||
| XM | BLK18EV-0062-0035 | HI3518EV200 | JXH62 | | Yes | | | Yes |
|
||||
| | | | | | | | | |
|
||||
| Zenotech | HI3516D_MB_V13_RA | HI3516DV100 | OV9689 | GD25Q128CSIG | Yes | No | | No |
|
||||
| Tungson | DS-YTJ5301 | SSC30KD | GC2053 | | Yes | RTL8188FTV | No | No |
|
||||
| Haier | HCC-18B30-U1 | T31ZX | SC3335 | NM25Q128EVB | No | SSV6X5X | No | Yes |
|
||||
| iFlytek | XFP301-M | T31ZX | JXQ03 | XM25QH128C | No | RTL8188FU | No | Yes |
|
||||
| Qihoo 360 | AP6PCM03 | T31ZX | GC4653 | EN25QH256A | Yes | ATBM6031 | No | Yes |
|
||||
| Goke | [MJ-C232V5-0SW1][5]| GK7205V200 | GC2305 | XM25QH128CHIQ| Yes | RTL8188FU | No | No |
|
||||
| Uniview | CMCC-IPC-A35 | Hi3516EV300 | SP2305 | W25N01GV | Yes | | No | No |
|
||||
| E-Life | EF3113 | T31L | GC2053 | ZB25VQ128 | Yes | SV6155P | No | Yes |
|
||||
| E-Life | ET-N3431H-DW | T31X | OS03B10| ZB25VQ128 | Yes | SV6155P | No | Yes |
|
||||
| H3C | C2041 | T31X | JXK04 | XM25QH128C | Yes | RTL8188FTV | No | Yes |
|
||||
| MEGVII | SmartEye-D1A-24A-P | T31X | JXK04 | FM25Q128A | Yes | No | No | Yes |
|
||||
| Uniview | IPC-D122-PF28 | SSC335 | SC2335 | XM25QH64C | Yes | No | No | No |
|
||||
|
||||
|
||||
| Processor | Sensor | Vendor | SKU | Board identification |
|
||||
|-------------|------------------|------------|--------------|---------------------------------|
|
||||
| Hi3516Cv100 | IMX222_spi_dc | XM | | [BLK18C-0222-38X38_S-V1.03][1] |
|
||||
| Hi3516Cv100 | OV2710_i2c_dc | Jovision | | IPG5020A-H-V1.0 |
|
||||
| | | | | |
|
||||
| Hi3516Cv200 | IMX323_i2c_dc | XM | | BLK16CV-0323-38X38-V1.01 |
|
||||
| Hi3516Cv200 | IMX323_i2c_dc | JVT | S323H16VF | IPS323-H16V-38X38-V2 |
|
||||
| Hi3516Cv200 | IMX323_i2c_mipi | XM | | |
|
||||
| | | | | |
|
||||
| Hi3516Cv300 | AR0237_i2c_dc | XM | | BLK16CV3-0237P-38X38-S-V1.01 |
|
||||
| Hi3516Cv300 | IMX307_i2c_lvds | Raysharp | | RS-CM-188D 2018-03-16 E150111 |
|
||||
| Hi3516Cv300 | IMX323_i2c_dc | Longse/HS | | HI3516CV300-IMX323-POE-TF V1.1 |
|
||||
| Hi3516Cv300 | IMX323_i2c_dc | Sunywo | ZB6323 | IPG5020A-T-N6-V0.1 |
|
||||
| Hi3516Cv300 | IMX323_i2c_dc | XM | | IVG-HP201Y-AE |
|
||||
| Hi3516Cv300 | IMX291_i2c_lvds | XM | | IVG-HP203Y-AE |
|
||||
| Hi3516Cv300 | IMX323_spi_dc | JVT | S323H16XF | IPS323-H16X-38X38-V2/V3 |
|
||||
| Hi3516Cv300 | JXF22_i2c_dc | XM | | BLK16CV3-0022-38X38-S-V1.01 |
|
||||
| | | | | |
|
||||
| Hi3516Ev100 | IMX323_i2c_dc | XM | | BLK16E-0323-38X38-B-V1.01 |
|
||||
| Hi3516Ev100 | SC2235P_i2c_dc | XM | 80HE20PS-S | BLK16E-0235-38X38-S-V2.03 |
|
||||
| | | | | |
|
||||
| Hi3516Ev200 | IMX307_i2c_mipi | XM | | IVG-85HF20PY-S |
|
||||
| Hi3516Ev200 | SC4239P_i2c_mipi | XM | | IVG-85HF30PS-S |
|
||||
| | | | | |
|
||||
| Hi3516Ev300 | IMX335_i2c_mipi | XM | | IVG-85HG50PYA-S |
|
||||
| | | | | |
|
||||
| Hi3518Ev100 | OV9712_i2c_dc | CamHi/Xin | | IPC18E_9712_V2.0/V3.1 |
|
||||
| | | | | |
|
||||
| Hi3518Ev200 | AR0130_i2c_dc | XM | | BLK18EV-0732-0035-38X38-V1.01 |
|
||||
| Hi3518Ev200 | JXF22_i2c_dc | XM | | BLK18EV-0002-2035-38X38-V1.01 |
|
||||
| Hi3518Ev200 | JXF22_i2c_dc | XM | | BLK18EV-0022-0130-38X38-V1.01 |
|
||||
| Hi3518Ev200 | OV2735_i2c_dc | Dahua | DH-IPC-C22P | E305654 JX02 94V-0 |
|
||||
| Hi3518Ev200 | OV9732_ | XM | | BLK18EV-0732-0035-38X38-V1.01 |
|
||||
| Hi3518Ev200 | OV9732_i2c_dc | Longse/HS | LS-IP100/40 | 3518EV200-OV9732-V1.0 |
|
||||
| Hi3518Ev200 | OV9732_i2c_dc | Rostelecom | QVC-IPC-136W | E305654 JX02 94V-0 |
|
||||
| Hi3518Ev200 | SC2135_i2c_dc | Amorvue | | 18EV200_V202P |
|
||||
| Hi3518Ev200 | SC2135_i2c_dc | XM | | BLK18EV-0035-0042-38X38_S-V1.01 |
|
||||
| Hi3518Ev200 | SC2235_i2c_dc | XM | | BLK18EV-0235-38X38-B-V1.01 |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| SSC335 | SC3335 | Uniview | | Uniview |
|
||||
| SSC338Q | IMX415 | CamHi/Xin | | SSC338Q_38M_1.1 |
|
||||
|
||||
|
||||
[1]: https://openipc.org/supported-hardware
|
||||
[2]: https://github.com/OpenIPC/wiki/blob/master/en/guide-supported-devices.md
|
||||
[3]: https://github.com/OpenIPC/wiki/blob/master/en/device-chacon-ipcam-ri01.md
|
||||
[4]: https://ipcamtalk.com/threads/smartwares-cip-37210-wifi.64605/
|
||||
[5]: http://www.hnamg.cn/h-col-139.html
|
||||
[6]: https://github.com/OpenIPC/device-mjsxj03hl
|
||||
[7]: https://github.com/OpenIPC/device-mjsxj02hl
|
||||
|
||||
|
||||
[^2]: WiFi can be enabled with 8MB flash using a custom build, or by upgrading to a 16MB flash and using Ultimate firmware.
|
|
@ -0,0 +1,132 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
## Supported sensors per SoC
|
||||
|
||||
_Note: This list does not guarantee that your sensor will work. There are nuances such as different ways of connecting sensors, relabeling of sensors, mismatch between the installed sensor and the declared sensor, etc. This is just a list of the drivers found in the SDK for the particular processor. Please take this into account._
|
||||
|
||||
### Ambarella
|
||||
|
||||
- S2L
|
||||
- S3L
|
||||
|
||||
### Anyka
|
||||
|
||||
- AK3916EV300
|
||||
- AK3916EV301
|
||||
- AK3918EV200
|
||||
- AK3918EV300
|
||||
- AK3918EV330
|
||||
|
||||
### Fullhan
|
||||
|
||||
- FH8626V100
|
||||
- FH8632V100
|
||||
- FH8833V100
|
||||
- FH8652V100
|
||||
- FH8852V100
|
||||
- FH8852V200
|
||||
- FH8852V210
|
||||
- FH8856V100
|
||||
- FH8856V200
|
||||
- FH8856V210
|
||||
- FH8858V200
|
||||
- FH8858V210
|
||||
|
||||
### Goke
|
||||
|
||||
- GK7102S
|
||||
- GK7202V300
|
||||
- GK7205V200
|
||||
- ar0237, bt656, f23, f37, gc2053, gc4653, imx290, imx307, imx327, imx335, os05a, ov2718, sc200ai, sc2231, sc2232h, sc2235, sc2239, sc223a, sc2335, sc3235, sc3335, sc4236, sc500ai
|
||||
- GK7205V210
|
||||
- imx307, imx327, imx335, os05a, ov2718, sc200ai, sc2231, sc2232h, sc2235, sc2239, [sc223a(sold as sc5239s)](https://github.com/RoboSchmied/Documentation/blob/main/sc223a.md), sc2335, sc3235, sc3335, sc4236, sc500ai
|
||||
- GK7205V300
|
||||
- GK7605V100
|
||||
|
||||
### GrainMedia
|
||||
|
||||
- GM8135
|
||||
- GM8136
|
||||
|
||||
### HiSilicon
|
||||
|
||||
- HI3516AV100
|
||||
- ar0230, ar0237, ar0330, imx122, imx123, imx178, imx185, imx224, imx225, imx290, imx291, imx385, os05a10, ov2718, ov4689, ov5658, sc2310, sc5235
|
||||
- HI3516AV200
|
||||
- HI3516AV300
|
||||
- HI3516CV100
|
||||
- 9m034, ar0130, ar0140, ar0330, himax1375, icx692, imx104, imx122, imx138, imx222, imx225, imx236, mn34041, mt9p006, ov2710, ov9712, ov9732, po3100k, sc1035, soih22, soih42
|
||||
- HI3516CV200
|
||||
- 9m034, ar0130, ar0230, gc1034, gc2023, gc2033, imx122, imx222, imx291, imx307, imx323, imx327, jxf22, jxf23, jxh62, jxh65, mn34222, ov2718, ov2735, ov9712, ov9732, ov9750, ov9752, sc1135, sc1145, sc1235, sc2035, sc2135, sc2232, sc2235
|
||||
- HI3516CV300
|
||||
- ar0237, imx291, imx307, imx323, imx385, jxf22, ov2718, ov2735, sc2235p, sc2310
|
||||
- HI3516CV500
|
||||
- gc2053, imx290, imx307, imx327, imx334, imx335, imx377, imx390, imx415, imx458, mn34220, os04b10, os05a, os08a10, ov12870, ov2775, ov9284, ps5260, sc4210
|
||||
- HI3516DV100
|
||||
- HI3516DV200
|
||||
- HI3516DV300
|
||||
- HI3516EV100
|
||||
- HI3516EV200
|
||||
- f23, f37, gc2053, imx307, imx335, sc2231, sc2232h, sc2239, sc2315e, sc3235, sc4236, sp2305
|
||||
- HI3516EV300
|
||||
- HI3518CV100
|
||||
- HI3518EV100
|
||||
- 9m034, ar0130, ar0130, ar0140, ar0330, himax1375, icx692, imx104, imx122, imx138, imx222, imx225, imx236, mn34031, mt9p006, ov2710, ov9712, ov9732, po3100k, sc1035, soih22, soih42
|
||||
- HI3518EV200
|
||||
- ar0130, gc1034, gc2023, imx122, imx222, imx291, imx323, jxf22, jxf23, jxh62, jxh65, mn34222, ov2718, ov2735, ov9712, ov9732, ov9750, ov9752, sc1135, sc1145, sc1235, sc2035, sc2135, sc2235
|
||||
- HI3518EV201
|
||||
- HI3518EV300
|
||||
- HI3519V101
|
||||
- imx178, imx185, imx226, imx274, imx290, imx326, imx327, imx385, os05a, os08a10, ov4689, sc4210
|
||||
- HI3520DV100
|
||||
- HI3520DV200
|
||||
- HI3536CV100
|
||||
- HI3536DV100
|
||||
|
||||
### Ingenic
|
||||
|
||||
- T10
|
||||
- ar0130, ar0230, ar0237, bf3115, bg0806, gc1024, gc1064, gc2023, imx291, imx322, imx323, jxf22, jxh42, jxh61, jxh62, ncu_os02b10, os02b10, os05a10, ov2710, ov2735, ov2735b, ov4689, ov9712, ov9732, ov9750, sc1035, sc1045, sc1135, sc1145, sc2135, sc2232, sc2235, sc3035, sc4236, sp1409
|
||||
- T20
|
||||
- T21
|
||||
- T31A
|
||||
- T31AL
|
||||
- T31L
|
||||
- T31N
|
||||
- T31X
|
||||
|
||||
### MicroStar
|
||||
|
||||
- MSC313E
|
||||
- MSC316DC
|
||||
- MSC316DM
|
||||
|
||||
### Novatek
|
||||
|
||||
- NT98562
|
||||
- NT98566
|
||||
|
||||
### Rockchip
|
||||
|
||||
- RV1109
|
||||
- RV1126
|
||||
|
||||
### SigmaStar
|
||||
|
||||
- SSC325
|
||||
- SSC325DE
|
||||
- SSC333
|
||||
- SSC335
|
||||
- SSC335DE
|
||||
- SSC337
|
||||
- SSC337DE
|
||||
- SSC30KD
|
||||
- SSC30KQ
|
||||
- SSC338Q
|
||||
|
||||
### Xiongmai
|
||||
|
||||
- XM510
|
||||
- XM530
|
||||
- XM550
|
|
@ -0,0 +1,58 @@
|
|||
# OpenIPC Wiki
|
||||
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Hardware: IPC Board Manufacturers
|
||||
---------------------------------
|
||||
|
||||
* [ACTi](https://www.acti.com/)
|
||||
* [Anjvision](http://www.anjvision.com/), <http://icamra.cn/>
|
||||
* [Ansjer](https://www.ansjer.com/)
|
||||
* [Anviz](http://www.anviz.com/)
|
||||
* [Apical](http://www.apical.com.cn/products/)
|
||||
* [Besnt](http://www.besnt-cctv.com/)
|
||||
* [Brovotech](https://brovotech.com/)
|
||||
* [CamHi/Haicam/Xin](https://haicam.tech)
|
||||
* [Cantonk](http://cantonk.com/)
|
||||
* [CCDCAM](http://www.ccdcam.com/) th?
|
||||
* [Filsion/Camasmart](http://www.camasmart.com/)
|
||||
* [FSAN](http://www.fsan.cn/)
|
||||
* [GeoVision](https://www.geovision.com.tw/)
|
||||
* [Gwell Times](http://cloud.gwell.cc/)
|
||||
* [Herospeed](http://www.herospeed.net/en/)
|
||||
* [Hichip](http://hichip.net/en/)
|
||||
* [TT Int'l, HTW Tech Limited](http://www.cctv-camera.cc/)
|
||||
* [Huatu](http://huatudigital.com/)
|
||||
* [Huishi](https://web.archive.org/web/20220209053811/http://hscctvcn.com/ProductInfoCategory?categoryId=400431,400432,400433,400434,400435,400436&PageInfoId=0) and [Huishi](https://www.vatilon.cn/)
|
||||
* [Hupuu](https://hupuu.com/category/camera-board)
|
||||
* [IPCAM](http://www.ipcam.xin/)
|
||||
* [Jovision](http://www.jovision.com/)
|
||||
* [JVT](http://www.jvt.cc/)
|
||||
* [LENOTEL](http://www.lenoteltechnology.com/) th?
|
||||
* [Longse](http://www.longse.com/)
|
||||
* [Mercury](https://www.mercurycom.com.cn/)
|
||||
* [Milesight](http://www.milesight.com/)
|
||||
* [Powerview](http://powerview.cn/en/)
|
||||
* [Raysharp](http://raysharp.cn/en/)
|
||||
* [Ruision](http://www.ruision.com/col/70560?lang=en)
|
||||
* [Safer](http://www.safer.net.cn/) th?
|
||||
* [SMTSEC](http://www.smtsec.com/)
|
||||
* [SV3C](https://sv3c.com/)
|
||||
* [Synuwo](http://www.sunywo.com/cn/product/41_0.shtml)
|
||||
* [Tiandy](http://en.tiandy.com/)
|
||||
* [Topsee](http://www.en.tpsee.com/product.html)
|
||||
* [Topper](http://toppervision.com/index2.asp)
|
||||
* [TVT](http://www.tvt.net.cn/)
|
||||
* [Uniview](https://www.uniview.com/)
|
||||
* [VandSec/Yoosee](http://vandsec.com/) th?
|
||||
* [VeeZoom](https://funcoo.en.alibaba.com/)
|
||||
* [Videopark](http://www.videopark.com.cn)
|
||||
* [VStarcam](http://www.vstarcam.com/) th?
|
||||
* [Vatilon](https://www.vatilon.cn/ProductInfoCategory?categoryId=400431,400432,400433,400434,400435,400436)
|
||||
* [Wansview](http://wansview.com/)
|
||||
* [XM](http://www.xiongmaitech.com/en/)
|
||||
* [Z-BEN](http://www.z-ben.cn/) th?
|
||||
* [Zenotech](http://www.videopark.com.cn)
|
||||
* [ZOSI](https://www.zositech.com/)
|
||||
|
||||
> _th? -- possibly a trading house_
|
|
@ -0,0 +1,78 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
CH341A Programmer
|
||||
-----------------
|
||||
|
||||
### Fixing high voltage bug
|
||||
|
||||
Early versions, prior ver. 1.7, of the cheap and popular CH341A Mini Programmer
|
||||
have a nasty bug where voltage levels on data lines remain at 5V despite the
|
||||
programmer being set to 3.3V with the jumper.
|
||||
|
||||
@ddemos1963 came out with an interesting hack to fix the issue in an efficient
|
||||
and artsy way.
|
||||
|
||||

|
||||

|
||||
|
||||
Here's what you do.
|
||||
|
||||

|
||||
|
||||
Sever the connection between between 5V power line and the CH341A chip.
|
||||
With a sharp utility knife, cut the trace on the back of the programmer board.
|
||||
|
||||

|
||||
|
||||
Connect 3.3v output leg of the voltage regulator to pin 9 of CH341A IC bridging
|
||||
it to a corresponding trace at a nearby capacitor.
|
||||
|
||||

|
||||
|
||||
Restore power to the chip re-routing 3.3V voltage from 3v3 pin to pin 28
|
||||
of CH341A IC through 5V pin connector on the header.
|
||||
|
||||

|
||||
|
||||
### Troubleshooting
|
||||
|
||||
```console
|
||||
libusb: error [get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003, errno=13
|
||||
libusb: error [get_usbfs_fd] libusb requires write access to USB device nodes
|
||||
```
|
||||
|
||||
If you get an error message like this running a programming software, you need to adjust
|
||||
permissions on the USB port for that device.
|
||||
|
||||
Create a udev rule file
|
||||
|
||||
```bash
|
||||
sudo vi /etc/udev/rules.d/99-ch341a-prog.rules
|
||||
```
|
||||
|
||||
add the following content in the file:
|
||||
|
||||
```bash
|
||||
# udev rule that sets permissions for CH341A programmer in Linux.
|
||||
# Put this file in /etc/udev/rules.d and reload udev rules or reboot to install
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
|
||||
```
|
||||
|
||||
save the file, reload udev
|
||||
|
||||
```bash
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
```
|
||||
|
||||
then unplug the programmer and plug it back in a USB port.
|
||||
|
||||
### Software
|
||||
|
||||
- [SNANDer](https://github.com/McMCCRU/SNANDer) or [this fork](https://github.com/Droid-MAX/SNANDer)
|
||||
- [microsnander](https://github.com/OpenIPC/microsnander) from OpenIPC
|
||||
- [ch341prog](https://github.com/setarcos/ch341prog/)
|
||||
- [flashrom](https://www.flashrom.org/Flashrom)
|
||||
- [DIY BCQ CH341A forum](http://www.diybcq.com/thread-144131-1-1.html) (Chinese, use Chrome automatic translation)
|
||||
- [CH341A Programmer](https://4pda.to/forum/index.php?showtopic=884713) (Russian, use Chrome automatic translation)
|
|
@ -0,0 +1,12 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Contents](../README.md)
|
||||
|
||||
Hardware: Image Sensors Manufacturers
|
||||
-------------------------------------
|
||||
- [Forza Silicon](https://www.forzasilicon.com/)
|
||||
- [GalaxyCore](https://en.gcoreinc.com/)
|
||||
- [OmniVision](https://www.ovt.com/)
|
||||
- [ON Semiconductor](https://www.onsemi.com/)
|
||||
- [Silicon Optronics](https://www.soinc.com.tw/)
|
||||
- [SmartSens Technology](https://www.smartsenstech.com/)
|
||||
- [Sony Semiconductor](https://www.sony-semicon.co.jp/)
|
|
@ -0,0 +1,18 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Contents](../README.md)
|
||||
|
||||
Hardware: SoC Manufacturers
|
||||
---------------------------
|
||||
- [Ambarella](https://www.ambarella.com/)
|
||||
- [Anyka](http://www.anyka.com/)
|
||||
- [Augentix](https://www.augentix.com/)
|
||||
- [Fullhan](https://www.fullhan.com/)
|
||||
- [Goke](http://www.goke.com/)
|
||||
- [Grain Media (Novatek)](https://www.novatek.com.tw/)
|
||||
- [HiSilicon](https://www.hisilicon.com/)
|
||||
- [Ingenic](http://www.ingenic.com.cn/)
|
||||
- [MStar (MediaTek)](http://www.mstarsemi.com/)
|
||||
- [Nextchip](http://www.nextchip.com/)
|
||||
- [Novatek](http://www.novatek.com.tw/)
|
||||
- [SigmaStar](http://www.sigmastarsemi.com/)
|
||||
- [XiongmaiTech](https://www.xiongmaitech.com/)
|
|
@ -0,0 +1,59 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Adding Huge-IC AH WiFi HaLow drivers for Ingenic T31
|
||||
----------------------------------------------------
|
||||
For basic users like myself, advanced users can ignore this document altogether.
|
||||
|
||||
This document describes how to add a Huge-IC's AH [WiFi HaLow](https://iot4beginners.com/wi-fi-halow/) drivers to OpenIPC firmware.
|
||||
|
||||
### Obtain driver source and edit Makefile
|
||||
|
||||
Obtain source file of the drivers so you can compile those drivers and upload to your camera system. So that when the hardware is connected, camera (host) can identify the hardware and connect with it. Its like, when you connect an USB dongle to your computer, it loads the driver. Your microprocessor does not load drivers like your PC, so you need to do it yourself.
|
||||
|
||||
First thing, locate Makefile. The file includes compilation instructions and failing to do it right will mean no wifi for your camera board. In the Makefile, edit values for ARCH, COMPILER and LINUX_KERNEL_PATH.
|
||||
|
||||
Ingenic uses MIPS architecture so use it for ARCH ‘ARCH := mips’
|
||||
|
||||
For COMPILER and Kernel Path, it is will be a cross compilation – kind of dependent on what you got in the OpenIPC. To enlighten yourself further, read this: https://blukat.me/2017/12/cross-compile-arm-kernel-module/
|
||||
|
||||
We can now move onto download and extract OpenIPC firmware, its extracted file will provide us the paths for Compiler and Kernel.
|
||||
|
||||
### Download OpenIPC Firmware
|
||||
|
||||
```
|
||||
cd
|
||||
git clone git@github.com:OpenIPC/firmware.git
|
||||
cd firmware
|
||||
./building.sh t31_ultimate
|
||||
```
|
||||
(t31_ultimate because ultimate comes with support for wireless devices. lite is stripped of those to save space.)
|
||||
|
||||
Now you can change the Compiler and Kernel path in driver source Makefile:
|
||||
|
||||
```
|
||||
#Driver Compilation for Ingenic T31
|
||||
ARCH := mips
|
||||
COMPILER := ~/firmware/output/host/bin/mipsel-linux-
|
||||
LINUX_KERNEL_PATH := ~/firmware/output/build/linux-3.10.14
|
||||
```
|
||||
|
||||
### Now run ‘make fmac’
|
||||
|
||||
(here FMAC or any other relevant name for your drivers)
|
||||
|
||||
If all went to plan, you should have one script file and one or more .ko extension files. Those .ko extension files are your drivers and the script file includes instructions for your host microcontroller to find and activate the drivers.
|
||||
|
||||
### Time to upload the drivers to camera system
|
||||
|
||||
If the files are small and Ingenic having extra space available, you can sideload the drivers.
|
||||
|
||||
Upload the .ko (drivers) and `fmac` (your script file can have a different name) script file to the folder of your choosing. Please make sure to edit the corresponding paths in the fmac script file, if required.
|
||||
|
||||
### Test
|
||||
|
||||
Test it with your WiFi hardware to ensure that it works.
|
||||
|
||||
### Next, create a package
|
||||
|
||||
Once you have learned how to create a package, please share it with the OpenIPC admin team members. They may agree to include your driver package to the repo. Once included as a package, next time you can use it by simply uncommenting and activating the package within the OpenIPC config file.
|
|
@ -0,0 +1,404 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Help: U-Boot
|
||||
------------
|
||||
|
||||
### Prepare the environment
|
||||
In booloader shell, check if `baseaddr` variable is already defined.
|
||||
|
||||
```bash
|
||||
printenv baseaddr
|
||||
```
|
||||
|
||||
If it is not there, set it yourself.
|
||||
|
||||
```bash
|
||||
# Look up address for your SoC at https://openipc.org/supported-hardware/
|
||||
setenv baseaddr 0x80600000
|
||||
```
|
||||
|
||||
Assign the hex size of your flash chip to a variable called `flashsize`.
|
||||
|
||||
```bash
|
||||
# Use 0x800000 for an 8MB flash chip, 0x1000000 for 16MB.
|
||||
setenv flashsize 0x800000
|
||||
```
|
||||
|
||||
Save these values into the environment afterwards.
|
||||
|
||||
```bash
|
||||
saveenv
|
||||
```
|
||||
|
||||
### Saving original firmware without using TFTP.
|
||||
|
||||
Before you start, [prepare the environment](#prepare-the-environment).
|
||||
|
||||
In the terminal program that you use to connect to the UART port, enable saving
|
||||
log file of the session. I like to use `screen` for this and my command for
|
||||
connect to the UART adapter with logging the active session to a file would look
|
||||
like this:
|
||||
|
||||
```bash
|
||||
screen -L -Logfile fulldump.log /dev/ttyUSB0 115200
|
||||
```
|
||||
|
||||
After connecting to the bootloader console, run a set of commands for reading
|
||||
whole amount of data from flash memory chip into RAM, and then dumping it as
|
||||
hexadecimal values into terminal window.
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} 0xff ${flashsize}
|
||||
sf probe 0
|
||||
sf read ${baseaddr} 0x0 ${flashsize}
|
||||
md.b ${baseaddr} ${flashsize}
|
||||
```
|
||||
|
||||
Since the process of reading is going to take a considerable amount of time
|
||||
(literally hours), you might want to disconnect from the terminal session to
|
||||
avoid accidental keystrokes contaminating the output. Press `Ctrl-a` followed
|
||||
by `d` to detach the session from active terminal. Run `screen -r` when you
|
||||
need to reconnect it later, after the size of the log file will stop growing.
|
||||
Reading of an 8 MB flash memory should result in a ~40 MB log file, and for a
|
||||
16 MB chip the file should be twice that size.
|
||||
|
||||
Convert the hex dump into a binary firmware file and use it for further research
|
||||
or restoring camera to its pristine state.
|
||||
|
||||
```bash
|
||||
cat fulldump.log | sed -E "s/^[0-9a-f]{8}\b: //i" | sed -E "s/ {4}.{16}\r?$//" > fulldump.hex
|
||||
xxd -revert -plain fulldump.hex fulldump.bin
|
||||
```
|
||||
|
||||
Use [binwalk](https://github.com/ReFirmLabs/binwalk) to unpack the binary file.
|
||||
|
||||
### Saving firmware via SD card.
|
||||
|
||||
Before you start, [prepare the environment](#prepare-the-environment).
|
||||
|
||||
Sometimes your camera only has a wireless connection, which does not work
|
||||
directly from the bootloader. Very often such cameras have a microSD card slot.
|
||||
In this case you can try to save a copy of the original firmware using an
|
||||
SD card as an intermediary medium.
|
||||
|
||||
Since you're going to save firmware in its binary form, the amount of data will
|
||||
be either 8 MB or 16 MB, depending on the size of camera's flash memory chip.
|
||||
So any SD card will do, even the smallest one.
|
||||
|
||||
Insert the card into the card slot on the camera, connect the serial adapter to
|
||||
the UART port, supply power to the camera and stop the boot process to get into
|
||||
the bootloader console.
|
||||
|
||||
Initialize access to the card, and clear some space to save firmware on.
|
||||
Data is written onto card in blocks of 512 bytes. You need to erase 16384 blocks
|
||||
to clear 8 MB, 32768 blocks for 16 MB, which are 0x4000 and 0x8000 hexadecimal,
|
||||
respectively.
|
||||
|
||||
Note that we are going to write directly to the card registers, bypassing the
|
||||
partition table. To avoid conflicts when accessing card data later from your PC,
|
||||
offset 8 kilobytes from the beginning of the card (8 * 1024 = 8192 bytes or 16
|
||||
blocks of 512 bytes, or 0x10 blocks in hexadecimal representation).
|
||||
|
||||
Example for 8MB:
|
||||
|
||||
```shell
|
||||
mmc dev 0
|
||||
mmc erase 0x10 0x4000
|
||||
```
|
||||
|
||||
Example for a 16MB:
|
||||
|
||||
```shell
|
||||
mmc dev 0
|
||||
mmc erase 0x10 0x8000
|
||||
```
|
||||
|
||||
Now you need to copy the contents of the firmware from the flash memory chip to
|
||||
the RAM of the camera. To do that, clear a section of RAM (0x800000 bytes for a
|
||||
8MB chip or 0x1000000 bytes for a 16MB chip), read the flash memory and copy
|
||||
the entire contents to the prepared space in RAM. Then export the copied data
|
||||
from RAM to the card.
|
||||
|
||||
Example for 8MB:
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} ff ${flashsize}
|
||||
sf probe 0
|
||||
sf read ${baseaddr} 0x0 ${flashsize}
|
||||
|
||||
mmc write ${baseaddr} 0x10 0x4000
|
||||
```
|
||||
|
||||
Another example, for 16MB:
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} ff ${flashsize}
|
||||
sf probe 0
|
||||
sf read ${baseaddr} 0x0 ${flashsize}
|
||||
|
||||
mmc write ${baseaddr} 0x10 0x8000
|
||||
```
|
||||
|
||||
Remove the card from the camera and insert it into a computer running Linux.
|
||||
Use `dd` command to copy data from the card to a binary file on the computer.
|
||||
|
||||
Example for 8MB:
|
||||
|
||||
```bash
|
||||
sudo dd bs=512 skip=16 count=16384 if=/dev/sdc of=./fulldump.bin
|
||||
```
|
||||
|
||||
Example for 16MB:
|
||||
|
||||
```bash
|
||||
sudo dd bs=512 skip=16 count=32768 if=/dev/sdc of=./fulldump.bin
|
||||
```
|
||||
|
||||
### Uploading binary image via serial connection.
|
||||
|
||||
There are cameras that only have wireless connection unavailable directly from
|
||||
bootloader. Most of such cameras also have SD card slot but some don't, or it
|
||||
does not work for some reason, or you don't have a card, or something. Anyway,
|
||||
you still can upload a binary image onto camera and either run it, or save it
|
||||
into the flash memory. Here's how.
|
||||
|
||||
First of all, you'll need to install `lrzsz` package on your desktop computer.
|
||||
I presume it runs Linux and preferrably of a Debian family, that'll be easier
|
||||
on examples. So, run this command to satisfy prerequisites:
|
||||
|
||||
```bash
|
||||
apt install lrzsz
|
||||
```
|
||||
|
||||
Now you are ready.
|
||||
|
||||
Place the binary file you are going to upload into the same directory where you
|
||||
will be starting a `screen` session to your camera from. Start the session and
|
||||
boot into the bootloader console interrupting booting routine with a key combo.
|
||||
|
||||
Now you can run `help` and check what data transfer protocols are supported by
|
||||
your version of bootloader. If you see `loady` in the list of commands, then
|
||||
you can use ymodem protocol. Run `loady` on you camera, then press `Ctrl-a`
|
||||
followed by `:` (semi-colon). It will switch you into command line at the very
|
||||
bottom of the screen.
|
||||
|
||||
Enter `exec !! sz --ymodem filename.bin` where _filename.bin_ and see your file
|
||||
uploading via serial connection. At 115200 bps. Slow, very slow.
|
||||
|
||||
After the file is uploaded, you can do the usual magic. Either boot from the
|
||||
memory image right away using `bootm`, or write it into the flash memory.
|
||||
|
||||
### Flashing full image via serial connection
|
||||
|
||||
Before you start, [prepare the environment](#prepare-the-environment).
|
||||
|
||||
Download the full firmware binary for your SoC and flash chip from
|
||||
[OpenIPC web site](https://openipc.org/supported-hardware/) after submitting the
|
||||
settings form and clicking the link hidden under "Alternative method" button.
|
||||
|
||||

|
||||
|
||||
Open `screen` and connect to UART port.
|
||||
|
||||
```bash
|
||||
screen /dev/ttyUSB0 115200
|
||||
```
|
||||
|
||||
Sign in into bootloader shell and run:
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} 0xff ${flashsize}
|
||||
loady ${baseaddr}
|
||||
```
|
||||
|
||||
press "Ctrl-a" followed by ":", then type
|
||||
|
||||
```bash
|
||||
exec !! sz --ymodem fullimage.bin
|
||||
```
|
||||
|
||||
after the image is loaded, continue
|
||||
|
||||
```shell
|
||||
sf probe 0
|
||||
sf erase 0x0 ${flashsize}
|
||||
sf write ${baseaddr} 0x0 ${filesize}
|
||||
```
|
||||
|
||||
### Flashing full image from TFTP
|
||||
|
||||
Before you start, [prepare the environment](#prepare-the-environment).
|
||||
|
||||
Download [full image binary for your SoC](https://openipc.org/supported-hardware/)
|
||||
and place it in the root directory of your local TFTP server.
|
||||
|
||||
Start the session and boot into the bootloader console interrupting booting
|
||||
routine with a key combo. When in the console, set up parameters of your local
|
||||
network, if needed.
|
||||
|
||||
```bash
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv netmask 255.255.255.0
|
||||
setenv gatewayip 192.168.1.1
|
||||
setenv serverip 192.168.1.254
|
||||
```
|
||||
|
||||
Use the following commands to re-flash your camera with the full image:
|
||||
|
||||
Example for 8MB:
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} 0xff ${flashsize}
|
||||
tftpboot ${baseaddr} openipc-${soc}-lite-8mb.bin
|
||||
sf probe 0; sf erase 0x0 ${flashsize}; sf write ${baseaddr} 0x0 ${filesize}
|
||||
reset
|
||||
```
|
||||
|
||||
Example for 16MB:
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} 0xff ${flashsize}
|
||||
tftpboot ${baseaddr} openipc-${soc}-ultimate-16mb.bin
|
||||
sf probe 0; sf erase 0x0 ${flashsize}; sf write ${baseaddr} 0x0 ${filesize}
|
||||
reset
|
||||
```
|
||||
|
||||
At the first boot, sign in into the bootloader shell once again and remap
|
||||
partitioning running `run setnor16m` command.
|
||||
|
||||
### Reading binary image from SD card.
|
||||
|
||||
Before you start, [prepare the environment](#prepare-the-environment).
|
||||
|
||||
If your camera supports SD card and you have `fatload` command in bootloader,
|
||||
then you can read firmware binary files from an SD card.
|
||||
|
||||
First, prepare the card: format it into FAT filesystem and place bootloader,
|
||||
kernel, and rootfs binary files there. Insert the card into camera and boot
|
||||
into bootloader console.
|
||||
|
||||
Check that you have access to the card.
|
||||
|
||||
```bash
|
||||
mmc rescan
|
||||
```
|
||||
|
||||
Then unlock access to flash memory and start writing content of the files from
|
||||
the card into the flash memory.
|
||||
|
||||
NB! Please note that load address and names of files used in this example not
|
||||
necessarily match those for your particular camera. Consult documentation, or
|
||||
seek help on [our Telegram channel][telegram].
|
||||
|
||||
Flash bootloader.
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} 0xff 0x50000
|
||||
sf probe 0
|
||||
sf erase 0x0 0x50000
|
||||
fatload mmc 0:1 ${baseaddr} u-boot-with-spl.bin
|
||||
sf write ${baseaddr} 0x0 ${filesize}
|
||||
```
|
||||
|
||||
Flash kernel.
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} 0xff 0x200000
|
||||
sf probe 0
|
||||
sf erase 0x50000 0x200000
|
||||
fatload mmc 0:1 ${baseaddr} uImage.${soc}
|
||||
sf write ${baseaddr} 0x50000 ${filesize}
|
||||
```
|
||||
|
||||
Flash root filesystem.
|
||||
|
||||
```shell
|
||||
mw.b ${baseaddr} 0xff 0x500000
|
||||
sf probe 0
|
||||
sf erase 0x250000 0x500000
|
||||
fatload mmc 0:1 ${baseaddr} rootfs.squashfs.${soc}
|
||||
sf write ${baseaddr} 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Bypassing password-protected bootloader.
|
||||
|
||||
Changing the bootloader is a risky operation. There's a high probability of
|
||||
turning your camera into a paperweight if something goes wrong. So before you
|
||||
flash a new bootloader you have to weigh up all the risks and benefits. In most
|
||||
cases the original bootloader plus new kernel and new operating system should
|
||||
work just fine. But there are exceptions.
|
||||
|
||||
#### Shorting pins on flash chip
|
||||
|
||||
If you can't interrupt the boot sequence with a key combination, or if your
|
||||
camera requires a bootloader password that you don't know, you can still make
|
||||
it stop the Linux kernel booting and throw you into the shell.
|
||||
|
||||
The first thing to do is locate the flash memory chip on the camera circuit
|
||||
board. Typically this is a square chip with 8 pins labeled 25Q64 or 25Q128,
|
||||
rarely 25L64 or 25L128. If you have trouble locating the chip, try taking
|
||||
some pictures of your board from both sides. Then ask for help
|
||||
[in our Telegram channel](https://t.me/openipc).
|
||||
__Do not try to short-circuit any random chip! It will most likely burn your camera circuit.__
|
||||
|
||||
Short-circuit pins 5 and 6 of the flash chip with a small metal object,
|
||||
a screwdriver or tweezers, right after the bootloader starts but before it
|
||||
calls up the Linux kernel.
|
||||
|
||||
Pins 5 and 6 of the SOIC8 chip are on the opposite corner of pin 1, indicated
|
||||
by the embossed or drawn dot next to it.
|
||||
|
||||

|
||||

|
||||
|
||||
[This hack in details](https://cybercx.co.nz/bypassing-bios-password/) or [archived](https://github.com/OpenIPC/wiki/blob/master/en/help-uboot.md#bypassing-password-protected-bootloader) version of the article
|
||||
|
||||
#### Downgrading stock firmware.
|
||||
|
||||
Today, we see more and more cameras where access to bootloader console is
|
||||
protected with a password. Thus, even if you connect to the camera's UART port,
|
||||
all you will see after interrupting the standard boot cycle is a prompt for
|
||||
password. In that case, a relatively safe solution is to downgrade the firmware
|
||||
to a version where the password protection was not yet implemented. For example,
|
||||
for Xiongmai cameras the bootloader password protection started popping up
|
||||
somewhere around July 2021, hence you need a firmware for your camera from an
|
||||
earlier date. After you successfully downgrade your camera to a password-free
|
||||
bootloader, you could install the OpenIPC firmware in a regular way.
|
||||
|
||||
#### Side-loading unlocked bootloader.
|
||||
|
||||
Many modern cameras utilize fastboot protocol that allows camera to load a
|
||||
bootloader binary code directly into memory and then run it from there.
|
||||
Check if our [burn utility][burn] supports your camera's SoC.
|
||||
|
||||
#### Modifying stock firmware.
|
||||
|
||||
One way to bypass the bootloader protection is to dump original firmware and
|
||||
replace bootloader there with an unlocked alternative. Or you could flash the
|
||||
entire OpenIPC firmware since you have the chip in the programmer, anyway.
|
||||
|
||||
__DO NOT FORGET TO MAKE A BACKUP OF YOUR ORIGINAL FIRMWARE!__
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Before you start, [prepare the environment](#prepare-the-environment).
|
||||
|
||||
If you get `Too many args` error while trying to set an environment variable,
|
||||
try to do that from within Linux using `fw_setenv` instead of `setenv` in U-boot.
|
||||
|
||||
__U-boot console:__
|
||||
|
||||
```shell
|
||||
hisilicon # setenv uk 'mw.b ${baseaddr} 0xff ${flashsize}; tftp ${baseaddr} uImage.${soc}; sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}'
|
||||
** Too many args (max. 16) **
|
||||
```
|
||||
|
||||
__OpenIPC Linux:__
|
||||
|
||||
```shell
|
||||
root@openipc-hi3518ev100:~# fw_setenv uk 'mw.b ${baseaddr} 0xff ${flashsize}; tftp ${baseaddr} uImage.${soc}; sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}'
|
||||
```
|
||||
|
||||
[burn]: https://github.com/OpenIPC/burn
|
||||
[telegram]: https://t.me/OpenIPC
|
|
@ -0,0 +1,69 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Help: Web UI
|
||||
------------
|
||||
|
||||
### Updating Web UI from Web UI.
|
||||
|
||||
In some cases, especially if you think that something does not work as it should,
|
||||
try to update Web UI once more, overriding version checking for the second update.
|
||||
This may be required because of some changes we have possibly made to the updating
|
||||
routine, thus you shall retrieve the updating routine code with the first update,
|
||||
and then use it for the consecutive update.
|
||||
|
||||
### Web UI Development.
|
||||
|
||||
If you want to help us with developing of the web interface for our
|
||||
firmware, here is what you need to know beforehands. Cameras are very
|
||||
limited in terms of space and performance. The only available option
|
||||
we have now in the firmware which is more or less suitable for dynamic
|
||||
generating of HTML pages is `haserl`, a fancy cousin of `ash` bent for
|
||||
serving as a CGI wrapper. Did I say `ash`? Right, because we don't have
|
||||
`bash`, `tcsh`, `zsh` in our Linux. Ash it is. As in A shell, full name
|
||||
Almquist shell. Tiny, lightweight, and kinda limited. System is limited,
|
||||
too -- in most parts it is `busybox`. So, if you still feel comfortable
|
||||
to make your hands dirty with a very 80s style of web development then
|
||||
welcome aboard.
|
||||
|
||||
Recent interface is built around [Bootstrap](https://getbootstrap.com/)
|
||||
CSS framework which is a little overkill for the purpose but allowed us
|
||||
to fast-track from the original microbe web to what we have now. We would
|
||||
like to slim down the original Bootstrap bundle and create a custom pack
|
||||
with only the features we use. If you posses such a skill, come and work
|
||||
with us.
|
||||
|
||||
Also, we're considering the possibility of switching to a client-side
|
||||
web interface builder, leaving only data-tossing to the server. Vue.js
|
||||
or similar. Have something to add here? Spill it out.
|
||||
|
||||
Any other ideas? We would like to listen them, too.
|
||||
|
||||
### Running a development version of Web UI.
|
||||
|
||||
To start improving the web interface, clone its GitHub repo locally and
|
||||
set up an NFS mount on your camera to the root directory of the local copy:
|
||||
|
||||
```bash
|
||||
mkdir -p /tmp/dev
|
||||
mount -t nfs -o nolock,tcp 192.168.1.123:/full/path/to/web/files /tmp/dev
|
||||
```
|
||||
|
||||
> _(replace 192.168.1.123 and /full/path/to/web/files with your own IP and path)_
|
||||
|
||||
Then start another instance of httpd daemon to serve your version of Web UI
|
||||
on another port of the camera, say port 86:
|
||||
|
||||
```bash
|
||||
httpd -p 86 -h "/tmp/dev/var/www" -c /dev/null
|
||||
```
|
||||
|
||||
Now you can work on Web UI source code in your favorite IDE or a text editor
|
||||
on your workstation, and immediately test the changes with a web browser
|
||||
pointed to port 86 on the camera. _(E.g. http://192.168.1.10:86/)_
|
||||
|
||||
Remember that you substitute only web server contents, but there are also
|
||||
supporting scripts residing outside web directory. These scripts might require
|
||||
updating on camera in case you make changes to them, as well. To update a
|
||||
script on camera, open ssh session to the camera and copy updated version of
|
||||
the script from `/tmp/dev/usr/sbin/` to `/usr/sbin/`.
|
|
@ -0,0 +1,239 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
## HomeAsistant PTZ INTEGRATION
|
||||
|
||||
This integration is based on the ssh command to the open ipc firmware to integrate ptz controls, for cameras that do not have onvif support
|
||||
|
||||
## Camera configuration
|
||||
Load the modules with parameters (you may need to experiment with the hmaxstep and vmaxstep values for your specific camera)
|
||||
|
||||
Copy motor_sample.ko ---> internal memory (ssh copy)
|
||||
```
|
||||
scp "C:\Users\Downloads\sample_motor.ko" root@192.168.1.29:/sample_motor.ko
|
||||
```
|
||||
Edit new autostart script on your camera
|
||||
```
|
||||
$ vi /etc/rc.local
|
||||
```
|
||||
Add these lines
|
||||
```
|
||||
# addmod
|
||||
insmod /sample_motor.ko vstep_offset=0 hmaxstep=2130 vmaxstep=1600
|
||||
# go to 0 position
|
||||
t31-kmotor -d h -r
|
||||
```
|
||||
Change file mod (add execute permissions )
|
||||
```
|
||||
$ chmod +x /etc/rc.local
|
||||
```
|
||||
|
||||
## Home Assistant configuration
|
||||
```
|
||||
docker ps
|
||||
docker exec -it <"ID_HA_container"> /bin/bash
|
||||
```
|
||||
install sshpass
|
||||
```
|
||||
apk add sshpass
|
||||
```
|
||||
|
||||
**Note:** You can test sshpass with
|
||||
|
||||
```
|
||||
sshpass -p '123456' ssh root@192.168.1.29
|
||||
```
|
||||
|
||||
|
||||
Add those lines to configuration.yaml
|
||||
```
|
||||
shell_command:
|
||||
c101_x_down: /bin/bash c101_x_down.sh
|
||||
c101_x_up: /bin/bash c101_x_up.sh
|
||||
c101_y_down: /bin/bash c101_y_down.sh
|
||||
c101_y_up: /bin/bash c101_y_up.sh
|
||||
c101_r: /bin/bash c101_r.sh
|
||||
```
|
||||
Add those lines to scripts.yaml
|
||||
```
|
||||
c101_x_down:
|
||||
alias: c101_x_down
|
||||
sequence:
|
||||
- service: shell_command.c101_x_down
|
||||
data: {}
|
||||
mode: single
|
||||
c101_x_up:
|
||||
alias: c101_x_up
|
||||
sequence:
|
||||
- service: shell_command.c101_x_up
|
||||
data: {}
|
||||
mode: single
|
||||
c101_y_down:
|
||||
alias: c101_y_down
|
||||
sequence:
|
||||
- service: shell_command.c101_y_down
|
||||
data: {}
|
||||
mode: single
|
||||
c101_y_up:
|
||||
alias: c101_y_up
|
||||
sequence:
|
||||
- service: shell_command.c101_y_up
|
||||
data: {}
|
||||
mode: single
|
||||
c101_r:
|
||||
alias: c101_r
|
||||
sequence:
|
||||
- service: shell_command.c101_r
|
||||
data: {}
|
||||
mode: single
|
||||
```
|
||||
|
||||
**SCRIPT**
|
||||
This script is found in this repo
|
||||
https://github.com/OpenIPC/motors/tree/4c7dc45e5e877f38c076343f361159844374920a/t31-kmotor
|
||||
|
||||
Create this script in the /config directory
|
||||
|
||||
```
|
||||
vi camara_scrip.sh
|
||||
```
|
||||
Paste this file
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
echo "Enter the camera user:"
|
||||
read user
|
||||
echo "Enter the camera password:"
|
||||
read password
|
||||
echo "Enter the camera IP:"
|
||||
read ip
|
||||
echo "Camera_Name_"
|
||||
read name
|
||||
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor remoto utilizando sshpass y la contraseña
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor con los argumentos
|
||||
t31-kmotor -d h -r
|
||||
EOF
|
||||
"> "$name"_r.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x -300 -y 0
|
||||
EOF
|
||||
"> "$name"_x_down.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x 300 -y 0
|
||||
EOF
|
||||
"> "$name"_x_up.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x 0 -y -300
|
||||
EOF
|
||||
"> "$name"_y_down.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x 0 -y 300
|
||||
EOF
|
||||
"> "$name"_y_up.sh
|
||||
|
||||
# Change mod
|
||||
chmod +x "$name"_r.sh "$name"_x_down.sh "$name"_x_up.sh "$name"_y_down.sh "$name"_y_up.sh
|
||||
|
||||
```
|
||||
Execute the following lines
|
||||
```
|
||||
chmod +x camara_scrip.sh
|
||||
./camara_scrip.sh
|
||||
```
|
||||
Enter your camera data (name of before example c101)
|
||||
|
||||
**Note:** need to make a script for the other files (configuration.yml and scrips.yml)
|
||||
|
||||
|
||||
|
||||
## Lovelace example
|
||||
Add this extract in a new card manually (yaml format)
|
||||
```
|
||||
camera_view: live
|
||||
type: picture-elements
|
||||
image: http://192.168.1.29/image.jpg
|
||||
entities:
|
||||
- entity: script.c1_r
|
||||
- entity: script.c1_x_down
|
||||
- entity: script.c1_x_up
|
||||
- entity: script.c1_y_down
|
||||
- entity: script.c1_y_up
|
||||
camera_image: camera.192_168_1_29
|
||||
elements:
|
||||
- type: icon
|
||||
icon: mdi:arrow-left-drop-circle
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.c1_x_down
|
||||
style:
|
||||
bottom: 45%
|
||||
left: 5%
|
||||
color: white
|
||||
opacity: 0.5
|
||||
transform: scale(1.5, 1.5)
|
||||
- type: icon
|
||||
icon: mdi:arrow-right-drop-circle
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.c1_x_up
|
||||
style:
|
||||
bottom: 45%
|
||||
right: 5%
|
||||
color: white
|
||||
opacity: 0.5
|
||||
transform: scale(1.5, 1.5)
|
||||
- type: icon
|
||||
icon: mdi:arrow-up-drop-circle
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.c1_y_up
|
||||
style:
|
||||
top: 10%
|
||||
left: 46%
|
||||
color: white
|
||||
opacity: 0.5
|
||||
transform: scale(1.5, 1.5)
|
||||
- type: icon
|
||||
icon: mdi:arrow-down-drop-circle
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.c1_y_down
|
||||
style:
|
||||
bottom: 10%
|
||||
left: 46%
|
||||
color: white
|
||||
opacity: 0.5
|
||||
transform: scale(1.5, 1.5)
|
||||
- type: icon
|
||||
icon: mdi:arrow-expand-all
|
||||
tap_action:
|
||||
action: more-info
|
||||
entity: camera.192_168_1_29
|
||||
style:
|
||||
top: 5%
|
||||
right: 5%
|
||||
color: white
|
||||
opacity: 0.5
|
||||
transform: scale(1.5, 1.5)
|
||||
|
||||
```
|
||||
|
||||
Example of view
|
||||
|
||||

|
||||
# Enjoy the stream.
|
|
@ -0,0 +1,65 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
|
||||
## HomeAsistant Generic camera
|
||||
#### Option 1
|
||||
Go to Setings -> Device and service -> Add integrations --> Generic camera
|
||||
|
||||
#### Option 2
|
||||
[HomeAssistan_Generic](https://my.home-assistant.io/redirect/config_flow_start/?domain=generic)
|
||||
|
||||
#### Option 3
|
||||
<"IP-HomeAsisstantServer">/config/integrations/dashboard
|
||||
|
||||
Add integrations --> Generic camera
|
||||
|
||||
### Config parameter
|
||||
|
||||
<div style="display: flex;">
|
||||
<div style="max-width: 80%; overflow-x: auto;">
|
||||
<img src="../images/howto-streaming-homeassistant.png" alt="Example configuration generic camera home assitant (IP_Camera 192.168.1.29)" width="300"/>
|
||||
</div>
|
||||
<div style="max-width: 80%; overflow-x: auto;">
|
||||
<pre>
|
||||
<code>
|
||||
Still Image URL -> http://<"IP-OIPC_Camera">/image.jpg
|
||||
Stream Source URL -> rtsp://<"User">:<"PASS">@<"IP-OIPC_Camera">:554/stream=0
|
||||
RTSP transport protocol -> TCP
|
||||
Authentication -> basic
|
||||
Username -> <"User">
|
||||
Password -> <"PASS">
|
||||
Frame Rate -> 15
|
||||
Verify SSL certificate -> empty
|
||||
Limit refetch to url change ->empty
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
**Note:** Default User and PASS OpenIPC -> ("root" & ¨12345¨)
|
||||
|
||||
**Note:** Be carful with frame rate (Currently home assistant does not support more than 20 having flicker problems)
|
||||
|
||||
## Lovelace example
|
||||
Add this extract in a new card manually (yaml format)
|
||||
```
|
||||
camera_view: live
|
||||
type: picture-glance
|
||||
image: http://192.168.1.29/image.jpg
|
||||
entities: []
|
||||
entity: camera.192_168_1_29
|
||||
view_layout:
|
||||
position: main
|
||||
camera_image: camera.192_168_1_29
|
||||
```
|
||||
**OTHERNote:**
|
||||
## Camera Configuration
|
||||

|
||||
|
||||
## Router settings
|
||||
Remember to set a fixed IP address for your camera from your router, otherwise it could change when it reboots.
|
||||
|
||||
|
||||
# Enjoy the stream.
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
[Table of Content](../README.md)
|
||||
|
||||
Integrate OpenIPC into HomeKit
|
||||
---
|
||||
|
||||
Currently OpenIPC doesn't have native HomeKit support yet, integration is made by 3rd party package [go2rtc](https://github.com/AlexxIT/go2rtc "go2rtc"), thanks [@gtxaspec](https://github.com/gtxaspec "@gtxaspec") for adding this package into OpenIPC
|
||||
|
||||
### Hardware requirement
|
||||
|
||||
Since the compiled binary file will 3.3MB in size, flash chip size should be 16MB at least, DDR size should be 128MB at least
|
||||
|
||||
### Compile go2rtc package
|
||||
|
||||
Install go and upx first
|
||||
```
|
||||
apt update
|
||||
apt install golang upx
|
||||
```
|
||||
- #### Method 1: Compile the whole firmware
|
||||
Edit board config file in `firmware/br-ext-chip-xxxx/configs` directory, add the following line to enable the go2rtc package
|
||||
```
|
||||
BR2_PACKAGE_GO2RTC=y
|
||||
```
|
||||
then run
|
||||
```
|
||||
make distclean
|
||||
make all BOARD=board_config_name
|
||||
```
|
||||
- #### Method2: Compile the package only
|
||||
```
|
||||
make distclean
|
||||
make br-go2rtc-rebuild BOARD=board_config_name
|
||||
```
|
||||
The compiled go2rtc binary file will located at `firmware/output/per-package/go2rtc/target/usr/bin`, default config file at `firmware/output/per-package/go2rtc/target/etc`
|
||||
|
||||
### Edit config file
|
||||
|
||||
Put config file `go2rtc.yaml` into `/etc/` directory, example config:
|
||||
|
||||
```
|
||||
log:
|
||||
level: info # default level
|
||||
api: trace
|
||||
exec: debug
|
||||
ngrok: info
|
||||
rtsp: warn
|
||||
streams: error
|
||||
webrtc: fatal
|
||||
|
||||
rtsp:
|
||||
listen: ":8553"
|
||||
|
||||
webrtc:
|
||||
candidates:
|
||||
- stun:8555
|
||||
|
||||
streams:
|
||||
openipc: rtsp://admin:12345@127.0.0.1/stream=0
|
||||
|
||||
homekit:
|
||||
openipc: # same stream ID from streams list
|
||||
pin: 19550224 # custom PIN, default: 19550224
|
||||
name: openipc-ssc30kq # custom camera name, default: generated from stream ID
|
||||
device_id: openipc # custom ID, default: generated from stream ID
|
||||
```
|
||||
|
||||
### Run go2rtc
|
||||
|
||||
```
|
||||
/usr/bin/go2rtc -config /etc/go2rtc.yaml &
|
||||
```
|
||||
|
||||
Open the Home app on your Apple device, click the `+` button on the top-right corner, the OpenIPC camera should appear there automatically, enter the pin numbers in the config file to pair with it.
|
||||
|
||||
### Autorun on startup
|
||||
|
||||
Add the following lines into /etc/rc.local
|
||||
|
||||
```
|
||||
/usr/bin/go2rtc -config /etc/go2rtc.yaml &
|
||||
```
|
||||
|
||||
### Limitations
|
||||
|
||||
- No HomeKit Secure Video support yet
|
||||
- No motion sensor support yet
|
||||
- No two-way audio support yet
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
## Live streaming to Telegram
|
||||
|
||||
Open the channel you want to translate to. Start a streaming session.
|
||||
|
||||

|
||||
|
||||
Copy Server URL and Stream key from Settings.
|
||||
|
||||

|
||||
|
||||
Open `/etc/majestic.yaml` on camera and add the URL and the key into `outgoing` section of the config.
|
||||
|
||||
**Note:** It will stream the `video0`. It **must** be configured to video codec: `h264`.
|
||||
|
||||
**Note:** Dont forget add `-` sign before parameters!
|
||||
|
||||
**Note:** `outgoing` section may affect another section addition. Remember it!
|
||||
|
||||

|
||||

|
||||
|
||||
Restart majestic streamer.
|
||||
|
||||

|
||||
|
||||
Enjoy the stream.
|
||||
|
||||

|
|
@ -0,0 +1,62 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
Each SoC manufacturer has its own software to adjust picture quality:
|
||||
|
||||
* HiSilicon - PQTools
|
||||
* Novatek - isptool
|
||||
* Fullhan - Coolview
|
||||
|
||||
## HiSilicon based boards
|
||||
|
||||
### EV300 family
|
||||
|
||||
#### Run server module on OpenIPC boards
|
||||
|
||||
```console
|
||||
$ pqtools
|
||||
|
||||
.....
|
||||
|
||||
dev mounted
|
||||
libs mounted
|
||||
pqtools:begin to run
|
||||
the s32Result is 1
|
||||
g_bUseSpecAWB is 0
|
||||
port is : 4321
|
||||
|
||||
<HI_PQT_Network_Init>(1486)bind ok!
|
||||
pqtools:server(port:4321)begin to listen
|
||||
pqtools:Waiting for connection from client!
|
||||
```
|
||||
|
||||
#### Run server module on XM boards
|
||||
|
||||
For sake of simplicity we wse public NFS server:
|
||||
|
||||
```console
|
||||
$ mount -o nolock 95.217.179.189:/srv/ro /utils/
|
||||
$ cd /utils/ittb_ev300_V1.0.1.2/
|
||||
$ LD_LIBRARY_PATH=lib ./ittb_control
|
||||
|
||||
...
|
||||
pqtools:Waiting for connection from client!
|
||||
```
|
||||
|
||||
#### Run client software on Windows
|
||||
|
||||
Download and install [MATLAB Compiler Runtime][mcr].
|
||||
|
||||
Download [PQTools][pqt] and extract a zip archive somewhere on your PC.
|
||||
|
||||
Launch `HiPQTools.exe`, select `Hi3516EV200_V1.0.1.2`, type IP address of your
|
||||
camera and click `OK`.
|
||||
|
||||
Use [this manual][man] as a reference.
|
||||
|
||||
[mcr]: https://ssd.mathworks.com/supportfiles/MCR_Runtime/R2012a/MCR_R2012a_win32_installer.exe
|
||||
[pqt]: https://drive.google.com/file/d/1c4XZRbJKXjMBwfMJaLl5jUPcVqMbO936/view?usp=sharing
|
||||
[man]: https://drive.google.com/file/d/1mY1lXMZVNz2Ia5CPvTF-K-907eIioSYU/view?usp=sharing
|
|
@ -0,0 +1,84 @@
|
|||
### Ingenic Cloner Utility
|
||||
|
||||
The ingenic cloner application is a PC side utility that interfaces with the "USB-Boot" mode built into Ingenic SOCs. By placing the SOC into "USB-Boot" mode, you are able to use the ingenic clonger application to directly flash the firmware chip without physically removing, or interfacing to the flash chip.
|
||||
|
||||
This guide is a work in progress.
|
||||
|
||||
|
||||
#### Shorting pins on flash chip
|
||||
|
||||
The first thing to do is locate the flash memory chip on the camera circuit
|
||||
board. Typically this is a square chip with 8 pins labeled 25Q64 or 25Q128,
|
||||
rarely 25L64 or 25L128. If you have trouble locating the chip, try taking
|
||||
some pictures of your board from both sides. Then ask for help
|
||||
[in our Telegram channel](https://t.me/openipc).
|
||||
__Do not try to short-circuit any random chip! It will most likely burn your camera circuit.__
|
||||
|
||||
Short-circuit pins 5 and 6 of the flash chip with a small metal object,
|
||||
a screwdriver or tweezers, right after the bootloader starts but before it
|
||||
calls up the Linux kernel.
|
||||
|
||||
Pins 5 and 6 of the SOIC8 chip are on the opposite corner of pin 1, indicated
|
||||
by the embossed or drawn dot next to it.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
# Download Cloner: [OpenIPC Utilities](https://openipc.org/utilities)
|
||||
|
||||
---
|
||||
|
||||
**OpenIPC Cloner Application Guide**
|
||||
|
||||
1. **Accessing Cloner**:
|
||||
- Navigate to the "cloner-2.5.xx-ubuntu_alpha" directory, with "xx" indicating your downloaded version of Cloner.
|
||||
|
||||
2. **Preparing for Firmware**:
|
||||
- Create a new folder named `0_OpenIPC_Firmware` in this directory.
|
||||
|
||||
3. **Launching Cloner**:
|
||||
- Open the `cloner` application. Ensure you are using version 2.5.43 or later for compatibility.
|
||||
|
||||
4. **Initial Setup**:
|
||||
- Click "Load Image" and select the "openipc_cloner_bundle_xxx.zip" file.
|
||||
- If the lock level is "2", change it to "0". Enter '!@#' (exclamation, at symbol, number sign, without any quotation marks) as the password. The 'Config' button should reappear.
|
||||
|
||||
5. **Configuration Settings**:
|
||||
- Click the 'Config' button in the top-right corner.
|
||||
|
||||
6. **Navigating Configuration**:
|
||||
- In the Config window, under the "Info" tab, access various configuration menus.
|
||||
|
||||
7. **Device Specific Settings**:
|
||||
- Select 'Platform T'.
|
||||
- Choose the appropriate SOC version for your device next to Platform 'T'.
|
||||
- Under 'Board', select the relevant operation:
|
||||
- `txxx_sfc_nor_reader_8MB.cfg` for 8MB flash chip devices.
|
||||
- `txxx_sfc_nor_reader_16MB.cfg` for 16MB flash chip devices.
|
||||
- `txxx_sfc_nor_writer.cfg` for writing individual partitions.
|
||||
- `txxx_sfc_nor_writer_full.cfg` to flash the entire chip.
|
||||
- Click "Save" to return to the main screen.
|
||||
|
||||
8. **Starting the Program**:
|
||||
- With your desired profile loaded, click "Start" on the main screen.
|
||||
|
||||
9. **Device Recognition Procedure**:
|
||||
- Plug the USB cable into the device, leaving the other end unplugged.
|
||||
- Short pins 5-6 ON THE FLASH CHIP, not SoC or any other chip, use the photos as a reference, as described earlier in this document.
|
||||
- While maintaining the short, connect the USB cable to the computer. Wait 2 seconds, then release the short.
|
||||
- It may take up to 30 seconds for Cloner to recognize the device. Progress bars on the main screen will indicate ongoing operations.
|
||||
|
||||
10. **Completion**:
|
||||
- Once all progress bars turn green, the operations are complete.
|
||||
|
||||
---
|
||||
|
||||
Carefully follow these steps to ensure the Cloner application is set up correctly and operates as expected.
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
# Ingenic PTZ Configuration Guide
|
||||
|
||||
The motors module is included in the `openingenic` repo which is installed by default, as the `motor.ko` kernel module.
|
||||
|
||||
## Loading the Module
|
||||
|
||||
Load the motor module with the following command ( adjust the GPIOs as needed for your hardware, see [Module Configuration](https://github.com/OpenIPC/wiki/blob/master/en/ingenic-ptz.md#module-configuration) ):
|
||||
|
||||
```bash
|
||||
modprobe motor hmaxstep=2540 vmaxstep=720 hst1=52 hst2=53 hst3=57 hst4=51 vst1=59 vst2=61 vst3=62 vst4=63
|
||||
```
|
||||
|
||||
To automate this process during boot, add the line `sample_motor hmaxstep=2540 vmaxstep=720 hst1=52 hst2=53 hst3=57 hst4=51 vst1=59 vst2=61 vst3=62 vst4=63` to `/etc/modules`.
|
||||
|
||||
## Module Configuration
|
||||
|
||||
- `hstX`: Horizontal motor phase GPIO pins.
|
||||
- `vstX`: Vertical motor phase GPIO pins.
|
||||
- `hmaxstep` and `vmaxstep`: Specify the maximum number of steps your hardware can handle.
|
||||
|
||||
## Controlling the Motors
|
||||
|
||||
Use the `ingenic-motor` command-line utility for motor control.
|
||||
|
||||
## Note on GPIO Handling
|
||||
|
||||
- Be aware that depending on the specific GPIOs your hardware uses for motor control, you might experience limited or non-functional movement due to broken GPIO handling on the Ingenic platform.
|
||||
- This issue may be addressed in future updates.
|
||||
```
|
|
@ -0,0 +1,165 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Ingenic SoC research and debugging notes
|
||||
----------------------------------------
|
||||
|
||||
#### Control PWM channels on ingenic devices using `ingenic-pwm` utility included with OpenIPC:
|
||||
|
||||
```
|
||||
INGENIC PWM Control Version: Oct 19 2023_18:01:16_latest-2294-g72f266e7
|
||||
Usage: ingenic-pwm [options]
|
||||
|
||||
Options:
|
||||
-c, --channel=<0-7> Specify PWM channel number
|
||||
-q, --query Query channel state
|
||||
-e, --enable Enable channel
|
||||
-d, --disable Disable channel
|
||||
-p, --polarity=<0|1> Set polarity (0: Inversed, 1: Normal)
|
||||
-D, --duty=<duty_ns> Set duty cycle in ns
|
||||
-P, --period=<period_ns> Set period in ns
|
||||
-r, --ramp=<value> Ramp PWM (+value: Ramp up, -value: Ramp down)
|
||||
-x, --max_duty=<max_duty_ns> Set max duty for ramping
|
||||
-n, --min_duty=<min_duty_ns> Set min duty for ramping
|
||||
-h, --help Display this help message
|
||||
```
|
||||
|
||||
Example commands:
|
||||
Turn on LED, Dim ON: Set PWM Channel 3 enabled, Period to 1000000, min Duty 0, max Duty 1000000, ramp rate + Dim Up, - to Dim down
|
||||
|
||||
`ingenic-pwm -c 3 -e -p 1 -P 1000000 -n 0 -x 1000000 -r 50000`
|
||||
`ingenic-pwm -c 3 -e -p 1 -P 1000000 -n 0 -x 1000000 -r -50000`
|
||||
|
||||
---
|
||||
|
||||
#### Enable full engineering debuging
|
||||
|
||||
Enable: Run `switch_debug on` to enable debugging
|
||||
Disable: Run `switch debug off` or `switch_debug` to surpress debugging output
|
||||
|
||||
Enabling will enable **FULL** engineering debuging output in dmesg.
|
||||
|
||||
---
|
||||
|
||||
#### Dynamic Debugging
|
||||
|
||||
Dynamic Debugging has been enabled on the Linux Kernel for the Ingenic platforms to surpress excess engineering debugging.
|
||||
|
||||
https://www.kernel.org/doc/html/v4.14/admin-guide/dynamic-debug-howto.html
|
||||
|
||||
Mount debugfs first:
|
||||
`mount -t debugfs none /sys/kernel/debug`
|
||||
|
||||
Check entries:
|
||||
`cat /sys/kernel/debug/dynamic_debug/control`
|
||||
|
||||
Example output:
|
||||
|
||||
```
|
||||
../ingenic-opensdk/kernel/avpu/t31/avpu_main.c:314 [avpu]write_reg =_ "Out-of-range register write: 0x%.4X\012"
|
||||
../ingenic-opensdk/kernel/avpu/t31/avpu_main.c:304 [avpu]write_reg =_ "Reg write: 0x%.4X: 0x%.8x\012"
|
||||
../ingenic-opensdk/kernel/avpu/t31/avpu_main.c:302 [avpu]write_reg =_ "Reg write: 0x%.4X: 0x%.8x\012"
|
||||
../ingenic-opensdk/kernel/avpu/t31/avpu_main.c:290 [avpu]read_reg =_ "Reg read: 0x%.4X: 0x%.8x\012"
|
||||
../ingenic-opensdk/kernel/avpu/t31/avpu_main.c:234 [avpu]wait_irq =_ "Unblocking channel\012"
|
||||
../ingenic-opensdk/kernel/avpu/t31/avpu_ip.c:128 [avpu]avpu_hardirq_handler =_ "ENOMEM: Missed interrupt\012"
|
||||
../ingenic-opensdk/kernel/avpu/t31/avpu_ip.c:117 [avpu]avpu_hardirq_handler =_ "bitfield is 0\012"
|
||||
/mnt/mips/external_utilities/OpenIPC/openingenic/kernel/sensors/t31/gc2053/gc2053.c:1860 [sensor_gc2053_t31]gc2053_probe =p "probe ok ------->gc2053\012"
|
||||
/mnt/mips/external_utilities/OpenIPC/openingenic/kernel/sensors/t31/gc2053/gc2053.c:1422 [sensor_gc2053_t31]gc2053_s_stream =p "gc2053 stream off\012"
|
||||
/mnt/mips/external_utilities/OpenIPC/openingenic/kernel/sensors/t31/gc2053/gc2053.c:1415 [sensor_gc2053_t31]gc2053_s_stream =p "gc2053 stream on\012"
|
||||
/mnt/mips/external_utilities/OpenIPC/openingenic/kernel/sensors/t31/gc2053/gc2053.c:1288 [sensor_gc2053_t31]gc2053_detect =p "-----%s: %d ret = %d, v = 0x%02x\012"
|
||||
/mnt/mips/external_utilities/OpenIPC/openingenic/kernel/sensors/t31/gc2053/gc2053.c:1282 [sensor_gc2053_t31]gc2053_detect =p "-----%s: %d ret = %d, v = 0x%02x\012"
|
||||
```
|
||||
|
||||
`=_` means debugging output is `disabled`, while `=P` will indcate that debugging output is `enabled`.
|
||||
|
||||
Check `dmesg` for output
|
||||
|
||||
Note: Some old kernel modules may complain about missing symbols relating to dynamic debugging:
|
||||
```
|
||||
[ 4.357160] sample_core: Unknown symbol __dynamic_dev_dbg (err 1)
|
||||
[ 4.361299] sample_hal: Unknown symbol __dynamic_dev_dbg (err 1)
|
||||
```
|
||||
To resolve this, make sure you update your entire OpenIPC installation to the latest versions after 10-20-2023, or try to update the individual kernel modules experiencing issues. As a last restort, you can also disable `CONFIG_DYNAMIC_DEBUG` in your kernel config, but extensive testing has not shown this to be an issue.
|
||||
|
||||
---
|
||||
|
||||
#### Change sensor clock rate dynamically
|
||||
|
||||
`echo "30000000" > /proc/jz/clock/cgu_cim/rate`
|
||||
This may be used to change the MCLK clockrate setting for image sensors. You can use this to get more bandwidth for higher resoluitons for FPS rates.
|
||||
|
||||
---
|
||||
|
||||
#### Dynamically insert or remove SDIO device
|
||||
|
||||
Use these commands to enable or disable SDIO devices after the system has already booted.
|
||||
|
||||
`echo "INSERT" > /sys/devices/platform/jzmmc_v1.2.X/present`
|
||||
`echo "REMOVE" > /sys/devices/platform/jzmmc_v1.2.X/present`
|
||||
|
||||
Where X = the MMC device you want to control MSC0=0 MSC1=1
|
||||
|
||||
---
|
||||
|
||||
### IMP-Control
|
||||
|
||||
IMP-Control is a versatile tool designed for controlling and configuring a wide range of parameters in the Ingenic IMP library, within the Majestic streamer. This tool allows for fine-tuning of both audio and video settings to achieve optimal performance in various environments.
|
||||
|
||||
#### Key Features and Functionalities
|
||||
1. **Audio Adjustments:**
|
||||
- `aihpf`: High Pass Filter toggle (on/off).
|
||||
- `aiagc`: Auto Gain Control with adjustable gain levels and compensation.
|
||||
- `ains`: Noise Suppression with intensity levels.
|
||||
- `aiaec`: Echo Cancellation toggle.
|
||||
- `aivol` and `aovol`: Adjusts audio input and output volume respectively.
|
||||
- `aigain` and `aogain`: Sets audio input and output gain.
|
||||
- `aialc`: Audio Input Automatic Level Control gain setting.
|
||||
|
||||
2. **Video Enhancements:**
|
||||
- `flip`: Manipulate image orientation.
|
||||
- `contrast`, `brightness`, `saturation`, `sharpness`: Adjust basic image qualities.
|
||||
- `sinter`, `temper`: Enhance image with sinter and temper strength adjustments.
|
||||
- `aecomp`: Auto Exposure Compensation.
|
||||
- `dpc`, `drc`: Control DPC and DRC strengths.
|
||||
- `hilight`: Adjust highlight intensity.
|
||||
- `again`, `dgain`: Set analog and digital gains.
|
||||
- `hue`: Modify color hue.
|
||||
- `ispmode`: Switch between day and night modes.
|
||||
- `flicker`: Anti-flicker settings.
|
||||
|
||||
3. **Advanced Controls:**
|
||||
- `whitebalance`: Adjust white balance with modes, red and blue gains.
|
||||
- `sensorfps`: Configure the sensor frames per second.
|
||||
- `backlightcomp`: Backlight Compensation Strength.
|
||||
- `defogstrength`: Control defog strength for clearer images.
|
||||
- `framerate`, `gopattr`: Manage frame rates and Group of Pictures (GOP) attributes.
|
||||
- `setbitrate`, `setgoplength`, `setqp`, `setqpbounds`, `setqpipdelta`: Detailed encoder settings.
|
||||
- `rcmode`: Set or get the Rate Control Mode.
|
||||
- `aemin`: Set Auto Exposure minimum parameters.
|
||||
- `autozoom`, `frontcrop`: Adjust zoom and crop settings.
|
||||
- `mask`: Set masking parameters for privacy or emphasis.
|
||||
|
||||
4. **OSD and Analytics:**
|
||||
- `getosdattr`, `getosdgrpattr`: Retrieve On-Screen Display (OSD) attributes.
|
||||
- `getgamma`, `getevattr`, `getaeluma`, `getawbct`, `getafmetrics`, `gettotalgain`, `getaeattr`: Fetch various image processing metrics.
|
||||
|
||||
5. **System Information:**
|
||||
- `getimpversion`: Get the IMP version.
|
||||
- `getcpuinfo`: Retrieve CPU information.
|
||||
|
||||
6. **Demonstration and Testing:**
|
||||
- `full_demo`: Runs a comprehensive demonstration of various functionalities.
|
||||
|
||||
#### How to Use
|
||||
The general usage syntax is:
|
||||
```
|
||||
imp-control [command] [parameters]
|
||||
```
|
||||
Parameters vary based on the command, and in some cases, they are optional to retrieve current values.
|
||||
|
||||
To get help and see the list of available commands, use:
|
||||
```
|
||||
imp-control help
|
||||
```
|
||||
---
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
[Table of Content](../README.md)
|
||||
|
||||
Unbrick Ingenic T31 with SD Card
|
||||
---
|
||||
|
||||
#### NOTE:
|
||||
```
|
||||
On certain devices, like many Wyze and Atom models, the SD Card is powered through a GPIO
|
||||
(General-Purpose Input/Output) connection. This means you have to activate a particular GPIO either
|
||||
in U-Boot or in the Linux system in order to supply power to use the SD Card. If your device is set
|
||||
up this way, you cannot use this method without making physical changes to the hardware.
|
||||
```
|
||||
|
||||
### Ingenic T31 boot squence
|
||||
|
||||

|
||||
|
||||
If failed to boot from uboot on flash memory, T31 will then try to boot from SD card, no matter what bootsel pin is set. So if the uboot on flash chip is somehow broken, we can burn uboot to a SD card and boot from it. The uboot file should be specially compiled for SD card boot, you can't use the one for normal flash boot.
|
||||
|
||||
### Compile uboot for SD card boot
|
||||
|
||||
```
|
||||
mkdir /opt/openipc
|
||||
cd /opt/openipc
|
||||
git clone https://github.com/Dafang-Hacks/mips-gcc472-glibc216-64bit.git
|
||||
git clone https://github.com/OpenIPC/u-boot-ingenic.git
|
||||
export PATH="$PATH:/opt/openipc/mips-gcc472-glibc216-64bit/bin"
|
||||
cd u-boot-ingenic
|
||||
make distclean
|
||||
```
|
||||
Now choose the final `make` command according to your T31 chip type
|
||||
|
||||
SoC | Command
|
||||
---- | ---------------------------
|
||||
T31N | make isvp_t31_msc0
|
||||
T31L | make isvp_t31_msc0_lite
|
||||
T31X | make isvp_t31_msc0_ddr128M
|
||||
T31A | make isvp_t31a_msc0_ddr128M
|
||||
|
||||
Now you will get the compiled uboot file `u-boot-with-spl.bin`
|
||||
|
||||
### Burn uboot to SD card
|
||||
|
||||
Insert SD card to your PC, run `fdisk -l` to check, you should see the device like in my case `Disk /dev/sdb: 29.72 GiB, 31914983424 bytes, 62333952 sectors`.
|
||||
|
||||
**CAUTION!** double check the `/dev` device name is actually your SD card, or you may lose data on other drives
|
||||
|
||||
```
|
||||
dd if=./u-boot-with-spl.bin of=/dev/sdb bs=512 seek=34
|
||||
```
|
||||
This will burn the uboot file to SD card at 17KBytes offset from 0x0
|
||||
|
||||
### Boot from SD card
|
||||
|
||||
If the original uboot on flash chip is broken or empty, it will choose to boot from SD card automatically, but if you just want to sideload your own uboot when there's working uboot on flash chip and camera PCB board's `bootsel` pin is set to 1, it will still boot from uboot on flash chip. To force booting from SD card, you can short circut pin 5 and 6 of the SOIC8 flash chip when powering up camera to block reading of the flash memory, details [here](https://github.com/gitgayhub/wiki/blob/master/en/help-uboot.md#shorting-pins-on-flash-chip).
|
||||
|
||||
#### OpenIPC uboot auto reset issue
|
||||
|
||||
OpenIPC's uboot will auto reset if failed to load kernel from default address, if you are trying to sideload uboot from SD card when there's a valid one on flash chip, this will result in camera booted to the original uboot again. To disable the auto reset function, edit `include/configs/isvp_common.h`, delete `; reset` from the ending of the `bootcmd` line
|
||||
|
||||
### uboot for other Ingenic SoC T10 T20 T21 & T30
|
||||
|
||||
uboot can be built for SD card boot for these SoCs, but not verified on real device
|
||||
|
||||
#### T10 & T20
|
||||
|
||||
SoC | Command
|
||||
--- | --------------------
|
||||
T10 | `make isvp_t10_msc0`
|
||||
T20 | `make isvp_t20_msc0`
|
||||
|
||||
#### T21 & T30
|
||||
|
||||
Edit `/opt/openipc/u-boot-ingenic/boards.cfg` add the following lines
|
||||
|
||||
```
|
||||
isvp_t21_msc0 mips xburst isvp_t21 ingenic t21 isvp_t21:SPL_MMC_SUPPORT,ENV_IS_IN_MMC,JZ_MMC_MSC0,SFC_COMMOND
|
||||
isvp_t30_msc0 mips xburst isvp_t30 ingenic t30 isvp_t30:SPL_MMC_SUPPORT,ENV_IS_IN_MMC,GPT_CREATOR,JZ_MMC_MSC0,SFC_COMMOND
|
||||
isvp_t30_msc0_lite mips xburst isvp_t30 ingenic t30 isvp_t30:SPL_MMC_SUPPORT,ENV_IS_IN_MMC,GPT_CREATOR,JZ_MMC_MSC0,SFC_COMMOND,LITE_VERSION
|
||||
isvp_t30_msc0_ddr128M mips xburst isvp_t30 ingenic t30 isvp_t30:SPL_MMC_SUPPORT,ENV_IS_IN_MMC,GPT_CREATOR,JZ_MMC_MSC0,SFC_COMMOND,DDR2_128M
|
||||
isvp_t30a_msc0_ddr128M mips xburst isvp_t30 ingenic t30 isvp_t30:SPL_MMC_SUPPORT,ENV_IS_IN_MMC,GPT_CREATOR,JZ_MMC_MSC0,SFC_COMMOND,DDR2_128M,T30A
|
||||
```
|
||||
|
||||
Choose `make` command according to your chip type
|
||||
|
||||
SoC | Command
|
||||
-----| -----------------------------
|
||||
T21 | `make isvp_t21_msc0`
|
||||
T30N | `make isvp_t30_msc0`
|
||||
T30L | `make isvp_t30_msc0_lite`
|
||||
T30X | `make isvp_t30_msc0_ddr128M`
|
||||
T30A | `make isvp_t30a_msc0_ddr128M`
|
||||
|
||||
### Install OpenIPC from SD card in uboot
|
||||
|
||||
Use T31ZX with 16MB NOR flash for example, download the [16MB full size image](https://openipc.org/cameras/vendors/ingenic/socs/t31x/download_full_image?flash_size=16&flash_type=nor&fw_release=ultimate)
|
||||
|
||||
#### Method 1
|
||||
|
||||
Used if there's `mmc` but no `fatload` command in uboot, we can burn firmware to SD card without any filesystem
|
||||
|
||||
**CAUTION! ** double check the `/dev` device name is actually your SD card, or you may lose data on other drives
|
||||
|
||||
```bash
|
||||
dd if=./openipc-t31x-ultimate-16mb.bin of=/dev/[sd-card-device] seek=20480
|
||||
```
|
||||
|
||||
This will burn OpenIPC image to SD card at 10MB offset, when card block size is 512 bytes
|
||||
|
||||
In uboot, run
|
||||
|
||||
```
|
||||
mw.b 0x80600000 0xff 0x1000000
|
||||
mmc read 0x80600000 0x5000 0x8000
|
||||
sf probe 0
|
||||
sf erase 0x0 0x1000000
|
||||
sf write 0x80600000 0x0 0x1000000
|
||||
```
|
||||
|
||||
#### Method 2
|
||||
|
||||
Used if there's `fatload` command in uboot to directly load file from FAT filesystem
|
||||
|
||||
Mount SD card's FAT filesystem to your PC, copy OpenIPC firmware image into it. In uboot, run `fatls mmc 0` to list files in the SD card, then
|
||||
|
||||
```
|
||||
mw.b 0x80600000 0xff 0x1000000
|
||||
fatload mmc 0 0x80600000 openipc-t31zx-ultimate-16mb.bin
|
||||
sf probe 0
|
||||
sf erase 0x0 0x1000000
|
||||
sf write 0x80600000 0x0 0x1000000
|
||||
```
|
|
@ -0,0 +1,62 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
For XM boards with SoC GK7202V300, GK7205V200, GK7205V300 ONLY!!!
|
||||
-----------------------------------------------------------------
|
||||
|
||||
### Supported sensors
|
||||
|
||||
Please look up your sensor in [the list of supported devices][1].
|
||||
|
||||
### Initial device firmware updates
|
||||
|
||||
```
|
||||
setenv bootargs 'mem=${osmem:-32M} console=ttyAMA0,115200 panic=20 root=/dev/mtdblock3 rootfstype=squashfs init=/init mtdparts=sfc:256k(boot),64k(env),2048k(kernel),5120k(rootfs),-(rootfs_data)'
|
||||
setenv bootcmd 'setenv setargs setenv bootargs ${bootargs}; run setargs; sf probe 0; sf read 0x42000000 0x50000 0x200000; bootm 0x42000000'
|
||||
setenv uk 'mw.b 0x42000000 ff 1000000; tftp 0x42000000 uImage.${soc} && sf probe 0; sf erase 0x50000 0x200000; sf write 0x42000000 0x50000 ${filesize}'
|
||||
setenv ur 'mw.b 0x42000000 ff 1000000; tftp 0x42000000 rootfs.squashfs.${soc} && sf probe 0; sf erase 0x250000 0x500000; sf write 0x42000000 0x250000 ${filesize}'
|
||||
saveenv
|
||||
|
||||
setenv soc gk7xxxxxxx # Set your SoC. gk7202v300, gk7205v200, or gk7205v300.
|
||||
setenv osmem 32M
|
||||
setenv totalmem 64M # 64M for gk7202v300, gk7205v200, 128M for gk7205v300.
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254 # Your TFTP server IP address.
|
||||
saveenv
|
||||
|
||||
run uk; run ur; reset # Flash kernel, rootfs and reboot device
|
||||
```
|
||||
|
||||
### Follow-up quick updates
|
||||
|
||||
```
|
||||
run uk; run ur; reset
|
||||
```
|
||||
|
||||
### A trick for GK7205V300+IMX335 users
|
||||
|
||||
```
|
||||
echo -e "!/bin/sh\n\ndevmem 0x120100f0 32 0x19\n" >/etc/init.d/S96trick
|
||||
chmod +x /etc/init.d/S96trick
|
||||
```
|
||||
|
||||
Alternative way [here](https://github.com/OpenIPC/firmware/pull/117/files)
|
||||
|
||||
### Danger zone
|
||||
|
||||
You always have an option to update the bootloader. However, you need to
|
||||
understand what you do.
|
||||
|
||||
NB! Replace bootloader filename with the one matching your SoC.
|
||||
Full list is [here](https://github.com/OpenIPC/firmware/releases/tag/latest).
|
||||
|
||||
```
|
||||
mw.b 0x42000000 ff 1000000
|
||||
tftp 0x42000000 u-boot-gk7xxxxxxxx-beta.bin
|
||||
sf probe 0
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x42000000 0x0 ${filesize}
|
||||
reset
|
||||
```
|
||||
|
||||
[1]: guide-supported-devices.md
|
|
@ -0,0 +1,103 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
For XM boards with Hi35{16Ev200,16Ev300,18Ev300} SoC ONLY!!!
|
||||
------------------------------------------------------------
|
||||
|
||||
Other boards may have different memory layout like HI3518Ev200
|
||||
uses 0x82000000 instead 0x42000000
|
||||
|
||||
### Supported sensors
|
||||
|
||||
Please look up your sensor in [the list of supported devices][1].
|
||||
|
||||
### Initial device firmware updates
|
||||
|
||||
```
|
||||
setenv bootargs 'mem=${osmem:-32M} console=ttyAMA0,115200 panic=20 root=/dev/mtdblock3 rootfstype=squashfs init=/init mtdparts=hi_sfc:256k(boot),64k(env),2048k(kernel),5120k(rootfs),-(rootfs_data)'
|
||||
setenv bootcmd 'setenv setargs setenv bootargs ${bootargs}; run setargs; sf probe 0; sf read 0x42000000 0x50000 0x200000; bootm 0x42000000'
|
||||
setenv uk 'mw.b 0x42000000 ff 1000000; tftp 0x42000000 uImage.${soc} && sf probe 0; sf erase 0x50000 0x200000; sf write 0x42000000 0x50000 ${filesize}'
|
||||
setenv ur 'mw.b 0x42000000 ff 1000000; tftp 0x42000000 rootfs.squashfs.${soc} && sf probe 0; sf erase 0x250000 0x500000; sf write 0x42000000 0x250000 ${filesize}'
|
||||
saveenv
|
||||
|
||||
setenv soc hi351xxxxxxx # Set your SoC. hi3516ev200, hi3516ev300, or hi3518ev300.
|
||||
setenv osmem 32M
|
||||
setenv totalmem 64M # 64M for hi3516ev200, hi3518ev300, 128M for hi3516ev300.
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254 # Your TFTP server IP address.
|
||||
saveenv
|
||||
|
||||
run uk; run ur; reset # Flash kernel, rootfs and reboot device
|
||||
```
|
||||
|
||||
### Follow-up quick updates
|
||||
|
||||
```
|
||||
run uk; run ur; reset
|
||||
```
|
||||
|
||||
### Executing a command after the first run
|
||||
|
||||
For a Hi3516Ev300 board:
|
||||
```
|
||||
set_allocator cma
|
||||
firstboot
|
||||
```
|
||||
|
||||
For a Hi3516Ev200 or Hi3518Ev300 board:
|
||||
```
|
||||
set_allocator hisi
|
||||
firstboot
|
||||
```
|
||||
|
||||
### Danger zone
|
||||
|
||||
You always have an option to update the bootloader. However, you need to
|
||||
understand what you do.
|
||||
|
||||
NB! Replace bootloader filename with the one matching your SoC.
|
||||
Full list is [here](https://github.com/OpenIPC/firmware/releases/tag/latest).
|
||||
|
||||
```
|
||||
mw.b 0x42000000 ff 1000000
|
||||
tftp 0x42000000 u-boot-hi3516xxxxx-beta.bin
|
||||
sf probe 0
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x42000000 0x0 ${filesize}
|
||||
reset
|
||||
```
|
||||
|
||||
[1]: guide-supported-devices.md
|
||||
|
||||
|
||||
### Uboot without tftp command
|
||||
|
||||
```
|
||||
setenv uk 'mw.b 0x42000000 ff 1000000; setenv bootfile uImage.${soc} && tftpboot && sf probe 0; sf erase 0x50000 0x200000; sf write 0x40080000 0x50000 ${filesize}'
|
||||
setenv ur 'mw.b 0x42000000 ff 1000000; setenv bootfile rootfs.squashfs.${soc} && tftpboot && sf probe 0; sf erase 0x250000 0x500000; sf write 0x40080000 0x250000 ${filesize}'
|
||||
```
|
||||
|
||||
|
||||
### backup device
|
||||
|
||||
```
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254 # Your TFTP server IP address.
|
||||
|
||||
sf read 0x42000000 0x0 0x800000
|
||||
tftpput 0x42000000 0x800000 backup.img
|
||||
```
|
||||
|
||||
|
||||
### restore device
|
||||
|
||||
if something goes wrong uboot can be bricked!
|
||||
|
||||
```
|
||||
setenv bootfile backup.img
|
||||
tftpboot
|
||||
sf probe 0
|
||||
sf erase 0x0000 0x800000
|
||||
sf write 0x40080000 0x0 ${filesize}
|
||||
reset
|
||||
```
|
|
@ -0,0 +1,33 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
For XM vendor boards with NT98562 and NT98566 SoC ONLY!!!
|
||||
---------------------------------------------------------
|
||||
|
||||
### Initial device firmware update
|
||||
|
||||
> **This section will be completed at the end of the research**
|
||||
|
||||
```
|
||||
run uk; run ur; reset # Flash kernel, rootfs and reboot device
|
||||
```
|
||||
|
||||
### Follow-up quick updates
|
||||
|
||||
```
|
||||
run uk; run ur; reset
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
After you have finished flashing new firmware, please run `firstboot` command
|
||||
to format `jffs2` partition used to store settings.
|
||||
|
||||
### Known issues
|
||||
|
||||
Change memory address for some tests.
|
||||
|
||||
```
|
||||
setenv bootcmd 'setenv setargs setenv bootargs ${bootargs};run setargs;sf probe 0;sf read 0x03100000 0x50000 0x200000;nvt_boot'
|
||||
saveenv
|
||||
```
|
|
@ -0,0 +1,51 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
For Anjoy/Brovotech/Gospell/Uniview boards with SSC335 Soc ONLY!!!
|
||||
------------------------------------------------------------------
|
||||
|
||||
### Initial device firmware update
|
||||
|
||||
```
|
||||
setenv bootargs 'mem=${osmem:-32M} console=ttyS0,115200 panic=20 root=/dev/mtdblock3 rootfstype=squashfs init=/init LX_MEM=0x3fe0000 mma_heap=mma_heap_name0,miu=0,sz=0x1C00000 mma_memblock_remove=1 mtdparts=NOR_FLASH:256k(boot),64k(tech),2048k(kernel),5120k(rootfs),-(rootfs_data)'
|
||||
setenv bootcmd 'setenv setargs setenv bootargs ${bootargs}; run setargs; sf probe 0; sf read 0x21000000 0x50000 0x200000; bootm 0x21000000'
|
||||
setenv uk 'mw.b 0x21000000 ff 1000000; tftpboot 0x21000000 uImage.${soc}; sf probe 0; sf erase 0x50000 0x200000; sf write 0x21000000 0x50000 ${filesize}'
|
||||
setenv ur 'mw.b 0x21000000 ff 1000000; tftpboot 0x21000000 rootfs.squashfs.${soc}; sf probe 0; sf erase 0x250000 0x500000; sf write 0x21000000 0x250000 ${filesize}'
|
||||
saveenv
|
||||
|
||||
setenv soc ssc335 # Your SoC. ssc325, ssc335, or ssc337.
|
||||
setenv sensor none # Your sensor. gc2053, imx307, or sc3335.
|
||||
setenv osmem 32M
|
||||
setenv totalmem 64M # 64M for ssc335.
|
||||
setenv ipaddr 192.168.1.10 # Your camera IP address.
|
||||
setenv serverip 192.168.1.254 # Your TFTP server IP address.
|
||||
saveenv
|
||||
|
||||
run uk; run ur; reset # Flash kernel, rootfs and reboot device
|
||||
```
|
||||
|
||||
### Follow-up quick updates
|
||||
|
||||
```
|
||||
run uk; run ur; reset
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
After you have finished flashing new firmware, please run `firstboot` command
|
||||
to format `jffs2` partition used to store settings.
|
||||
|
||||
|
||||
### Other info
|
||||
|
||||
#### Human-readable processor names for SigmaStar devices.
|
||||
The data is obtained from the original firmware.
|
||||
|
||||
| Engraving | /sys/class/mstar/msys/CHIP_ID | /sys/devices/soc0/soc_id | /sys/devices/soc0/machine |
|
||||
|-----------|-------------------------------|--------------------------|----------------------------------|
|
||||
| SSC325DE | not found | 239 | INFINITY6 SSC009B-S01A QFN128 |
|
||||
| | | | |
|
||||
| SSC335 | 0xF2 | 242 | INFINITY6B0 SSC009A-S01A QFN88 |
|
||||
| SSC337 | 0xF2 | 242 | INFINITY6B0 SSC009A-S01A QFN88 |
|
||||
| SSC337DE | 0xF2 | 242 | INFINITY6B0 SSC009B-S01A QFN128 |
|
||||
| SSC338Q | 0xF1 | 241 | INFINITY6E SSC012B-S01A |
|
|
@ -0,0 +1,41 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
For XM vendor boards with XM510 SoC ONLY!!!
|
||||
-------------------------------------------
|
||||
|
||||
### Initial device firmware update
|
||||
|
||||
```
|
||||
setenv bootargs 'mem=18M console=ttyAMA0,115200 panic=20 root=/dev/mtdblock3 rootfstype=squashfs init=/init mtdparts=xm_sfc:256k(boot),64k(env),2048k(kernel),5120k(rootfs),-(rootfs_data)'
|
||||
setenv bootcmd 'sf probe 0; sf read 0x80007fc0 0x50000 0x200000; bootm 0x80007fc0'
|
||||
setenv uk1 'mw.b 0x80007fc0 ff 1000000; tftp 0x80007fc0 uImage.${soc}'
|
||||
setenv uk2 'sf probe 0; sf erase 0x50000 0x200000; sf write 0x80007fc0 0x50000 ${filesize}'
|
||||
setenv uk 'run uk1 ; run uk2'
|
||||
setenv ur1 'mw.b 0x80007fc0 ff 1000000; tftp 0x80007fc0 rootfs.squashfs.${soc}'
|
||||
setenv ur2 'sf probe 0; sf erase 0x250000 0x500000; sf write 0x80007fc 0x250000 ${filesize}'
|
||||
setenv ur 'run ur1 ; run ur2'
|
||||
saveenv
|
||||
|
||||
setenv soc xm510 # Your SoC. xm510.
|
||||
setenv osmem 18M # 18M for xm510.
|
||||
setenv totalmem 32M # 32M for xm510.
|
||||
setenv ipaddr 192.168.1.10 # Your camera IP address.
|
||||
setenv serverip 192.168.1.254 # Your TFTP server IP address.
|
||||
saveenv
|
||||
|
||||
run uk; run ur; reset # Flash kernel, rootfs and reboot device
|
||||
```
|
||||
|
||||
### Follow-up quick updates
|
||||
|
||||
```
|
||||
run uk; run ur; reset
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
After you have finished flashing new firmware, please run `firstboot` command
|
||||
to format jffs2 partition used to store settings.
|
||||
|
||||
### Known issues
|
|
@ -0,0 +1,70 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
For XM vendor boards with XM530/XM550 SoC ONLY !!!
|
||||
--------------------------------------------------
|
||||
|
||||
### Initial device firmware update
|
||||
|
||||
```
|
||||
setenv bootargs 'mem=35M console=ttyAMA0,115200 panic=20 root=/dev/mtdblock3 rootfstype=squashfs init=/init mtdparts=xm_sfc:256k(boot),64k(env),2048k(kernel),5120k(rootfs),-(rootfs_data)'
|
||||
setenv bootcmd 'sf probe 0; sf read 0x80007fc0 0x50000 0x200000; bootm 0x80007fc0'
|
||||
setenv uk1 'mw.b 0x80007fc0 ff 1000000; tftp 0x80007fc0 uImage.${soc}'
|
||||
setenv uk2 'sf probe 0; sf erase 0x50000 0x200000; sf write 0x80007fc0 0x50000 ${filesize}'
|
||||
setenv uk 'run uk1 ; run uk2'
|
||||
setenv ur1 'mw.b 0x80007fc0 ff 1000000; tftp 0x80007fc0 rootfs.squashfs.${soc}'
|
||||
setenv ur2 'sf probe 0; sf erase 0x250000 0x500000; sf write 0x80007fc0 0x250000 ${filesize}'
|
||||
setenv ur 'run ur1 ; run ur2'
|
||||
saveenv
|
||||
|
||||
setenv soc xm530 # Your SoC. xm530 for both xm530 and xm550.
|
||||
setenv osmem 35M # 35M for xm530, 64M for xm550.
|
||||
setenv totalmem 64M # 64M for xm530, 128M for xm550.
|
||||
setenv ipaddr 192.168.1.10 # Your camera IP address.
|
||||
setenv serverip 192.168.1.254 # Your TFTP server IP address.
|
||||
saveenv
|
||||
|
||||
run uk; run ur; reset # Flash kernel, rootfs and reboot device
|
||||
```
|
||||
|
||||
### Follow-up quick updates
|
||||
|
||||
```
|
||||
run uk; run ur; reset
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
After you have finished flashing new firmware, please run `firstboot` command
|
||||
to format jffs2 partition used to store settings.
|
||||
|
||||
### Known issues
|
||||
|
||||
|
||||
### Uboot with out tftp command
|
||||
|
||||
```
|
||||
setenv uk1 'mw.b 0x81000000 ff 1000000; setenv bootfile uImage.${soc}; tftpboot'
|
||||
setenv uk2 'sf probe 0; sf erase 0x50000 0x200000; sf write 0x81000000 0x50000 ${filesize}'
|
||||
setenv uk 'run uk1 ; run uk2'
|
||||
setenv ur1 'mw.b 0x81000000 ff 1000000; setenv bootfile rootfs.squashfs.${soc}; tftpboot'
|
||||
setenv ur2 'sf probe 0; sf erase 0x250000 0x500000; sf write 0x81000000 0x250000 ${filesize}'
|
||||
setenv ur 'run ur1 ; run ur2'
|
||||
saveenv
|
||||
|
||||
run uk; run ur; reset
|
||||
```
|
||||
|
||||
### Backup device (no tftpput)
|
||||
|
||||
open the serial console with a logfile
|
||||
Note: dumping via Serial takes long
|
||||
|
||||
```
|
||||
sf probe 0
|
||||
sf read 0x81000000 0x0 0x800000
|
||||
md.b 0x81000000 0x800000
|
||||
```
|
||||
|
||||
use `cut -b 11-57 | xxd -r -p` to reconstruct the binary from `md.b` output
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Running a TFTP server in Docker
|
||||
-------------------------------
|
||||
|
||||
The easiest way to run a TFTP server is to do that inside a containerized
|
||||
environment. It does not matter if you run Linux, Windows, or Mac, just perform
|
||||
these steps:
|
||||
|
||||
### Install Docker Composer
|
||||
Follow the [Docker installation instructions][1].
|
||||
|
||||
### Create Docker image files
|
||||
Create a file named `Dockerfile` with the following content:
|
||||
```dockerfile
|
||||
FROM debian:latest
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install tftpd-hpa -y -qq && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
CMD echo -n "Starting $(in.tftpd --version)" && \
|
||||
in.tftpd --foreground --create --secure --ipv4 --verbose --user tftp \
|
||||
--address 0.0.0.0:69 --blocksize 1468 /srv/tftp
|
||||
```
|
||||
|
||||
In the same directory, create a file named `docker-compose.yml` with the
|
||||
following content:
|
||||
```yaml
|
||||
version: '3.9'
|
||||
services:
|
||||
tftpd-hpa:
|
||||
build: .
|
||||
container_name: tftp
|
||||
network_mode: 'host'
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./tftp:/srv/tftp
|
||||
```
|
||||
|
||||
### Start the container
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
Docker will build an image if necessary and launch it in the background. During
|
||||
building the container, Docker will also create `tftp/` subdirectory from which
|
||||
your files will be served. Docker acts as user `systemd-network` from group
|
||||
`input` to access that directory. If you want to allow saving files sent via
|
||||
TFTP to your machine you'll need to change ownership on that directory:
|
||||
```bash
|
||||
sudo chown systemd-network:input ./tftp
|
||||
```
|
||||
Alternatively, you may loosen permissions on that directory:
|
||||
```bash
|
||||
sudo chmod 777 ./tftp
|
||||
```
|
||||
Use your computer's IP address to access the TFTP server from other machines on
|
||||
your local network.
|
||||
|
||||
### Stop the container
|
||||
To stop the container and free up memory just run
|
||||
```bash
|
||||
docker-compose stop
|
||||
```
|
||||
The container will be saved on your computer until the next time you need to
|
||||
start it.
|
||||
|
||||
|
||||
[1]: https://docs.docker.com/compose/install/
|
|
@ -0,0 +1,354 @@
|
|||
# OpenIPC Wiki
|
||||
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Available Installation Methods
|
||||
==============================
|
||||
|
||||
Unfortunately IP camera manufacturers aren't **yet** shipping hardware with
|
||||
OpenIPC preinstalled, so to install OpenIPC onto a camera which is still using
|
||||
factory firmware images, one of the following methods must be used:
|
||||
|
||||
* The [Coupler](https://github.com/openipc/coupler/) project makes available
|
||||
firmware images which can be installed using the firmware upgrade mechanisms
|
||||
which are built into the factory firmware of many cameras.
|
||||
|
||||
* Flashing the OpenIPC firmware using the [*U Boot*
|
||||
bootloader](https://en.wikipedia.org/wiki/Das_U-Boot) which is included in
|
||||
the vendor firmware. This method interrupts the normal boot process of the
|
||||
vendor firmware, and instead instructs U-Boot to load the OpenIPC firmware
|
||||
over the network, and write it to the flash storage (replacing the main
|
||||
portion of the vendor firmware). **This method requires the camera's case to
|
||||
be opened** to connect a [**UART adapter**][FTDI] to the camera's internal
|
||||
"console" serial/debug port.
|
||||
|
||||
|
||||
OpenIPC firmware installation using Coupler.
|
||||
--------------------------------------------
|
||||
|
||||
Instructions for using [Coupler](https://github.com/openipc/coupler/) can be
|
||||
found in [the project's documentation](https://github.com/openipc/coupler/).
|
||||
|
||||
OpenIPC firmware installation via TFTP and UART, step by step.
|
||||
--------------------------------------------------------------
|
||||
|
||||
### Step 1. Determine the System on Chip.
|
||||
|
||||
The SoC includes the CPU core of the camera, as well as all the necessary
|
||||
peripherals such as the camera and network interfaces. For various reasons
|
||||
(including the limited onboard storage space on most IP Cameras), the OpenIPC
|
||||
project currently builds separate firmware binaries for each SoC model. **You
|
||||
must identify the SoC which your camera uses**, so that you can use the correct
|
||||
firmware binaries. This can be done by reading the markings on the SoC IC
|
||||
package on the camera's main PCB (see example photo below), or by using
|
||||
software such as [ipctool](https://github.com/openipc/ipctool/) to identify the
|
||||
SoC model from the vendor firmware.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
_Hisilicon Hi3518EV100, Ingenic T20, T31 and T40 SoCs marking.
|
||||
Relevant symbols highlighted with yellow._
|
||||
|
||||
### Step 2. Install and set up a TFTP server.
|
||||
|
||||
TFTP stands for _Trivial File Transfer Protocol_. As the name implies, it is a
|
||||
very simple protocol intended for transferring files over a local computer
|
||||
network. TFTP does not support authentication. Its code is so tiny and simple
|
||||
that TFTP-clients are widely used in thin-clients and embedded systems for
|
||||
retrieving bootable images from a designated boot server on the local network.
|
||||
|
||||
#### If you have Linux...
|
||||
|
||||
...then it's easy. Pre-compiled and ready-to-use binary package for your distro
|
||||
most likely already exists in distro's repo, and you only need to install it and
|
||||
set it up.
|
||||
|
||||
```bash
|
||||
sudo apt install tftpd-hpa
|
||||
sudo sed -i '/^TFTP_OPTIONS/s/"$/ --create"/' /etc/default/tftpd-hpa
|
||||
sudo systemctl restart tftpd-hpa.service
|
||||
```
|
||||
|
||||
> **Note**: some users reported issues (connection timeouts) when using
|
||||
`tftpd-hpa` with recent versions of Ubuntu. In that case, you can try with an
|
||||
[alternative TFTP server](https://askubuntu.com/a/457105/1074320).
|
||||
|
||||
### Step 3. Connect to UART port of your camera.
|
||||
|
||||
In order to make a connection to UART port you will need a
|
||||
[serial port adapter][FTDI] for your PC.
|
||||
|
||||

|
||||
|
||||
__Before you connect that adapter to you camera, make sure that it's working
|
||||
voltage is set to 3.3 volt!__
|
||||
Sometimes, you only need to flip a jumper to achieve that. But in some cases you
|
||||
might need to solder a wire, a zero Ohm resistor, or make a connection between
|
||||
two contacts with a blob of solder. Some adapters support only 5 volt. In that
|
||||
case, you will need an additional [logic level converter][TLLC] connected
|
||||
between the adapter and UART port on your camera.
|
||||
|
||||
One of the contact pads you will need to connect you adapter to is GND (ground).
|
||||
It is easy to discover using a multimeter in continuity mode. Put one of the
|
||||
leads onto a well-known exposed ground pads. Usually, these are large open
|
||||
copper contact areas around mounting screw holes, USB port housing, SD card slot
|
||||
metallic walls. Use another lead to slightly touch control pads until you see or
|
||||
hear a notification from your multimeter that the circuit is closed. That means,
|
||||
you found the ground. Now, you need to find two more: `RX` and `TX`, both used
|
||||
for receiving and transmitting data, respectively. Start with `TX`. It transmits
|
||||
series of characters and quite easy to spot.
|
||||
|
||||
Be aware that you are looking for a contact with 3.3v potential between it and
|
||||
the ground. Test possible connection points with a multimeter and mark those
|
||||
showing 3.3 volt. This way you won't have to test everything, and you save
|
||||
yourself from hitting say a 12 volt connector intended for infrared LED array
|
||||
or whatnot.
|
||||
|
||||
Connect `GND` pin on your camera to `GND` pad of the adapter, connect USB
|
||||
connector of the adapter to a USB port on your PC, start a terminal emulator
|
||||
application and connect to your adapter. Set your terminal settings to
|
||||
115200 bps baudrate, 8 bits, no parity, 1 stopbit, no flow control.
|
||||
|
||||
Here's a few command lines for various terminal programs with session logging. Pick your poison.
|
||||
|
||||
#### screen
|
||||
|
||||
Start a sessions with
|
||||
|
||||
```bash
|
||||
screen -L -Logfile ipcam-$(date +%s).log /dev/ttyUSB0 115200
|
||||
```
|
||||
|
||||
Use `Ctrl-a` followed by `\` to exit the session.
|
||||
|
||||
#### `minicom`
|
||||
|
||||
Start a sessions with
|
||||
|
||||
```bash
|
||||
minicom -b 115200 -8 --capturefile=ipcam-$(date +%s).log --color=on -D /dev/ttyUSB0
|
||||
```
|
||||
|
||||
Use `Ctrl-a` followed by `x` to exit the session.
|
||||
|
||||
#### `picocom`
|
||||
|
||||
Start a sessions with
|
||||
|
||||
```bash
|
||||
picocom -b 115200 --databits 8 --parity n --stopbits 1 --flow n --logfile=ipcam-$(date +%s).log /dev/ttyUSB0
|
||||
```
|
||||
|
||||
Use `Ctrl-a` followed by `Ctrl-x` to exit the session.
|
||||
|
||||
#### PuTTY
|
||||
|
||||
If you opt for a GUI terminal, namely [PuTTY](https://www.putty.org/), this is how it should look like:
|
||||
|
||||

|
||||

|
||||
|
||||
Then, connect `RX` pin on the adapter to a possible `TX` contact of UART port
|
||||
on your camera. Power the camera with its standard power adapter. If you had a
|
||||
lucky guess then you'll start seeing booting log in your terminal window. In
|
||||
some cases, if you see garbled text on you screen instead of booting kernel,
|
||||
you might need to change the connection speed to 57600 bps and try again.
|
||||
|
||||
If your screen remains blank, try another UART contact, and then another, until
|
||||
you hit the proper one.
|
||||
|
||||
After you found the `TX` pad, connect it to `RX` pin on your adapter. Yes, it is
|
||||
a cross-connection. Whatever transmits goes into a receiver and vice-versa. Now,
|
||||
put a heavy object -- a railroad nut, an antique tin solder, a shot of vodka
|
||||
(full) -- on any letter key of your computer keyboard and start connect
|
||||
remaining `TX` pin of your adapter to different pads on the camera until you see
|
||||
it backfeeding to the terminal. As it happens, you have successfully completed
|
||||
a UART connection to you camera. Now you may drink the vodka.
|
||||
|
||||
NB! Usually, there is a fourth contact on a UART connector marked `VCC`. It is
|
||||
used for powering camera during initial programming by manufacturer. We strongly
|
||||
advise not to power your camera though that pin, but use the OEM power connector
|
||||
for this purpose.
|
||||
|
||||
### Step 4. Get access to the bootloader.
|
||||
|
||||
Reboot the camera and try to interrupt its boot sequence in order to access
|
||||
bootloader console by pressing a key combination on your computer keyboard,
|
||||
between the time the bootloader starts and before Linux kernel kicks in.
|
||||
Key combinations differ from vendor to vendor but, in most cases, it is
|
||||
`Ctrl-C`, less commonly -- `Enter`, `Esc`, `*` or just any key. Carefully read text
|
||||
appearing on screen while booting, you might see a hint there. Some cameras
|
||||
require more exotic combinations not revealed in booting logs. You may try to
|
||||
look them up on the internet, or ask on [our Telegram channel][telegram].
|
||||
Chances are, we have already dealt with such a camera and know the combo.
|
||||
|
||||
If you succeeded and got a command prompt then congrats, you've got access to
|
||||
your camera's bootloader.
|
||||
|
||||
From this point on, we strongly advise you to keep a record of everything you do.
|
||||
Enable session logging in your terminal. Even better, create a text file on your
|
||||
computer and write down all commands you run and how system responses to them.
|
||||
|
||||
### Step 5. Determine the flash memory size.
|
||||
|
||||
Most IP cameras nowadays are equipped with 8 or 16 MB NOR or NAND flash memory.
|
||||
You can check the type and size of the chip installed on of your camera in the
|
||||
bootloader log output. You'll see something like this:
|
||||
|
||||
```console
|
||||
U-Boot 2010.06-svn (Oct 21 2016 - 11:21:29)
|
||||
|
||||
Check Flash Memory Controller v100 ... Found
|
||||
SPI Nor(cs 0) ID: 0xс2 0x20 0x18
|
||||
spi_general_qe_enable(294): Error: Disable Quad failed! reg: 0x2
|
||||
Block:64KB Chip:16MB Name:"MX25L128XX"
|
||||
SPI Nor total size: 16MB
|
||||
```
|
||||
|
||||
Another example:
|
||||
|
||||
```console
|
||||
U-Boot 2013.07 (Feb 27 2019 - 02:05:08)
|
||||
|
||||
DRAM: 64 MiB
|
||||
MMC: msc: 0
|
||||
SF: Detected EN25QH64
|
||||
```
|
||||
|
||||
Which shows the flash memory model (`EN25QH64`) that you can look up online to
|
||||
find a data sheet. Also, `64` in the model number hints for a 64 Megabits memory,
|
||||
which is equivalent to 8MB. Similarly, `128` would be equivalent to 16MB.
|
||||
|
||||
You should also be able to identify the model of the flash memory by looking up
|
||||
at the board, but this is usually a difficult task because the chips are very
|
||||
small and may not come with clear markings.
|
||||
|
||||
### Step 6. Save the original firmware.
|
||||
|
||||
After you get access to the bootloader console, run `help` to get a list of
|
||||
available commands. Check if you have `tftp` among them. If you do, then saving
|
||||
the original firmware should be a breeze. You only need to set up access to your
|
||||
TFTP server from step 2.
|
||||
|
||||
NB! If your bootloader does not have `tftp`, you can still make a copy of the
|
||||
original firmware. [Read here for more](help-uboot.md).
|
||||
|
||||
Check the system environment using `printenv` command. Look for `ipaddr`,
|
||||
`netmask`, `gatewayip` and `serverip` parameters. The first three set IP address,
|
||||
netmask of your camera, and the IP address of the network gateway for accessing
|
||||
local network. The fourth parameter is an IP address of your TFTP server. Assign
|
||||
the values by `setenv` command (use IP addresses and netmask corresponding to
|
||||
your local network), then save the new values into environment with `saveenv`
|
||||
command.
|
||||
|
||||
```bash
|
||||
setenv ipaddr 192.168.1.253
|
||||
setenv netmask 255.255.255.0
|
||||
setenv gatewayip 192.168.1.1
|
||||
setenv serverip 192.168.1.254
|
||||
saveenv
|
||||
```
|
||||
|
||||
To dump the original firmware, you need to save the contents of camera's flash
|
||||
memory to a file. For that, you must first load the contents into RAM. Here's
|
||||
how you do that. Initialize the Flash memory. Clean a region of RAM large enough to
|
||||
fit whole content of flash memory chip. Read contents of the flash from into that
|
||||
region, then export it to a file on the TFTP server.
|
||||
|
||||
Please note, that flash type, size and starting address differ for different cameras!
|
||||
For exact commands please use [automatically generated instructions](https://openipc.org/supported-hardware/)
|
||||
for your hardware, consult data sheets, or seek help on [our Telegram channel][telegram].
|
||||
|
||||
### Step 7. Install OpenIPC firmware.
|
||||
|
||||
#### Prelude.
|
||||
|
||||
No two camera models are alike. Different camera models consist of different
|
||||
sets of components. The most important of them, the central processor and the
|
||||
image sensor, directly affect the image quality and the range of functions
|
||||
inherent in a particular camera. Unlike desktop computer CPU, camera's processor
|
||||
handles so many functions that it got a specific name -- System-on-Chip or SoC,
|
||||
for short.
|
||||
|
||||
But even seemingly less significant components can set limitations on the camera
|
||||
and its firmware capabilities. For example, different cameras may have different
|
||||
flash memory chips installed. Some cameras may have 8MB of flash memory, while
|
||||
others may have 16MB or more. More flash memory can fit more software code and
|
||||
allow the camera to run additional services that are not available on cameras
|
||||
with less flash memory. So we decided to build two versions of our firmware:
|
||||
the basic version (_Lite_) for cameras with 8 MB of flash memory and the
|
||||
advanced version (_Ultimate_) with additional features for cameras with 16 MB
|
||||
flash memory.
|
||||
|
||||
As said before, firmware installation routine differs for different cameras.
|
||||
There are different memory addresses and different environment parameters,
|
||||
so before proceeding, determine what kind of SoC is in your camera, what sensor,
|
||||
what flash memory chip and what amount of memory is has.
|
||||
|
||||
Below we describe the procedure for installing the OpenIPC Lite firmware on a
|
||||
camera with 8 MB of flash memory, as an example. Even if your camera has larger
|
||||
flash memory, do not skip this text. Read it carefully to understand the
|
||||
principle and the sequence of operations. We will provide specific commands
|
||||
for different cameras in the second part of this section.
|
||||
|
||||
#### Preparing the firmware and the TFTP server.
|
||||
|
||||
Go to <https://openipc.org/supported-hardware>, find your SoC in the table of
|
||||
supported hardware. Make sure there is a downloadable binary file for that SoC.
|
||||
Hopefully there is a pre-compiled firmware file for your processor --
|
||||
download it onto your PC.
|
||||
|
||||
If you followed step 2, you've got your own TFTP server serving files from
|
||||
`/srv/tftp` directory. Extract files from the bundle you just downloaded into
|
||||
that directory.
|
||||
|
||||
```bash
|
||||
sudo tar -C /srv/tftp/ -xvf openipc.*.tgz
|
||||
```
|
||||
|
||||
#### Preparing the camera for flashing.
|
||||
|
||||
So, we have a guinea pig, a camera with hi3518ev100 SoC, equipped with a OV9712
|
||||
sensor, 64 MB of RAM and a 8MB NOR flash memory.
|
||||
|
||||
Connect to the camera via the UART port and access the bootloader console.
|
||||
Set the component parameters to the appropriate environment variables. Set
|
||||
environment variables for loading the Linux kernel and the root file system
|
||||
of the new firmware. Set environment variables for the camera to access local network,
|
||||
where `ethaddr` is the original camera MAC address, `ipaddr` is camera's IP address
|
||||
on the network, `gatewayip` is the IP address of a router to access the network,
|
||||
`netmask` is the subnet mask, and `serverip` is am IP address of the TFTP server
|
||||
from step 3. Save updated values to flash memory.
|
||||
|
||||
For exact commands please use [automatically generated instructions](https://openipc.org/supported-hardware/)
|
||||
for your hardware, consult data sheets, or seek help on [our Telegram channel][telegram].
|
||||
|
||||
#### Installation.
|
||||
|
||||
For exact commands please use [automatically generated instructions](https://openipc.org/supported-hardware/)
|
||||
for your hardware, consult data sheets, or seek help on [our Telegram channel][telegram].
|
||||
|
||||
NB! Pay attention to the messages on the terminal screen! If any of the commands
|
||||
throws an error, find out what went wrong. Maybe you made a typo? In any case,
|
||||
do not continue the procedure until all previous commands succeed. Otherwise,
|
||||
you might end up with a bricked camera!
|
||||
|
||||
### Step 8. First boot.
|
||||
|
||||
If all previous steps are done correctly, your camera should start with the new
|
||||
firmware. Welcome to OpenIPC!
|
||||
|
||||
After the first boot with the new firmware you need to clean the overlay
|
||||
partition. Run this in your terminal window:
|
||||
|
||||
```bash
|
||||
firstboot
|
||||
```
|
||||
|
||||
[logo]: ../images/logo_openipc.png
|
||||
[FTDI]: https://www.google.com/search?q=ftdi+usb+ttl
|
||||
[TLLC]: https://google.com/search?q=logic+level+converter+3.3v+5v
|
||||
[telegram]: https://t.me/OpenIPC
|
|
@ -0,0 +1,34 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Additional requirements for kernel configuration
|
||||
------------------------------------------------
|
||||
|
||||
```
|
||||
CONFIG_BLK_DEV=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
|
||||
CONFIG_IP_MULTICAST=y
|
||||
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
|
||||
CONFIG_ROOT_NFS=y
|
||||
```
|
||||
|
||||
## Patch file requirements
|
||||
|
||||
- Patch file name should follow format `<number>-<description>.patch`.
|
||||
|
||||
- Patch file should not contain any reference to package version in its name.
|
||||
|
||||
- The `<number>` part of patch's file name refers to the application order
|
||||
starting from 1. It is preferred to left-pad the number with zeros up to total
|
||||
of four digits, like `git-format-patch` does. _0001-foobar-the-buz.patch_
|
||||
|
||||
- Patch file should contain a commentary in its header, explaining what this
|
||||
patch does, and why it is needed.
|
||||
|
||||
- Add a _Signed-off-by_ statement in the header of each patch file to help
|
||||
tracking changes and certify that the patch is released under the same license
|
||||
as the software it modifies.
|
|
@ -0,0 +1,152 @@
|
|||
```
|
||||
system:
|
||||
webPort: 80
|
||||
httpsPort: 443
|
||||
#httpsCertificate: /etc/ssl/certs/www.example.com.crt
|
||||
#httpsCertificateKey: /etc/ssl/private/www.example.com.key
|
||||
logLevel: debug
|
||||
buffer: 1024
|
||||
plugins: false
|
||||
|
||||
isp:
|
||||
#sensorConfig: /etc/sensors/imx222_1080p_line.ini
|
||||
antiFlicker: disabled
|
||||
#blkCnt: 4
|
||||
#drc: 300
|
||||
#rawMode: slow
|
||||
#iqProfile: <path/to/file>
|
||||
#lowDelay: false
|
||||
#awbMode: auto
|
||||
|
||||
image:
|
||||
mirror: false
|
||||
flip: false
|
||||
rotate: 0
|
||||
contrast: 50
|
||||
hue: 50
|
||||
saturation: 50
|
||||
luminance: 50
|
||||
|
||||
video0:
|
||||
enabled: true
|
||||
codec: h264
|
||||
#size: 1920x1080
|
||||
fps: 20
|
||||
bitrate: 4096
|
||||
rcMode: vbr
|
||||
gopSize: 1
|
||||
#gopMode: normal
|
||||
#crop: 0x0x960x540
|
||||
#sliceUnits: 4
|
||||
#minQp: 12
|
||||
#maxQp: 42
|
||||
|
||||
video1:
|
||||
enabled: false
|
||||
codec: h264
|
||||
size: 704x576
|
||||
fps: 15
|
||||
|
||||
jpeg:
|
||||
enabled: true
|
||||
qfactor: 50
|
||||
fps: 5
|
||||
#size: 1920x1080
|
||||
|
||||
#mjpeg:
|
||||
#size: 1280x720
|
||||
#fps: 5
|
||||
#bitrate: 1024
|
||||
|
||||
osd:
|
||||
enabled: false
|
||||
font: /usr/share/fonts/truetype/UbuntuMono-Regular.ttf
|
||||
template: "%d.%m.%Y %H:%M:%S"
|
||||
posX: 16
|
||||
posY: 16
|
||||
#privacyMasks: 0x0x234x640,2124x0x468x1300
|
||||
|
||||
audio:
|
||||
enabled: false
|
||||
volume: 30
|
||||
srate: 8000
|
||||
codec: opus
|
||||
outputEnabled: false
|
||||
outputVolume: 30
|
||||
#speakerPin: 32
|
||||
#speakerPinInvert: false
|
||||
|
||||
rtsp:
|
||||
enabled: true
|
||||
port: 554
|
||||
|
||||
nightMode:
|
||||
enabled: false
|
||||
#irCutPin1: 1
|
||||
#irCutPin2: 2
|
||||
irCutSingleInvert: false
|
||||
#backlightPin: 65
|
||||
colorToGray: true
|
||||
#overrideDrc: 300
|
||||
#minThreshold: 2000
|
||||
#maxThreshold: 5000
|
||||
#irSensorPin: 62
|
||||
irSensorPinInvert: false
|
||||
#dncDelay: 30
|
||||
|
||||
motionDetect:
|
||||
enabled: false
|
||||
visualize: false
|
||||
debug: false
|
||||
#roi: 1854x1304x216x606,1586x1540x482x622
|
||||
#skipIn: 960x540x1920x1080
|
||||
#sensitivity: 3
|
||||
|
||||
records:
|
||||
enabled: false
|
||||
path: /mnt/mmcblk0p1/%F/%H.mp4
|
||||
maxUsage: 95
|
||||
#splitRecord: 10
|
||||
|
||||
outgoing:
|
||||
enabled: false
|
||||
#server: udp://192.168.1.10:5600
|
||||
#naluSize: 1200
|
||||
#- udp://IP:port # Multiple data sending is configured only in the /etc/majestic.yaml file and is not available for control from the WebUI
|
||||
#- unix:/tmp/rtpstream.sock
|
||||
#- rtmps://dc4-1.rtmp.t.me/s/mykey
|
||||
|
||||
watchdog:
|
||||
enabled: true
|
||||
timeout: 300
|
||||
|
||||
hls:
|
||||
enabled: false
|
||||
|
||||
onvif:
|
||||
enabled: false
|
||||
|
||||
ipeye:
|
||||
enabled: false
|
||||
|
||||
youtube: # This function only works with the external daemon plugin for Majestic
|
||||
enabled: false
|
||||
#key: xxxx-xxxx-xxxx-xxxx-xxxx
|
||||
|
||||
netip:
|
||||
enabled: false
|
||||
#user: admin
|
||||
#password: 6V0Y4HLF
|
||||
#port: 34567
|
||||
#snapshots: true
|
||||
#ignoreSetTime: false
|
||||
|
||||
cloud:
|
||||
enabled: false
|
||||
|
||||
#webrtc:
|
||||
# https://www.w3.org/TR/webrtc/#rtciceserver-dictionary with optional
|
||||
# '?transport=udp' or '?transport=tcp'
|
||||
#iceServers: stun:stun.kinesisvideo.eu-north-1.amazonaws.com:443
|
||||
|
||||
```
|
|
@ -0,0 +1,222 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Majestic Streamer
|
||||
-----------------
|
||||
|
||||
### Preamble
|
||||
|
||||
Majestic is a video streaming application, the heart of our firmware (in
|
||||
relation to camera/video surveillance functionality). Majestic is configurable
|
||||
via /etc/majestic.yaml file, and has many features/services enabled by default.
|
||||
Unneeded options can be switched off for better security and performance. See /etc/majestic.full for configuration options.
|
||||
|
||||
### Control signals
|
||||
|
||||
```
|
||||
-HUP restart Majestic (Except Ingenic T21).
|
||||
-SIGUSR2 SDK Shutdown (For all platforms).
|
||||
```
|
||||
|
||||
### Camera related URLs in firmware
|
||||
|
||||
Majestic supports multiple audio, video and still image formats, and more.
|
||||
You can find the full list of available endpoints on [this page](https://openipc.org/majestic-endpoints).
|
||||
|
||||
The long JPEG control parameter did not fit into the example on the site and we publish it here:
|
||||
|
||||
`/image.jpg?width=640&height=360&qfactor=73&color2gray=1`
|
||||
|
||||
### Changing parameters via cli
|
||||
|
||||
At the moment it is possible to change parameters in the configuration file via the CLI utility.
|
||||
|
||||
This allows parameters to be changed with a single line in pseudo-dynamic mode on some platforms
|
||||
simply by forcing a re-read of the configuration file.
|
||||
```
|
||||
cli -s .video0.codec h264 ; cli -s .video0.fps 10 ; killall -HUP majestic
|
||||
```
|
||||
|
||||
### Experimental Control Features (not yet described in endpoints)
|
||||
|
||||
```
|
||||
/metrics/isp
|
||||
/metrics/venc
|
||||
/metrics/motion
|
||||
```
|
||||
```
|
||||
/night/ircut
|
||||
/night/light
|
||||
```
|
||||
|
||||
|
||||
### Auto day/night detection
|
||||
|
||||
If these variables are used, it is possible to replace the used sandbox scripts.
|
||||
Works only for simple day/night schemes with minimal configuration and in the absence of mentions of irSensorPin in the majestic.yaml configuration file.
|
||||
If the light sensor gpio is set, it will use the default mode.
|
||||
|
||||
The settings work like this:
|
||||
```day < [minThreshold] | hysteresis | [maxThreshold] < night```
|
||||
|
||||
If the sensor gain is 1024 on a bright day the minThreshold could be set to 2000,
|
||||
if the sensor gain is 32000 on a dark night the maxThreshold could be set to 10000.
|
||||
|
||||
```
|
||||
cli -s .nightMode.minThreshold 10
|
||||
cli -s .nightMode.maxThreshold 50
|
||||
```
|
||||
|
||||
### Motion detection
|
||||
|
||||
Motion detect is supported for Hisilion/Goke, Ingenic and Sigmastar.
|
||||
When a motion event is detected, `majestic` invokes a predefined script `/usr/sbin/motion.sh` with a parameter specifying the object count:
|
||||
|
||||
```
|
||||
/usr/sbin/motion.sh [count]
|
||||
```
|
||||
|
||||
Enable motion detection in `majestic` configuration:
|
||||
|
||||
```
|
||||
cli -s .motionDetect.enabled true
|
||||
cli -s .motionDetect.debug true
|
||||
```
|
||||
|
||||
Reboot the camera and restart `majestic` in the foreground:
|
||||
|
||||
```
|
||||
killall majestic; sleep 3; majestic
|
||||
```
|
||||
|
||||
You should see the script running after motion detection events:
|
||||
|
||||
```
|
||||
20:37:02 <SED_IVE_DETCTOR> [ motion] motion_update@155 Motion detected: [1163x0] -> [690x475]
|
||||
20:37:02 <SED_IVE_DETCTOR> [ tools] motion_event@615 Execute motion script: /usr/sbin/motion.sh
|
||||
```
|
||||
|
||||
### Broadcasts using RTMP
|
||||
|
||||
To instantly launch a YouTube broadcast, run these commands in the console:
|
||||
```
|
||||
cli -s .video0.codec h264
|
||||
cli -s .audio.enabled true
|
||||
cli -s .outgoing.enabled true
|
||||
cli -s .outgoing.server rtmp://a.rtmp.youtube.com/live2/you-key-here
|
||||
reboot
|
||||
```
|
||||
|
||||
Examples of other addresses for different services:
|
||||
- YouTube
|
||||
- rtmp://a.rtmp.youtube.com/live2/---KEY---
|
||||
- Telegram
|
||||
- rtmps://dc4-1.rtmp.t.me/s/---KEY---
|
||||
- RuTube
|
||||
- rtmp://upload.rutube.ru/live_push/---KEY---
|
||||
- OK and VK
|
||||
- rtmp://ovsu.mycdn.me/input/---KEY---
|
||||
|
||||
We ask that you add information about other popular services here, thank you.
|
||||
|
||||
RTMP reconnection and timeout logic works as follows:
|
||||
|
||||
```
|
||||
0-200 tries = 10 seconds timeout
|
||||
200-500 tries = 60 seconds timeout
|
||||
500-1000 tries = 300 seconds timeout
|
||||
1000+ tries = 600 seconds timeout
|
||||
```
|
||||
|
||||
### Other outgoing options
|
||||
|
||||
```
|
||||
outgoing:
|
||||
enabled: true
|
||||
server: udp://192.168.1.10:5600
|
||||
naluSize: 1200
|
||||
- udp://IP-1:port
|
||||
- udp://IP-2:port
|
||||
- unix:/tmp/rtpstream.sock
|
||||
- rtmps://dc4-1.rtmp.t.me/s/mykey
|
||||
```
|
||||
|
||||
### ONVIF
|
||||
|
||||
For basic ONVIF to work correctly, you need to enable it and add a user to the system as shown in the example:
|
||||
|
||||
```
|
||||
cli -s .onvif.enabled true
|
||||
adduser viewer -s /bin/false -D -H
|
||||
echo viewer:123456 | chpasswd
|
||||
```
|
||||
|
||||
### JPEG and MJPEG
|
||||
|
||||
For the purpose of unification and standardization for all platforms, as well as to increase the stability of the streamer, the image size will always be equal to the size on the Video0 channel and a separate setting is not provided.
|
||||
|
||||
### ROI
|
||||
|
||||
Detection zones of two types:
|
||||
|
||||
`motionDetect.roi: 1854x1304x216x606,1586x1540x482x622`
|
||||
|
||||
`motionDetect.skipIn: 960x540x1920x1080`
|
||||
|
||||
**roi** - region of interest, when we specify one or more regions whose movements we are interested in.
|
||||
|
||||
**skipIn** - on the contrary, if we are interested in movements on the whole screen, except for some areas (for example, there is a tree in the frame, which is swaying in the wind).
|
||||
|
||||
Coordinate format is the same as in osd.privacyMasks: x,y of the top left point, length and width in pixels.
|
||||
|
||||
### How to convert YUV image to a more common image format
|
||||
|
||||
Use `convert` command from ImageMagick software. Run it like this:
|
||||
```
|
||||
convert -verbose -sampling-factor 4:2:0 -size 1920x1080 -depth 8 image.yuv image.png
|
||||
```
|
||||
where `1920x1080` is the picture resolution of video0, and `.png` is the target
|
||||
image format.
|
||||
|
||||
### How to play audio stream
|
||||
|
||||
Use [ffplay][ffplay] utility from [ffmpeg][ffmpeg] package.
|
||||
```
|
||||
ffplay -ar 48000 -ac 1 -f s16le http://192.168.1.10/audio.pcm
|
||||
ffplay -ar 48000 -ac 1 -f alaw http://192.168.1.10/audio.alaw
|
||||
ffplay -ar 48000 -ac 1 -f mulaw http://192.168.1.10/audio.ulaw
|
||||
ffplay -ar 8000 -ac 1 -f alaw http://192.168.1.10/audio.g711a
|
||||
```
|
||||
|
||||
### How to create an audio file to play on camera's speaker over network
|
||||
|
||||
Using [sox][sox] program convert any source audio file to [PCM][pcm] 8kbps audio:
|
||||
```
|
||||
sox speech.mp3 -t raw -r 8000 -e signed -b 16 -c 1 test.pcm
|
||||
```
|
||||
|
||||
### How to play audio file on camera's speaker over network
|
||||
|
||||
```
|
||||
curl -u root:12345 --data-binary @test.pcm http://192.168.1.10/play_audio
|
||||
```
|
||||
|
||||
[aac]: https://en.wikipedia.org/wiki/Advanced_Audio_Coding
|
||||
[alaw]: https://en.wikipedia.org/wiki/A-law_algorithm
|
||||
[dng]: https://en.wikipedia.org/wiki/Digital_Negative
|
||||
[g711]: https://en.wikipedia.org/wiki/G.711
|
||||
[heif]: https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
|
||||
[hls]: https://en.wikipedia.org/wiki/HTTP_Live_Streaming
|
||||
[jpeg]: https://en.wikipedia.org/wiki/JPEG
|
||||
[mjpeg]: https://en.wikipedia.org/wiki/Motion_JPEG
|
||||
[mp3]: https://en.wikipedia.org/wiki/MP3
|
||||
[mp4]: https://en.wikipedia.org/wiki/MPEG-4_Part_14
|
||||
[opus]: https://en.wikipedia.org/wiki/Opus_(audio_format)
|
||||
[pcm]: https://en.wikipedia.org/wiki/Pulse-code_modulation
|
||||
[raw]: https://en.wikipedia.org/wiki/Raw_image_format
|
||||
[rtsp]: https://en.wikipedia.org/wiki/RTSP
|
||||
[ulaw]: https://en.wikipedia.org/wiki/%CE%9C-law_algorithm
|
||||
[yuv]: https://en.wikipedia.org/wiki/YUV
|
||||
[ffplay]: https://ffmpeg.org/ffplay.html
|
||||
[ffmpeg]: https://ffmpeg.org/
|
||||
[sox]: https://en.wikipedia.org/wiki/SoX
|
|
@ -0,0 +1,25 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
HiSilicon boards
|
||||
----------------
|
||||
|
||||
### Disable subsystems you don't use
|
||||
|
||||
Vendor kernel modules take about 5 megabytes of RAM (code with dynamic memory
|
||||
for buffers) and some of them are pretty useless you need specific functionality
|
||||
like OSD, motion detection, support of audio, or H264/265/JPEG codecs.
|
||||
|
||||
| Feature | Modules | Size |
|
||||
|---------------------------------------|---------------------------------------------------------------------------------------------------------|------|
|
||||
| Audio output | hi3516ev200_ao, hi3516ev200_adec | |
|
||||
| Audio input | hi3516ev200_ai, hi3516ev200_aenc | |
|
||||
| Audio support (both input and output) | hi3516ev200_acodec, hi3516ev200_adec, hi3516ev200_aenc, hi3516ev200_ao, hi3516ev200_ai, hi3516ev200_aio | |
|
||||
| I2C sensor support | hi_sensor_i2c | |
|
||||
| SPI sensor support | hi_sensor_spi | |
|
||||
| PWM support | hi_pwm | |
|
||||
| Motion detection | hi3516ev200_ive | |
|
||||
| JPEG snapshots | hi3516ev200_jpege | |
|
||||
| H.264 codec support | hi3516ev200_h264e | |
|
||||
| H.265 codec support | hi3516ev200_h265e | |
|
||||
| OSD support | hi3516ev200_rgn | |
|
|
@ -0,0 +1,2 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
|
@ -0,0 +1,125 @@
|
|||
# Wiki OpenIPC
|
||||
[Mục lục](../README.md)
|
||||
|
||||
## Thông tin cơ bản
|
||||
|
||||
OpenIPC là một [firmware](https://github.com/OpenIPC) thay thế cho
|
||||
camera IP và là một loại ô che cho các dự án khác là thành phần của
|
||||
hệ thống của chúng tôi.
|
||||
|
||||
OpenIPC là một hệ điều hành Linux dựa trên các dự án Buildroot/OpenWrt và
|
||||
nhắm đến camera IP với chipset từ các nhà cung cấp khác nhau, bắt đầu
|
||||
với Goke GK72xx, HiSilicon Hi35xx, SigmaStar SSC33x, và XiongmaiTech XM5xx.
|
||||
|
||||
Mọi người đều được chào đón sử dụng/đóng góp cho dự án theo bất kỳ cách nào họ thấy hữu ích!
|
||||
|
||||
Chúng tôi sẽ rất biết ơn bất kỳ phản hồi và đề xuất nào.
|
||||
|
||||
|
||||
## Liên kết chính thức
|
||||
|
||||
* [OpenIPC trên Wiki](https://github.com/openipc/wiki) - Bộ sưu tập các tài liệu và hướng dẫn khác nhau.
|
||||
* [OpenIPC trên GitHub](https://github.com/OpenIPC/) - Tổ chức GitHub, hầu hết các dự án được lưu trữ ở đây.
|
||||
* [OpenIPC trên OpenCollective](https://opencollective.com/openipc) - Cộng đồng OpenCollective.
|
||||
* [OpenIPC trên Twitter](https://twitter.com/openipc) - Tin tức chính của chúng tôi.
|
||||
* [OpenIPC trên YouTube](https://www.youtube.com/channel/UCaXlbR2uGTRFh8jQ2lCFd2g) - Hướng dẫn và phát trực tiếp của chúng tôi (trong kế hoạch).
|
||||
|
||||
|
||||
## Nhóm chat Telegram
|
||||
|
||||
* [OpenIPC](https://t.me/openipc) (EN) - Kênh quốc tế để thảo luận về việc phát triển dự án của chúng tôi, [*](https://combot.org/c/1166652144)
|
||||
* [OpenIPC modding](https://t.me/openipc_modding) (RU) - vấn đề chung về việc sửa đổi firmware thiết bị IPCam, [*](https://combot.org/c/-1001247643198)
|
||||
* [OpenIPC development](https://t.me/openipc_software) (RU) - HiSilicon, XM porting in OpenWrt và vấn đề lập trình, [*](https://combot.org/c/-1001196905312)
|
||||
* [OpenIPC advice](https://t.me/openipc_advice) (RU) - vấn đề, tìm giải pháp, cuộc trò chuyện dài, [*](https://combot.org/c/1385065634)
|
||||
* [OpenIPC Iranian](https://t.me/joinchat/T_GwQUBTJdfXJrFb) (IR) - nhóm đặc biệt cho người dùng Iran / تیم OpenIPC برای کاربران ایرانی, [*](https://combot.org/c/-1001341239361)
|
||||
* [OpenIPC demo](https://t.me/openipc_demo) (EN/RU) - bot thử nghiệm với các nút, sau khi kết nối, đưa ra "/menu", [*](https://combot.org/c/1414887196)
|
||||
* [OpenIPC ExIPCam](https://t.me/ExIPCam) (RU) - Chương trình ExIPCam và sửa chữa phần cứng/phần mềm thiết bị, [*](https://combot.org/c/1213889378)
|
||||
* [OpenIPC updates](https://t.me/s/openipc_updates) (RU) - Kênh thông tin cập nhật Firmware & Software
|
||||
* [OpenIPC dev](https://t.me/s/openipc_dev) - Kênh phát triển Firmware & Software
|
||||
|
||||
## Phát triển của nhóm
|
||||
|
||||
### Firmware
|
||||
|
||||
* [openipc-2.x](https://github.com/openipc/firmware) - Hệ thống phát triển và tạo Firmware dựa trên Buildroot.
|
||||
* [openipc-1.0][chaos_calmer] - Hệ thống phát triển và tạo Firmware dựa trên OpenWrt 15.05.
|
||||
* [coupler][coupler] - Chuyển đổi mượt mà giữa các firmware của camera video.
|
||||
|
||||
### Streamers
|
||||
|
||||
* [majestic](https://openipc.org/majestic-endpoints) - Streamer IPCam phổ quát.
|
||||
* [mini][mini] - Streamer camera IP Mini mã nguồn mở.
|
||||
|
||||
### Công cụ
|
||||
|
||||
* [ipctool](https://github.com/openipc/ipctool) - Công cụ (và thư viện) để kiểm tra phần cứng camera IP.
|
||||
* [yaml-cli][yaml-cli] - Công cụ để thay đổi cài đặt trong CLI.
|
||||
* [glutinium](https://github.com/ZigFisher/Glutinium) - Gói OpenWRT bổ sung.
|
||||
|
||||
### Phần mềm Windows
|
||||
|
||||
* [exipcam](http://team.openipc.org/exipcam) - Tiện ích tuyệt vời để sửa chữa IPCam (Dành cho Windows, hoạt động trên Linux qua Wine).
|
||||
* [ipcam_dms](http://team.openipc.org/ipcam_dms) - Hệ thống quản lý thiết bị IPCam (Dành cho Windows, hoạt động trên Linux qua Wine).
|
||||
|
||||
## Nhà phát triển
|
||||
|
||||
| Tên | Vai trò | Tham gia |
|
||||
|------------------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------------------------|
|
||||
| [Dmitry Ilyin](https://web.telegram.org/#/im?p=@widgetii) | đồng sáng lập và thành viên chính của dự án OpenIPC | [ipctool][ipctool], [majestic][majestic], [mini][mini], [motors][motors] |
|
||||
| [Dmitry Ermakov](https://web.telegram.org/#/im?p=@dimerrr) | thành viên chính | [coupler][coupler], [firmware][firmware], [ipctool][ipctool] |
|
||||
| [Igor Zalatov](https://web.telegram.org/#/im?p=@FlyRouter) | **người sáng lập dự án và điều phối phát triển** | [chaos_calmer][chaos_calmer], [firmware][firmware], [wiki][wiki] |
|
||||
| [Ivan Pozdeev](https://web.telegram.org/#/im?p=@John) | nhà phát triển | [microbe-web][webui], [yaml-cli][yaml-cli] |
|
||||
| [Konstantin](#) | nhà phát triển | [hisi-trace][hisi-trace], [yaml-cli][yaml-cli] |
|
||||
| [Maksim Patrushev](https://web.telegram.org/#/im?p=@maxi380) | nhà phát triển | [motors][motors] |
|
||||
| [Maxim Chertov](https://web.telegram.org/#/im?p=@mAX3773) | đồng sáng lập dự án OpenIPC | [chaos_calmer][chaos_calmer], [ipctool][ipctool], [mini][mini] |
|
||||
| [Paul Philippov](https://web.telegram.org/#/im?p=@themactep) | thành viên chính | [microbe-web][webui] |
|
||||
| [Sergey Sharshunov](https://web.telegram.org/#/im?p=@USSSSSH) | đồng sáng lập dự án OpenIPC | [chaos_calmer][chaos_calmer], [burn][burn] |
|
||||
| [Temirkhan Myrzamadi](https://web.telegram.org/#/im?p=@hirrolot) | thành viên chính | [smolrtsp][smolrtsp] |
|
||||
| [Vasiliy Yakovlev](https://web.telegram.org/#/im?p=@#) | người hỗ trợ chung | |
|
||||
|
||||
### Hỗ trợ
|
||||
|
||||
OpenIPC cung cấp hai mức độ hỗ trợ.
|
||||
|
||||
- Hỗ trợ miễn phí thông qua cộng đồng (qua [chat](https://openipc.org/#telegram-chat-groups) và [danh sách thư](https://github.com/OpenIPC/firmware/discussions)).
|
||||
- Hỗ trợ thương mại có phí (từ nhóm các nhà phát triển).
|
||||
|
||||
Hãy xem xét việc đăng ký hỗ trợ thương mại có phí nếu bạn định sử dụng sản phẩm của chúng tôi cho kinh doanh.
|
||||
Là khách hàng trả phí, bạn sẽ nhận được dịch vụ hỗ trợ kỹ thuật và bảo dưỡng trực tiếp từ đội ngũ kỹ thuật của chúng tôi.
|
||||
Báo cáo lỗi và yêu cầu tính năng của bạn sẽ nhận được sự chú ý ưu tiên và giải pháp nhanh chóng. Đây là chiến lược đôi bên cùng thắng,
|
||||
đóng góp vào sự ổn định kinh doanh của bạn, và giúp các nhà phát triển cốt lõi
|
||||
làm việc toàn thời gian trên dự án.
|
||||
|
||||
Nếu bạn có bất kỳ câu hỏi cụ thể nào liên quan đến dự án của chúng tôi, đừng ngần ngại [liên hệ với chúng tôi](mailto:flyrouter@gmail.com).
|
||||
### Tham gia và Đóng góp
|
||||
|
||||
Nếu bạn thích những gì chúng tôi đang làm, và muốn tăng cường sự phát triển, hãy xem xét việc tham gia.
|
||||
|
||||
Bạn có thể cải thiện mã nguồn hiện tại và gửi cho chúng tôi các bản vá. Bạn có thể thêm vào các tính năng mới mà mã nguồn của chúng tôi đang thiếu.
|
||||
|
||||
Bạn có thể giúp chúng tôi viết tài liệu tốt hơn, đọc và sửa lại các trang web của chúng tôi.
|
||||
|
||||
Bạn chỉ cần quyên góp một số tiền để bao phủ chi phí phát triển và duy trì lâu dài cho những gì chúng tôi tin rằng sẽ trở thành Khung Camera Mạng IP ổn định, linh hoạt và mở nhất cho người dùng như bạn.
|
||||
|
||||
Bạn có thể đóng góp tài chính cho dự án tại [Open Collective](https://opencollective.com/openipc/contribute/backer-14335/checkout).
|
||||
|
||||
Cảm ơn bạn.
|
||||
|
||||
<p style="text-align:center">
|
||||
<a href="https://opencollective.com/openipc/contribute/backer-14335/checkout" target="_blank"><img src="https://opencollective.com/webpack/donate/button@2x.png?color=blue" width="375" alt="Nút quyên góp Open Collective"></a>
|
||||
</p>
|
||||
|
||||
|
||||
[burn]: https://github.com/OpenIPC/burn
|
||||
[chaos_calmer]: https://github.com/OpenIPC/chaos_calmer
|
||||
[coupler]: https://github.com/OpenIPC/coupler
|
||||
[firmware]: https://github.com/OpenIPC/firmware
|
||||
[hisi-trace]: https://github.com/OpenIPC/hisi-trace
|
||||
[ipctool]: https://github.com/OpenIPC/ipctool
|
||||
[majestic]: https://github.com/OpenIPC/majestic
|
||||
[mini]: https://github.com/OpenIPC/mini
|
||||
[motors]: https://github.com/OpenIPC/motors
|
||||
[smolrtsp]: https://github.com/OpenIPC/smolrtsp
|
||||
[webui]: https://github.com/OpenIPC/microbe-web
|
||||
[wiki]: https://github.com/wiki
|
||||
[yaml-cli]: https://github.com/OpenIPC/yaml-cli
|
|
@ -0,0 +1,448 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
A collection of practical networking settings
|
||||
---------------------------------------------
|
||||
|
||||
> Attention! If something does not work, run `ifdown -v <iface>; ifup -v <iface>` and check the output!
|
||||
|
||||
### ETH0 | DHCP for all platforms
|
||||
|
||||
```
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
hwaddress ether $(fw_printenv -n ethaddr || echo 00:24:B8:FF:FF:FF)
|
||||
#udhcpc_opts -O search -O ntpsrv -O hostname <= proposition
|
||||
#pre-up echo -e "nameserver 77.88.8.8\nnameserver 8.8.4.4\n" >/tmp/resolv.conf <= dynamic
|
||||
#pre-up echo -e "server 0.time.openipc.org iburst\nserver 1.time.openipc.org iburst\nserver 2.time.openipc.org iburst\nserver 3.time.openipc.org iburst" >/tmp/ntp.conf <= proposition
|
||||
```
|
||||
|
||||
|
||||
### ETH0 | Static for all platforms
|
||||
|
||||
```
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.168.1.10
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.1.1
|
||||
hwaddress ether $(fw_printenv -n ethaddr || echo 00:24:B8:FF:FF:FF)
|
||||
pre-up echo -e "nameserver 77.88.8.8\nnameserver 8.8.4.4\n" >/tmp/resolv.conf <= work
|
||||
pre-up echo -e "server 0.time.openipc.org iburst\nserver 1.time.openipc.org iburst\nserver 2.time.openipc.org iburst\nserver 3.time.openipc.org iburst" >/tmp/ntp.conf <= proposition
|
||||
up /usr/sbin/ntpd -N -q
|
||||
```
|
||||
|
||||
|
||||
### ETH0:1 | Alias example
|
||||
|
||||
```
|
||||
auto eth0
|
||||
iface eth0:1 inet static
|
||||
address $(fw_printenv -n ipaddr || echo 192.168.1.10)
|
||||
netmask 255.255.255.0
|
||||
```
|
||||
|
||||
|
||||
### ETH2 | Chinese WiFi
|
||||
|
||||
```
|
||||
auto eth2
|
||||
iface eth2 inet dhcp
|
||||
pre-up wifi xm711
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up (sleep 3; wpa_supplicant -B -D nl80211 -i eth2 -c/tmp/wpa_supplicant.conf)
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
||||
|
||||
|
||||
### PPP0 | T31 | CamHi/Xin
|
||||
|
||||
```
|
||||
auto ppp0
|
||||
iface ppp0 inet ppp
|
||||
pre-up echo 61 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio61/direction
|
||||
pre-up echo 0 > /sys/class/gpio/gpio61/value
|
||||
pre-up sleep 7
|
||||
post-down echo 1 > /sys/class/gpio/gpio61/value
|
||||
post-down echo 61 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### USB0 | HI3516EV300/GK7205V300 | CamHi/Xin
|
||||
|
||||
```
|
||||
auto usb0
|
||||
iface usb0 inet dhcp
|
||||
pre-up echo 9 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio9/direction
|
||||
pre-up echo 0 > /sys/class/gpio/gpio9/value
|
||||
pre-up modprobe usbserial vendor=0x2c7c product=0x6026
|
||||
pre-up modprobe rndis_host
|
||||
pre-up sleep 10
|
||||
post-down echo 1 > /sys/class/gpio/gpio9/value
|
||||
post-down echo 9 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### WG0 | All platforms
|
||||
|
||||
```
|
||||
auto wg0
|
||||
iface wg0 inet static
|
||||
address 192.168.99.1
|
||||
netmask 255.255.255.0
|
||||
pre-up modprobe wireguard
|
||||
pre-up ip link add dev wg0 type wireguard
|
||||
pre-up wg setconf wg0 /etc/wireguard.conf
|
||||
post-down ip link del dev wg0
|
||||
```
|
||||
|
||||
### WLAN0 | Update SSID & PWD from SD card
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
sleep 2
|
||||
pre-up wlanssid=$(cat /mnt/mmcblk0p1/wlanssid); if [ $wlanssid ]; then fw_setenv wlanssid $wlanssid; fi
|
||||
pre-up wlanpass=$(cat /mnt/mmcblk0p1/wlanpass); if [ $wlanpass ]; then fw_setenv wlanpass $wlanpass; fi
|
||||
post-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf
|
||||
post-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
post-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
||||
|
||||
### WLAN0 | GM8135 | Unknown
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up modprobe mac80211
|
||||
pre-up modprobe 8188eu
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up (sleep 3; wpa_supplicant -B -D wext -i wlan0 -c/tmp/wpa_supplicant.conf)
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | HI3516EV200/GK7205V200/GK7205V210 | CamHi/Xin
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 9 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio9/direction
|
||||
pre-up echo 0 > /sys/class/gpio/gpio9/value
|
||||
pre-up modprobe mt7601u
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 1 > /sys/class/gpio/gpio9/value
|
||||
post-down echo 9 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
### WLAN0 | GK7205V200 | RTL8188
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 57 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio57/direction
|
||||
pre-up echo 0 > /sys/class/gpio/gpio57/value
|
||||
pre-up modprobe mac80211
|
||||
pre-up sleep 1
|
||||
pre-up insmod /lib/modules/4.9.37/extra/rtl8188fu.ko
|
||||
pre-up sleep 1
|
||||
pre-up wpa_passphrase "OpenIPC_NFS" "project2021" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -Dnl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 1 > /sys/class/gpio/gpio57/value
|
||||
post-down echo 57 > /sys/class/gpio/unexport
|
||||
|
||||
```
|
||||
|
||||
### WLAN0 | HI3516EV300/GK7205V300 | CamHi/Xin
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up devmem 0x100C0080 32 0x530
|
||||
pre-up echo 7 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio7/direction
|
||||
pre-up echo 0 > /sys/class/gpio/gpio7/value
|
||||
pre-up modprobe mt7601u
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 1 > /sys/class/gpio/gpio7/value
|
||||
post-down echo 7 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
### WLAN0 | GK7205V300 + ATBM603X | Unknown
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up devmem 0x100C0080 32 0x530
|
||||
pre-up echo 7 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio7/direction
|
||||
pre-up echo 0 > /sys/class/gpio/gpio7/value
|
||||
pre-up modprobe mt7601u
|
||||
pre-up modprobe atbm603x_wifi_usb
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 1 > /sys/class/gpio/gpio7/value
|
||||
post-down echo 7 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
Note: Enter commands in U-Boot console to enable the wifi device
|
||||
|
||||
```
|
||||
fw_setenv wlandev atbm603x-generic-usb
|
||||
saveenv
|
||||
```
|
||||
|
||||
### WLAN0 | HI3518EV200 | CamHi/Xin
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 9 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio9/direction
|
||||
pre-up echo 0 > /sys/class/gpio/gpio9/value
|
||||
pre-up modprobe mt7601u
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 1 > /sys/class/gpio/gpio9/value
|
||||
post-down echo 9 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | HI3518EV200 | CIP37210 and HS303v1
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 3 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio3/direction
|
||||
pre-up echo 1 > /sys/class/gpio/gpio3/value
|
||||
pre-up modprobe mac80211
|
||||
pre-up sleep 1
|
||||
pre-up insmod /lib/modules/4.9.37/extra/rtl8188fu.ko
|
||||
pre-up sleep 1
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up ifconfig wlan0 up
|
||||
pre-up wpa_supplicant -B -Dnl80211 -iwlan0 -c/tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
#pre-up echo -e "nameserver 77.88.8.8\nnameserver 8.8.4.4\n" >/tmp/resolv.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 0 > /sys/class/gpio/gpio3/value
|
||||
post-down echo 3 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | HI3518EV200 | HS303v2
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 54 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio54/direction
|
||||
pre-up echo 1 > /sys/class/gpio/gpio54/value
|
||||
pre-up modprobe r8188eu
|
||||
pre-up sleep 1
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up ifconfig wlan0 up
|
||||
pre-up wpa_supplicant -B -Dwext -iwlan0 -c/tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 0 > /sys/class/gpio/gpio54/value
|
||||
post-down echo 54 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | HI3518EV200 | HS303v3 and IPC-136W
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up devmem 0x200f000c 32 0x0
|
||||
pre-up echo 7 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio7/direction
|
||||
pre-up echo 1 > /sys/class/gpio/gpio7/value
|
||||
pre-up modprobe r8188eu
|
||||
pre-up sleep 1
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up ifconfig wlan0 up
|
||||
pre-up wpa_supplicant -B -Dwext -iwlan0 -c/tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 0 > /sys/class/gpio/gpio7/value
|
||||
post-down echo 7 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | HI3518EV300 | Unknown
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up modprobe rtl8188fu
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | HI3518EV300 | MJSXJ02HL
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up devmem 0x112C0048 32 0x1D54
|
||||
pre-up devmem 0x112C004C 32 0x1174
|
||||
pre-up devmem 0x112C0064 32 0x1174
|
||||
pre-up devmem 0x112C0060 32 0x1174
|
||||
pre-up devmem 0x112C005C 32 0x1174
|
||||
pre-up devmem 0x112C0058 32 0x1174
|
||||
pre-up devmem 0x10020028 32 0x28000000
|
||||
pre-up devmem 0x10020028 32 0x20000000
|
||||
pre-up modprobe cfg80211
|
||||
pre-up insmod /lib/modules/4.9.37/external/8189fs_kasito.ko
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | SSC335 | Apical
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 14 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio14/direction
|
||||
pre-up echo 1 > /sys/class/gpio/gpio14/value
|
||||
pre-up echo '00:24:B8:FF:FF:FF' >/tmp/.mac.info
|
||||
pre-up modprobe mac80211
|
||||
pre-up insmod /lib/modules/4.9.84/sigmastar/ssw101b_wifi_usb.ko
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D wext -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 0 > /sys/class/gpio/gpio14/value
|
||||
post-down echo 14 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | SSC337DE | Tiandy
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 14 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio14/direction
|
||||
pre-up echo 1 > /sys/class/gpio/gpio14/value
|
||||
pre-up modprobe cfg80211
|
||||
pre-up insmod /lib/modules/4.9.84/sigmastar/rtl8192eu.ko
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
post-down echo 1 > /sys/class/gpio/gpio14/value
|
||||
post-down echo 14 > /sys/class/gpio/unexport
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | T10 | Netcam
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up modprobe mac80211
|
||||
pre-up modprobe mt7601sta
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 3
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | MT7601U | T31 | CamHi/Xin
|
||||
|
||||
```
|
||||
fw_setenv wlandevice mt7601u-t31-camhi
|
||||
fw_setenv wlanssid MySSID
|
||||
fw_setenv wlanpass MyPassword
|
||||
```
|
||||
|
||||
|
||||
### WLAN0 | T31 | Xiaomi MJSXJ03HL 2K
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up modprobe mac80211
|
||||
pre-up insmod /lib/modules/rtl8189ftv.ko
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 1
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
||||
|
||||
### WLAN0 | T31 + ATBM6031 SDIO | Wyze V3, HL-CAM04
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up modprobe mac80211
|
||||
pre-up modprobe atbm603x_wifi_sdio
|
||||
pre-up wpa_passphrase "SSID" "password" >/tmp/wpa_supplicant.conf
|
||||
pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
pre-up sleep 1
|
||||
pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c/tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
||||
|
||||
### WLAN0 | T31 | RTL8188FU | iFlytek
|
||||
|
||||
```
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
pre-up echo 10 > /sys/class/gpio/export
|
||||
pre-up echo out > /sys/class/gpio/gpio10/direction
|
||||
pre-up echo 1 > /sys/class/gpio/gpio10/value
|
||||
pre-up modprobe mac80211
|
||||
pre-up sleep 1
|
||||
pre-up insmod /lib/modules/8188fu.ko
|
||||
pre-up sleep 1
|
||||
pre-up wlan_addr=$(fw_printenv -n wlanaddr); if [ -n "$wlan_addr" ]; then ip link set dev wlan0 address $wlan_addr; fi
|
||||
post-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf
|
||||
post-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
|
||||
post-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf
|
||||
post-down killall -q wpa_supplicant
|
||||
```
|
|
@ -0,0 +1,379 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Installation: how to make OpenIPC running on certain hardware
|
||||
-------------------------------------------------------------
|
||||
|
||||
Supported hardware and installation procedures are given on [openipc.org](https://openipc.org/firmware/) site.
|
||||
|
||||
Please follow on site instructions for your CPU and video chip!
|
||||
|
||||
Here are some examples:
|
||||
|
||||
[Hi3516cv300 with IMX291](https://openwrt.org/docs/techref/hardware/soc/soc.hisilicon.hi35xx/ivg-hp203y-ay)
|
||||
|
||||
[[Hi3516Ev300-IMX335]]
|
||||
|
||||
## How to upgrade OpenIPC
|
||||
|
||||
Currently, full automatic system upgrade like [sysupgrade][openwrtsysupgrade]
|
||||
in OpenWRT is not supported. Use partial manual update instead.
|
||||
|
||||
### Partial manual update
|
||||
|
||||
**NB!** _Partial upgrade of U-boot and kernel are recommended only in special cases and should be done with caution._
|
||||
|
||||
The process is described on the main site on [firmware page](https://openipc.org/firmware/#update-parts-of-the-firmware).
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
* Can OpenIPC be installed on Raspberry Pi or other hardware?
|
||||
|
||||
No. Currently, only HiSilicon HI35xx SoC are supported. But theoretically it is
|
||||
possible to support other architectures and boards. Though it will require a lot
|
||||
of efforts, and thus it is not a near time focus of the project.
|
||||
|
||||
* Can I flash OpenIPC image without using UART console and TFTP?
|
||||
|
||||
No. Currently, it is not possible, though we are working on this.
|
||||
|
||||
* What the difference between OpenIPC based on BuildRoot and based on OpenWRT?
|
||||
|
||||
Buildroot is faster for initial development for new platforms as it is
|
||||
minimalistic and has no dependencies. OpenWRT is convenient for users as a final
|
||||
product, but there are a lot of complexities, dependencies, and there is no
|
||||
point in developing without a community.
|
||||
|
||||
### Other FAQs
|
||||
|
||||
* [OpenIPC Wiki (ru)](https://github.com/OpenIPC/camerasrnd/blob/master/docs/FAQ-ru.md)
|
||||
|
||||
|
||||
## Network related stuff
|
||||
|
||||
Common network configuration can be done in Luci GUI:
|
||||
|
||||
`http://<your camera IP>`
|
||||
|
||||
[[3G_modems]] USB modems support in hilink and ppp modes
|
||||
|
||||
## Graphical User Interfaces
|
||||
|
||||
There are two branches of OpenIPC currently:
|
||||
|
||||
### OpenWRT based
|
||||
|
||||
GUI is based on Luci. There are menu sections for camera specific setup.
|
||||
|
||||
### Buildroot based
|
||||
|
||||
There is a different interface planned... Still under development.
|
||||
|
||||
## Hardware related recommendations
|
||||
|
||||
### Power Over Internet PoE
|
||||
|
||||
It is advised to use 48V power adapters with RJ-45 connectors instead of 12V.
|
||||
With 12V adapters the current will be 4 times higher. High current can burn
|
||||
RJ-45 connectors and wires.
|
||||
|
||||
## How to stream video to Internet
|
||||
|
||||
* __MiniHttp__ ➤ main audio/video streamer of the OpenIPC based system.
|
||||
|
||||
* __Мajestic__ ➤ new (in development) audio/video streamer of the OpenIPC based system.
|
||||
|
||||
* __YouTube Streaming__
|
||||
|
||||
### MiniHttp is the main streamer of the OpenIPC based system
|
||||
|
||||
It is important to tune configuration of MiniHttp by turning off unneeded
|
||||
protocols and features for better security and performance.
|
||||
|
||||
Config file is located in `/etc/minihttp.ini`
|
||||
|
||||
### Debug mode:
|
||||
|
||||
```killall -sigint minihttp; sleep 1; export SENSOR=`ipctool --sensor_id`; minihttp```
|
||||
|
||||
### Production mode:
|
||||
|
||||
```killall -sigint minihttp; sleep 1; export SENSOR=`ipctool --sensor_id`; minihttp 2>&1 | logger -p daemon.info -t minihttp &```
|
||||
|
||||
|
||||
## Custom build tools used in OpenIPC OS
|
||||
|
||||
[Tools repository](https://github.com/OpenIPC/packages/tree/main/utils)
|
||||
|
||||
[ipctool](https://github.com/OpenIPC/ipctool) - gets information about hardware
|
||||
and outputs it in common format. Can also be used to make backup and restore of
|
||||
the camera software (still experimental feature).
|
||||
|
||||
## Integration examples with Digital Video Recording systems
|
||||
|
||||
Recording stream locally with various utilities.
|
||||
|
||||
YouTube as DVR hack.
|
||||
|
||||
## Tips and tricks on monitoring OpenIPC system
|
||||
|
||||
### How to get temperature from chip's internal sensor (where supported):
|
||||
|
||||
`ipctool --temp`
|
||||
|
||||
other commands to [[monitor temperature]]
|
||||
|
||||
[[snmp]]
|
||||
|
||||
### Prometheus monitoring
|
||||
|
||||
[[prometheus-node]]
|
||||
|
||||
### Monitoring templates
|
||||
|
||||
* [[Zabbix monitoring templates]]
|
||||
|
||||
## Prometheus node configuration
|
||||
|
||||
[Prometheus](https://prometheus.io/) is an open-source systems monitoring and
|
||||
alerting toolkit.
|
||||
|
||||
OpenIPC has prometheus node exporter as a package. The result output can be
|
||||
viewed as plain text on http://192.168.1.10:9100/metrics
|
||||
|
||||
Or visualized if you install [proemetheus server and graphana](https://prometheus.io/docs/visualization/grafana/):
|
||||
|
||||
[[images/preometheus_node_graphana_example.jpg]]
|
||||
|
||||
You can configure the node in `/etc/config/prometheus-node-exporter-lua`.
|
||||
|
||||
### Meta package
|
||||
|
||||
<https://github.com/ZigFisher/Glutinium/tree/master/prometheus-node-exporter-lua>
|
||||
|
||||
## Experiments with I2C on Hi3518EV200
|
||||
|
||||
### Setting up i2c-x via device tree
|
||||
|
||||
The standard i2c-hisilicon driver does not give an option to set pins to i2c
|
||||
mode if they were previously set to dts. To automatically set the required pins
|
||||
to i2c mode you just need to add the following code to the beginning of
|
||||
hi_i2c_hw_init (linux/drivers/i2c/busses/i2c-hisilicon.c)
|
||||
|
||||
```
|
||||
#ifdef CONFIG_ARCH_HI3518EV200 // Might be the same for other hardware devices
|
||||
if(pinfo->mem->start = 0x200d0000 /* address i2c-0 */) {
|
||||
writel(0x2, 0x200f0040);
|
||||
writel(0x2, 0x200f0044);
|
||||
}
|
||||
if(pinfo->mem->start = 0x20240000 /* address i2c-1 */) {
|
||||
writel(0x1, 0x200f0050);
|
||||
writel(0x1, 0x200f0054);
|
||||
}
|
||||
if(pinfo->mem->start = 0x20250000 /* address i2c-2 */) {
|
||||
writel(0x1, 0x200f0060);
|
||||
writel(0x1, 0x200f0064);
|
||||
}
|
||||
#endif
|
||||
```
|
||||
|
||||
## R&D related information
|
||||
|
||||
### How to [[login inside]] original firmware
|
||||
|
||||
### [[Majestic Log]] comments
|
||||
|
||||
### [[DevTools]]
|
||||
|
||||
### [[Docs on different IP cameras]]
|
||||
|
||||
### Groups in Telegram related to development:
|
||||
|
||||
|
||||
## Tools used in Research and Development
|
||||
|
||||
[hisi-trace](https://github.com/OpenIPC/hisi-trace) --> tool to run Sofia inside
|
||||
the OpenIPC. Allows porting stock Sofia functions to the target system without
|
||||
loading in the original firmware.
|
||||
|
||||
[some tools for dissassembling](https://github.com/TekuConcept/ArmElfDisassembler)
|
||||
|
||||
## Docs on currently unsupported SoC:
|
||||
|
||||
[Novatek NV98515 SoC](https://github.com/hn/reolink-camera)
|
||||
|
||||
Different hack & mod related to IP Cameras forums:
|
||||
|
||||
<https://www.goprawn.com/>
|
||||
|
||||
Below are some examples how to record video streams with various utilities.
|
||||
|
||||
### gstreamer
|
||||
|
||||
* rtsp h264 stream:
|
||||
|
||||
`gst-launch-1.0 rtspsrc location=rtsp://192.168.1.10:554/stream=0 ! rtpjitterbuffer ! rtph264depay ! h264parse ! mp4mux ! filesink location=stream0_h264.mp4 -e`
|
||||
|
||||
* rtsp h265 stream:
|
||||
|
||||
`gst-launch-1.0 rtspsrc location=rtsp://192.168.1.10:554/stream=0 ! rtpjitterbuffer ! rtph265depay ! h265parse ! mp4mux ! filesink location=stream0_h265.mp4 -e`
|
||||
|
||||
### ffmpeg
|
||||
|
||||
### vlc
|
||||
|
||||
## How to login inside original firmware
|
||||
|
||||
Information applicable only for XM-based camera firmware.
|
||||
|
||||
### Enable telnet server
|
||||
|
||||
In U-Boot console:
|
||||
|
||||
```
|
||||
setenv telnetctrl 1; saveenv
|
||||
```
|
||||
|
||||
### Connect with telnet
|
||||
|
||||
```
|
||||
LocalHost login: root
|
||||
Password: xmhdipc
|
||||
Welcome to HiLinux.
|
||||
```
|
||||
|
||||
Also, can try [other pairs](https://gist.github.com/gabonator/74cdd6ab4f733ff047356198c781f27d)
|
||||
|
||||
### Optional: enable Linux kernel verbose boot (where armbenv exists)
|
||||
|
||||
```
|
||||
# armbenv -s xmuart 0
|
||||
# reboot
|
||||
```
|
||||
|
||||
Or in case where XmEnv exists:
|
||||
|
||||
```
|
||||
# XmEnv -s xmuart 0
|
||||
# reboot
|
||||
```
|
||||
|
||||
### Enable telnet without even open your camera (remotely)
|
||||
|
||||
* Find proper zip with recent firmware update using [link](https://translate.google.com/translate?hl=en&sl=ru&tl=en&u=https%3A%2F%2Fwww.cctvsp.ru%2Farticles%2Fobnovlenie-proshivok-dlya-ip-kamer-ot-xiong-mai) and download it.
|
||||
|
||||
* Unzip it and choose proper `bin` file from several options.
|
||||
|
||||
* It's recommended update your camera using this stock firmware without
|
||||
modifying it. It will help understand possible issues. Use `General...` if
|
||||
not sure which option you want.
|
||||
|
||||
* Unzip `bin` file as it would be ordinary zip archive.
|
||||
|
||||
* Copy `add_xmuart.sh` from `utils` directory of the repository inside directory
|
||||
with unpacked files.
|
||||
|
||||
* Run `./add_xmaurt.sh` and then ensure that `u-boot.env.img` has
|
||||
`xmuart=1telnetctrl=1` near the end of file.
|
||||
|
||||
* Repack `bin` file adding changed `u-boot.env.img` there like this:
|
||||
`zip -u General_IPC_HI3516EV200_85H30AI_S38.Nat.dss.OnvifS.HIK_V5.00.R02.20200507_all.bin u-boot.env.img`
|
||||
|
||||
* Upgrade camera using new `bin` file.
|
||||
|
||||
Document origin is [here](https://github.com/OpenIPC/camerasrnd/blob/master/get_telnet.md)
|
||||
|
||||
## Commands to measure chip temperature on various SoCs
|
||||
|
||||
`Hi3516CV200 / Hi3518EV200 / Hi3518EV201`
|
||||
```sh
|
||||
devmem 0x20270110 32 0x60FA0000 ; devmem 0x20270114 8 | awk '{print "CPU temperature: " ((($1)*180)/256)-40}'
|
||||
```
|
||||
|
||||
`Hi3516CV300 / Hi3518EV100`
|
||||
```sh
|
||||
devmem 0x1203009C 32 0x60FA0000 ; devmem 0x120300A4 16 | awk '{print "CPU temperature: " (((($1)-125.0)/806)*165)-40}'
|
||||
```
|
||||
|
||||
`Hi3516EV200 / Hi3516EV300`
|
||||
```sh
|
||||
devmem 0x120280B4 32 0xC3200000 ; devmem 0x120280BC 16 | awk '{print "CPU temperature: " (((($1)-117)/798)*165)-40}'
|
||||
```
|
||||
|
||||
`Hi3536D`
|
||||
```sh
|
||||
himm 0x0120E0110 0x60320000 > /dev/null; himm 0x120E0118 | awk '{print $4}' | dd skip=1 bs=7 2>/dev/null | awk '{print "0x"$1}' | awk '{print "CPU temperature: " (($1*180)/256)-40}'
|
||||
```
|
||||
|
||||
`Hi3536C`
|
||||
```sh
|
||||
himm 0x0120E0110 0x60320000 > /dev/null; himm 0x120E0118 | awk '{print $4}' | dd skip=1 bs=7 2>/dev/null | awk '{print "0x"$1}' | awk '{print "CPU temperature: " (($1-125)/806)*165-40}'
|
||||
```
|
||||
|
||||
`HI3520DV200`
|
||||
```sh
|
||||
devmem 20060020 32
|
||||
```
|
||||
|
||||
`Hi3516AV200`
|
||||
```sh
|
||||
#PERI_PMC68 0x120a0110 (disable-->enable)
|
||||
himm 0x120a0110 0 > /dev/null;
|
||||
himm 0x120a0110 0x40000000 > /dev/null;
|
||||
|
||||
usleep 100000
|
||||
#PERI_PMC70 0x120a0118 read temperature
|
||||
DATA0=$(himm 0x120a0118 0 | grep 0x120a0118)
|
||||
DATA1=$(printf "$DATA0" | sed 's/0x120a0118: //')
|
||||
DATA2=$(printf "$DATA1" | sed 's/ --> 0x00000000//')
|
||||
|
||||
let "var=$DATA2&0x3ff"
|
||||
if [ $var -ge 125 -a $var -le 931 ];then
|
||||
echo `awk -v x="$var" 'BEGIN{printf "chip temperature: %f\n",(x-125)*10000/806*165/10000-40}'`
|
||||
else
|
||||
echo "$var ---> invalid. [125,931]"
|
||||
fi
|
||||
```
|
||||
|
||||
## Direct streaming to YouTube
|
||||
|
||||
YouTube offers not only LiveStreaming but also can record this stream.
|
||||
|
||||
Up to 12 hours of LiveStream can be recorded.
|
||||
|
||||
Direct streaming to YouTube is possible but not currently supported by OpenIPC.
|
||||
|
||||
### Direct streaming can be done with MiniHttp
|
||||
|
||||
Direct streaming to YouTube could be done with the help of RTMP but there are
|
||||
currently no plans add this protocol to the main streamer MiniHttp.
|
||||
|
||||
### Direct streaming can be done with FFMPEG
|
||||
|
||||
There are two modes available: the old one, supporting H264 over RTMP,
|
||||
and the new one, with H265 over HLS.
|
||||
|
||||
Both methods were not tested in production and still are in development mode.
|
||||
See following links for details:
|
||||
|
||||
### H264 over RTMP
|
||||
|
||||
Navigate to the compiled package [H264 over RTMP](https://github.com/ZigFisher/Glutinium/tree/master/hi35xx-ffmpeg/files)
|
||||
|
||||
Copy file `silence.aac` to `/usr/lib/` and file `ffmpeg` to `/usr/sbin/`
|
||||
|
||||
Also set execution permission:
|
||||
|
||||
`chmod +x /usr/sbin/ffmpeg`
|
||||
|
||||
Run `ffmpeg` with the following parameters:
|
||||
|
||||
`ffmpeg -stream_loop -1 -i /usr/lib/silence.aac -rtsp_transport udp -thread_queue_size 64 -i rtsp://127.0.0.1:554/stream=0 -c:v copy -c:a copy -f flv rtmp://a.rtmp.youtube.com/live2/<your key>`
|
||||
|
||||
[H265 over HLS](https://gist.github.com/widgetii/ec275524dd621cd55774c952bee4c622)
|
||||
|
||||
Some build instructions:
|
||||
|
||||
<https://github.com/ZigFisher/Glutinium/blob/master/hi35xx-ffmpeg/0_Build.sh>
|
||||
|
||||
[openwrtsysupgrade]: https://github.com/openwrt/openwrt/blob/master/package/base-files/files/sbin/sysupgrade
|
|
@ -0,0 +1,12 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Old installation
|
||||
---
|
||||
|
||||
- [Old Goke instructions](../en/install-goke.md)
|
||||
- [Old HiSilicon instructions](../en/install-hisi.md)
|
||||
- [Old Novatek instructions](../en/install-novatek.md)
|
||||
- [Old SigmaStar instructions](../en/install-sigmastar.md)
|
||||
- [Old XM510 instructions](../en/install-xm510.md)
|
||||
- [Old XM530 instructions](../en/install-xm530.md)
|
|
@ -0,0 +1,701 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This page describes OpenWRT-based firmware variant.
|
||||
|
||||
### Firmware features
|
||||
|
||||
* RTSP, ONVIF, NETIP
|
||||
* Native ipeye service support
|
||||
* Support squashfs, jffs2, overlayfs, vfat
|
||||
* Vlan and bridges support
|
||||
* Standard OPKG package system
|
||||
* Tiny SNMP daemon
|
||||
* Curl with SSL for upload/download files
|
||||
* Run arbitrary command from u-boot ENV (linux_cmd=)
|
||||
* Simple L2/L3 VPN with traffic shaping and compression (vtun)
|
||||
* Simply sender Telegram bot (estgb)
|
||||
* Low cost 3G/4G USB modems support in hilink mode
|
||||
* µVPN tunnel service
|
||||
* and more ...
|
||||
|
||||
|
||||
### Supported devices
|
||||
|
||||
We aim to develop **universal**, portable firmware supporting wide range of
|
||||
manufacturers and delivering updates and fixes which vendors oftentimes
|
||||
unable to deliver.
|
||||
|
||||
The list is constantly updated, please visit often and/or follow our Telegram
|
||||
groups for new release notifications.
|
||||
|
||||
More information about sensors: [https://cctvsp.ru][8] (translated from Russian
|
||||
with Google Translate).
|
||||
|
||||
|
||||
### Web interface
|
||||
|
||||
* <http://192.168.1.10/> - Standard system interface based on OpenWrt Luci
|
||||
|
||||
|
||||
### Majestic streamer
|
||||
|
||||
Majestic is a video streaming application, the heart of our firmware (in
|
||||
relation to camera/video surveillance functionality). It's configurable via
|
||||
file `/etc/majestic.yaml` and by default has many features/services enabled.
|
||||
Unneeded options can be turned off for better security and performance.
|
||||
|
||||
To run `majestic` in debug mode:
|
||||
|
||||
```bash
|
||||
killall -sigint majestic; export SENSOR=$(ipctool --sensor_id); majestic
|
||||
```
|
||||
|
||||
To run `majestic` in production mode restart the camera or run command:
|
||||
|
||||
```bash
|
||||
killall -sigint majestic; export SENSOR=$(ipctool --sensor_id); majestic 2>&1 | logger -p daemon.info -t majestic &
|
||||
```
|
||||
|
||||
|
||||
### Camera related URLs in firmware
|
||||
|
||||
Information on streamer URLs and their description can be found in the [Wiki][9].
|
||||
|
||||
|
||||
### Statistical data
|
||||
|
||||
Software might do product usage data collection including SoC and sensor model
|
||||
name to gather statistics used in QA process.
|
||||
|
||||
We guaranty that the data is fully anonymized, and does not contain anything
|
||||
that can arguably be considered data about an individual, that could be
|
||||
considered end-user data; or that could be sensitive or confidential to users.
|
||||
|
||||
|
||||
Getting firmware
|
||||
----------------
|
||||
|
||||
### Downloads (latest dev)
|
||||
|
||||
| Building status | SoC | U-Boot | Kernel | Rootfs |
|
||||
|----------------------------|-------------|-------------|---------------|---------------|
|
||||
| ![Hi3516Cv100 images][b1] | Hi3516CV100 | [uboot][u1] | [kernel][k1] | [rootfs][r1] |
|
||||
| ![Hi3516Cv200 images][b2] | Hi3516CV200 | [uboot][u2] | [kernel][k2] | [rootfs][r2] |
|
||||
| ![Hi3516Cv300 images][b3] | Hi3516CV300 | [uboot][u3] | [kernel][k3] | [rootfs][r3] |
|
||||
| ![Hi3516Ev100 images][b4] | Hi3516EV100 | [uboot][u4] | [kernel][k4] | [rootfs][r4] |
|
||||
| ![Hi3518Av100 images][b5] | Hi3518AV100 | [uboot][u5] | [kernel][k5] | [rootfs][r5] |
|
||||
| ![Hi3518Cv100 images][b6] | Hi3518CV100 | [uboot][u6] | [kernel][k6] | [rootfs][r6] |
|
||||
| ![Hi3518Ev100 images][b7] | Hi3518EV100 | [uboot][u7] | [kernel][k7] | [rootfs][r7] |
|
||||
| ![Hi3518Ev200 images][b8] | Hi3518EV200 | [uboot][u8] | [kernel][k8] | [rootfs][r8] |
|
||||
| ![Hi3518Ev201 images][b9] | Hi3518EV201 | [uboot][u9] | [kernel][k9] | [rootfs][r9] |
|
||||
| ![Hi3520Dv100 images][b10] | Hi3520DV100 | ! | [kernel][k10] | [rootfs][r10] |
|
||||
| ![Hi3520Dv200 images][b11] | Hi3520DV200 | ! | [kernel][k11] | [rootfs][r11] |
|
||||
|
||||
|
||||
### Releases
|
||||
|
||||
The **releases** of the OpenIPC firmware are hosted at <https://github.com/OpenIPC/chaos_calmer/releases>.
|
||||
|
||||
|
||||
### Source code
|
||||
|
||||
The **source code** of the OpenIPC firmware is hosted at <https://github.com/openipc/chaos_calmer>.
|
||||
|
||||
|
||||
Building from source
|
||||
--------------------
|
||||
|
||||
### Build on Linux machine
|
||||
|
||||
Usage example for Debian 8/9
|
||||
|
||||
```bash
|
||||
git clone --depth=1 https://github.com/OpenIPC/chaos_calmer.git OpenIPC
|
||||
cd OpenIPC
|
||||
./Project_OpenIPC.sh update
|
||||
./Project_OpenIPC.sh 16cv300_DEFAULT
|
||||
```
|
||||
|
||||
|
||||
### Use Docker for building
|
||||
|
||||
> **Default Dockerfile.openipc**
|
||||
|
||||
```docker
|
||||
FROM debian:stretch
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& apt-get --no-install-recommends -y install bc bison build-essential \
|
||||
ca-certificates cmake cpio curl dos2unix file flex gawk gcc-multilib \
|
||||
gettext gettext-base git intltool libc6-dev liblocale-gettext-perl \
|
||||
libncurses-dev libssl-dev locales mc openssl python rsync subversion \
|
||||
time tofrodos unzip upx wget zlib1g-dev \
|
||||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias \
|
||||
en_US.UTF-8 && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
WORKDIR /src/openipc
|
||||
|
||||
RUN git clone --depth=1 https://github.com/OpenIPC/chaos_calmer.git /src/openipc
|
||||
RUN ./Project_OpenIPC.sh update
|
||||
RUN ./Project_OpenIPC.sh 18ev200_DEFAULT # <= Change this ID to you profile
|
||||
```
|
||||
|
||||
> **Start building**
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
docker build -t openipc -f Dockerfile.openipc .
|
||||
```
|
||||
|
||||
|
||||
Preparing to install
|
||||
--------------------
|
||||
|
||||
### Get access to U-boot
|
||||
|
||||
Serial (UART) connection to your camera device is required.
|
||||
|
||||
* CamHi | Press **Ctrl+C** in U-boot start and access password - HI2105CHIP
|
||||
* Dahua | Press **Shift 8** in U-boot start
|
||||
* JVT | Press **Ctrl+Q** in U-boot start
|
||||
* XM | Press **Ctrl+C** in U-boot start
|
||||
* SigmaStar | Press **Ctrl+B** (UNIV) or **Enter** (Anjvision) in U-boot start
|
||||
|
||||
|
||||
### Backup original MAC
|
||||
|
||||
You should definitely write the original MAC of your device on the eth0 port.
|
||||
|
||||
This is **important** and will be necessary at the final stage of device configuration.
|
||||
|
||||
|
||||
### Backup original firmware
|
||||
|
||||
#### 8M Flash
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0
|
||||
mw.b 0x82000000 ff 1000000
|
||||
sf read 0x82000000 0x0 0x800000
|
||||
tftp 0x82000000 fullflash.img 0x800000
|
||||
```
|
||||
|
||||
#### 16M Flash
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0
|
||||
mw.b 0x82000000 ff 1000000
|
||||
sf read 0x82000000 0x0 0x1000000
|
||||
tftp 0x82000000 fullflash.img 0x1000000
|
||||
```
|
||||
|
||||
#### 32M Flash
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0
|
||||
mw.b 0x82000000 ff 2000000
|
||||
sf read 0x82000000 0x0 0x2000000
|
||||
tftp 0x82000000 fullflash.img 0x2000000
|
||||
```
|
||||
|
||||
|
||||
### Flash and memory layout
|
||||
|
||||
We have developed a universal partition system for camera flash chips,
|
||||
and it is now available as standard for all types of devices. (Note
|
||||
that it means it likely doesn't match vendor flash layout.)
|
||||
|
||||
#### OpenIPC flash layout
|
||||
|
||||
```txt
|
||||
0x000000000000-0x000000040000 : "boot"
|
||||
0x000000040000-0x000000050000 : "env"
|
||||
0x000000050000-0x000000250000 : "kernel"
|
||||
0x000000250000-0x000000750000 : "rootfs"
|
||||
0x000000750000-0x000001000000 : "rootfs_data"
|
||||
```
|
||||
|
||||
#### Kernel Memory Load Addresses
|
||||
|
||||
```txt
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_16cv100) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_16cv200) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_16cv300) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_16dv100) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_16ev100) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_16ev200) := 0x40008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_16ev300) := 0x40008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_18cv100) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_18ev100) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_18ev200) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_18ev201) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_18ev300) := 0x40008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_20dv100) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_hi35xx_20dv200) := 0x80008000
|
||||
```
|
||||
|
||||
|
||||
Flashing new firmware
|
||||
---------------------
|
||||
|
||||
**Attention!**
|
||||
|
||||
All examples indicate the download of firmware components via the TFTP server.
|
||||
If your device does not have an Ethernet port, replace all `tftp` commands with
|
||||
`fatload mmc 0:1`. For example:
|
||||
|
||||
```txt
|
||||
tftp 0x82000000 openwrt-hi35xx-XXXXX-u-boot.bin
|
||||
#
|
||||
fatload mmc 0:1 0x82000000 openwrt-hi35xx-XXXXX-u-boot.bin
|
||||
```
|
||||
|
||||
### Hi3516Cv100
|
||||
|
||||
**This type of board has additional Ethernet control systems via GPIO and
|
||||
registers. Consult with experts!**
|
||||
|
||||
**Experimental devices:**
|
||||
|
||||
* 00:12:16:FA:F3:52
|
||||
* 00:12:12:10:31:54 - BLK18C_0222_38x38_S_v1.03
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv100-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv100-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv100-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3516Cv200
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv200-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv200-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv200-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3516Cv300
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv300-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv300-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv300-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3516Ev100
|
||||
|
||||
**Experimental devices:**
|
||||
|
||||
* 00:12:13:02:d7:2c
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16ev100-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv300-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv300-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3518Cv100
|
||||
|
||||
**This type of board has additional Ethernet control systems via GPIO and
|
||||
registers. Consult with experts!**
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-18cv100-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv100-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-16cv100-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3518Ev100
|
||||
|
||||
**This type of board has additional Ethernet control systems via GPIO and
|
||||
registers. Consult with experts!**
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-18ev100-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-18ev100-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-18ev100-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3518Ev200
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-18ev200-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-18ev200-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-18ev200-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3520Dv100
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-20dv100-experimental-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-20dv100-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-20dv100-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Hi3520Dv200
|
||||
|
||||
```txt
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-20dv200-experimental-u-boot.bin
|
||||
sf erase 0x0 0x50000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-20dv200-default-uImage
|
||||
sf erase 0x50000 0x200000
|
||||
sf write 0x82000000 0x50000 ${filesize}
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 openwrt-hi35xx-20dv200-default-root.squashfs
|
||||
sf erase 0x250000 0x500000
|
||||
sf write 0x82000000 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
|
||||
Updating parts of the firmware
|
||||
------------------------------
|
||||
|
||||
If you already have OpenIPC firmware installed, you can update individual
|
||||
flash partitions from shell command line:
|
||||
|
||||
|
||||
### Update u-boot
|
||||
|
||||
```bash
|
||||
flashcp -v openwrt-hi35xx-XXXXX-u-boot.bin boot
|
||||
```
|
||||
|
||||
> **or**
|
||||
|
||||
```bash
|
||||
flashcp -v openwrt-hi35xx-XXXXX-u-boot.bin /dev/mtd0
|
||||
```
|
||||
|
||||
|
||||
### Update kernel
|
||||
|
||||
```bash
|
||||
flashcp -v openwrt-hi35xx-XXXXX-default-uImage kernel
|
||||
```
|
||||
|
||||
|
||||
### Update rootfs
|
||||
|
||||
```bash
|
||||
flashcp -v openwrt-hi35xx-XXXXX-default-root.squashfs rootfs
|
||||
```
|
||||
|
||||
|
||||
Configuring system after installation
|
||||
--------------------------------------
|
||||
|
||||
### Format overlayfs partition
|
||||
|
||||
**Must be executed on the first run!**
|
||||
|
||||
```txt
|
||||
flash_eraseall -j /dev/$(awk -F ':' '/rootfs_data/ {print $1}' /proc/mtd)
|
||||
reboot
|
||||
```
|
||||
|
||||
|
||||
### Installing the original MAC
|
||||
|
||||
> **U-boot ENV and Linux UCI**
|
||||
|
||||
```txt
|
||||
fw_setenv ethaddr 00:01:02:03:04:05
|
||||
uci set network.lan.macaddr=00:01:02:03:04:05
|
||||
uci commit
|
||||
```
|
||||
|
||||
|
||||
### Installing the correct sensor
|
||||
|
||||
> **Specify your correct sensor, control type, and data bus**
|
||||
|
||||
```txt
|
||||
fw_setenv sensor imx291_i2c_lvds
|
||||
```
|
||||
|
||||
|
||||
Resetting configuration
|
||||
-----------------------
|
||||
|
||||
If something went wrong, you can reset configuration to defaults.
|
||||
|
||||
|
||||
### Clean overlayfs (reset)
|
||||
|
||||
> **Restore to default Linux settings**
|
||||
|
||||
```txt
|
||||
firstboot
|
||||
reboot
|
||||
```
|
||||
|
||||
|
||||
### Clean u-boot env
|
||||
|
||||
> **Restore to default u-boot env**
|
||||
|
||||
```txt
|
||||
flash_eraseall -j /dev/$(awk -F ':' '/env/ {print $1}' /proc/mtd)
|
||||
reboot
|
||||
```
|
||||
|
||||
|
||||
### Recover backup firmware
|
||||
|
||||
If something goes horribly wrong, and you want your backed up firmware back
|
||||
|
||||
> **Restore backup up firmware via serial**
|
||||
|
||||
Install kermit using [this instruction](https://glasstty.com/?p=662) or similar.
|
||||
Here are the sample commands for 8MB Flash.
|
||||
|
||||
```
|
||||
kermit
|
||||
Linux Kermit> CONNECT
|
||||
Connecting to /dev/ttyUSB0, speed 115200
|
||||
Escape character: Ctrl-\ (ASCII 28, FS): enabled
|
||||
Type the escape character followed by C to get back,
|
||||
or followed by ? to see other options.
|
||||
----------------------------------------------------
|
||||
## Total Size = 0x002fb3f1 = 3126257 Bytes
|
||||
## Start Addr = 0x82000000
|
||||
OpenIPC # sf probe 0
|
||||
8192 KiB hi_sfc at 0:0 is now current device
|
||||
OpenIPC # mw.b 0x82000000 ff 1000000
|
||||
OpenIPC # loadb 0x82000000
|
||||
## Ready for binary (kermit) download to 0x82000000 at 115200 bps...
|
||||
|
||||
(Back at alex-B85M-D3H)
|
||||
----------------------------------------------------
|
||||
Linux Kermit> SEND /srv/tftp/fullflash.img
|
||||
Linux Kermit> CONNECT
|
||||
Connecting to /dev/ttyUSB0, speed 115200
|
||||
Escape character: Ctrl-\ (ASCII 28, FS): enabled
|
||||
Type the escape character followed by C to get back,
|
||||
or followed by ? to see other options.
|
||||
----------------------------------------------------
|
||||
## Total Size = 0x00800000 = 8388608 Bytes
|
||||
## Start Addr = 0x82000000
|
||||
OpenIPC # sf erase 0x0 0x00800000
|
||||
Erasing at 0x800000 -- 100% complete.
|
||||
OpenIPC # sf write 0x82000000 0x0 ${filesize}
|
||||
Writing at 0x800000 -- 100% complete.
|
||||
OpenIPC #
|
||||
```
|
||||
> **Restore backup up firmware via TFTP**
|
||||
|
||||
Here are the commands for 8MB Flash.
|
||||
|
||||
```shell
|
||||
setenv ipaddr 192.168.1.10
|
||||
setenv serverip 192.168.1.254
|
||||
sf probe 0; sf lock 0
|
||||
|
||||
mw.b 0x82000000 ff 1000000
|
||||
tftp 0x82000000 fullflash.img
|
||||
sf erase 0x0 0x00800000
|
||||
sf write 0x82000000 0x0 ${filesize}
|
||||
```
|
||||
|
||||
|
||||
## Reference Book
|
||||
|
||||
To be written...
|
||||
|
||||
[1]: https://aliexpress.com/item/32493067946.html
|
||||
[2]: https://aliexpress.com/item/32851596596.html
|
||||
[3]: https://aliexpress.com/item/1005002315913099.html
|
||||
[4]: https://aliexpress.com/item/1005002298832047.html
|
||||
[5]: https://aliexpress.com/item/4000119561119.html
|
||||
[6]: https://aliexpress.com/item/4000054902736.html
|
||||
[7]: https://aliexpress.com/item/1005001933429701.html
|
||||
[8]: https://translate.google.com/translate?sl=ru&tl=en&u=https://www.cctvsp.ru/articles/obzor-i-sravnenie-matrits-dlya-kamer-videonablyudeniya
|
||||
[9]: majestic-streamer.md
|
||||
|
||||
[b1]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv100_images.yml/badge.svg?branch=master
|
||||
[b2]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv200_images.yml/badge.svg?branch=master
|
||||
[b3]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv300_images.yml/badge.svg?branch=master
|
||||
[b4]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv300_images.yml/badge.svg?branch=master
|
||||
[b5]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv100_images.yml/badge.svg?branch=master
|
||||
[b6]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv100_images.yml/badge.svg?branch=master
|
||||
[b7]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv100_images.yml/badge.svg?branch=master
|
||||
[b8]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv200_images.yml/badge.svg?branch=master
|
||||
[b9]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3516cv200_images.yml/badge.svg?branch=master
|
||||
[b10]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3520dv200_images.yml/badge.svg?branch=master
|
||||
[b11]: https://github.com/openipc/chaos_calmer/actions/workflows/hi3520dv200_images.yml/badge.svg?branch=master
|
||||
|
||||
[u1]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv100-u-boot.bin
|
||||
[u2]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv200-u-boot.bin
|
||||
[u3]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv300-u-boot.bin
|
||||
[u4]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16ev100-u-boot.bin
|
||||
[u5]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18av100-u-boot.bin
|
||||
[u6]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18cv100-u-boot.bin
|
||||
[u7]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev100-u-boot.bin
|
||||
[u8]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev200-u-boot.bin
|
||||
[u9]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev201-u-boot.bin
|
||||
|
||||
[k1]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv100-default-uImage
|
||||
[k2]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv200-default-uImage
|
||||
[k3]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv300-default-uImage
|
||||
[k4]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16ev100-default-uImage
|
||||
[k5]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18av100-default-uImage
|
||||
[k6]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18cv100-default-uImage
|
||||
[k7]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev100-default-uImage
|
||||
[k8]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev200-default-uImage
|
||||
[k9]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev201-default-uImage
|
||||
[k10]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-20dv100-default-uImage
|
||||
[k11]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-20dv200-default-uImage
|
||||
|
||||
[r1]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv100-default-root.squashfs
|
||||
[r2]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv200-default-root.squashfs
|
||||
[r3]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16cv300-default-root.squashfs
|
||||
[r4]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-16ev100-default-root.squashfs
|
||||
[r5]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18av100-default-root.squashfs
|
||||
[r6]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18cv100-default-root.squashfs
|
||||
[r7]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev100-default-root.squashfs
|
||||
[r8]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev200-default-root.squashfs
|
||||
[r9]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-18ev201-default-root.squashfs
|
||||
[r10]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-20dv100-default-root.squashfs
|
||||
[r11]: https://github.com/OpenIPC/chaos_calmer/releases/download/latest/openwrt-hi35xx-20dv200-default-root.squashfs
|
|
@ -0,0 +1,168 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Access to SSH, telnet, FTP and other services
|
||||
---------------------------------------------
|
||||
|
||||
Very often stock firmware provides access to its operating system but the
|
||||
access is closed with an undisclosed password. We can recover a cryptographic
|
||||
hash of that password while extracting a copy of the firmware image.
|
||||
|
||||
### Password hash
|
||||
|
||||
```console
|
||||
$1$bh2njiGH$4duacOMcXDh6myANzbZTf.
|
||||
```
|
||||
|
||||
The hashed salt password string consists of three parts: hashing algorithm
|
||||
identifier, salt and password hash, each of which is preceded by a dollar sign.
|
||||
The first part, `$1`, is the hashing algorithm encoded with one (rarely two)
|
||||
characters. It denotes the cryptographic method used to generate the hash:
|
||||
|
||||
- `$1` - MD5 algorithm.
|
||||
- `$2` - Blowfish algorithm.
|
||||
- `$2a` - eksblowfish algorithm
|
||||
- `$5` - SHA-256 algorithm
|
||||
- `$6` - SHA-512 algorithm
|
||||
|
||||
The second part, `$bh2njiGH`, is a salt - a character string added to the
|
||||
plaintext password before hashing it in order to randomize the resulting hashes
|
||||
for the same password and prevent [rainbow table][1] attacks.
|
||||
|
||||
The last part, `$4duacOMcXDh6myANzbZTf.`, is the hash. When you enter a
|
||||
password, it is concatinated with the provided salt then hashed using the
|
||||
provided hashing algorithm and the result is compared to the hash.
|
||||
Same password, salt and hashing method will always produce the same result.
|
||||
|
||||
Hashing algorithms are one-way encryption methods meaning the hash cannot be
|
||||
decrypted back to a plaintext password, but it is possible to perform hashing
|
||||
of available variants of plaintext passwords until the match is found.
|
||||
This method is called the [brute-force attack][2].
|
||||
|
||||
IP cameras tend to utilize a relatively simple and fast MD5 hashing algorithm
|
||||
so using a password-breaking software and powerful computing resources the
|
||||
original plaintext password can be picked in a matter of weeks or days, if not
|
||||
hours, especially using high-quality dictionaries.
|
||||
|
||||
In the example above we used password "openipc". You can check the validity of
|
||||
the password using either `mkpasswd` or `openssl`:
|
||||
|
||||
```bash
|
||||
$ mkpasswd -m md5crypt -S bh2njiGH openipc
|
||||
$1$bh2njiGH$4duacOMcXDh6myANzbZTf.
|
||||
$ openssl passwd -1 -salt bh2njiGH openipc
|
||||
$1$bh2njiGH$4duacOMcXDh6myANzbZTf.
|
||||
```
|
||||
|
||||
When the password is found, it is wise to share it publicly, so that other
|
||||
researchers in the field could dedicate their cryptographic resources to
|
||||
discover even more yet unknown passwords. Sharing is caring, boys!
|
||||
|
||||
### Some passwords that we found in different firmware
|
||||
|
||||
```
|
||||
| Hash | Plain text |
|
||||
|---------------------------------------|------------|
|
||||
| $1$MoCJ1nRA$NfsI1wlYcWoF5MbU4t3Og0 | ivdev |
|
||||
| $1$ZebZnWdY$QZ1Aa.7hwBshCS5k40MUE1 | xc12345 |
|
||||
| $1$d3VPdE0x$Ztn09cyReJy5Pyn | runtop10 |
|
||||
| $1$qFa2kfke$vJob19l64Q6n8FvP8/kvJ0 | wabjtam |
|
||||
| $1$rHWQwR5V$i4FVDvwhuzau8msvAfHEt. | 2601hx |
|
||||
| $1$tiaLlxGM$byeTUfQgqyET5asfwwNjg0 | hichiphx |
|
||||
| $1$0Me7S3z5$.uQ4Pr/QjJQ/0JUZI0w4m. | |
|
||||
| $1$4dAkkeWK$HCy0K1z8E.wAuwgLV8bWd/ | |
|
||||
| $1$7bfnUEjV$3ogadpYTDXtJPV4ubVaGq1 | |
|
||||
| $1$7BqzlCqK$nQXIfc53c1ACEwzNg7G3D. | |
|
||||
| $1$cNGGWwI/$5/mZTMlcVfJlpE5DGrdsl/ | |
|
||||
| $1$FMNq4QIj$lJg6WzZxy1HWl3sL.YwIq1 | |
|
||||
| $1$IZfqary9$IrG6loat5pDTBLr6ksKTD0 | |
|
||||
| $1$ocmTTAhE$v.q2/jwr4BS.20KYshYQZ1 | |
|
||||
| $1$OIKWDzOV$WjZNcNtHSKVscbi9WQcpu/ | |
|
||||
| $1$rnjbbPTD$tR9oAIWgUp/jRrhjDuUwp0 | |
|
||||
| $1$RYIwEiRA$d5iRRVQ5ZeRTrJwGjRy.B0 | xmhdipc |
|
||||
| $1$uF5XC.Im$8k0Gkw4wYaZkNzuOuySIx/ | |
|
||||
| $1$vN9F.lHa$E09mbCRo70834AUfkytpX | |
|
||||
| $1$wbAnPk8f$yz0PI9vnyLRmWbENUnce3/ | |
|
||||
| $1$ybdHbPDn$ii9aEIFNiolBbM9QxW9mr0 | |
|
||||
| $1$yq01TaSp$lkN/azu3IxE97owy27pve. | |
|
||||
| $1$yFuJ6yns$33Bk0I91Ji0QMujkR/DPi1 | |
|
||||
| $1$yi$FS7W5j1RJmbRHDe0El/zX/ | |
|
||||
| $1$yi$MiivC6pLdwS0zp0pa0cUq1 | qw1234qw |
|
||||
| $Dg.cUjtWGTIVkuFS0ZYbN1 | fx1805 |
|
||||
| $enWsv2cbxPCrd0WeXUXtX0 | nobody |
|
||||
| $qZV4X6DTqMHUDIyZG.8PH. | |
|
||||
| $z2VkRbfNoE/xHLBj8i2cv. | ftp |
|
||||
| 7wtxBdUGBnuoY | runtop10 |
|
||||
| 9B60FC59706134759DBCAEA58CAF9068 | Fireitup |
|
||||
| LHjQopX4yjf1Q | ls123 |
|
||||
| ab8nBoH3mb8.g | helpme |
|
||||
| absxcfbgXtb3o | xc3511 |
|
||||
| xt5USRjG7rEDE | j1/_7sxw |
|
||||
| $1$EmcmB/9a$UrsXTlmYL/6eZ9A2ST2Yl/ | |
|
||||
| $1$soidjfoi$9klIbmCLq2JjYwKfEA5rH1 | |
|
||||
```
|
||||
|
||||
### Hijacking the default password
|
||||
> _tested on Goke_
|
||||
|
||||
Over the UART interface, it is possible to temporarily interrupt the normal
|
||||
booting sequence and drop into a limited Linux shell at early stage of
|
||||
system startup.
|
||||
```
|
||||
setenv bootargs ${bootargs} single init=/bin/sh
|
||||
boot
|
||||
```
|
||||
This shell won't load the full working system, so you have to amend it manually.
|
||||
First, mount `/rom` filesystem:
|
||||
```
|
||||
mount -t jffs2 /dev/mtdblock3 /rom
|
||||
```
|
||||
Mount the rest of mounting points from `/etc/fstab`:
|
||||
```
|
||||
mount -a
|
||||
```
|
||||
Also mount the SD card to copy files to and from:
|
||||
```
|
||||
mount /dev/mmcblk0p1 on /mnt/s0
|
||||
```
|
||||
On `/rom` filesystem, you can edit the `/room/etc/passwd` file but once the
|
||||
device restarts it will be reset to default. This happens because there is a
|
||||
guide bin file recreating `passwd` file on each start, so we need to modify
|
||||
that executable.
|
||||
|
||||
Copy `system.dat` to an SD card:
|
||||
```
|
||||
cp /rom/system.dat /mnt/s0
|
||||
```
|
||||
On a linux computer, unpack `system.dat` file using `unsquashfs`:
|
||||
```
|
||||
mkdir squashfs-temp
|
||||
cd squashfs-temp
|
||||
unsquashfs system.dat
|
||||
```
|
||||
Find guide file and edit its content in a hex-editor to modify the name of the
|
||||
file where password is written on every restart. Search for `/etc/passwd` and
|
||||
change a letter in its name to something different, like `/etc/passwT`.
|
||||
|
||||
Pack the squash file system using `mksquashfs`:
|
||||
|
||||
```bash
|
||||
mksquashfs ./squashfs-root ./file -comp xz -no-xattrs -noappend -no-exports -all-root -quiet -b 131072
|
||||
```
|
||||
and copy it from the SD card back to `/rom` directory on the camera.
|
||||
|
||||
Now you can replace the password in `/rom/etc/passwd` with your own password, and when
|
||||
you restart the device, you will have full working system with your own password.
|
||||
|
||||
|
||||
### Software
|
||||
|
||||
- [Hashcat](https://hashcat.net/)
|
||||
- [John The Ripper](https://www.openwall.com/john/)
|
||||
- [Hydra](https://github.com/vanhauser-thc/thc-hydra)
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/Rainbow_table
|
||||
[2]: https://en.wikipedia.org/wiki/Brute-force_attack
|
||||
|
||||
|
||||
---------------------------------------------------
|
|
@ -0,0 +1,60 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
How to send files over UART
|
||||
---------------------------
|
||||
|
||||
If SD card reader failt and there is no network configured on your cam, you may need to send a new firmware over UART interface to update the camera.
|
||||
|
||||
## Sender:
|
||||
|
||||
1- First we encode the files
|
||||
|
||||
```bash
|
||||
base64 uImage > uImage.b
|
||||
```
|
||||
|
||||
2- Now make sure your com send-file command is, ascii-xfr, this was my connection command line
|
||||
|
||||
```bash
|
||||
picocom -f n -p n -d 8 -b 115200 --send-cmd "ascii-xfr -snv" /dev/ttyUSB0
|
||||
|
||||
```
|
||||
|
||||
Normally we want ascii-xfr on the receiving side, but since we don't have it, that -n works around this by maintaining correct line endings.
|
||||
|
||||
|
||||
|
||||
## Receiver:
|
||||
|
||||
3- Now that we've connected, go to the directory where you want the received file.
|
||||
```bash
|
||||
cd /tmp/
|
||||
```
|
||||
|
||||
4- Start receiving the file by uart
|
||||
```bash
|
||||
cat > uImage.b
|
||||
```
|
||||
5- On picocom, I just CTRL+a+s, and enter the full path of the file I'm sending. Once the transfer completes, you'll need to CTRL+c to break that cat.
|
||||
|
||||
6- Now we decode the file,
|
||||
```bash
|
||||
base64 -d uImage.b > uImage
|
||||
```
|
||||
|
||||
7- Do whatever you can to verify that file is IDENTICAL to the one you sent, because an ASCII transfer has no checksum protection.
|
||||
Openipc had sha512sum, but any checksum command would suffice.
|
||||
|
||||
|
||||
```bash
|
||||
sha256sum uImage
|
||||
```
|
||||
Once you manually confirm the sums match, you can assume the transfer was successful!
|
||||
|
||||
Repeat for rootfs steps 4,5 & 6, and now you will be able to upgrade with sysupgrade
|
||||
|
||||
```bash
|
||||
sysupgrade --kernel=/tmp/uImage --rootfs=/tmp/rootfs.squashfs --force_ver -z
|
||||
```
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Serial UART pin description
|
||||
|
||||
## Quick test
|
||||
|
||||
Config serial port -> 8N1 Baud rate 115200
|
||||
|
||||
This is a quick test. Ground to ground, tx from the adapter is not connected, rx probes pads and you check output in the terminal app.
|
||||
|
||||

|
||||
|
||||
|
||||
## Cameras UART pins
|
||||
|
||||
### T31 -- Rebranding of wyze cam pan v3
|
||||
|
||||

|
||||
|
||||

|
|
@ -0,0 +1,82 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Roadmap
|
||||
-------
|
||||
|
||||
### Quick access to Git logs for popular repositories:
|
||||
|
||||
- [firmware](https://github.com/OpenIPC/firmware/commits/master), [builder](https://github.com/OpenIPC/builder/commits/master), [coupler](https://github.com/OpenIPC/coupler/commits/main)
|
||||
- [ipctool](https://github.com/OpenIPC/ipctool/commits/master), [webui](https://github.com/OpenIPC/webui/commits/master), [webui-next](https://github.com/OpenIPC/webui-next/commits/master), [wiki](https://github.com/OpenIPC/wiki/commits/master)
|
||||
|
||||
### Planned changes:
|
||||
|
||||
- Add webui-next as default interface.
|
||||
- Better integration with Majestic and webui-next.
|
||||
- Continued refactoring of firmware scripts and packages.
|
||||
- Extend builder support.
|
||||
- Extend docs support.
|
||||
- Extend majestic-plugins support.
|
||||
- Update buildroot to upcoming 2024 version.
|
||||
- Update wiki build commands.
|
||||
- Update wiki majestic commands.
|
||||
|
||||
### 19.02.2024:
|
||||
- [hisilicon/goke] Fix muxing unneeded GPIOs which were burning IRCUTs on XM boards
|
||||
|
||||
### 12.02.2024:
|
||||
- Added an enhancement that allows Majestic to run cgi scripts detached from the sdk.
|
||||
- Fixed an issue that prevented rebinding the rtsp port.
|
||||
- Fixed a problem with the Majestic webserver home directory.
|
||||
- Fixed an exception on the codec selection.
|
||||
- Improved stability if majestic.yaml is not available.
|
||||
- Reduced time frame for Majestic shutdown on Ingenic devices.
|
||||
|
||||
### 05.02.2024:
|
||||
- Added mjpeg preview to webui-next.
|
||||
- Added mjpeg support for Ingenic.
|
||||
- Added port 85 redirect to Majestic webserver.
|
||||
- Adjusted several Majestic configuration settings for webui-next.
|
||||
- Fixed night mode controls on webui-next.
|
||||
- Fixed a problem with inverting single ircut.
|
||||
- Set Majestic as only webserver for webui-next.
|
||||
- Set majestic-webui as default for Sigmastar devices.
|
||||
- Note: majestic-webui extensions are not available for now.
|
||||
|
||||
### 29.01.2024:
|
||||
- Added ipctool support for various new Sony sensors.
|
||||
- Added additional commands when majestic-plugins are started and stopped.
|
||||
- Added various new alias commands (show_help)
|
||||
- Added experimental Majestic IP6 support.
|
||||
- Added a check to prevent repeated execution to night mode settings.
|
||||
- Replaced building.sh with makefile.
|
||||
- Refactored several firmware scripts and package makefiles.
|
||||
|
||||
### 22.01.2024:
|
||||
- Added T40/T41 chipset detection.
|
||||
- Added audio support for Sigmastar fpv.
|
||||
- Added optional night color mode.
|
||||
- Fixed several Majestic stability issues.
|
||||
- Fixed a problem with Ingenic motion detect on sighup/reload.
|
||||
- Increased stability of Majestic webserver.
|
||||
- Included gkrcparams into majestic configuration.
|
||||
- Updated libevent library and toolchains.
|
||||
- Updated Ingenic vendor libraries.
|
||||
|
||||
### 15.01.2024:
|
||||
- Added separated control toggle for ircut and light.
|
||||
- Added sensor based day/night detection.
|
||||
- Added authentication to various endpoints.
|
||||
- Added initial support for Ingenic register info scan.
|
||||
- Fixed an issue with Majestic not correctly reopening udp sockets.
|
||||
- Fixed an issue with the Ingenic T10/T20 rtsp stream.
|
||||
- Fixed a problem with setting the correct hisilicon encoder bitrate.
|
||||
|
||||
### 08.01.2024:
|
||||
- Added Majestic sighup support for Ingenic devices.
|
||||
- Added h265 support for rtmp.
|
||||
- Added rtmp reconnect option.
|
||||
- Added support for Sigmastar register info scan.
|
||||
- Fixed several rtmp authentication problems.
|
||||
- Fixed a problem with rotation on a few Sigmastar sensor drivers.
|
||||
- Removed Ingenic software based day/night detection.
|
|
@ -0,0 +1,16 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
SigmaStar SoC research and debugging notes
|
||||
------------------------------------------
|
||||
|
||||
#### Control PWM channels on SigmaStar SSC338Q
|
||||
|
||||
Switch GPIO1 to PWM1 mode and set parameters
|
||||
```
|
||||
devmem 0x1F207994 16 0x1121
|
||||
echo 1 > /sys/class/pwm/pwmchip0/export
|
||||
echo 10000 > /sys/class/pwm/pwmchip0/pwm1/period
|
||||
echo 25 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
|
||||
echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable
|
||||
```
|
|
@ -0,0 +1,61 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Sigmastar unbrick
|
||||
---
|
||||
|
||||
**Locate the Sigmastar UART output and connect it to the CH341A I2C:**
|
||||
- $\color{dimgray}{\texttt{GND -> GND (PIN 1-4)}}$
|
||||
- $\color{deepskyblue}{\texttt{TX -> SDA I2C (PIN 5)}}$
|
||||
- $\color{orange}{\texttt{RX -> SCL I2C (PIN 6)}}$
|
||||
|
||||
<img src="../images/sigmastar-ch341a.webp">
|
||||
<img src="../images/sigmastar-uart.webp">
|
||||
<img src="../images/sigmastar-example.webp">
|
||||
|
||||
---
|
||||
|
||||
**Download snander-mstar:**
|
||||
- https://github.com/openipc/snander-mstar/releases
|
||||
|
||||
<details>
|
||||
<summary>Install Windows driver</summary>
|
||||
<img src="../images/sigmastar-driver.webp">
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
**Check the device flash with snander:**
|
||||
- The device must be powered when connected to the programmer.
|
||||
- Power cycling might help if the device can not be detected.
|
||||
```
|
||||
snander -i -q
|
||||
```
|
||||
|
||||
<img src="../images/sigmastar-check.webp">
|
||||
|
||||
**Erase the boot partition:**
|
||||
```
|
||||
snander -l 0x200000 -e
|
||||
```
|
||||
|
||||
<img src="../images/sigmastar-erase.webp">
|
||||
|
||||
**Write the new uboot file:**
|
||||
- https://github.com/openipc/firmware/releases/tag/latest
|
||||
- drop the file into the same folder as the program
|
||||
```
|
||||
snander -w u-boot-ssc338q-nand.bin
|
||||
```
|
||||
|
||||
<img src="../images/sigmastar-write.webp">
|
||||
|
||||
---
|
||||
|
||||
**I2C devices:**
|
||||
- 0x49 -> MStar ISP
|
||||
- 0x59 -> MStar Debug
|
||||
|
||||
---
|
||||
|
||||
- [Alternative Raspberry method by MarioFPV](https://youtu.be/88C8UvyKQlQ)
|
|
@ -0,0 +1,26 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Video Recording Software
|
||||
------------------------
|
||||
|
||||
- [Agent DVR](https://www.ispyconnect.com/) (former iSpy)
|
||||
- [AVreg](http://avreg.net/)
|
||||
- [Blue Iris](https://blueirissoftware.com/)
|
||||
- [Camera.ui](https://github.com/seydx/camera.ui)
|
||||
- [ContaCam](https://www.contaware.com/contacam.html)
|
||||
- [Frigate](https://frigate.video/)
|
||||
- [GO2RTC](https://github.com/AlexxIT/go2rtc)
|
||||
- [Insentry](https://insentry.io/)
|
||||
- [Motion](https://motion-project.github.io/)
|
||||
- [MotionEyeOS](https://github.com/motioneye-project/motioneyeos)
|
||||
- [Nimble](https://softvelum.com/nimble/)
|
||||
- [Shinobi](https://shinobi.video/)
|
||||
- [Sighthound](https://www.sighthound.com/)
|
||||
- [Skryped NVR](https://www.scrypted.app/)
|
||||
- [SRS](https://github.com/ossrs/srs)
|
||||
- [TinyCam Monitor](https://tinycammonitor.com/)
|
||||
- [Viseron](https://viseron.netlify.app/)
|
||||
- [Xeoma](https://felenasoft.com/xeoma/en/)
|
||||
- [Yucca](https://yucca.app)
|
||||
- [ZoneMinder](https://zoneminder.com/)
|
|
@ -0,0 +1,276 @@
|
|||
# OpenIPC Firmware Development Guide
|
||||
|
||||
## Table of Contents
|
||||
- Introduction
|
||||
- Building from Sources
|
||||
- Installing the Firmware
|
||||
- Anatomy of the Project
|
||||
- Modifying and Adding Packages
|
||||
- Building a Custom Version of the Firmware
|
||||
- Statistical Data
|
||||
|
||||
## Introduction
|
||||
|
||||
This document serves as a comprehensive guide for developers looking to contribute to the OpenIPC firmware, including how to build from sources, understand the project's structure, modify, and add new packages, as well as instructions for installing the firmware on devices.
|
||||
|
||||
We are currently developing a high-quality source code repository. Your patience is appreciated as we strive to deliver a fully polished and ready-to-use project.
|
||||
|
||||
## Building from Sources
|
||||
|
||||
Before you start building your own firmware, it's essential to make a few changes to your system and understand the general process.
|
||||
|
||||
### Clone OpenIPC Firmware Git Repository
|
||||
|
||||
```cd
|
||||
mkdir -p local/src
|
||||
cd local/src
|
||||
git clone https://github.com/OpenIPC/firmware.git openipc-firmware
|
||||
cd openipc-firmware
|
||||
```
|
||||
|
||||
### Install Required Packages
|
||||
|
||||
```bash
|
||||
sudo make deps
|
||||
```
|
||||
|
||||
For Debian/Ubuntu, an example of installing the necessary packages and downloading our repository:
|
||||
|
||||
```sudo apt-get update -y
|
||||
sudo apt-get install -y automake autotools-dev bc build-essential curl fzf git libtool rsync unzip
|
||||
git clone --depth=1 https://github.com/OpenIPC/firmware.git
|
||||
cd firmware
|
||||
```
|
||||
|
||||
Alternatively, you can use the following command in the root of your OpenIPC firmware directory to install dependencies:
|
||||
|
||||
```bash
|
||||
sudo make deps
|
||||
```
|
||||
|
||||
### Quick Build from Sources
|
||||
|
||||
To build the desired version of the firmware for your processor, run the following command in the root of the project. The files will be available in the directory "output/images".
|
||||
|
||||
```bash
|
||||
./building.sh hi3518ev300_ultimate
|
||||
```
|
||||
|
||||
Examples of rebuilding the Linux kernel, root filesystems, and individual packages in our project:
|
||||
|
||||
```BOARD=hi3518ev300_ultimate make br-linux-{dirclean,rebuild}
|
||||
BOARD=hi3518ev300_ultimate make br-rootfs-{squashfs,tar}
|
||||
BOARD=hi3518ev300_ultimate make br-vtund-openipc-{dirclean,rebuild}
|
||||
```
|
||||
|
||||
### Create a Permanent Storage for Downloaded Bundles
|
||||
|
||||
By default, Buildroot stores all downloaded files in `dl/` directory inside
|
||||
buildroot file tree.
|
||||
|
||||
OpenIPC building script creates a fresh buildroot file tree before every
|
||||
compilation, meaning either deletes all downloaded packages or copies them back
|
||||
and forth prior and after creating a fresh setup.
|
||||
|
||||
You can set your own storage directory outside of the buildroot tree. Add the
|
||||
following piece of code to `.profile` file in your home directory:
|
||||
|
||||
```bash
|
||||
BR2_DL_DIR="${HOME}/buildroot_dl"
|
||||
[ ! -d "$BR2_DL_DIR" ] && mkdir -p $BR2_DL_DIR
|
||||
export BR2_DL_DIR
|
||||
```
|
||||
|
||||
Then, source the changes.
|
||||
|
||||
```bash
|
||||
source ~/.profile
|
||||
```
|
||||
|
||||
### Build the firmware.
|
||||
|
||||
Building of a binary firmware for your IP camera is fairly easy. Just clone
|
||||
source code from the repository and run:
|
||||
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
You will be greeted with a list of available targets.
|
||||
|
||||

|
||||
|
||||
Each target's name consists of a name of vendor, SoC model (System-on-Chip,
|
||||
the heart of an IP camera, central processor with extra features) and flavor
|
||||
denoting releases for different purposes - **Lite**, a compact release for
|
||||
cameras with only 8MB of ROM; **Ultimate**, an extended release for cameras
|
||||
with 16MB+ ROM, **FPV**, a release crafted specifically for use in drones,
|
||||
or **Mini**, a fully liberated version of the firmware with an alternative
|
||||
open-source streamer.
|
||||
|
||||
Select desired target and hit enter. Building ensues.
|
||||
|
||||
Process of building firmware binary takes from 15-20 minutes to several hours
|
||||
depending on your computer performance and selected target. If you want to
|
||||
speed up the process, make sure you use a computer with SSD rather than HDD as
|
||||
the process of compiling involves a lot of reading and writing. Faster CPU is
|
||||
also beneficial, and one cannot have too much RAM, either. You could even rent
|
||||
an online virtual server for a handful of cents to compile your firmware with
|
||||
the power of cloud computing.
|
||||
|
||||
The very first run is the longest as the script will download every source
|
||||
bundle required for successful compilation. Consequent runs will take a little
|
||||
less time.
|
||||
|
||||
After the compilation is done, you'll find the final binary kernel and `rootfs`
|
||||
image in `output/images/` directory.
|
||||
|
||||
```
|
||||
paul@r610:~/src/openipc-firmware$ ls -l output/images/
|
||||
total 35628
|
||||
-rw-r--r-- 1 paul paul 4816896 Nov 22 06:06 rootfs.squashfs.t10
|
||||
-rw-r--r-- 1 paul paul 14520320 Nov 22 06:06 rootfs.t10.cpio
|
||||
-rw-r--r-- 1 paul paul 15544320 Nov 22 06:06 rootfs.t10.tar
|
||||
-rw-r--r-- 1 paul paul 1597586 Nov 22 06:02 uImage.t10
|
||||
```
|
||||
|
||||
## Installing the Firmware
|
||||
|
||||
After you build your custom firmware, you need to install it on the camera.
|
||||
You can do it in two ways:
|
||||
1. Use Advanced Install instructions as you did first time you flashed the camera: copy the build files to your TFTP server and then do the flashing procedure as explained in specific Advanced Instructions for your camera;
|
||||
2. Manual install: boot up your camera, connect it to your local network and then using scp copy the two files (rootfs and uImage) to your camera /tmp folder (/tmp folder is a temporary storage, as big as your camera free RAM).
|
||||
Then, run this commands:
|
||||
|
||||
```
|
||||
sysupgrade --kernel=/tmp/uImage.... --rootfs=/tmp/rootfs.... -z
|
||||
```
|
||||
Replace uImage... and rootfs... with your actual filenames resulted from the build process.
|
||||
You can add -n key if you need to clean overlay after update (reset all settings to default).
|
||||
After the instalation is complete, the camera will reboot automatically.
|
||||
Connect again to the camera and run this command (same as -n in the previous command):
|
||||
|
||||
```
|
||||
firstboot
|
||||
```
|
||||
|
||||
Remember! The user and password will be reset to default in most cases (the default is usually root/12345)
|
||||
|
||||
## Anatomy of the Project
|
||||
|
||||
OpenIPC firmware v2 utilizes [Buildroot][1] to build its firmware binaries. So
|
||||
you should make yourself familiar with the [Buildroot documentation][2] if you
|
||||
want not only to compile provided source code but make your own modifications
|
||||
to the firmware.
|
||||
|
||||
You can add drivers or software not included in the our official releases, you
|
||||
can remove unneeded drivers or software that you're not going to use, to free
|
||||
up some space in the firmware. You can change default settings to better suit
|
||||
your needs. The beauty of open source is that anyone can improve it, anytime.
|
||||
Just don't forget to contribute your changes back to the upstream repo so that
|
||||
everyone can benefit from it.
|
||||
|
||||
Please note that OpenIPC uses a slightly outdated version of Buildroot. As of
|
||||
today, it is Buildroot [2021.02.12][3], so you might need to check out the
|
||||
documentation for that particular version, as later versions may have
|
||||
incompatible changes.
|
||||
|
||||
OpenIPC firmware sources are organized in directories by IP camera SoC vendors
|
||||
as Buildroot external trees, namely `br-ext-chip-<vendor name>`. Each of such
|
||||
directories has a number of subdirectories: `board/`, `configs/`, `linux/` and
|
||||
`packages/`, and a few config files, all related to different boards bearing
|
||||
chips from that particular vendor.
|
||||
|
||||
`board/` directory includes subdirectories named by groups of processors called
|
||||
families. Inside each of such a family directory reside kernel configuration
|
||||
files for individual processors in that family, common patches and other
|
||||
family-specific files.
|
||||
|
||||
`configs/` directory includes default configuration files (defconfig) for
|
||||
various boards with processors from the given vendor. These config files also
|
||||
can differ by hardware settings, set of included packages, different default
|
||||
settings, branding, and so on. Each of these defconfig files is a separate
|
||||
package resulting in a separate firmware binary.
|
||||
|
||||
`linux/` directory includes configuration files for patching kernel to make it
|
||||
work with vendor-provided binary blobs, if any.
|
||||
|
||||
`package/` directory has symlinks to packages used for building the resulting
|
||||
firmware.
|
||||
|
||||
`Config.in` is a configuration file consolidating configuration files from all
|
||||
provided packages.
|
||||
|
||||
`external.mk` is a makefile referring to makefiles from all provided packages.
|
||||
|
||||
`external.desc` is a file with the description of the external tree.
|
||||
|
||||
|
||||
### Making Changes and Adding Packages
|
||||
|
||||
You can modify existing packages or add new ones to meet your project's needs. This section provides guidelines on how to make these changes effectively.
|
||||
|
||||
Once you start tinkering with the packages you'll realize you need a way to
|
||||
rebuild only one particular package, without rebuilding the whole project.
|
||||
Is it even possible? Fortunately, yes. All you have to do after making changes
|
||||
to the package configs is to run a couple of commands:
|
||||
```
|
||||
make br-<package>-dirclean
|
||||
make br-<package>-rebuild
|
||||
```
|
||||
where _\<package>_ is the name of the package you want to recompile. Although,
|
||||
as Buildroot manual states,
|
||||
|
||||
> While `br-<package>-rebuild` implies `br-<package>-reinstall` and `br-<package>-reconfigure`
|
||||
implies `br-<package>-rebuild`, these targets as well as `<package>` only act on
|
||||
the said package, and do not trigger re-creating the root filesystem image.
|
||||
If re-creating the root filesystem in necessary, one should in addition run
|
||||
`make br-all`.
|
||||
|
||||
Run `make br-linux-rebuild br-all` to rebuild Linux kernel image,
|
||||
`make br-busybox-rebuild br-all` to rebuild busybox and pack it into a rootfs image.
|
||||
|
||||
Remember! the name of the package in the two commands above is the folder name of your package, not the package name you set in Config.in file
|
||||
|
||||
f you want to add new packages to a particular project, these are the changes you need to do (let's take for example goke board, fpv type firmware; the steps can be applied to any project or all projects):
|
||||
* Add your new package in [root]/general/package/ folder (where [root] is your local folder where you cloned the firmware repo);
|
||||
* Add your new package Config.in file to the list of sources packages in this file: [root]/general/package/Config.in
|
||||
* Modifiy your target project configuration (i.e. goke board, fpv firmware) to include and build your new package, add your package to this file: [root]/br-ext-chip-qoke/configs/gk7205v200_fpv_def_config
|
||||
* Build the firmware.
|
||||
|
||||
After the build completes, your package (if it did installed any files) should be part of the generated images and file systems.
|
||||
|
||||
|
||||
### Building a Custom Version of the Firmware
|
||||
|
||||
Sometimes your need to add a driver or a package to the firmware. How can you
|
||||
do that using provided OpenIPC Firmware sources? It is really easy. Clone the
|
||||
firmware repository locally and compile binary files for your particular
|
||||
hardware.
|
||||
|
||||
Compilation process heavily depends on your computer performance. The more CPU
|
||||
threads and memory you get, the faster the process. Anyway, you can expect the
|
||||
initial compilation to last about half an hour, give or take. The resulting
|
||||
binary files will reside in `output/images` directory. If you did not make any
|
||||
changes to the sources then these files should be identical to those
|
||||
[available from GitHub][4].
|
||||
|
||||
Compilation process has also built a toolchain suitable for compiling packages
|
||||
for your version of firmware. The toolchain is located in `output/host`
|
||||
directory.
|
||||
|
||||
To customize your firmware, add or remove a package run `make br-menuconfig`.
|
||||
That will load buildroot configuration menu where you can make changes following
|
||||
[The Buildroot user manual][5]. Make your changes and save amended config on exit.
|
||||
Then run `make clean all`.
|
||||
|
||||
__Be aware that building firmware directly with buildroot will not rename the
|
||||
resulting image files adding a soc suffix to them. You either can to it
|
||||
yourself or adjust your firmware updating the commands accordingly.__
|
||||
|
||||
|
||||
[1]: https://buildroot.org/
|
||||
[2]: https://buildroot.org/docs.html
|
||||
[3]: https://github.com/OpenIPC/firmware/blob/96b2a0ed2f5457fda5b903ab67146f30b5062147/Makefile#L25
|
||||
[4]: https://github.com/OpenIPC/firmware/releases/tag/latest
|
||||
[5]: https://buildroot.org/downloads/manual/manual.html
|
|
@ -0,0 +1,71 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Comparison of streamers
|
||||
-----------------------
|
||||
|
||||
### Table of contents
|
||||
|
||||
- [Main types of streamers and their presence](/en/streamer-comparison.md#main-types-of-streamers-and-their-presence)
|
||||
- [Table of streamer functionality](/en/streamer-comparison.md#table-of-streamer-functionality)
|
||||
- [Table of supported platforms and groups](/en/streamer-comparison.md#table-of-supported-platforms-and-groups)
|
||||
|
||||
|
||||
### Main types of streamers and their presence
|
||||
|
||||
- [Divinus](https://github.com/OpenIPC/divinus) - new, open and actively developing streamer with support for multiple platforms
|
||||
- [Majestic](https://github.com/OpenIPC/majestic) - the undisputed leader in functionality and support for various platforms
|
||||
- [Mini](https://github.com/OpenIPC/mini) - the oldest streamer, the great-grandfather of all others
|
||||
- [Venc](https://github.com/OpenIPC/silicon_research/tree/master/venc) - miniature streamer for FPV/URLLC for two platforms
|
||||
|
||||
|
||||
### Table of streamer functionality
|
||||
|
||||
| Features and capabilities | Divinus | Majestic | Mini | Venc |
|
||||
|:--------------------------------------------------------|:--------:|:--------:|:--------:|:--------:|
|
||||
| Development of the project in the active phase | Yes | Yes | No | No |
|
||||
| Open source project | Yes | No | Yes | Yes |
|
||||
| Limited number of platforms supported | No | No | Yes | Yes |
|
||||
| IR filter and backlight control | Yes | Yes | Yes | No |
|
||||
| Freeze detection and Watchdog support | Yes | Yes | No | No |
|
||||
| Record video to SD card in MP4 format | ? | Yes | Yes | No |
|
||||
| Getting a JPEG snapshot | Yes | Yes | Yes | No |
|
||||
| Sending JPEG snapshots to a remote server | ? | No | Yes | No |
|
||||
| Basic OSD support | Yes | Yes | No | No |
|
||||
| Expanded OSD support and dynamic data | Yes | No | No | No |
|
||||
| MJPEG support | Yes | Yes | Yes | No |
|
||||
| Basic RTSP support, H264 UDP | Yes | Yes | Yes | No |
|
||||
| Expanded RTSP support, H264/H265 and TCP/UDP | ? | Yes | No | No |
|
||||
| Two independent RTSP video streams | No | Yes | No | No |
|
||||
| RTMP H264/H265 support | No | Yes | No | No |
|
||||
| Audio support in all streams | No | Yes | No | No |
|
||||
| Support for sensor tuning profiles | No | Yes | No | No |
|
||||
| Motion detection and script launch | No | Yes | No | No |
|
||||
| Cloud video surveillance support [ipeye.ae](https://ipeye.ae) | No | Yes | No | No |
|
||||
| Sending steam to YouTube, Facebook, Telegram, etc | No | Yes | No | No |
|
||||
| HLS support | No | Yes | No | No |
|
||||
| WebRTC support | No | Yes | No | No |
|
||||
| NetIP protocol support for DVRs | No | Yes | No | No |
|
||||
| Basic ONVIF support, resource search | No | Yes | No | No |
|
||||
| Support for custom plugins | No | Yes | No | No |
|
||||
| Setup via WebUI | No | Yes | No | No |
|
||||
| Custom ISP settings, a large number of | No | Yes | No | No |
|
||||
| Custom RTP stream, via UDP post or socket | No | Yes | No | Yes |
|
||||
| Sending telemetry to developers | No | Yes | No | No |
|
||||
| | | | | |
|
||||
| To be continued, material is being written | | | | |
|
||||
|
||||
|
||||
### Table of supported platforms and groups
|
||||
|
||||
| Features and capabilities | Divinus | Majestic | Mini | Venc |
|
||||
|:--------------------------------------------------------|:--------:|:--------:|:--------:|:--------:|
|
||||
| HiSilicon HS3516AV100 group | No | Yes | No | No |
|
||||
| HiSilicon HS3516CV100 group | ? | Yes | Part | No |
|
||||
| HiSilicon HS3516CV200 group | ? | Yes | Yes | No |
|
||||
| HiSilicon HS3516CV300 group | Yes | Yes | Yes | No |
|
||||
| HiSilicon HS3516CV500 group | ? | Yes | No | No |
|
||||
| HiSilicon HS3516EV200 group | Yes | Yes | No | Yes |
|
||||
| HiSilicon HS3519V101 group | No | Yes | No | No |
|
||||
| | | | | |
|
||||
| To be continued, material is being written | | | | |
|
|
@ -0,0 +1,55 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Remote syslog
|
||||
-------------
|
||||
|
||||
Sometimes it is necessary to get logs from multiple OpenIPC devices remotely.
|
||||
|
||||
There is no difficulty in this, you need to configure the server by enabling the option to receive information and write its IP address in the call to the handler on the camera.
|
||||
|
||||
Will start with the camera. Add the option -R server-ip:514 with the address as shown in the example and reboot the device.
|
||||
|
||||
```bash
|
||||
root@openipc-hi3516ev300:~# differ /etc/init.d/S01syslogd
|
||||
```
|
||||
|
||||
```diff
|
||||
--- /rom/etc/init.d/S01syslogd
|
||||
+++ /etc/init.d/S01syslogd
|
||||
@@ -3,7 +3,7 @@
|
||||
DAEMON="syslogd"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
.
|
||||
-SYSLOGD_ARGS="-C64 -t"
|
||||
+SYSLOGD_ARGS="-C64 -t -R 172.19.32.17:514"
|
||||
.
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
```
|
||||
|
||||
In the server configuration file, write down the options of which port numbers and protocols to listen to it and make a restart of the service.
|
||||
|
||||
```diff
|
||||
--- rsyslog.conf.orig 2022-09-30 16:41:52.081353630 +0300
|
||||
+++ rsyslog.conf 2023-05-01 12:44:06.098032982 +0300
|
||||
@@ -14,12 +14,12 @@
|
||||
#module(load="immark") # provides --MARK-- message capability
|
||||
.
|
||||
# provides UDP syslog reception
|
||||
-#module(load="imudp")
|
||||
-#input(type="imudp" port="514")
|
||||
+module(load="imudp")
|
||||
+input(type="imudp" port="514")
|
||||
.
|
||||
# provides TCP syslog reception
|
||||
-#module(load="imtcp")
|
||||
-#input(type="imtcp" port="514")
|
||||
+module(load="imtcp")
|
||||
+input(type="imtcp" port="514")
|
||||
.
|
||||
# provides kernel logging support and enables non-kernel klog messages
|
||||
module(load="imklog" permitnonkernelselfacility="on")
|
||||
```
|
||||
|
||||
Comments and additions welcome. Bye !
|
|
@ -0,0 +1,20 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
System features
|
||||
---------------
|
||||
|
||||
* Supports for most TrueType (.ttf) and certain OpenType (.otf) fonts.
|
||||
|
||||
### Random Number Generator
|
||||
|
||||
Works on Hi3516Ev200/Hi3516Ev300 devices.
|
||||
|
||||
### Watchdog
|
||||
|
||||
Works on Hi3516Ev200/Hi3516Ev300 devices.
|
||||
|
||||
### WiFi
|
||||
|
||||
* Realtek Semiconductor RTL8188ETV Wireless LAN 802.11n Network Adapter
|
||||
* [https://linux-hardware.org/index.php?id=usb:0bda-0179](https://linux-hardware.org/index.php?id=usb:0bda-0179)
|
|
@ -0,0 +1,157 @@
|
|||
# OpenIPC Wiki
|
||||
[Table of Content](../README.md)
|
||||
|
||||
Upgrading firmware
|
||||
------------------
|
||||
|
||||
### Upgrading from GitHub
|
||||
For old firmware running `sysupgrade` without parameters is enough. For newer firmware, run `sysupgrade -k -r` to update both kernel and rootfs.
|
||||
|
||||
__ATTENTION! Upgrading firmware can lead to "bricking" your camera. Make sure you are prepared both morally and skillwise. Have your rescue SD card and/or UART adapter ready. Be prepared to de-solder and reprogram flash chip as the last resort. Do not upgrade production cameras unless you really have to!__
|
||||
|
||||
### Upgrading from a TFTP server
|
||||
|
||||
[Set up a TFTP server](installation-tftpd.md).
|
||||
|
||||
Go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC.
|
||||
Extract content of the bundle into the root directory of your TFTP server.
|
||||
|
||||
On the camera run:
|
||||
|
||||
#### Github: From Linux
|
||||
|
||||
```bash
|
||||
soc=$(fw_printenv -n soc)
|
||||
serverip=$(fw_printenv -n serverip)
|
||||
busybox tftp -r rootfs.squashfs.${soc} -g ${serverip}
|
||||
busybox tftp -r uImage.${soc} -g ${serverip}
|
||||
```
|
||||
|
||||
#### Github: Alternatively, from U-Boot
|
||||
|
||||
for 8MB image
|
||||
|
||||
```bash
|
||||
tftp ${baseaddr} uImage.${soc}
|
||||
sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}
|
||||
|
||||
tftp ${baseaddr} rootfs.squashfs.${soc}
|
||||
sf probe 0; sf erase 0x250000 0x500000; sf write ${baseaddr} 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
for 16MB image
|
||||
|
||||
```bash
|
||||
tftp ${baseaddr} uImage.${soc}
|
||||
sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}
|
||||
|
||||
tftp ${baseaddr} rootfs.squashfs.${soc}
|
||||
sf probe 0; sf erase 0x250000 0xA00000; sf write ${baseaddr} 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
### Upgrading from local files
|
||||
|
||||
Go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC.
|
||||
Unpack the bundle and upload its content on camera using `scp`:
|
||||
|
||||
```bash
|
||||
tar xvf <firmware.tgz>
|
||||
scp uImage* rootfs* root@<yourcameraip>:/tmp/
|
||||
```
|
||||
|
||||
On the camera run:
|
||||
|
||||
```bash
|
||||
soc=$(fw_printenv -n soc)
|
||||
sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z
|
||||
```
|
||||
|
||||
### Upgrading from SD card
|
||||
|
||||
#### SD Card: From Linux
|
||||
|
||||
Go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC.
|
||||
Insert an SD card into your desktop PC. Unpack the bundle and copy its content to the card:
|
||||
|
||||
```bash
|
||||
tar xvf <firmware.tgz>
|
||||
cp uImage* rootfs* /media/<username>/<card-id>/
|
||||
```
|
||||
|
||||
Insert the SD card into your camera.
|
||||
On the camera run:
|
||||
|
||||
```bash
|
||||
soc=$(fw_printenv -n soc)
|
||||
sysupgrade --kernel=/mnt/mmcblk0p1/uImage.${soc} --rootfs=/mnt/mmcblk0p1/rootfs.squashfs.${soc} --force_ver -z
|
||||
```
|
||||
|
||||
#### SD Card: Alternatively, from U-Boot
|
||||
|
||||
for 8MB image
|
||||
|
||||
```bash
|
||||
mw.b ${baseaddr} 0xff 0x200000
|
||||
fatload mmc 0:1 ${baseaddr} uImage.${soc}
|
||||
sf probe 0; sf erase 0x50000 0x200000; sf write ${baseaddr} 0x50000 ${filesize}
|
||||
|
||||
mw.b ${baseaddr} 0xff 0x500000
|
||||
fatload mmc 0:1 ${baseaddr} rootfs.squashfs.${soc}
|
||||
sf probe 0; sf erase 0x250000 0x500000; sf write ${baseaddr} 0x250000 ${filesize}
|
||||
```
|
||||
|
||||
for 16MB image
|
||||
|
||||
```bash
|
||||
mw.b ${baseaddr} 0xff 0x300000
|
||||
fatload mmc 0:1 ${baseaddr} uImage.${soc}
|
||||
sf probe 0; sf erase 0x50000 0x300000; sf write ${baseaddr} 0x50000 ${filesize}
|
||||
|
||||
mw.b ${baseaddr} 0xff 0x500000
|
||||
fatload mmc 0:1 ${baseaddr} rootfs.squashfs.${soc}
|
||||
sf probe 0; sf erase 0x350000 0xa00000; sf write ${baseaddr} 0x350000 ${filesize}
|
||||
```
|
||||
|
||||
### Flashing U-Boot via ymodem
|
||||
|
||||
Clean 320K of RAM amd load bootloader file into it:
|
||||
|
||||
```bash
|
||||
mw.b ${baseaddr} 0xff 0x50000
|
||||
loady
|
||||
```
|
||||
|
||||
> _(press "Ctrl-a" followed by ":", then type)_
|
||||
|
||||
```bash
|
||||
exec !! sz --ymodem u-boot.bin
|
||||
```
|
||||
|
||||
After the file if uploaded, write it into ROM:
|
||||
|
||||
```bash
|
||||
sf probe 0
|
||||
sf erase 0x0 0x50000
|
||||
sf write ${baseaddr} 0x0 ${filesize}
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
If you got this error:
|
||||
|
||||
```console
|
||||
losetup: /tmp/rootfs.squashfs.${soc}: No such file or directory
|
||||
Rootfs: Unable to get hostname, execution was interrupted...
|
||||
```
|
||||
|
||||
then try to update only kernel first:
|
||||
`sysupgrade -k`
|
||||
|
||||
If it doesn't help, use `--force` option:
|
||||
`sysupgrade -r --force`
|
||||
|
||||
If you caught a glitch, retrieve the most recent version of the utility:
|
||||
|
||||
```bash
|
||||
curl -k -L -o /usr/sbin/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade"
|
||||
```
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue