Merge branch 'OpenIPC:master' into master

pull/409/head
mikecarr 2024-09-14 09:14:02 -07:00 committed by GitHub
commit 6eb6f9f82a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 190 additions and 115 deletions

View File

@ -31,6 +31,8 @@ OpenIPC Wiki
- [Wireless settings](en/wireless-settings.md)
- [System features](en/system-features.md)
- [Majestic streamer](en/majestic-streamer.md)
- [Majestic example config](en/majestic-config.md)
- [Majestic usage research](en/majestic-research.md)
- [Web interface](en/web-interface.md)
- [Upgrade firmware](en/sysupgrade.md)
- [Image quality tuning](en/image-quality-tuning.md)
@ -83,7 +85,7 @@ OpenIPC Wiki
- [List of supported sensors](en/firmware-sensors.md)
- [Visual sensor identification](en/visual_sensor_identification.md)
- [List of OpenIPC Buildroot packages](en/dev-buildroot-packages.md)
- [Source code](en/source-code.md)
- [Firmware development guide](en/source-code.md)
- [Bug reports](https://github.com/OpenIPC/firmware/issues)
- [Buildroot User Manual](https://buildroot.org/docs.html)
- [U-Boot Documentation](https://u-boot.readthedocs.io/)

View File

@ -27,6 +27,7 @@ and then look it up in the [FCC ID database](https://fccid.io/).
- MQTT (telemetry) support
- WiFi support
- lame (mp3) and libwebsockets support
- experimental WebRTC support (only recent Hisi/Goke)
### How to strip U-Boot Image wrapper header from a binary image

View File

@ -15,17 +15,7 @@ Video version: - [OpenIPC - Prepare GroundStation: Ubuntu + QGroundControl](http
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
sudo apt install dkms git python3-all-dev net-tools virtualenv fakeroot debhelper python3-twisted libpcap-dev python3-pyroute2 python3-future python3-all libsodium-dev
```
### Wifi card driver
@ -62,7 +52,7 @@ systemctl start wifibroadcast@gs
### Qground control manual
- https://docs.qgroundcontrol.com/master/en/getting_started/download_and_install.html
- https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html
### Get last logs from service
```

View File

@ -60,7 +60,10 @@ 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
Plug USB cable to connect AIO and PC first, then power on DC, or usb power only.
If there are unknown USB devices in the computer, the following drivers need to be installed.
[corechip-sr9900-usb20-to-fast-ethernet-adapter-1750095.zip](https://github.com/user-attachments/files/16829005/corechip-sr9900-usb20-to-fast-ethernet-adapter-1750095.zip)
in windows:
@ -77,7 +80,7 @@ then open ssh to connect AIO address:192.168.1.10
user:root password:12345
### Upgrade furmware
### Upgrade firmware
Update firmware possible via SD card or just use win scp drug the rootfs and kernel files to /tmp
@ -87,6 +90,10 @@ sysupgrade -n -z --kernel=/tmp/uImage.ssc338q --rootfs=/tmp/rootfs.squashfs.ssc3
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.
You can also read the current discussions and suggestions here:
- https://t.me/c/1809358416/98818/103632
- https://t.me/c/1809358416/98818/108052
Or just use the configurator - https://github.com/OpenIPC/configurator
@ -103,16 +110,18 @@ 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
RF Power max 18dbm for onbard PA input.
For 1T1R rf setting range: 1-63 firmware update to latest!
stbc=0,ldpc=0 Recommand RF power value < 45
MCS index 1,3(0-7 is 1T1R, 8+ is 2T2R)
stbc=1,ldpc=1
Video biterate:4096 /8192/12688(mcs 3+)
Video bitrate:4096 /8192/12688(mcs 3+)
Keep RF poweroff or power=1 when on bench test(when only usb connect)
when use stbc=1,ldpc=1 recommand rf power setting for MCS3 from 8-15 for test.
Keep RF power < = 15 when on bench test(when only usb connect)
### SD solt for Air camera record
@ -134,10 +143,26 @@ all heat sink mount holes are M2 screws thread.
![image](https://github.com/user-attachments/assets/af8124e3-539f-42c6-a757-a560eb93e3fe)
### Todo
**NOTE**
USB only for debug mode
USB only for debug mode, when DC power only, the cdc ethernet works in sleep mode to save energy.
Power limited 5W input.
USB power only mode Power limited 5W input.
**Upgrade Firmware to Ruby FPV**
plug usb cable and setting cdc ethernet ipv4: 192.168.1.11 255.255.255.0
use winscp drag unzip files to /tmp
use ssh login and copy following command:
sysupgrade --kernel=/tmp/uImage.ssc338q --rootfs=/tmp/rootfs.squashfs.ssc338q -z -n
after update and reboot
use ssh login and set command:
fw_setenv sensor imx335 && fw_setenv upgrade https://github.com/OpenIPC/firmware/releases/download/latest/openipc.ssc338q-nor-rubyfpv.tgz && reboot

View File

@ -20,3 +20,5 @@ We draw your attention to the fact that other modules of the other companies are
<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>
Connector type - **DF56L-26P-0.3SD**

View File

@ -6,13 +6,14 @@ 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 |
| Processor | IRCUT1 | IRCUT2 | LIGHT IR | LIGHT WHITE | 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 | 59 | 10 | | 8 | MC800S-V3 | 39 |
| SSC377 | 11 | 80 | 9 | 13 | | | | MC-A42P-V1.1 | 12 |
### CamHi / Xin boards
@ -58,11 +59,12 @@ Tested on GK7205V300 for /dev/ttyАМА1:
> _Yes, it's amazing but it really matches on two Goke processors_
### GSA boards
### GSA / EnZhi boards
| Processor   | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | USB_ENA |
|-------------|--------|--------|----------|-------|---------|
| T31L        | 58     | 57     |         |       |         |
| T31L        | 58     | 57     |         | 49    |         |
### Herospeed/Longse/Cantonk boards
@ -82,10 +84,10 @@ Tested on GK7205V300 for /dev/ttyАМА1:
### Huishi / Vatilon boards
| Processor | IRCUT1 | IRCUT2 | IRSTATUS |
|-------------|--------|--------|----------|
| SSC377 | 80 | 81 | |
| SSC378DE | 80 | 81 | |
| Processor | IRCUT1 | IRCUT2 | IRSTATUS | IRLED |
|-------------|--------|--------|----------|-------|
| SSC377 | 80 | 81 | | |
| SSC378DE | 80 | 81 | | 13 |
### Jabsco boards

View File

@ -1,3 +1,8 @@
# OpenIPC Wiki
[Table of Content](../README.md)
Majestic example config
-----------------------
```
system:
webPort: 80
@ -17,6 +22,9 @@ isp:
#iqProfile: <path/to/file>
#lowDelay: false
#awbMode: auto
#memMode: reduction
#slowShutter: disabled
#dis: false
image:
mirror: false
@ -34,7 +42,7 @@ video0:
fps: 20
bitrate: 4096
rcMode: vbr
gopSize: 1
gopSize: 1.0
#gopMode: normal
#crop: 0x0x960x540
#sliceUnits: 4
@ -51,12 +59,8 @@ jpeg:
enabled: true
qfactor: 50
fps: 5
#size: 1920x1080
#mjpeg:
#size: 1280x720
#fps: 5
#bitrate: 1024
#size: 160x120
rtsp: false
osd:
enabled: false
@ -81,7 +85,7 @@ rtsp:
port: 554
nightMode:
enabled: false
lightMonitor: true
#irCutPin1: 1
#irCutPin2: 2
irCutSingleInvert: false
@ -90,8 +94,8 @@ nightMode:
#overrideDrc: 300
#minThreshold: 2000
#maxThreshold: 5000
#irSensorPin: 62
irSensorPinInvert: false
#lightSensorPin: 62
lightSensorPinInvert: false
#dncDelay: 30
motionDetect:

View File

@ -0,0 +1,28 @@
# OpenIPC Wiki
[Table of Content](../README.md
Majestic Usage Research
-----------------------
### RTMP services
- [go2rtc](https://github.com/AlexxIT/go2rtc)
- [libnginx-mod-rtmp](https://github.com/arut/nginx-rtmp-module)
- [MediaMTX](https://github.com/bluenviron/mediamtx)
- [OvenMediaEngine](https://github.com/AirenSoft/OvenMediaEngine)
- [HappyTime Media Server](https://www.happytimesoft.com/products/media-server/index.html)
- [OSS SRS](https://ossrs.io/)
- [Wowza](https://www.wowza.com/)
### Testing
```
SRS:
docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:6 objs/srs -c conf/docker.conf
Outgoing (with H265 codec):
rtmp://192.168.1.85/openipc/live
FFMpeg:
ffplay rtmp://192.168.1.85/openipc/live
```

View File

@ -26,7 +26,7 @@ To connect to the server, go to the extensions tab, specify the IP address or do
Installing components and dependencies for Debian/Ubuntu
```
apt install -y bison bridge-utils build-essential curl flex
apt install -y bison bridge-utils build-essential curl flex bridge-utils
```
### Automatic compilation script
@ -34,7 +34,7 @@ apt install -y bison bridge-utils build-essential curl flex
```
#!/bin/bash
#
# OpenIPC.org | v.20240824
# OpenIPC.org | v.20240908
#
LANG=C
@ -55,8 +55,8 @@ compile() {
}
install() {
mkdir -p ../_binary
mv -v vtund ../_binary/vtund_i386
mkdir -p /usr/local/sbin
mv -v vtund /usr/local/sbin/vtund
cd -
rm -rf vtun-${vtun_version}
}
@ -141,3 +141,19 @@ E60BFB000001 {
}
#
```
### Alternative
```
#!/bin/sh -x
curl -L -o vtun_3.0.4.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/universe/v/vtun/vtun_3.0.4.orig.tar.gz
tar xvfz vtun_3.0.4.orig.tar.gz
curl -L -o vtun_3.0.4-2build1.debian.tar.xz http://archive.ubuntu.com/ubuntu/pool/universe/v/vtun/vtun_3.0.4-2build1.debian.tar.xz
tar xvfJ vtun_3.0.4-2build1.debian.tar.xz
cd vtun-3.0.4
cat ../debian/patches/*.patch | patch -p 1
./configure --build=x86_64-linux-gnu --disable-lzo --disable-zlib --disable-ssl --prefix=''
make && strip vtund && cp vtund ../ && cd -
rm -rf vtun_3.0.4.orig.tar.gz vtun_3.0.4-2build1.debian.tar.xz debian vtun-3.0.4
```

View File

@ -13,92 +13,71 @@
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.
We are continuously working towards creating a high-quality source code repository. Your patience is appreciated as we strive to deliver a fully polished and ready-to-use project and welcome your thoughts and feedback through the [OpenIPC telegram channel](https://t.me/openipc/117235)
## 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
First step is to make a local copy of the OpenIPC firmware source code. We are using 'mylocalOpenIPC/src' in the script below but you can change this to whatever location you prefer e.g. ~/myprojects/myOpenIPC
```cd
mkdir -p local/src
cd local/src
mkdir -p mylocalOpenIPC/src
cd mylocalOpenIPC/src
git clone https://github.com/OpenIPC/firmware.git openipc-firmware
cd openipc-firmware
```
We now have a clone of the firmware repository source code.
### Install Required Packages
To ensure your system has the required dependencies for a successful build you can either use the pre-built **make deps** command which is in the root of the openipc-firmware directory you have just created or enter the commands manually in a terminal window.
To run the make script (recommended way as this will be maintained within the source code git repository itself) do this
```bash
sudo make deps
```
For Debian/Ubuntu, an example of installing the necessary packages and downloading our repository:
or to manually enter the commands yourself do the following:
```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}
sudo apt-get install -y automake autotools-dev bc build-essential cpio \
curl file fzf git libncurses-dev libtool lzop make rsync unzip wget libssl-dev
```
### Create a Permanent Storage for Downloaded Bundles
[Buildroot](https://buildroot.org/) is the Linux distribution used for OpenIPC. It is used in many embedded systems as it has a very small footprint and can easily be customized to include or exclude specific functionality (see [this article](https://github.com/OpenIPC/wiki/blob/master/en/dev-buildroot-packages.md) on what is included in the OpenIPC build).
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:
By default, every time you build the firmware the OpenIPC build script creates a fresh buildroot source file tree which results in unnecessary downloads or copying of files. To avoid this, you can create a permanent location and set the BR2_DL_DIR environment variable to tell the build script to use this each time.
Add the following piece of code to the `.profile` file in your home directory using your favourite text editor e.g. nano ~/.profile
```bash
#Buildroot directory for OpenIPC build
BR2_DL_DIR="${HOME}/buildroot_dl"
[ ! -d "$BR2_DL_DIR" ] && mkdir -p $BR2_DL_DIR
export BR2_DL_DIR
```
Then, source the changes.
Then, source the changes to make them effective immediately.
```bash
source ~/.profile
```
### Build the firmware.
If you have followed the above steps then you are now ready to build the firmware for your specific camera model.
Building of a binary firmware for your IP camera is fairly easy. Just clone
source code from the repository and run:
The Makefile located within the firmware directory contains the build script for each supported camera model.
You just need to ensure you are in the firmware directory e.g. ~/mylocalOpenIPC/src/openipc-firmware and run make.
```bash
cd ~/mylocalOpenIPC/src/openipc-firmware
make
```
You will be greeted with a list of available targets.
![](../images/firmware-building-whiptail.webp)
![image](https://github.com/user-attachments/assets/4e3c87e7-560a-45bb-89e5-2259282e8f2a)
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
@ -108,12 +87,14 @@ 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.
Select the desired target and hit enter. Building will start.
Process of building firmware binary takes from 15-20 minutes to several hours
_If you get an error 'tar: This does not look like a tar archive' see the Note at the bottom of this section_
The process of building the 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
speed up the process, make sure you use a computer with a SSD rather than a HDD as
the process of compiling involves a lot of reading and writing. A 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.
@ -122,24 +103,46 @@ 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.
After the compilation is done, you'll find the final binary kernel **uImage** and **rootfs**
images in the `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
~/mylocalOpenIPC/src/openipc-firmware/output/images$ ls -la
total 39352
-rw-rw-r-- 1 chrisdev chrisdev 6515434 Sep 5 14:52 openipc.v83x-nor-lite.tgz
-rw-r--r-- 1 chrisdev chrisdev 12971008 Sep 5 14:52 rootfs.cpio
-rw-r--r-- 1 chrisdev chrisdev 4464640 Sep 5 14:52 rootfs.squashfs.v83x
-rw-r--r-- 1 chrisdev chrisdev 14274560 Sep 5 14:52 rootfs.v83x.tar
-rw-r--r-- 1 chrisdev chrisdev 2058032 Sep 5 14:50 uImage.v83x
```
** **Note: 'tar: This does not look like a tar archive' error** \
If you are using Ubuntu you may come across an issue when using wget in the make scripts which causes the build to fail and is reported to the console with the message 'tar: This does not look like a tar archive'. This is because the wget command used in the script is failing to authenticate properly and so the result is an empty file.
The workaround for this is to ensure the Makefile in the firmware directory is updated with the addition of '--ca-directory=/etc/ssl/certs' so the prepare section will now read
```
prepare:
@if test ! -e $(TARGET)/buildroot-$(BR_VER); then \
wget -c -q --ca-directory=/etc/ssl/certs $(BR_LINK)/$(BR_VER).tar.gz -O $(BR_FILE); \
mkdir -p $(TARGET); tar -xf $(BR_FILE) -C $(TARGET); fi
```
and the general/external.mk file is also updated to include:
```
export WGET := wget --ca-directory=/etc/ssl/certs --show-progress --passive-ftp -nd -t5 -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).
After you have built your firmware, you need to install it on the camera.
You can do it in multiple ways:
1) If you have a fully supported camera board then after copying the new uImage and rootfs.squashfs files from your output/images directory to your tftp server use the Advanced Install instructions that were part of the generated guide you would have initially used. If you don't have this available then [simply generate it again](https://openipc.org/supported-hardware/featured).
2) Follow the wiki document on [upgrading firmware](https://github.com/OpenIPC/wiki/blob/master/en/sysupgrade.md) using your own generated files obviously.
3) 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:
```
@ -147,7 +150,7 @@ 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.
After the installation is complete, the camera will reboot automatically.
Connect again to the camera and run this command (same as -n in the previous command):
```
@ -160,7 +163,7 @@ Remember! The user and password will be reset to default in most cases (the defa
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
want not only to compile the source code but make your own modifications
to the firmware.
You can add drivers or software not included in the our official releases, you
@ -171,13 +174,16 @@ 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
today, it is Buildroot 2024.02.1 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
as Buildroot external trees, namely `br-ext-chip-<vendor name>`.
![image](https://github.com/user-attachments/assets/bd060676-7008-41ae-9ec6-f0ed18f6f48e)
Each of 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.
@ -205,7 +211,6 @@ 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.