Wiki source code of OTA Auto Update For Gateway Firmware
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | **Table of Contents:** | ||
2 | |||
3 | {{toc/}} | ||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | = 1. What is OTA and how it works = | ||
10 | |||
11 | |||
12 | Dragino gateways support firmware OTA auto-update. In OTA update, the gateway will connect to Dragino update server and get the latest firmware and update it to the gateway for (% style="color:blue" %)**bug fix** (%%)and (% style="color:blue" %)**new features**. | ||
13 | |||
14 | In below case, gateway will connect to Dragino server to check for updates: | ||
15 | |||
16 | * Every reboot | ||
17 | * Every midnight (~~UTC time: 12:00) | ||
18 | |||
19 | (% style="display:none" %) | ||
20 | |||
21 | |||
22 | |||
23 | = 2. Support hardrware & Software = | ||
24 | |||
25 | |||
26 | {{velocity}} | ||
27 | $xwiki.ssfx.use("js/xwiki/table/table.css") | ||
28 | $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) | ||
29 | {{/velocity}} | ||
30 | |||
31 | (% border="1" cellspacing="10" class="doOddEven filterable grid sortable" id="tableid" style="background-color:#f2f2f2; width:1191.22px" %) | ||
32 | (% class="sortHeader" %)|=(% style="width: 247px;background-color:#D9E2F3" %)Models|=(% style="width: 222px;background-color:#D9E2F3" %)Devices Type|=(% style="width: 317px;background-color:#D9E2F3" %)OS, CPU Info|=(% style="width: 223px;background-color:#D9E2F3" %)Firmware requirement|=(% style="width: 178px;background-color:#D9E2F3" %)OTA Update Detail | ||
33 | |(% style="width:247px" %)((( | ||
34 | [[LIG16>>https://www.dragino.com/products/lora-lorawan-gateway/item/171-lig16.html]],[[LPS8>>https://www.dragino.com/products/lora-lorawan-gateway/item/148-lps8.html]], [[LPS8N>>https://www.dragino.com/products/lora-lorawan-gateway/item/200-lps8n.html]], [[LG308>>https://www.dragino.com/products/lora-lorawan-gateway/item/140-lg308.html]], [[LG308N>>https://www.dragino.com/products/lora-lorawan-gateway/item/229-lg308n.html]], [[DLOS8>>https://www.dragino.com/products/lora-lorawan-gateway/item/160-dlos8.html]], [[DLOS8N** **>>https://www.dragino.com/products/lora-lorawan-gateway/item/225-dlos8n.html]] | ||
35 | )))|(% style="width:222px" %)LoRaWAN Gateway|(% style="width:317px" %)((( | ||
36 | * Linux OS: OpenWrt, | ||
37 | * CPU: 400MHz, | ||
38 | * Flash: 16MB, RAM: 64MB | ||
39 | )))|(% style="width:223px" %)((( | ||
40 | ((( | ||
41 | |||
42 | ))) | ||
43 | )))|(% style="width:178px" %)[[Change Log>>||anchor="H3.1ForLIG162CLPS82CLPS8N2CLG3082CLG308N2CDLOS82CDLOS8N"]] | ||
44 | |(% style="width:247px" %)[[LPS8v2>>https://www.dragino.com/products/lora-lorawan-gateway/item/228-lps8v2.html]]|(% style="width:222px" %)LoRaWAN Gateway|(% style="width:317px" %)((( | ||
45 | * Linux OS: Armbian, | ||
46 | * CPU: Quad-core Cortex-A7 1.2Ghz | ||
47 | * RAM: 512MB | ||
48 | * eMMC: 4GB | ||
49 | )))|(% style="width:223px" %)((( | ||
50 | |||
51 | )))|(% style="width:178px" %)[[Change Log>>||anchor="H3.2ForLPS8Nv2"]] | ||
52 | |(% style="width:247px" %)[[LG01v2>>https://www.dragino.com/products/lora-lorawan-gateway/item/244-lg01v2.html]]|(% style="width:222px" %)Single Channel LoRa Gateway|(% style="width:317px" %)((( | ||
53 | * Linux OS: Armbian, | ||
54 | * CPU: Quad-core Cortex-A7 1.2Ghz | ||
55 | * RAM: 512MB | ||
56 | * eMMC: 4GB | ||
57 | )))|(% style="width:223px" %)((( | ||
58 | |||
59 | )))|(% style="width:178px" %)[[Change Log>>||anchor="H3.3.ForLG01v2"]] | ||
60 | |||
61 | (% style="display:none" %) | ||
62 | |||
63 | |||
64 | |||
65 | = 3. OTA Update Change Log = | ||
66 | |||
67 | == 3.1 For LIG16,LPS8, LPS8N, LG308, LG308N, DLOS8, DLOS8N == | ||
68 | |||
69 | |||
70 | (% border="1" cellspacing="5" style="width:602.222px" %) | ||
71 | |(% style="background-color:#d9e2f3; color:#0070c0; width:106px" %)**Date**|(% style="background-color:#d9e2f3; color:#0070c0; width:182px" %)**Main Packages**|(% style="background-color:#d9e2f3; color:#0070c0; width:287px" %)**Change Log** | ||
72 | |(% style="background-color:#f2f2f2; width:106px" %)~-~-~-~-~-~-~-~-~-~-~-~-|(% style="background-color:#f2f2f2; width:182px" %)dragino_gw_fwd-2.6.0|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
73 | * Basic versions | ||
74 | ))) | ||
75 | |(% style="background-color:#f2f2f2; width:106px" %)~-~-~-~-~-~-~-~-~-~-~-~-|(% style="background-color:#f2f2f2; width:182px" %)haserl_ui-1.2.1|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
76 | * Basic versions | ||
77 | ))) | ||
78 | |(% style="background-color:#f2f2f2; width:106px" %)22-09-16|(% style="background-color:#f2f2f2; width:182px" %)dragino_gw_fwd-2.6.1|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
79 | * Add lora global_config file for zn | ||
80 | ))) | ||
81 | |(% style="background-color:#f2f2f2; width:106px" %)22-11-16|(% style="background-color:#f2f2f2; width:182px" %)dragino_gw_fwd-2.6.3|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
82 | * Optimize recycling threads | ||
83 | * Optimize log output | ||
84 | ))) | ||
85 | |(% style="background-color:#f2f2f2; width:106px" %)23-04-25|(% style="background-color:#f2f2f2; width:182px" %)dragino_gw_fwd-2.6.4|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
86 | * Fixed Semtech UDP mode lost connection issue | ||
87 | ))) | ||
88 | |(% style="background-color:#f2f2f2; width:106px" %)23-08-01|(% style="background-color:#f2f2f2; width:182px" %)dragino_gw_fwd-2.7.0|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
89 | * Fixed Cellular mode lost connection issue | ||
90 | ))) | ||
91 | |(% style="background-color:#f2f2f2; width:106px" %)23-12-10|(% style="background-color:#f2f2f2; width:182px" %)haserl_ui-1.4.0-5|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
92 | * Add no network detection | ||
93 | * Fixed Basic station clock drift to 100mp | ||
94 | ))) | ||
95 | |(% style="background-color:#f2f2f2; width:106px" %)23-12-27|(% style="background-color:#f2f2f2; width:182px" %)haserl_ui-1.4.6-0|(% style="background-color:#f2f2f2; width:287px" %)((( | ||
96 | * Optimized Cellular connection | ||
97 | * Optimized BasicStation connection | ||
98 | * Optimized IoT connections in cellular | ||
99 | * Added auto-channel for MQTT | ||
100 | ))) | ||
101 | |(% style="background-color:#f2f2f2; width:106px" %) |(% style="background-color:#f2f2f2; width:182px" %) |(% style="background-color:#f2f2f2; width:287px" %) | ||
102 | |(% style="background-color:#f2f2f2; width:106px" %) |(% style="background-color:#f2f2f2; width:182px" %) |(% style="background-color:#f2f2f2; width:287px" %) | ||
103 | |||
104 | (% style="display:none" %) | ||
105 | |||
106 | |||
107 | |||
108 | == 3.2 For LPS8v2 == | ||
109 | |||
110 | |||
111 | (% border="1" cellspacing="5" style="width:770.222px" %) | ||
112 | |(% style="background-color:#d9e2f3; color:#0070c0; width:118px" %)**Date**|(% style="background-color:#d9e2f3; color:#0070c0; width:255px" %)**Main Packages**|(% style="background-color:#d9e2f3; color:#0070c0; width:383px" %)**Change Log** | ||
113 | |(% style="background-color:#f2f2f2; width:118px" %)2022-10-23|(% style="background-color:#f2f2f2; width:255px" %)draginofwd-22-10-23|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
114 | * Fix i2c interface error ( for FWD) | ||
115 | ))) | ||
116 | |(% style="background-color:#f2f2f2; width:118px" %)2023-01-06|(% style="background-color:#f2f2f2; width:255px" %)((( | ||
117 | dragino-httpd | ||
118 | |||
119 | dragino-ui | ||
120 | |||
121 | draginoups | ||
122 | )))|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
123 | * Add Login-Authentication | ||
124 | * Add system/general page | ||
125 | * Add the fallback interface | ||
126 | ))) | ||
127 | |(% style="background-color:#f2f2f2; width:118px" %)2023-01-10|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
128 | * Add timezone setting | ||
129 | * Add Static IP setting with WLAN | ||
130 | * Add the http/ssh port setting | ||
131 | * Optimized built-in server updates | ||
132 | * Fix the basic station display with the EUI | ||
133 | ))) | ||
134 | |(% style="background-color:#f2f2f2; width:118px" %)2023-02-08|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
135 | * add the edit the address of fallback | ||
136 | * Add Static IP setting with ETH | ||
137 | ))) | ||
138 | |(% style="background-color:#f2f2f2; width:118px" %)2023-02-16|(% style="background-color:#f2f2f2; width:255px" %)armbian-bsp-cli-draginohp0z|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
139 | * Optimization Auto Update | ||
140 | * Add the docker cache clean | ||
141 | ))) | ||
142 | |(% style="background-color:#f2f2f2; width:118px" %)2023-03-18|(% style="background-color:#f2f2f2; width:255px" %)((( | ||
143 | dragino-ui | ||
144 | |||
145 | draginofwd | ||
146 | )))|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
147 | * Fix LoRaWAN lost connection with the server, not being displayed correctly | ||
148 | * Optimized the IoT keepalive detection.((( | ||
149 | When the gateway's network is unreachable, the sys led will switch to red and wait for the network to recover | ||
150 | Once the network is back in access, the gateway will reload the running server(draginofwd) | ||
151 | ))) | ||
152 | ))) | ||
153 | |(% style="background-color:#f2f2f2; width:118px" %)2023-04-10|(% style="background-color:#f2f2f2; width:255px" %)((( | ||
154 | dragino-ui | ||
155 | |||
156 | dragino-fwd | ||
157 | |||
158 | draginohtppd | ||
159 | )))|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
160 | * Fixed the wifi survey doesn't show the complete SSID | ||
161 | * Fixed the LoRa global config of IN865 which is missing a frequency point | ||
162 | * Fixed the LoRa frequency band type of AS923 | ||
163 | * Fixed lighttpd takes up a lot of CPU. | ||
164 | ))) | ||
165 | |(% style="background-color:#f2f2f2; width:118px" %)2023-04-18|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
166 | * Optimized the General page | ||
167 | ))) | ||
168 | |(% style="background-color:#f2f2f2; width:118px" %)2023-5-04|(% style="background-color:#f2f2f2; width:255px" %)dragnoups|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
169 | * Fixed block broken problem | ||
170 | ))) | ||
171 | |(% style="background-color:#f2f2f2; width:118px" %)2023-05-06|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
172 | * Update Package Filrer ruler | ||
173 | * Update Stat package interval setting | ||
174 | ))) | ||
175 | |(% style="background-color:#f2f2f2; width:118px" %)2023-05-23|(% style="background-color:#f2f2f2; width:255px" %)((( | ||
176 | dragino-ui | ||
177 | |||
178 | draginoups | ||
179 | )))|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
180 | * Add the AP function | ||
181 | * Fix the incomplete display of 4g icon information | ||
182 | * | ||
183 | ))) | ||
184 | |(% style="background-color:#f2f2f2; width:118px" %)2023-06-14|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
185 | * Update the Web page for the built-in server | ||
186 | ))) | ||
187 | |(% style="background-color:#f2f2f2; width:118px" %)2023-06-30|(% style="background-color:#f2f2f2; width:255px" %)((( | ||
188 | dragino-ui | ||
189 | |||
190 | draginoups | ||
191 | )))|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
192 | * Optimized resource consumption | ||
193 | * Fix the gateway downtime bug | ||
194 | ))) | ||
195 | |(% style="background-color:#f2f2f2; width:118px" %)2023-07-08|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
196 | * Fix the Home page cellular icon display error | ||
197 | ))) | ||
198 | |(% style="background-color:#f2f2f2; width:118px" %)2023-07-14|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
199 | * Reduce the memory usage of web UI | ||
200 | ))) | ||
201 | |(% style="background-color:#f2f2f2; width:118px" %)2023-07-16|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
202 | * Fixed the issue of cellular consuming a lot of data | ||
203 | ))) | ||
204 | |(% style="background-color:#f2f2f2; width:118px" %)2023-08-01|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
205 | * Fixed the issue of cellular Pinconde settings | ||
206 | ))) | ||
207 | |(% style="background-color:#f2f2f2; width:118px" %)2023-08-05|(% style="background-color:#f2f2f2; width:255px" %)draginofwd|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
208 | * Fixed the server connection status detection | ||
209 | ))) | ||
210 | |(% style="background-color:#f2f2f2; width:118px" %)2023-10-24|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
211 | * Fixed Uable install Chirpstack | ||
212 | ))) | ||
213 | |(% style="background-color:#f2f2f2; width:118px" %)2023-11-06|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
214 | * Add reset data for Chirpstack | ||
215 | ))) | ||
216 | |(% style="background-color:#f2f2f2; width:118px" %)2023-11-26|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
217 | * Fixed the issue unable to disable SSH | ||
218 | ))) | ||
219 | |(% style="background-color:#f2f2f2; width:118px" %)2023-12-01|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
220 | * Add batch register for Chirpstack | ||
221 | ))) | ||
222 | |(% style="background-color:#f2f2f2; width:118px" %)2023-12-05|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
223 | * Fixed basic-station abandonment issue | ||
224 | ))) | ||
225 | |(% style="background-color:#f2f2f2; width:118px" %)2023-12-06|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
226 | * Add cached writes are immediately written to the disk | ||
227 | * Fix the issue that the backup page cannot be downloaded | ||
228 | ))) | ||
229 | |(% style="background-color:#f2f2f2; width:118px" %)2023-12-07|(% style="background-color:#f2f2f2; width:255px" %)draginoups|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
230 | * Enable Hardware watchdog from CPU | ||
231 | * Improve TCP link retransmission speed. Improve the Basic Station connection stability. | ||
232 | ))) | ||
233 | |(% style="background-color:#f2f2f2; width:118px" %)2024-01-10|(% style="background-color:#f2f2f2; width:255px" %)dragino-ui|(% style="background-color:#f2f2f2; width:383px" %)((( | ||
234 | * support watchdog chip | ||
235 | ))) | ||
236 | |(% style="background-color:#f2f2f2; width:118px" %) |(% style="background-color:#f2f2f2; width:255px" %) |(% style="background-color:#f2f2f2; width:383px" %) | ||
237 | |||
238 | (% style="display:none" %) | ||
239 | |||
240 | |||
241 | |||
242 | == 3.3 For MS48 == | ||
243 | |||
244 | (% border="1" cellspacing="5" style="width:774.222px" %) | ||
245 | |(% style="background-color:#d9e2f3; color:#0070c0; width:126px" %)**Date**|(% style="background-color:#d9e2f3; color:#0070c0; width:252px" %)**Main Packages**|(% style="background-color:#d9e2f3; color:#0070c0; width:392px" %)**Change Log** | ||
246 | |(% style="background-color:#f2f2f2; width:126px" %)2023-12-28|(% style="background-color:#f2f2f2; width:252px" %)((( | ||
247 | dragino-ui | ||
248 | |||
249 | draginoups | ||
250 | )))|(% style="background-color:#f2f2f2; width:392px" %)((( | ||
251 | * Fix the LoRa page saved without frequency modification | ||
252 | * Fix Modbus registers with no data | ||
253 | |||
254 | ))) | ||
255 | |(% style="background-color:#f2f2f2; width:126px" %)2024-01-10|(% style="background-color:#f2f2f2; width:252px" %)draginoups|(% style="background-color:#f2f2f2; width:392px" %)((( | ||
256 | * Enable Hardware watchdog from CPU | ||
257 | ))) | ||
258 | |(% style="background-color:#f2f2f2; width:126px" %) |(% style="background-color:#f2f2f2; width:252px" %) |(% style="background-color:#f2f2f2; width:392px" %) | ||
259 | |(% style="background-color:#f2f2f2; width:126px" %) |(% style="background-color:#f2f2f2; width:252px" %) |(% style="background-color:#f2f2f2; width:392px" %) | ||
260 | |||
261 | == 3.4 For LG01v2 == | ||
262 | |||
263 | |||
264 | (% border="1" cellspacing="5" style="width:774.222px" %) | ||
265 | |(% style="background-color:#d9e2f3; color:#0070c0; width:126px" %)**Date**|(% style="background-color:#d9e2f3; color:#0070c0; width:252px" %)**Main Packages**|(% style="background-color:#d9e2f3; color:#0070c0; width:392px" %)**Change Log** | ||
266 | |(% style="background-color:#f2f2f2; width:126px" %) |(% style="background-color:#f2f2f2; width:252px" %) |(% style="background-color:#f2f2f2; width:392px" %) | ||
267 | |(% style="background-color:#f2f2f2; width:126px" %) |(% style="background-color:#f2f2f2; width:252px" %) |(% style="background-color:#f2f2f2; width:392px" %) | ||
268 | |||
269 | (% style="display:none" %) | ||
270 | |||
271 | |||
272 | |||
273 | == 3.5 TODO list == | ||
274 | |||
275 | |||
276 | * --Solve "DC no in band" issue for Senet Downink in EU868 band.-- | ||
277 | * --Fixed fwd IN865 global configuration.-- | ||
278 | * --Fixed Basic-station no connection after gateway reboot/power cycle.-- | ||
279 | * --Fix GPS time issue-- | ||
280 | * --Online/offline detect and reload improvement for LPS8v2 for UDP Connection.-- | ||
281 | * --Online/offline detect and reload improvement for LPS8v2 for Chirpstack Gateway-Bridge Connection-- | ||
282 | * Fix Redis Memory Leak for build-in TTS | ||
283 | * --Fix AS923 Frequency Band Typo in Web (LPS8v2)-- | ||
284 | |||
285 | (% style="display:none" %) | ||
286 | |||
287 | |||
288 | |||
289 | == 3.6 Finish list == | ||
290 | |||
291 | |||
292 | * Add Fall Back IP to LPS8v2 | ||
293 | * Add Login-Authentication | ||
294 | |||
295 | (% style="display:none" %) | ||
296 | |||
297 | |||
298 | |||
299 | = 4. Disable OTA Update = | ||
300 | |||
301 | |||
302 | It is possible for clients to disable the OTA update feature. Below is the instruction: | ||
303 | |||
304 | |||
305 | === LPS8V2: === | ||
306 | |||
307 | [[image:image-20230830104754-1.png||height="472" width="878"]] | ||
308 | |||
309 | |||
310 | === LPS8/LPS8N/DLOS8/DLOS8N/LG308/LG308N: === | ||
311 | |||
312 | |||
313 | * Using Command Line | ||
314 | |||
315 | (% class="box infomessage" %) | ||
316 | ((( | ||
317 | sed -i 's/0 2 \* \* \* \/etc\/init.d\/opkg-update start/\#0 2 \* \* \* \/etc\/init.d\/opkg-update start/g' /etc/crontabs/root | ||
318 | |||
319 | |||
320 | /etc/init.d/opkg-update disable | ||
321 | ))) | ||
322 | |||
323 | |||
324 | |||
325 |