Wiki source code of LA66 LoRaWAN Module

Version 64.1 by Edwin Chen on 2022/07/02 21:03

Hide last authors
Edwin Chen 1.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
Edwin Chen 6.1 5 = LA66 LoRaWAN Module =
Edwin Chen 1.1 6
Edwin Chen 6.1 7 == What is LA66 LoRaWAN Module ==
8
Edwin Chen 64.1 9 **Dragino LA66** is a small wireless LoRaWAN module that offers a very compelling mix of long-range, low power consumption, and secure data transmission. It is designed to facilitate developers to quickly deploy industrial-level LoRaWAN and IoT solutions. It helps users to turn the idea into a practical application and make the Internet of Things a reality. It is easy to create and connect your things everywhere.
Edwin Chen 1.1 10
Edwin Chen 64.1 11 **LA66 **is a ready-to-use module that includes the LoRaWAN v1.0.4 protocol. The LoRaWAN stack used in LA66 is used in more than 1 million LoRaWAN End Devices deployed world widely. This mature LoRaWAN stack greatly reduces the risk for developers to make a LoRaWAN End device. External MCU can use AT command to call LA66 and start to transmit data via the LoRaWAN protocol.
Edwin Chen 1.1 12
13
Edwin Chen 64.1 14 LA66 is equipped with **TCXO crystal** which ensures the module can achieve the stable performance in extreme temperatures.
Edwin Chen 1.1 15
16
Edwin Chen 64.1 17 **Each LA66 **module includes a world-unique OTAA key for LoRaWAN registration.
18
19
20
Edwin Chen 6.1 21 == Specification ==
Edwin Chen 1.1 22
Edwin Chen 3.1 23 [[image:image-20220517072526-1.png]]
Edwin Chen 1.1 24
Edwin Chen 3.1 25 Input Power Range: 1.8v ~~ 3.7v
Edwin Chen 1.1 26
Edwin Chen 3.1 27 Power Consumption: < 4uA.
Edwin Chen 1.1 28
Edwin Chen 3.1 29 Frequency Range: 150 MHz ~~ 960 MHz
Edwin Chen 1.1 30
Edwin Chen 3.1 31 Maximum Power +22 dBm constant RF output
32
33 High sensitivity: -148 dBm
34
35 Temperature:
36
37 * Storage: -55 ~~ +125℃
38 * Operating: -40 ~~ +85℃
39
40 Humidity:
41
42 * Storage: 5 ~~ 95% (Non-Condensing)
43 * Operating: 10 ~~ 95% (Non-Condensing)
44
45 LoRa Tx Current: <90 mA at +17 dBm, 108 mA at +22 dBm
46
47 LoRa Rx current: <9 mA
48
49 I/O Voltage: 3.3v
Edwin Chen 5.1 50
51
Edwin Chen 6.1 52 == AT Command ==
Edwin Chen 5.1 53
54 AT Command is valid over Main TXD and Main RXD. Serial Baud Rate is 9600. AT commands can be found in AT Command documents.
55
56
Edwin Chen 6.1 57 == Pin Mapping ==
Edwin Chen 5.1 58
Xiaoling 10.2 59 [[image:image-20220523101537-1.png]]
Edwin Chen 5.1 60
Edwin Chen 6.1 61 == Land Pattern ==
Edwin Chen 5.1 62
63 [[image:image-20220517072821-2.png]]
64
65
Edwin Chen 6.1 66 == Part Number ==
Edwin Chen 5.1 67
68 Part Number: **LA66-XXX**
69
70 **XX**: The default frequency band
71
72 * **AS923**: LoRaWAN AS923 band
73 * **AU915**: LoRaWAN AU915 band
74 * **EU433**: LoRaWAN EU433 band
75 * **EU868**: LoRaWAN EU868 band
76 * **KR920**: LoRaWAN KR920 band
77 * **US915**: LoRaWAN US915 band
78 * **IN865**: LoRaWAN IN865 band
79 * **CN470**: LoRaWAN CN470 band
Edwin Chen 6.1 80
81 = LA66 LoRaWAN Shield =
82
83 LA66 LoRaWAN Shield is the Arduino Breakout PCB to fast test the features of LA66 module and turn Arduino to support LoRaWAN.
84
Edwin Chen 11.1 85 == Pin Mapping & LED ==
Edwin Chen 6.1 86
Edwin Chen 11.1 87 == Example: Use AT Command to communicate with LA66 module via Arduino UNO. ==
88
89 == Example: Join TTN network and send an uplink message, get downlink message. ==
90
91 == Example: Log Temperature Sensor(DHT11) and send data to TTN, show it in DataCake. ==
92
Edwin Chen 13.1 93 == Upgrade Firmware of LA66 LoRaWAN Shield ==
Edwin Chen 11.1 94
Herong Lu 20.1 95 === what needs to be used ===
Edwin Chen 11.1 96
Herong Lu 20.1 97 1.LA66 LoRaWAN Shield that needs to be upgraded
Edwin Chen 13.1 98
Herong Lu 20.1 99 2.Arduino
100
101 3.USB TO TTL
102
103 [[image:image-20220602100052-2.png]]
104
105 === Wiring Schematic ===
106
107 [[image:image-20220602101311-3.png]]
108
109 LA66 LoRaWAN Shield  >>>>>>>>>>>>USB TTL
110
111 GND  >>>>>>>>>>>>GND
112
113 TXD  >>>>>>>>>>>>TXD
114
115 RXD  >>>>>>>>>>>>RXD
116
117 JP6 of LA66 LoRaWAN Shield needs to be connected with yellow jumper cap
118
119 Connect to the PC after connecting the wires
120
121 [[image:image-20220602102240-4.png]]
122
123 === Upgrade steps ===
124
Herong Lu 32.1 125 ==== Dial the SW1 of the LA66 LoRaWAN Shield to the ISP's location as shown in the figure below ====
Herong Lu 20.1 126
Herong Lu 32.1 127 [[image:image-20220602102824-5.png]]
128
129 ==== Press the RST switch on the LA66 LoRaWAN Shield once ====
130
131 [[image:image-20220602104701-12.png]]
132
133 ==== Open the upgrade application software ====
134
Herong Lu 39.1 135 Software download link:  [[https:~~/~~/www.dragino.com/downloads/index.php?dir=LSN50-LoRaST/Utility/LSN50N/>>https://www.dragino.com/downloads/index.php?dir=LSN50-LoRaST/Utility/LSN50N/]]
136
Herong Lu 32.1 137 [[image:image-20220602103227-6.png]]
138
139 [[image:image-20220602103357-7.png]]
140
141 ===== Select the COM port corresponding to USB TTL =====
142
143 [[image:image-20220602103844-8.png]]
144
145 ===== Select the bin file to burn =====
146
147 [[image:image-20220602104144-9.png]]
148
149 [[image:image-20220602104251-10.png]]
150
151 [[image:image-20220602104402-11.png]]
152
153 ===== Click to start the download =====
154
155 [[image:image-20220602104923-13.png]]
156
157 ===== The following figure appears to prove that the burning is in progress =====
158
159 [[image:image-20220602104948-14.png]]
160
161 ===== The following picture appears to prove that the burning is successful =====
162
163 [[image:image-20220602105251-15.png]]
164
Edwin Chen 6.1 165 = LA66 USB LoRaWAN Adapter =
166
Edwin Chen 7.1 167 LA66 USB LoRaWAN Adapter is the USB Adapter for LA66, it combines a USB TTL Chip and LA66 module which can easy to test the LoRaWAN feature by using PC or embedded device which has USB Interface.
168
Herong Lu 52.1 169 Before use, please make sure that the computer has installed the CP2102 driver
170
Edwin Chen 14.1 171 == Pin Mapping & LED ==
Edwin Chen 7.1 172
Edwin Chen 11.1 173 == Example Send & Get Messages via LoRaWAN in PC ==
Edwin Chen 7.1 174
Herong Lu 58.1 175 Connect the LA66 LoRa Shield to the PC
176
Herong Lu 61.1 177 [[image:image-20220602171217-1.png||height="615" width="915"]]
Herong Lu 58.1 178
179 Open the serial port tool
180
181 [[image:image-20220602161617-8.png]]
182
183 [[image:image-20220602161718-9.png||height="529" width="927"]]
184
185 Press the reset switch RST on the LA66 LoRa Shield.
186
187 The following picture appears to prove that the LA66 LoRa Shield successfully entered the network
188
189 [[image:image-20220602161935-10.png]]
190
191 send instructions: AT+SENDB=<confirn_status>,<Fport>,<data_len>,<data>
192
193 example: AT+SENDB=01,02,8,05820802581ea0a5
194
195 [[image:image-20220602162157-11.png]]
196
197 Check to see if TTN received the message
198
199 [[image:image-20220602162331-12.png||height="547" width="1044"]]
200
Edwin Chen 11.1 201 == Example Send & Get Messages via LoRaWAN in RPi ==
202
Herong Lu 52.1 203 Connect the LA66 LoRa Shield to the RPI
Edwin Chen 12.1 204
Herong Lu 61.1 205 [[image:image-20220602171233-2.png||height="592" width="881"]]
Herong Lu 43.1 206
Herong Lu 52.1 207 Log in to the RPI's terminal and connect to the serial port
208
209 [[image:image-20220602153146-3.png]]
210
211 Press the reset switch RST on the LA66 LoRa Shield.
212 The following picture appears to prove that the LA66 LoRa Shield successfully entered the network
213
214 [[image:image-20220602154928-5.png]]
215
216 send instructions: AT+SENDB=<confirn_status>,<Fport>,<data_len>,<data>
217
218 example: AT+SENDB=01,02,8,05820802581ea0a5
219
220 [[image:image-20220602160339-6.png]]
221
222 Check to see if TTN received the message
223
224 [[image:image-20220602160627-7.png||height="468" width="1013"]]
225
Edwin Chen 8.1 226 === Install Minicom ===
227
Herong Lu 46.1 228 Enter the following command in the RPI terminal
229
230 apt update
231
232 [[image:image-20220602143155-1.png]]
233
234 apt install minicom
235
236 [[image:image-20220602143744-2.png]]
237
Herong Lu 38.1 238 === Send PC's CPU/RAM usage to TTN via script. ===
Edwin Chen 11.1 239
Herong Lu 38.1 240 ==== Take python as an example: ====
Edwin Chen 11.1 241
Herong Lu 38.1 242 ===== Preconditions: =====
243
Herong Lu 62.1 244 1.LA66 USB LoRaWAN Adapter works fine
Herong Lu 38.1 245
Herong Lu 62.1 246 2.LA66 USB LoRaWAN Adapter  is registered with TTN
Herong Lu 38.1 247
248 ===== Steps for usage =====
249
Herong Lu 62.1 250 1.Press the reset switch RESET on the LA66 USB LoRaWAN Adapter
Herong Lu 38.1 251
252 2.Run the script and see the TTN
253
254 [[image:image-20220602115852-3.png]]
255
256
257
Edwin Chen 11.1 258 == Example: LA66 USB Module got a message from LA66 LoRa Shield and send the sensor data to NodeRed. ==
259
Edwin Chen 13.1 260
261 == Upgrade Firmware of LA66 USB LoRaWAN Adapter ==
Herong Lu 63.1 262
263