From f16dfbeca8bfeb490d09f1dc82e7f39e9fa5eaa4 Mon Sep 17 00:00:00 2001 From: cdg123 <chrisgambell@btinternet.com> Date: Thu, 26 Sep 2024 14:12:34 +0100 Subject: [PATCH 1/9] Update sysupgrade.md Added extra details to make it easier for new people to the project to understand the firmware update options --- en/sysupgrade.md | 69 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 21 deletions(-) diff --git a/en/sysupgrade.md b/en/sysupgrade.md index 9e94840..b137cf6 100644 --- a/en/sysupgrade.md +++ b/en/sysupgrade.md @@ -3,31 +3,50 @@ Upgrading firmware ------------------ +Once the initial installation of the OpenIPC software for your camera is complete it is possible to upgrade it either via the Majestic web interface or manually via a terminal window. -### 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. +This article is about how to manually perform an update using a terminal window using the sysupgrade command. -__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!__ +_Note: By default, sysupgrade will reboot the camera to complete the update. If you don't wish to do that then use the -x option (see sysupgrade --help for all options)_ -### Upgrading from a TFTP server +### Upgrading from the GitHub latest release. +By default, running sysupgrade will attempt to download the latest software for your camera model from the github sources. -[Set up a TFTP server](installation-tftpd.md). +There are other options available such as pointing to your own online .tgz file or a local copy of the Linux kernel (uImage) and camera software (rootfs.squashfs) -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. +For old firmware running `sysupgrade` without parameters is enough. For newer firmware, run `sysupgrade -k -r` to update both kernel and rootfs is required -On the camera run: +__ATTENTION! Upgrading firmware can lead to "bricking" your camera. Make sure you are prepared both morally and skill wise. 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!__ -#### Github: From Linux +### Using sysupgrade +Typically running sysupgrade will give you the latest release for your camera, as described above, however if you wish to revert to a previous image, or load your own updates, then use any the following options. +Remember once you are ready to run sysupgrade you must use the syntax </br></br> +`sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z` </br></br>where '${soc}' is your camera specific soc e.g. gk7205v300 +otherwise the Github latest will be downloaded. + +### Using a TFTP server +#### On your host machine: +If you haven't already got a TFTP server running on your host machine then take a look at the Wiki article [Set up a TFTP server](installation-tftpd.md). + +If you don't already have the uImage and rootfs.squashfs images for your camera then go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC and extract the content of the bundle into the root directory of your TFTP server. + +If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. Copy these to the root of your tftp server. + +#### On the camera: +You can either update the images from a Linux terminal session or from the U-Boot prompt if you have a UART serial connection and interrupted Linux loading. + +##### From Linux ```bash soc=$(fw_printenv -n soc) serverip=$(fw_printenv -n serverip) +cd /tmp busybox tftp -r rootfs.squashfs.${soc} -g ${serverip} busybox tftp -r uImage.${soc} -g ${serverip} +sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z ``` -#### Github: Alternatively, from U-Boot +##### From U-Boot for 8MB image @@ -49,37 +68,45 @@ tftp ${baseaddr} rootfs.squashfs.${soc} sf probe 0; sf erase 0x250000 0xA00000; sf write ${baseaddr} 0x250000 ${filesize} ``` -### Upgrading from local files +Now restart the camera to load the new images -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`: +### Using scp +#### On your host machine: +If you don't already have the uImage and rootfs.squashfs images for your camera then go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC and extract the contents + +If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. + +Now copy these to the camera using scp ```bash tar xvf <firmware.tgz> scp uImage* rootfs* root@<yourcameraip>:/tmp/ ``` -On the camera run: +#### On the camera: +Now create a terminal session with the camera e.g. ssh root@192.168.1.10 and run the sysupgrade command pointing at your new images in /tmp. ```bash soc=$(fw_printenv -n soc) sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z ``` -### Upgrading from SD card +### Upgrading from an SD card +#### On your host machine +If you don't already have the uImage and rootfs.squashfs images for your camera then go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC and extract the contents -#### SD Card: From Linux +If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. -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: +Insert an SD card into your host machine and copy the uImage and squashfs files to the card e.g. ```bash -tar xvf <firmware.tgz> cp uImage* rootfs* /media/<username>/<card-id>/ ``` +#### On your camera Insert the SD card into your camera. -On the camera run: + +Create a terminal session and run the following ```bash soc=$(fw_printenv -n soc) @@ -114,7 +141,7 @@ 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: +Clean 320K of RAM and load bootloader file into it: ```bash mw.b ${baseaddr} 0xff 0x50000 From a1345c9776358143cae012a049570ab19dd1aee5 Mon Sep 17 00:00:00 2001 From: cdg123 <chrisgambell@btinternet.com> Date: Thu, 26 Sep 2024 15:41:20 +0100 Subject: [PATCH 2/9] Update sysupgrade.md --- en/sysupgrade.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/en/sysupgrade.md b/en/sysupgrade.md index b137cf6..60dc077 100644 --- a/en/sysupgrade.md +++ b/en/sysupgrade.md @@ -3,7 +3,7 @@ Upgrading firmware ------------------ -Once the initial installation of the OpenIPC software for your camera is complete it is possible to upgrade it either via the Majestic web interface or manually via a terminal window. +Once the initial installation of the OpenIPC software for your camera is complete it is possible to upgrade it either via the web interface or manually via a terminal window. This article is about how to manually perform an update using a terminal window using the sysupgrade command. @@ -12,18 +12,18 @@ _Note: By default, sysupgrade will reboot the camera to complete the update. If ### Upgrading from the GitHub latest release. By default, running sysupgrade will attempt to download the latest software for your camera model from the github sources. -There are other options available such as pointing to your own online .tgz file or a local copy of the Linux kernel (uImage) and camera software (rootfs.squashfs) +There are other options available so you can use a local copy of the Linux kernel (uImage) and camera software (rootfs.squashfs) For old firmware running `sysupgrade` without parameters is enough. For newer firmware, run `sysupgrade -k -r` to update both kernel and rootfs is required __ATTENTION! Upgrading firmware can lead to "bricking" your camera. Make sure you are prepared both morally and skill wise. 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!__ ### Using sysupgrade -Typically running sysupgrade will give you the latest release for your camera, as described above, however if you wish to revert to a previous image, or load your own updates, then use any the following options. +Typically running sysupgrade will give you the latest release for your camera, as described above, however if you wish to revert to a previous image, or load your own updates, then use any the options described below. Remember once you are ready to run sysupgrade you must use the syntax </br></br> `sysupgrade --kernel=/tmp/uImage.${soc} --rootfs=/tmp/rootfs.squashfs.${soc} -z` </br></br>where '${soc}' is your camera specific soc e.g. gk7205v300 -otherwise the Github latest will be downloaded. +otherwise the latest release on Github will be downloaded. ### Using a TFTP server #### On your host machine: @@ -34,7 +34,11 @@ If you don't already have the uImage and rootfs.squashfs images for your camera If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. Copy these to the root of your tftp server. #### On the camera: -You can either update the images from a Linux terminal session or from the U-Boot prompt if you have a UART serial connection and interrupted Linux loading. +You can either update the images from a Linux terminal session or from the U-Boot prompt, if you have a UART serial connection and interrupted Linux loading. + +Check that your camera environment variable for the TFTP server is correct by looking for the _serverip_ entry when listing them with _fw_printenv_. + +If it needs updating use _fw_setenv serverip <your.tftp.ip.address>_ command. ##### From Linux ```bash From 16eb13dc272cacfc6a8f013e9e6d83fcdbd89909 Mon Sep 17 00:00:00 2001 From: cdg123 <chrisgambell@btinternet.com> Date: Thu, 26 Sep 2024 16:40:30 +0100 Subject: [PATCH 3/9] Update sysupgrade.md scp comments updated to reflect need for -O option in latest desktop OS's --- en/sysupgrade.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/en/sysupgrade.md b/en/sysupgrade.md index 60dc077..1bd4ba8 100644 --- a/en/sysupgrade.md +++ b/en/sysupgrade.md @@ -7,14 +7,14 @@ Once the initial installation of the OpenIPC software for your camera is complet This article is about how to manually perform an update using a terminal window using the sysupgrade command. -_Note: By default, sysupgrade will reboot the camera to complete the update. If you don't wish to do that then use the -x option (see sysupgrade --help for all options)_ +_Note: By default, sysupgrade will reboot the camera to complete the update. If you don't wish to do that then use the -x option (see sysupgrade --help for all options)_. ### Upgrading from the GitHub latest release. By default, running sysupgrade will attempt to download the latest software for your camera model from the github sources. -There are other options available so you can use a local copy of the Linux kernel (uImage) and camera software (rootfs.squashfs) +There are other options available so you can use a local copy of the Linux kernel (uImage) and camera software (rootfs.squashfs). -For old firmware running `sysupgrade` without parameters is enough. For newer firmware, run `sysupgrade -k -r` to update both kernel and rootfs is required +For old firmware running `sysupgrade` without parameters is enough. For newer firmware, run `sysupgrade -k -r` to update both kernel and rootfs is required. __ATTENTION! Upgrading firmware can lead to "bricking" your camera. Make sure you are prepared both morally and skill wise. 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!__ @@ -29,7 +29,11 @@ otherwise the latest release on Github will be downloaded. #### On your host machine: If you haven't already got a TFTP server running on your host machine then take a look at the Wiki article [Set up a TFTP server](installation-tftpd.md). -If you don't already have the uImage and rootfs.squashfs images for your camera then go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC and extract the content of the bundle into the root directory of your TFTP server. +If you don't already have the uImage and rootfs.squashfs images for your camera then go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC and extract the content of the bundle into the root directory of your TFTP server. + +```bash +tar xvf <firmware.tgz> +``` If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. Copy these to the root of your tftp server. @@ -72,21 +76,29 @@ tftp ${baseaddr} rootfs.squashfs.${soc} sf probe 0; sf erase 0x250000 0xA00000; sf write ${baseaddr} 0x250000 ${filesize} ``` -Now restart the camera to load the new images +Now restart the camera to load the new images. ### Using scp #### On your host machine: -If you don't already have the uImage and rootfs.squashfs images for your camera then go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC and extract the contents - -If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. - -Now copy these to the camera using scp +If you don't already have the uImage and rootfs.squashfs images for your camera then go to <https://github.com/OpenIPC/firmware/releases/tag/latest> and download the latest firmware bundle for your SoC and extract the contents. ```bash tar xvf <firmware.tgz> +``` + +If you have built your own versions using a copy of the [firmware repository](https://github.com/OpenIPC/firmware) then your uImage and rootsfs.squashfs images will be in your _output/images_ folder. + +Now copy these to the camera using scp. + +```bash scp uImage* rootfs* root@<yourcameraip>:/tmp/ ``` +**Note:** If you get an error that '/usr/libexec/sftp-server could not be found' it is because in later versions of scp sftp is now used behind the scenes and this is not built into the busybox implementation currently. To force scp to use the legacy behavour use the -O option so +```bash +scp -O uImage* rootfs* root@<yourcameraip>:/tmp/ +``` +ssh #### On the camera: Now create a terminal session with the camera e.g. ssh root@192.168.1.10 and run the sysupgrade command pointing at your new images in /tmp. From 6a7677b3037a6a15d8aab03c0cd2e1193d92635b Mon Sep 17 00:00:00 2001 From: cdg123 <chrisgambell@btinternet.com> Date: Thu, 26 Sep 2024 16:46:03 +0100 Subject: [PATCH 4/9] Update sysupgrade.md Fix typo --- en/sysupgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/sysupgrade.md b/en/sysupgrade.md index 1bd4ba8..0a7a880 100644 --- a/en/sysupgrade.md +++ b/en/sysupgrade.md @@ -98,7 +98,7 @@ scp uImage* rootfs* root@<yourcameraip>:/tmp/ ```bash scp -O uImage* rootfs* root@<yourcameraip>:/tmp/ ``` -ssh + #### On the camera: Now create a terminal session with the camera e.g. ssh root@192.168.1.10 and run the sysupgrade command pointing at your new images in /tmp. From f6d8e4875240c7619a13164287355276c2755135 Mon Sep 17 00:00:00 2001 From: wildcapuchino <wildcapuchino@gmail.com> Date: Fri, 27 Sep 2024 21:21:03 -0300 Subject: [PATCH 5/9] Add internet forwarding tutorial --- en/fpv-openipc-aio-internet-forwarding.md | 132 ++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 en/fpv-openipc-aio-internet-forwarding.md diff --git a/en/fpv-openipc-aio-internet-forwarding.md b/en/fpv-openipc-aio-internet-forwarding.md new file mode 100644 index 0000000..737c53c --- /dev/null +++ b/en/fpv-openipc-aio-internet-forwarding.md @@ -0,0 +1,132 @@ +## AIO Mario firmware update over usb via internet forwarding +This method will work on Linux due to specific network commands. The key idea is to use the local PC as a network bridge betwen AIO board ethernet interface and your local internet interface. + +## Steps +1. Connect AIO Mario to USB +2. Identify your PC address. On your local PC run: +```bash +ip -c a +... +3: enx00e099fead02: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 + link/ether 00:e0:99:fe:ad:02 brd ff:ff:ff:ff:ff:ff + inet 192.168.1.11/24 brd 192.168.1.255 scope global noprefixroute enx00e099fead02 + valid_lft forever preferred_lft forever + inet6 fe80::de74:78fc:9af0:f031/64 scope link noprefixroute + valid_lft forever preferred_lft forever +``` +Here: `192.168.1.11` is my local PC address on AIO ethernet interface. + +3. Connect to AIO Mario over ssh. On PC: +```bash +ssh root@192.168.1.10 +``` +4. List AIO routes. On AIO run: +```bash +root@openipc-ssc338q:~# route -n +Kernel IP routing table +Destination Gateway Genmask Flags Metric Ref Use Iface +192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 +``` +5. We need to add a route to our local PC, so traffic could get route over. On AIO run: +```bash +root@openipc-ssc338q:~# route add default gw 192.168.1.11 eth0 +``` +Here: `192.168.1.11` is the local PC address. + +6. Verify that route was added correctly: +```bash +root@openipc-ssc338q:~# route -n +Kernel IP routing table +Destination Gateway Genmask Flags Metric Ref Use Iface +0.0.0.0 192.168.1.11 0.0.0.0 UG 0 0 0 eth0 +192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 +``` + +7. On the local PC we need to forward all the traffic from `enx00e099fead02` AIO Mario ethernet interface to our local connection. +This can be `wlp2s0` for wifi. To check the interface name, on the local PC run again: +```bash +ip -c a +2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 + link/ether f8:34:41:af:55:37 brd ff:ff:ff:ff:ff:ff + inet 192.168.1.8/24 brd 192.168.1.255 scope global noprefixroute wlp2s0 + valid_lft forever preferred_lft forever + inet6 fe80::8d6a:f2f6:c850:cf9d/64 scope link noprefixroute + valid_lft forever preferred_lft forever +``` +Here: `wlp2s0` is my internet connection, it could be also `eth0` on other setups. + +8. Traffic forwarding. Create a bash script `~/forward.sh`: +```bash +#!/bin/bash + +# Get the interface name of the wireless card by stdin +# $1 is the interface name of the AIO card + +USB_AIO=$1 +echo $1 + +sudo iptables -A FORWARD -i $USB_AIO -o wlp2s0 -j ACCEPT +sudo iptables -A FORWARD -i wlp2s0 -o $USB_AIO -m state --state RELATED,ESTABLISHED -j ACCEPT +sudo iptables --table nat -A POSTROUTING -o wlp2s0 -j MASQUERADE +``` +This script will receive as input `$1` the AIO ethernet interface, and forward the traffic to `wlp2s0`. You can change `wlp2s0` accordingly + +9. Run the script on your local PC: +```bash +chmod u+x ./forward_red.sh +sudo ./forward_red.sh enx00e099fead02 +``` +Here: `enx00e099fead02` is AIO ethernet interface. + +10. On AIO Mario we need to configure DNS servers. Edit `/etc/resolv.conf` and add: +``` +nameserver 8.8.8.8 +nameserver 8.8.4.4 +``` + +11. Test internet acces. On AIO run `ping 8.8.8.8` and `ping openipc.org`: +```bash +root@openipc-ssc338q:~# ping 8.8.8.8 +PING 8.8.8.8 (8.8.8.8): 56 data bytes +64 bytes from 8.8.8.8: seq=0 ttl=116 time=23.611 ms +64 bytes from 8.8.8.8: seq=1 ttl=116 time=28.683 ms +^C +--- 8.8.8.8 ping statistics --- +2 packets transmitted, 2 packets received, 0% packet loss +round-trip min/avg/max = 23.611/26.147/28.683 ms +root@openipc-ssc338q:~# ping openipc.org +PING openipc.org (5.161.116.152): 56 data bytes +64 bytes from 5.161.116.152: seq=0 ttl=51 time=290.381 ms +64 bytes from 5.161.116.152: seq=1 ttl=51 time=207.881 ms +64 bytes from 5.161.116.152: seq=2 ttl=51 time=232.049 ms +^C +--- openipc.org ping statistics --- +3 packets transmitted, 3 packets received, 0% packet loss +round-trip min/avg/max = 207.881/243.437/290.381 ms +``` + +12. Update firmware: +```bash +root@openipc-ssc338q:~# sysupgrade -r -k -n --force_ver +OpenIPC System Updater v1.0.41 + +Vendor sigmastar +SoC ssc338q +Kernel 03:35:18 2024-09-27 +RootFS master+d69195a, 2024-09-27 + +Synchronizing time +ntpd: setting time to 2024-09-28 00:05:42.525372 (offset +73821.493151s) +Sat Sep 28 00:05:42 GMT 2024 + +Checking for sysupgrade update... +Same version. No update required. + +Stop services, sync files, free up memory +Stopping crond: OK +Stopping ntpd: OK +Stopping klogd: OK +Stopping syslogd: OK +... +``` + From 050df9c7def46d8b75d090f90ab2eb6b350c41f0 Mon Sep 17 00:00:00 2001 From: wildcapuchino <wildcapuchino@gmail.com> Date: Fri, 27 Sep 2024 22:24:00 -0300 Subject: [PATCH 6/9] Update internet forward script --- en/fpv-openipc-aio-internet-forwarding.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/en/fpv-openipc-aio-internet-forwarding.md b/en/fpv-openipc-aio-internet-forwarding.md index 737c53c..e47b9fa 100644 --- a/en/fpv-openipc-aio-internet-forwarding.md +++ b/en/fpv-openipc-aio-internet-forwarding.md @@ -63,20 +63,20 @@ Here: `wlp2s0` is my internet connection, it could be also `eth0` on other setup # $1 is the interface name of the AIO card USB_AIO=$1 -echo $1 +INTERNET_IF=$2 -sudo iptables -A FORWARD -i $USB_AIO -o wlp2s0 -j ACCEPT -sudo iptables -A FORWARD -i wlp2s0 -o $USB_AIO -m state --state RELATED,ESTABLISHED -j ACCEPT -sudo iptables --table nat -A POSTROUTING -o wlp2s0 -j MASQUERADE +sudo iptables -A FORWARD -i $USB_AIO -o $INTERNET_IF -j ACCEPT +sudo iptables -A FORWARD -i $INTERNET_IF -o $USB_AIO -m state --state RELATED,ESTABLISHED -j ACCEPT +sudo iptables --table nat -A POSTROUTING -o $INTERNET_IF -j MASQUERADE ``` -This script will receive as input `$1` the AIO ethernet interface, and forward the traffic to `wlp2s0`. You can change `wlp2s0` accordingly +This script will receive as input `$1` the AIO ethernet interface, and forward the traffic to `$2`. 9. Run the script on your local PC: ```bash -chmod u+x ./forward_red.sh -sudo ./forward_red.sh enx00e099fead02 +chmod u+x ./forward.sh +sudo ./forward.sh enx00e099fead02 wlp2s0 ``` -Here: `enx00e099fead02` is AIO ethernet interface. +Here: `enx00e099fead02` is AIO ethernet interface, and `wlp2s0` local PC interface. 10. On AIO Mario we need to configure DNS servers. Edit `/etc/resolv.conf` and add: ``` From 2f5bdd0219d7f346b5ed9756d15db644d0da8477 Mon Sep 17 00:00:00 2001 From: wildcapuchino <wildcapuchino@gmail.com> Date: Fri, 27 Sep 2024 22:36:29 -0300 Subject: [PATCH 7/9] Add sysctl port forwarding instructions --- en/fpv-openipc-aio-internet-forwarding.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/en/fpv-openipc-aio-internet-forwarding.md b/en/fpv-openipc-aio-internet-forwarding.md index e47b9fa..248ad65 100644 --- a/en/fpv-openipc-aio-internet-forwarding.md +++ b/en/fpv-openipc-aio-internet-forwarding.md @@ -71,6 +71,20 @@ sudo iptables --table nat -A POSTROUTING -o $INTERNET_IF -j MASQUERADE ``` This script will receive as input `$1` the AIO ethernet interface, and forward the traffic to `$2`. +Enable IP forwading by editing `/etc/sysctl.conf` on your local PC and adding: +``` +net.ipv4.ip_forward = 1 +``` +And enable the changes with: +```bash +sudo sysctl -p /etc/sysctl.conf +``` + +on Debian/Ubuntu systems this can be also done restarting the procps service: +``` +sudo /etc/init.d/procps restart +``` + 9. Run the script on your local PC: ```bash chmod u+x ./forward.sh From 46a5795cb141072cb5dd3fd06f9da2052d6e83f1 Mon Sep 17 00:00:00 2001 From: Igor Zalatov <flyrouter@gmail.com> Date: Sun, 29 Sep 2024 23:40:05 +0300 Subject: [PATCH 8/9] Update mavfwd note --- README.md | 1 + en/fpv-kit.md | 5 ----- en/fpv-mavfwd.md | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 en/fpv-mavfwd.md diff --git a/README.md b/README.md index d1a4664..fb2f658 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ OpenIPC Wiki - [A selection of OpenIPC videos on YouTube](en/fpv-youtube.md) - [RunCam WiFiLink based on OpenIPC](en/fpv-runcam-wifilink-openipc.md) - [Radxa based groundstation](en/fpv-radxa.md) +- [The mavfwd tool](en/fpv-mavfwd.md) ### Troubleshooting diff --git a/en/fpv-kit.md b/en/fpv-kit.md index c0fccb5..a4a0ebf 100644 --- a/en/fpv-kit.md +++ b/en/fpv-kit.md @@ -4,11 +4,6 @@ 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 diff --git a/en/fpv-mavfwd.md b/en/fpv-mavfwd.md new file mode 100644 index 0000000..24baa52 --- /dev/null +++ b/en/fpv-mavfwd.md @@ -0,0 +1,22 @@ +# OpenIPC Wiki +[Table of Content](../README.md) + +OpenIPC FPV - mavfwd tool +------------------------- + +The idea is to use telemetry ports for a remote setup: +``` +echo cli -s .video0.fps 120 | nc -uq0 localhost 14650 +``` + +Update drone key: +``` +file="echo $(cat gs.key | base64) | base64 -d > /etc/drone.key" +echo $file | nc -uq0 localhost 14650 +``` + +Update configuration: +``` +file="echo $(cat wfb.conf | base64) | base64 -d > /etc/wfb.conf" +echo $file | nc -uq0 localhost 14650 +``` \ No newline at end of file From 66554dc46bb611f89616acabba3bf50bfe9788dd Mon Sep 17 00:00:00 2001 From: viktorxda <35473052+viktorxda@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:21:41 +0200 Subject: [PATCH 9/9] Update fpv-mavfwd.md (#415) --- en/fpv-mavfwd.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/en/fpv-mavfwd.md b/en/fpv-mavfwd.md index 24baa52..554a5b5 100644 --- a/en/fpv-mavfwd.md +++ b/en/fpv-mavfwd.md @@ -4,19 +4,27 @@ OpenIPC FPV - mavfwd tool ------------------------- -The idea is to use telemetry ports for a remote setup: +Edit **/etc/wifibroadcast.cfg**: +```diff +[gs_mavlink] +peer = 'connect://127.0.0.1:14550' # outgoing connection +-# peer = 'listen://0.0.0.0:14550' # incoming connection ++peer = 'listen://0.0.0.0:14550' # incoming connection ``` -echo cli -s .video0.fps 120 | nc -uq0 localhost 14650 + +Update settings: +``` +echo cli -s .video0.fps 120 > /dev/udp/localhost/14550 ``` Update drone key: ``` file="echo $(cat gs.key | base64) | base64 -d > /etc/drone.key" -echo $file | nc -uq0 localhost 14650 +echo $file > /dev/udp/localhost/14550 ``` Update configuration: ``` file="echo $(cat wfb.conf | base64) | base64 -d > /etc/wfb.conf" -echo $file | nc -uq0 localhost 14650 -``` \ No newline at end of file +echo $file > /dev/udp/localhost/14550 +```