Wiki source code of UART Access for LoRa ST v4 base model
Version 36.1 by Edwin Chen on 2023/05/15 17:21
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
26.16 | 1 | (% class="wikigeneratedid" %) |
![]() |
14.1 | 2 | **Table of Contents:** |
3 | |||
4 | {{toc/}} | ||
5 | |||
6 | |||
7 | |||
8 | |||
![]() |
15.1 | 9 | = 1. LoRaST v4 base Hardware = |
![]() |
1.1 | 10 | |
![]() |
15.2 | 11 | |
![]() |
29.1 | 12 | Below hardware use LoRaST v4 module. They supports UART Access for AT Command and Firmware Upgrade. |
![]() |
1.1 | 13 | |
![]() |
26.22 | 14 | {{velocity}} |
15 | $xwiki.ssfx.use("js/xwiki/table/table.css") | ||
16 | $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true) | ||
17 | {{/velocity}} | ||
![]() |
26.13 | 18 | |
![]() |
29.1 | 19 | (% border="1" cellspacing="5" class="doOddEven filterable grid sortable" id="tableid" style="width:829px" %) |
20 | |(% style="background-color:#d9e2f3; width:290px" %)**Models**|(% style="background-color:#d9e2f3; color:#0070c0; width:172px" %)**Mother Board**|(% style="background-color:#d9e2f3; color:#0070c0; width:116px" %)**UART for AT Commands**|(% style="background-color:#d9e2f3; color:#0070c0; width:248px" %)**UART for Upgrade Firmware** | ||
21 | |(% style="width:290px" %)PS-LB, PS-LB-NA, SDI12-LB|(% style="width:172px" %)SIB|(% style="width:116px" %)Instruction|(% style="width:248px" %)Instruction | ||
22 | |(% style="width:290px" %)((( | ||
23 | SN50v3, S31-LB, S31B-LB, | ||
![]() |
26.13 | 24 | |
![]() |
29.1 | 25 | D20-LB.D20S-LB, D21-LB, D22-LB |
26 | )))|(% style="width:172px" %)SN50v3|(% style="width:116px" %) |(% style="width:248px" %) | ||
27 | |(% style="width:290px" %)LHT65N|(% style="width:172px" %)LHT65N|(% style="width:116px" %) |(% style="width:248px" %) | ||
28 | |(% style="width:290px" %) |(% style="width:172px" %) |(% style="width:116px" %) |(% style="width:248px" %) | ||
![]() |
26.24 | 29 | |
![]() |
15.1 | 30 | = 2. UART for AT Commands = |
31 | |||
32 | == 2.1 Generate software set up for AT Commands via UART == | ||
33 | |||
![]() |
15.2 | 34 | |
![]() |
26.25 | 35 | ~1. Use a general serial tool. |
![]() |
9.1 | 36 | |
![]() |
26.25 | 37 | 2. Connect PC to device's UART interface |
38 | |||
39 | 3. Set up serial tool with : BaudRate: 9600, databit:8, No parity, No flow control. | ||
40 | |||
41 | ((( | ||
42 | 4. The password is the last six characters of APPSKEY or PIN of box | ||
43 | |||
![]() |
20.2 | 44 | **Example:** |
![]() |
16.1 | 45 | |
46 | APPSKEY= 41 85 71 A7 5D 7E 54 52 25 58 74 85 96 14 74 85 | ||
47 | |||
48 | The password:147485 | ||
![]() |
19.1 | 49 | |
![]() |
20.1 | 50 | [[image:image-20230329162900-1.png||height="302" width="648"]] |
![]() |
19.1 | 51 | |
52 | |||
![]() |
16.1 | 53 | ))) |
54 | |||
![]() |
9.1 | 55 | [[image:image-20221224170218-1.png||height="497" width="640"]] |
56 | |||
57 | |||
![]() |
15.1 | 58 | == 2.2 UART Connection for SIB mother board == |
![]() |
9.1 | 59 | |
![]() |
15.3 | 60 | |
![]() |
9.1 | 61 | [[image:image-20221224171304-3.png||height="545" width="863"]] |
62 | |||
63 | |||
![]() |
21.1 | 64 | == 2.3 UART Connection for SN50v3 base mother board == |
65 | |||
![]() |
34.1 | 66 | [[image:image-20230515102801-1.png]] |
![]() |
21.1 | 67 | |
![]() |
26.24 | 68 | |
![]() |
15.1 | 69 | = 3. UART for Firmware Upgrade = |
![]() |
9.1 | 70 | |
![]() |
28.1 | 71 | == 3.1 Check Your device already have bootloader == |
![]() |
13.1 | 72 | |
![]() |
28.1 | 73 | === 3.1.1 What is Dragino Bootloader? === |
![]() |
24.1 | 74 | |
![]() |
26.24 | 75 | |
![]() |
24.1 | 76 | Dragino Bootloader is a customizer made bootloader which support below features: |
77 | |||
![]() |
36.1 | 78 | * OTA Update via LoRa |
79 | * OTA Batch update configure via LoRa | ||
![]() |
24.1 | 80 | |
![]() |
31.1 | 81 | All Dragino End Devices base on LoRa ST v4 supports Dragino Bootloader. |
![]() |
24.1 | 82 | |
83 | |||
![]() |
28.1 | 84 | === 3.1.2 How can i know if my device already have bootloader? === |
![]() |
26.26 | 85 | |
![]() |
28.1 | 86 | If a device has a bootloader. it will output bootloader info to UART when boot. As below: |
![]() |
15.3 | 87 | |
![]() |
28.1 | 88 | [[image:image-20230514150410-1.png||height="398" width="815"]] |
![]() |
22.1 | 89 | |
![]() |
23.1 | 90 | |
![]() |
28.1 | 91 | === 3.1.3 How to upload bootloader to device? === |
![]() |
23.1 | 92 | |
![]() |
32.1 | 93 | If your is LoRa ST v4 base hardware and doesn't have bootloader. You can upload a bootloader to it. |
![]() |
23.1 | 94 | |
![]() |
36.1 | 95 | **[[Downlink Link for OTA bootloader>>https://www.dropbox.com/sh/g4cp2lm85ovr8hu/AADX-4aEE-7SuKQAKTWrgKHIa?dl=0]].** |
![]() |
23.1 | 96 | |
![]() |
36.1 | 97 | |
98 | **Update a firmware via TremoProgrammer:** | ||
99 | |||
100 | LoRaSTv4 Base hardware support UART update firmware. the UART connection is the same as AT Command connection, with the need for two extra action. See below for the steps: | ||
101 | |||
102 | (% style="color:blue" %)**Step1**(%%): Set BOOT Switch to (% style="color:blue" %)**PROG**(%%) mode. PROG mode is for update firmware specially. | ||
103 | |||
104 | (% style="color:blue" %)**Step2**(%%): Press (% style="color:blue" %)**Reset**(%%) button, the module will then boot into program mode. | ||
105 | |||
106 | (% style="color:blue" %)**Step3**(%%): Use (% style="color:blue" %)**TremoProgrammer**(%%) to update the firmware to LoRaST v4. | ||
107 | |||
108 | (% style="color:blue" %)**Step4**(%%): Set BOOT Switch to (% style="color:blue" %)**FLASH**(%%) position. Press Reset button again and module will run the new software. | ||
109 | |||
110 | |||
111 | Below is the method for how to update via (% style="color:blue" %)**TremoProgrammer:** | ||
112 | |||
113 | 1. **TremoProgrammer** download link: [[https:~~/~~/www.dropbox.com/sh/j0qyc7a9ejit7jk/AACtx2tK4gEv6YFXMIVUM4dLa?dl=0>>url:https://www.dropbox.com/sh/j0qyc7a9ejit7jk/AACtx2tK4gEv6YFXMIVUM4dLa?dl=0]] | ||
114 | |||
115 | 2. Run** (% style="color:blue" %)TremoProgrammer.(%%)** | ||
116 | |||
117 | 3. Choose software and set the address to (% style="color:blue" %)**0x08000000**(%%). | ||
118 | |||
119 | 4. Rember to set BOOT Switch to (% style="color:blue" %)**FLASH**(%%) after update finish. And you should be about to see Bootloader info in output after update | ||
120 | |||
121 | [[image:image-20230515171651-1.png]] | ||
122 | |||
123 | |||
124 | |||
![]() |
28.1 | 125 | == 3.2 Update Firmware (Assume the device already have a bootloader) == |
126 | |||
127 | === 3.2.1 Update a firmware via Dragino bootloader === | ||
128 | |||
129 | |||
130 | |||
131 | |||
132 | === 3.2.2 Update a firmware via TremoProgrammer === | ||
133 | |||
134 | Make sure your device already bootloader while use this update. Other device won't be able to boot ( can be solve by upload a bootloader to the device). | ||
135 | |||
![]() |
13.1 | 136 | LoRaSTv4 Base hardware support UART update firmware. the UART connection is the same as AT Command connection, with the need for two extra action. See below for the steps: |
137 | |||
![]() |
15.4 | 138 | (% style="color:blue" %)**Step1**(%%): Set BOOT Switch to (% style="color:blue" %)**PROG**(%%) mode. PROG mode is for update firmware specially. |
![]() |
13.1 | 139 | |
![]() |
15.4 | 140 | (% style="color:blue" %)**Step2**(%%): Press (% style="color:blue" %)**Reset**(%%) button, the module will then boot into program mode. |
![]() |
13.1 | 141 | |
![]() |
15.4 | 142 | (% style="color:blue" %)**Step3**(%%): Use (% style="color:blue" %)**TremoProgrammer**(%%) to update the firmware to LoRaST v4. |
![]() |
13.1 | 143 | |
![]() |
15.4 | 144 | (% style="color:blue" %)**Step4**(%%): Set BOOT Switch to (% style="color:blue" %)**FLASH**(%%) position. Press Reset button again and module will run the new software. |
![]() |
13.1 | 145 | |
146 | |||
![]() |
15.4 | 147 | Below is the method for how to update via (% style="color:blue" %)**TremoProgrammer:** |
![]() |
13.1 | 148 | |
149 | 1. Software download link: [[https:~~/~~/www.dropbox.com/sh/j0qyc7a9ejit7jk/AACtx2tK4gEv6YFXMIVUM4dLa?dl=0>>url:https://www.dropbox.com/sh/j0qyc7a9ejit7jk/AACtx2tK4gEv6YFXMIVUM4dLa?dl=0]] | ||
150 | |||
![]() |
15.4 | 151 | 2. Run** (% style="color:blue" %)TremoProgrammer.(%%)** |
![]() |
13.1 | 152 | |
![]() |
36.1 | 153 | 3. Choose software and set the address to (% style="color:blue" %)**0x0800D000**(%%). (% style="color:red" %)VERY IMPORTANT for this address. |
![]() |
13.1 | 154 | |
![]() |
15.4 | 155 | 4. Rember to set BOOT Switch to (% style="color:blue" %)**FLASH**(%%) after update |
![]() |
13.1 | 156 | |
157 | [[image:image-20221224174341-4.png||height="471" width="374"]] |