From e4c97aa72ed45644cc160f134a065d9e51b988ea Mon Sep 17 00:00:00 2001
From: sspark <sspark@onioi.com>
Date: Mon, 16 Jan 2023 11:09:46 +0000
Subject: [PATCH] add release

---
 README.md |   84 ++++++++++++++++++++++++++++++++++++++---
 1 files changed, 77 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 3387eeb..75d6b4c 100644
--- a/README.md
+++ b/README.md
@@ -8,17 +8,17 @@
 
 option
 -> SSH enable
--> wifi country GB
+-> wifi country KR
 -> locale Asia/Seoul
 
-### login ssh ##
+### get gw install script from git server ##
 
 ```
-wget https://.../gateway/gwinstall.sh
+curl -k -O https://onioi.com:8443/raw/MEDILOGIS/gwinstall.git/master/gwinstall.sh
 
 ```
 
-### install ssh tunnel service ###
+### install SSH tunnel service on RPi4 ###
 
 ```
 #!/bin/bash
@@ -55,8 +55,31 @@
 
 ```
 
+### Change sshd_config ###
 
-### Connect to RPi 4 via SSH tunnel ###
+```
+sudo vi /etc/ssh/sshd_config
+
+```
+
+```
+AllowTcpForwarding yes
+GatewayPorts yes
+```
+
+```
+sudo service ssh restart
+```
+
+### Check server side RPi4 SSH tunnel port ###
+
+```
+netstat -tulpn
+
+```
+
+
+### Connect to RPi4 via SSH tunnel ###
 
 ```
 
@@ -65,7 +88,7 @@
 ```
 
 
-### install package ###
+### install packages ###
 
 ```
 sudo apt-get update
@@ -82,11 +105,24 @@
 git clone https://github.com/aircrack-ng/rtl8812au.git
 cd rtl8812au
 sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
-sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile
+sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
 
 sudo make dkms_install
 
 ```
+
+### RPi4 internal WiFi disable & USB WiFi enable wlan0 ###
+
+/boot/config.txt
+
+append 
+
+```
+dtoverlay=disable-wifi
+```
+
+and reboot 
+
 
 ### RPi 4 Korean font install ###
 
@@ -101,6 +137,40 @@
 vcgencmd measure_temp
 ```
 
+### RPi 4 SD Card wifi setting ###
+
+Put the wpa_supplicant.conf file with the following contents in /boot folder of the sd card.
+When the setting is completed, the x file will be deleted from the /boot folder of the sd card.
+
+```
+country=KR # Your 2-digit country code
+ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
+
+network={
+    ssid="wifi ssid"
+    psk="widi passwd"
+}
+
+```
+
+
+### WireGuard ###
+
+```
+sudo apt install wireguard
+sudo vi /etc/wireguard/wg0.conf
+sudo vi /etc/network/interfaces.d/wg0
+sudo ifup wg0
+ip route get 10.8.0.1
+ping -c 3 10.8.0.1
+sudo wg show wg0
+```
+
+### update gateway ###
+
+```
+curl "https://onioi.com:8443/zip/?r=MEDILOGIS/gwinstall.git&p=dist&h=master&format=gz" -k -o dist.tar.gz
+```
 
 ### TODO ###
  

--
Gitblit v1.9.3