From c8b2451bc914df1c228d3c9f1855fe5155911ba4 Mon Sep 17 00:00:00 2001 From: Laurent Martin Date: Fri, 23 Jun 2023 18:22:22 +0200 Subject: [PATCH] typos and markdown fixes --- .technical.dict | 18 +++ .vscode/settings.json | 19 +++ cspell.yaml | 24 ++++ en/acme-v2.md | 22 ++-- en/building.md | 30 +++-- en/contribute.md | 5 +- en/dev-ffmpeg-usage.md | 2 +- en/dev-tricks.md | 4 +- en/device-chacon-ipcam-ri01.md | 3 +- en/device-wyze-integration.md | 24 ++-- en/equipment-flashing.md | 6 +- en/example-ipctool.md | 6 +- en/faq.md | 57 +++++---- en/glossary.md | 2 +- en/gpio-settings.md | 9 +- en/guide-supported-devices.md | 3 - en/guide-supported-sensors.md | 6 +- en/hardware-board-manufacturers.md | 4 +- en/hardware-programmer-ch341a-voltage-fix.md | 23 ++-- en/hardware-wifi-ah-huge-ic.md | 4 +- en/help-uboot.md | 118 ++++++++++++------- en/help-webui.md | 63 +++++----- 22 files changed, 292 insertions(+), 160 deletions(-) create mode 100644 .technical.dict create mode 100644 .vscode/settings.json create mode 100644 cspell.yaml diff --git a/.technical.dict b/.technical.dict new file mode 100644 index 0000000..d4c3b9a --- /dev/null +++ b/.technical.dict @@ -0,0 +1,18 @@ +RTSP +RTMP +sysklogd +bootloader +UART +bootable +distro +stopbit +baudrate +backfeeding +Buildroot +GPIO +makefile +makefiles +defconfig +rootfs +ipctool +ffplay diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9a4f5c4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "markdownlint.config": { + "default": true, + "MD003": false, + "MD009": false, + "MD007": { "indent": 2 }, + "MD012": { "maximum": 2}, + "MD022": false, + "MD026": { "punctuation": ",;!" }, + "MD031": false, + "MD032": false, + "MD034": false, + "MD040": false, + "MD045": false, + "MD050": false, + "MD053": false, + "no-hard-tabs": false + } +} diff --git a/cspell.yaml b/cspell.yaml new file mode 100644 index 0000000..d7af123 --- /dev/null +++ b/cspell.yaml @@ -0,0 +1,24 @@ +version: "0.2" +ignorePaths: [] +dictionaryDefinitions: + - name: technical + path: .technical.dict + addWords: true +dictionaries: + - technical +words: [] +import: [] +enableFiletypes: + - shellscript +patterns: + - name: markdown_code_block + pattern: "/^\\s*```(.|\\n)+?^\\s*```/gm" + - name: markdown_code_inline + pattern: "/`[^`]*`/g" +languageSettings: + - languageId: markdown + ignoreRegExpList: + - markdown_code_block + - markdown_code_inline + - "/[A-Z]*/g" +ignoreWords: [] diff --git a/en/acme-v2.md b/en/acme-v2.md index f685ffe..e86701d 100644 --- a/en/acme-v2.md +++ b/en/acme-v2.md @@ -11,8 +11,9 @@ for that. ### Create an ACME account: __on camera:__ -```console -$ uacme -y -v new + +```bash +uacme -y -v new ``` ### Give your camera a FQDN @@ -24,20 +25,22 @@ 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 ``` @@ -47,19 +50,22 @@ camera domain name to HTTP proxy. ### Issue a certificate for your domain: __on camera__: -```console -$ uacme -y -v -h /usr/share/uacme/uacme.sh -t EC issue ipc-001.mysuperduperdomain.com + +```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/ +Open your favorite web browser and go to diff --git a/en/building.md b/en/building.md index 8bd327e..79e585b 100644 --- a/en/building.md +++ b/en/building.md @@ -3,6 +3,9 @@ Building from sources Before you start building your own firmware, make a few changes to your system. +General +--- + ### Clone OpenIPC Firmware Git repository. ``` cd @@ -13,7 +16,8 @@ cd openipc-firmware ``` ### Install required packages. -``` + +```bash sudo make install-deps ``` @@ -23,12 +27,13 @@ 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 dosnloaded packages or copies them back +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 @@ -36,7 +41,7 @@ export BR2_DL_DIR Then, source the changes. -``` +```bash source ~/.profile ``` @@ -44,7 +49,8 @@ source ~/.profile Building of a binary firmware for your IP camera is fairly easy. Just clone source code from the repository and run a provided script. -``` + +```bash ./building.sh ``` @@ -67,14 +73,14 @@ 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 handfull of cents to compile your firmware with +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 +After the compilation is done, you'll find the final binary kernel and `rootfs` image in `output/images/` directory. ``` @@ -140,7 +146,7 @@ Making changes and rebuilding a package --------------------------------------- Once you start tinkering with the packages you'll realize you need a way to -rebuld only one particular package, without rebuilding the whole project. +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: ``` @@ -156,14 +162,14 @@ 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, +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. Making changes to Buildroot packages ------------------------------------ -If you need to make a change to a package already supplied with Buildroot, -place your patches to `global/package/all-patches//` directory. +If you need to make a change to a package already supplied with Buildroot, +place your patches to `global/package/all-patches//` directory. These patches will be added after Buildroot package is extracted and patches from Buildroot package applied. @@ -185,7 +191,7 @@ 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`. +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`. diff --git a/en/contribute.md b/en/contribute.md index f5d50a5..cfff404 100644 --- a/en/contribute.md +++ b/en/contribute.md @@ -3,6 +3,9 @@ > "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 @@ -10,7 +13,7 @@ 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 knowledgebase. +to the knowledge base. ### How to contribute. diff --git a/en/dev-ffmpeg-usage.md b/en/dev-ffmpeg-usage.md index c6b8653..4280ad0 100644 --- a/en/dev-ffmpeg-usage.md +++ b/en/dev-ffmpeg-usage.md @@ -4,7 +4,7 @@ FFMPEG, RTSP and SRT examples ----------------------------- -``` +```bash # Copy from file to file ./ffmpeg -re -i z_input.mp4 -c copy z_output.mp4 diff --git a/en/dev-tricks.md b/en/dev-tricks.md index 65c46f8..f10bdee 100644 --- a/en/dev-tricks.md +++ b/en/dev-tricks.md @@ -5,7 +5,8 @@ Interesting tricks ------------------ ### Sharing output of a command via web -``` + +```bash | nc seashells.io 1337 ``` @@ -108,4 +109,5 @@ index d64ff27..159336e 100644 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)_ diff --git a/en/device-chacon-ipcam-ri01.md b/en/device-chacon-ipcam-ri01.md index bb07bdf..32cabeb 100644 --- a/en/device-chacon-ipcam-ri01.md +++ b/en/device-chacon-ipcam-ri01.md @@ -80,7 +80,6 @@ At the bottom of the mainboard: ![device_chacon_ipcam-ri01_uart](https://user-images.githubusercontent.com/1659543/149518771-a33ab23f-a4f0-44db-83a6-873bd1802056.jpg) - ### GPIOs | nr | Description | @@ -517,7 +516,7 @@ sensors: ## Flashing OpenIPC (soon...) -#### Boot dump +### Boot dump ``` Uncompress Ok! diff --git a/en/device-wyze-integration.md b/en/device-wyze-integration.md index 6c9c54c..a4b38fe 100644 --- a/en/device-wyze-integration.md +++ b/en/device-wyze-integration.md @@ -31,7 +31,7 @@ This is where we'll be writing down our guide to flashing new devices and report * Backup -Downgrade original firmware version to (Jun 2021 w-o internet)demo_wcv3_4.36.2.5.bin +Downgrade original firmware version to (Jun 2021 w-o internet)demo_wcv3_4.36.2.5.bin [(WYom20200 Jun 2021 w-o internet)demo_wcv3_4.36.2.5.bin.zip](https://github.com/OpenIPC/wiki/files/10755387/WYom20200.Jun.2021.w-o.internet.demo_wcv3_4.36.2.5.bin.zip) Login with user `root` password `WYom20200` via telnet or UART console. @@ -175,7 +175,7 @@ Erasing block: 8/8 (100%) Writing kb: 242/242 (100%) Verifying kb: 242/242 (100%) ``` -Now your camera flashed with OpenIPC U-boot, but whole system is still stock. +Now your camera flashed with OpenIPC U-boot, but whole system is still stock. So, next re/boot will load OpenIPC U-boot only (in cycling mode, until stop with `Ctrl+C` in UART console). * Flash kernel and rootfs @@ -188,27 +188,31 @@ https://github.com/OpenIPC/firmware/releases/download/latest/openipc.t31-nor-lit Power off the camera. -Extract and copy `rootfs.squashfs.t31` `uImage.t31` to microSD card. Insert microSD card in camera. +Extract and copy `rootfs.squashfs.t31` `uImage.t31` to microSD card. Insert microSD card in camera. Power on the camera. -During power on the camera press `Ctrl+C` several times until it shows OpenIPC promt like this `OpenIPC # ` +During power on the camera press `Ctrl+C` several times until it shows OpenIPC prompt like this `OpenIPC #` Then issue command `run setnor16m` After you press the Enter key the camera will almost immediately restart and you will have to catch the prompt again. -Then issue command +Then issue command: -`mw.b ${baseaddr} ff 1000000; fatload mmc 0:1 ${baseaddr} uImage.${soc} ; sf probe 0; sf erase 0x50000 0x300000; sf write ${baseaddr} 0x50000 ${filesize}` +```bash +mw.b ${baseaddr} ff 1000000; fatload mmc 0:1 ${baseaddr} uImage.${soc} ; sf probe 0; sf erase 0x50000 0x300000; sf write ${baseaddr} 0x50000 ${filesize} +``` -and next +and next: -`mw.b ${baseaddr} ff 1000000; fatload mmc 0:1 ${baseaddr} rootfs.squashfs.${soc} ; sf probe 0; sf erase 0x350000 0xa00000; sf write ${baseaddr} 0x350000 ${filesize}` +```bash +mw.b ${baseaddr} ff 1000000; fatload mmc 0:1 ${baseaddr} rootfs.squashfs.${soc} ; sf probe 0; sf erase 0x350000 0xa00000; sf write ${baseaddr} 0x350000 ${filesize} +``` Output sample: -``` +```shell OpenIPC # mw.b ${baseaddr} ff 1000000; fatload mmc 0:1 ${baseaddr} uImage.${soc} ; sf probe 0; sf erase 0x50000 0x300000; sf write ${baseaddr} 0x50000 ${filesize} reading uImage.t31 1855437 bytes read in 89 ms (19.9 MiB/s) @@ -236,7 +240,7 @@ SF: 5079040 bytes @ 0x350000 Written: OK ``` If everything went well, issue the command `reset` and camera should start boot OpenIPC. -``` +```console Welcome to OpenIPC openipc-t31 login: root diff --git a/en/equipment-flashing.md b/en/equipment-flashing.md index ec459a5..9203159 100644 --- a/en/equipment-flashing.md +++ b/en/equipment-flashing.md @@ -9,7 +9,7 @@ Equipment for flashing 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 +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. @@ -19,8 +19,8 @@ or less. ![](../images/equipment-youyue8586.webp) Throw in a silicone mat, a tube of no-clean flux, a can of solder paste, -desoldering copper wick, ceramic tweezers, nonwoven swabs and a bottle -of isopropyl alcohol. Many of these things can be already included as +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. diff --git a/en/example-ipctool.md b/en/example-ipctool.md index 6a04a6a..fcd2915 100644 --- a/en/example-ipctool.md +++ b/en/example-ipctool.md @@ -4,8 +4,11 @@ Run ipctool ----------- -``` +```bash root@ipcam:/# ipctool +``` + +```yaml --- board: vendor: OpenIPC @@ -53,5 +56,4 @@ sensors: bus: 0 type: i2c addr: 0x30 -root@ipcam:/# ``` diff --git a/en/faq.md b/en/faq.md index 6c64c79..185d938 100644 --- a/en/faq.md +++ b/en/faq.md @@ -1,7 +1,7 @@ # OpenIPC Wiki [Table of Content](../README.md) -Frequesntly Asked Questions +Frequently Asked Questions --------------------------- ### How to strip U-Boot Image wrapper header from a binary image @@ -12,11 +12,14 @@ for use with U-Boot image loader and prepended with headers in 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 ``` @@ -31,11 +34,14 @@ 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__ +> __only for 8MB flash partitioning__ + ``` sf probe 0; sf erase 0x750000 0xb0000; reset ``` -__only for 16MB flash partitioning__ + +> __only for 16MB flash partitioning__ + ``` sf probe 0; sf erase 0xd50000 0x2b0000; reset ``` @@ -61,11 +67,14 @@ 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; sf erase 0x750000 0xb0000; reset ``` + For a camera with 16MB flash chip, run -``` + +```bash sf probe; sf erase 0xd50000 0x2b0000; reset ``` @@ -93,7 +102,8 @@ If you need to know what is in the command, search for `ipctool` in the 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 @@ -101,46 +111,50 @@ 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. +Enable and configure Core Dump in the menu **Majestic** > **Majestic Debugging**. #### Camera image has a pink tint @@ -156,16 +170,17 @@ 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 @@ -193,19 +208,19 @@ No, this is a difficult algorithm, it does not have a sense to run it this way. 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/ ``` diff --git a/en/glossary.md b/en/glossary.md index 6154217..19e123b 100644 --- a/en/glossary.md +++ b/en/glossary.md @@ -60,7 +60,7 @@ IPC Glossary - USB - Universal Serial Bus - WDR - Wide Dynamic Range -#### ffmpeg/ffplay +### ffmpeg/ffplay - PTS - Presentation Time Stamp - fps - Average frame rate in frames per second (`AVStream.avg_frame_rate`) diff --git a/en/gpio-settings.md b/en/gpio-settings.md index 177218d..5ba1b32 100644 --- a/en/gpio-settings.md +++ b/en/gpio-settings.md @@ -24,13 +24,13 @@ Board specific GPIO settings list | Hi3516Cv300 | | | | | | | Hi3516Ev100 | | | | | | | Hi3516Ev200 | | | | | 9i | -| Hi3516Ev300 | 10 | 11 | | | 7i | 63 | | | | 42 | +| Hi3516Ev300 | 10 | 11 | | | 7i | 63 | | | | 42 | | Hi3518Ev200 | 1 | 2 | 48 | | | | Hi3518Ev300 | | | | | | | | | | | | | | T31 | 58 | 57 | | 49 | 61i | 53 | 55 | 56 | | 11 | 50 | 62 | -_i - inverted value_ +> _i - inverted value_ ``` Tested on Gk7205v200: @@ -45,7 +45,6 @@ Tested on GK7205V200 for /dev/ttyАМА1 ``` - ### GSA boards | Processor   | IRCUT1 | IRCUT2 | IRSTATUS | IRCTL | USB_ENA | @@ -125,7 +124,7 @@ Tested on GK7205V200 for /dev/ttyАМА1 |-------------|--------|--------|-------|--------------------------| | Hi3516Ev300 | 63 | 67 | 64 | Rostelecom IPC8232SWC-WE | -### Wansview +### Wansview | Processor | IRCUT1 | IRCUT2 | IR LEDs | RESET | ETH_GREEN | ETH_ORANGE| DEVICE ID | |-------------|--------|--------|---------|-------|-----------|-----------|------------------------| @@ -147,7 +146,7 @@ Tested on GK7205V200 for /dev/ttyАМА1 | 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 | 10 | 11 | 66 | 52 | 4, 67 | 65 | 30 | 31 | 0 | | +| Hi3516Ev300 | 10 | 11 | 66 | 52 | 4, 67 | 65 | 30 | 31 | 0 | | | Hi3518Ev200 | 33 | 34 | | | 61 | 35 | | | | | | Hi3518Ev300[^3] | 8 | | 55 | | 13 | | | | 15 | | 3 | diff --git a/en/guide-supported-devices.md b/en/guide-supported-devices.md index a091487..53c78fa 100644 --- a/en/guide-supported-devices.md +++ b/en/guide-supported-devices.md @@ -53,8 +53,6 @@ _If you have another supported device to add, please do it [here][2]._ | Zenotech | HI3516D_MB_V13_RA | HI3516DV100 | OV9689 | GD25Q128CSIG | Yes | No | | No | - - | Processor | Sensor | Vendor | SKU | Board identification | |-------------|------------------|------------|--------------|---------------------------------| | Hi3516Cv100 | IMX222_spi_dc | XM | | [BLK18C-0222-38X38_S-V1.03][1] | @@ -99,7 +97,6 @@ _If you have another supported device to add, please do it [here][2]._ | 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 diff --git a/en/guide-supported-sensors.md b/en/guide-supported-sensors.md index cf261d6..5fb1c7e 100644 --- a/en/guide-supported-sensors.md +++ b/en/guide-supported-sensors.md @@ -56,11 +56,11 @@ _Note: This list does not guarantee that your sensor will work. There are nuance - 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 + - 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 + - gc2053, imx290, imx307, imx327, imx334, imx335, imx377, imx390, imx415, imx458, mn34220, os04b10, os05a, os08a10, ov12870, ov2775, ov9284, ps5260, sc4210 - HI3516DV100 - HI3516DV200 - HI3516DV300 @@ -76,7 +76,7 @@ _Note: This list does not guarantee that your sensor will work. There are nuance - HI3518EV201 - HI3518EV300 - HI3519V101 - - imx178, imx185, imx226, imx274, imx290, imx326, imx327, imx385, os05a, os08a10, ov4689, sc4210 + - imx178, imx185, imx226, imx274, imx290, imx326, imx327, imx385, os05a, os08a10, ov4689, sc4210 - HI3520DV100 - HI3520DV200 - HI3536CV100 diff --git a/en/hardware-board-manufacturers.md b/en/hardware-board-manufacturers.md index 34647ae..e4ee011 100644 --- a/en/hardware-board-manufacturers.md +++ b/en/hardware-board-manufacturers.md @@ -1,8 +1,10 @@ # OpenIPC Wiki + [Table of Content](../README.md) Hardware: IPC Board Manufacturers --------------------------------- + * [ACTi](https://www.acti.com/) * [Anjvision](http://www.anjvision.com/), * [Ansjer](https://www.ansjer.com/) @@ -52,4 +54,4 @@ Hardware: IPC Board Manufacturers * [Zenotech](http://www.videopark.com.cn) * [ZOSI](https://www.zositech.com/) -_th? -- possibly a trading house_ +> _th? -- possibly a trading house_ diff --git a/en/hardware-programmer-ch341a-voltage-fix.md b/en/hardware-programmer-ch341a-voltage-fix.md index 87f096a..7f0b96c 100644 --- a/en/hardware-programmer-ch341a-voltage-fix.md +++ b/en/hardware-programmer-ch341a-voltage-fix.md @@ -26,7 +26,7 @@ With a sharp utility knife, cut the trace on the back of the programmer board. ![](../images/hardware-ch341a-hack-3.webp) Connect 3.3v output leg of the voltage regulator to pin 9 of CH341A IC bridging -it to a corresponding trace at a nerby capacitor. +it to a corresponding trace at a nearby capacitor. ![](../images/hardware-ch341a-hack-4.webp) @@ -37,28 +37,35 @@ 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 -``` +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 diff --git a/en/hardware-wifi-ah-huge-ic.md b/en/hardware-wifi-ah-huge-ic.md index 9afbbb6..74f063a 100644 --- a/en/hardware-wifi-ah-huge-ic.md +++ b/en/hardware-wifi-ah-huge-ic.md @@ -13,7 +13,7 @@ Obtain source file of the drivers so you can compile those drivers and upload to 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’ +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/ @@ -52,7 +52,7 @@ Upload the .ko (drivers) and `fmac` (your script file can have a different name) ### Test -Test it with your WiFi hardware to ensure that it works. +Test it with your WiFi hardware to ensure that it works. ### Next, create a package diff --git a/en/help-uboot.md b/en/help-uboot.md index bff2c92..6bfa872 100644 --- a/en/help-uboot.md +++ b/en/help-uboot.md @@ -4,43 +4,51 @@ Help: U-Boot ------------ -### Prepare the enviroment +### 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 enviroment](#prepare-the-enviroment). +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: -``` -$ screen -L -Logfile fulldump.log /dev/ttyUSB0 115200 + +```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} @@ -58,7 +66,7 @@ Reading of an 8 MB flash memory should result in a ~40 MB log file, and for a 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 ``` @@ -67,7 +75,7 @@ Use [binwalk](https://github.com/ReFirmLabs/binwalk) to unpack the binary file. ### Saving firmware via SD card. -Before you start, [prepare the enviroment](#prepare-the-enviroment). +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. @@ -94,14 +102,14 @@ 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 ``` @@ -113,7 +121,8 @@ 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} @@ -122,7 +131,8 @@ mmc write ${baseaddr} 0x10 0x4000 ``` Another example, for 16MB: -``` + +```shell mw.b ${baseaddr} ff ${flashsize} sf probe 0 sf read ${baseaddr} 0x0 ${flashsize} @@ -134,12 +144,14 @@ 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 ``` @@ -154,9 +166,11 @@ 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 @@ -177,7 +191,7 @@ memory image right away using `bootm`, or write it into the flash memory. ### Flashing full image via serial connection -Before you start, [prepare the enviroment](#prepare-the-enviroment). +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 @@ -186,20 +200,27 @@ settings form and clicking the link hidden under "Alternative method" button. ![](../images/firmware-full-binary-link.webp) 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} @@ -207,26 +228,27 @@ sf write ${baseaddr} 0x0 ${filesize} ### Flashing full image from TFTP -Before you start, [prepare the enviroment](#prepare-the-enviroment). +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 FTFP server. +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 reflash your camera with the full image: +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} @@ -234,31 +256,34 @@ 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. +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 enviroment](#prepare-the-enviroment). +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, prepage the card: format it into FAT filesystem and place bootloader, -kernel, and rootsf binary files there. Insert the card into camera and boot +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. @@ -267,7 +292,8 @@ 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 @@ -276,7 +302,8 @@ sf write ${baseaddr} 0x0 ${filesize} ``` Flash kernel. -``` + +```shell mw.b ${baseaddr} 0xff 0x200000 sf probe 0 sf erase 0x50000 0x200000 @@ -285,7 +312,8 @@ sf write ${baseaddr} 0x50000 ${filesize} ``` Flash root filesystem. -``` + +```shell mw.b ${baseaddr} 0xff 0x500000 sf probe 0 sf erase 0x250000 0x500000 @@ -309,8 +337,8 @@ 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 +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.__ @@ -352,23 +380,23 @@ __DO NOT FORGET TO MAKE A BACKUP OF YOUR ORIGINAL FIRMWARE!__ ## Troubleshooting -Before you start, [prepare the enviroment](#prepare-the-enviroment). +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 diff --git a/en/help-webui.md b/en/help-webui.md index 838d39c..f4de9ce 100644 --- a/en/help-webui.md +++ b/en/help-webui.md @@ -7,35 +7,35 @@ 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. +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. +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 purpouse but allowed us - to fasttrack 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. +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. +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. @@ -44,25 +44,26 @@ Any other ideas? We would like to listen them, too. 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)_ + +> _(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: +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/)_ +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/`. +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/`.