Changes for page Monitor & Remote Access Gateway
Last modified by Kilight Cao on 2025/01/14 10:25
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -91,10 +91,87 @@ 91 91 92 92 93 93 94 += 2. Monitor Gateway via ThingsSpeak = 94 94 95 -= 2. Remote Access via Remote.it. = 96 96 97 +This introduction shows how to use a script to monitor the gateway. The video link for this instruction is: [[https:~~/~~/youtu.be/8PieIwfSF_g>>url:https://youtu.be/8PieIwfSF_g]] 97 97 99 + 100 +[[image:image-20220531155018-18.png]] 101 + 102 + 103 +== 2.1 Steps == 104 + 105 + 106 +* Create account in ThingsSpeak and creat channel. 107 + 108 +* Download script from dragino site and move it to properly directory 109 + 110 +(% class="box infomessage" %) 111 +((( 112 +root@dragino-1baf44:~~# wget [[http:~~/~~/www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh>>url:http://www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh]] 113 +Downloading '[[http:~~/~~/www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh'>>url:http://www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh']] 114 +Connecting to 162.241.22.11:80 115 +Writing to 'monitor_gateway.sh' 116 +monitor_gateway.sh 100% |~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~**| 1860 0:00:00 ETA 117 +Download completed (1860 bytes) 118 +root@dragino-1baf44:~~# chmod +x monitor_gateway.sh;mv monitor_gateway.sh /usr/bin/ 119 +root@dragino-1baf44:~~# 120 +root@dragino-1baf44:~~# 121 +))) 122 + 123 + 124 + 125 +* change the script monitor_gateway.sh with properly users setting: 126 + 127 +(% class="box infomessage" %) 128 +((( 129 +USER='xxxxx' # user name in your thinkspeak ~-~-> Profile 130 +PASS='xxxxx' #MQTT_API_KEY in your thinkspeak ~-~-> Profile 131 +CHAN_ID='xxxx' #Channel ID of the channel for this gateway 132 +CHAN_KEY='xxxxx' #Channel Write API of the channel for this gateway 133 +))) 134 + 135 + 136 + 137 +* run (% style="color:blue" %)**/usr/bin/monitor_gateway.sh**(%%) to test if upload is good. 138 + 139 +* Add monitor_gateway.sh to cron work (% style="color:blue" %)**/etc/crontabs/root**(%%) to make this script runs perdiocally, below is an example to update every 20 minutes 140 + 141 +(% class="box infomessage" %) 142 +((( 143 +# For details see man 4 crontabs 144 +# Example of job definition: 145 +# .~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- minute (0 - 59) 146 +# | .~-~-~-~-~-~-~-~-~-~-~-~-- hour (0 - 23) 147 +# | | .~-~-~-~-~-~-~-~-~-~- day of month (1 - 31) 148 +# | | | .~-~-~-~-~-~-- month (1 - 12) OR jan,feb,mar,apr ... 149 +# | | | | .~-~-~-~- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat 150 +# | | | | | 151 +# * * * * * user-name command to be executed 152 +#*/10 * * * * checklog 153 +~* 23 * * * /etc/init.d/auto_update start 154 +*/20 * * * * /usr/bin/monitor_gateway.sh 155 +))) 156 + 157 +* Reboot device. 158 + 159 +== 2.2 Monitor Public IP == 160 + 161 + 162 +The monitor_gateway.sh has been updated to upload the public ip of the device as well. 163 + 164 +User can find the public ip in field7, the chart is not able to show the complete public ip, user can check that in the export. 165 + 166 + 167 +[[image:image-20220531145559-2.png||height="658" width="1233"]] 168 + 169 +Find Public IP 170 + 171 + 172 += 3. Remote Access via Remote.it. = 173 + 174 + 98 98 Remote.it for remote access is available in the latest Dragino firmware for gateway. For security concern, the remote.it only available base on end user demand. 99 99 100 100 ... ... @@ -141,7 +141,7 @@ 141 141 [[image:image-20220725115720-2.png||height="658" width="900"]] 142 142 143 143 144 -== 2.1 How to save the registered remote after the gateway's firmware update. ==221 +== 3.1 How to save the registered remote after the gateway's firmware update. == 145 145 146 146 147 147 Before version [[lgw~~-~~-build-v5.4.1668240318-20221112-1606>>http://repo.dragino.com/release/miscellaneous/remoteit/dragino-lgw--v5.4.1668240318-squashfs-sysupgrade.bin]], once the gateway firmware is upgraded the remote configuration is gone. ... ... @@ -174,7 +174,7 @@ 174 174 [[image:image-20221112162547-3.png]] 175 175 176 176 177 -== 2.2 How to register hp0d with Remote.it ==254 +== 3.2 How to register hp0d with Remote.it == 178 178 179 179 180 180 (% style="color:blue" %)**Prerequisites:** ... ... @@ -214,7 +214,7 @@ 214 214 [[image:image-20220815173958-4.jpeg||height="580" width="964"]] 215 215 216 216 217 -== 2.3 How to register the gateway with Remote.it via SSH Access for Linux console ==294 +== 3.3 How to register the gateway with Remote.it via SSH Access for Linux console == 218 218 219 219 220 220 (% style="color:blue" %)**Prerequisites:** ... ... @@ -256,7 +256,7 @@ 256 256 [[image:image-20230320112057-6.png||height="603" width="1135"]] 257 257 258 258 259 -== 2.4 Trouble Shooting ==336 +== 3.4 Trouble Shooting == 260 260 261 261 262 262 === **1. What should users do when gateway Remote.it installation fails** === ... ... @@ -279,7 +279,7 @@ 279 279 (% style="color:blue" %)**Step 3:**(%%) Follow the [[Remoteit user instruction for Dragino Gateway>>https://www.remote.it/getting-started/dragino]] steps to reconfigure 280 280 281 281 282 -= 3. RSSH Introduction =359 += 4. RSSH Introduction = 283 283 284 284 285 285 Reverse SSH for remote access is available in the latest Dragino firmware for gateway. For security concern, the RSSH only available base on end user demand. ... ... @@ -305,7 +305,7 @@ 305 305 * LIG16 306 306 * MS14 series if installed with the same firmware. 307 307 308 -== 3.1 End User Guide to use SSH access ==385 +== 4.1 End User Guide to use SSH access == 309 309 310 310 311 311 Go to this the Reverse SSH page as below: ... ... @@ -328,7 +328,7 @@ 328 328 After doing above, please download and mail the public keys to Dragino support and wait for our mail for the valid host port. Input the valid host port got from our support and click connect so we can remote access to your gateway. 329 329 330 330 331 -== 3.2 Set Up RSSH Server ==408 +== 4.2 Set Up RSSH Server == 332 332 333 333 334 334 Advance administrator can config a SSH server to provide support their end user themselves., Steps as below ... ... @@ -462,7 +462,7 @@ 462 462 {{{ check: sudo ls /home/xxxxx/.ssh/authorizedkey}}} 463 463 464 464 465 -== 3.3 How does user get the gateway to connect to a user's private server ==542 +== 4.3 How does user get the gateway to connect to a user's private server == 466 466 467 467 468 468