Update via LoRa OTA
1. Overview
There are some new models of Dragino sensors support OTA update via Private LoRa Protocol, (Even the sensor runs LoRaWAN protocol by default).
User can use the OTA update to update the configure file or firmware to the sensors.
2. Support Models
Here list the models that support OTA Update.
| Models | Firmware Version | Comments |
|---|---|---|
| LoRaWAN model with -LB, -LB2 or LS Suffix | All firmware versions | |
| LHT65N/S | All firmware versions | |
| AQS01-L | All firmware versions | |
| DS20L | All firmware versions | |
| SVC01-LS2 | All firmware versions | |
| DishSense | All firmware versions | |
| LT-22222-LA | All firmware versions | |
| LHT65N/S-E5 | All firmware versions | |
| LHT65N/S-PIR | All firmware versions | |
| LPT01 | All firmware versions | |
| T68DL | All firmware versions | |
| WSC2-L | All firmware versions | |
| AirFlow-LN | All firmware versions | |
| LWL04 | All firmware versions | |
| A0S02-L | All firmware versions | |
| CO2-LE | All firmware versions | |
| POM01-L | All firmware versions | |
| AI52 | All firmware versions | |
| PF52 | All firmware versions | |
| LC01 | All firmware versions | |
| LC03 | All firmware versions | |
| LC04 | All firmware versions | |
| IBPv1 | All firmware versions | |
| Thermostat1 | All firmware versions | |
| PB01 | All firmware versions | |
| PB05-L | All firmware versions | |
| LA66 LoRaWAN Module | All firmware versions | |
| LA66 LoRaWAN Shield | All firmware versions | |
| LA66 USB LoRaWAN Adapter | All firmware versions | |
| LTS5 | All firmware versions | |
| DMT01 | All firmware versions | |
| IVS-LN | All firmware versions | |
| LHT65N-VIB | All firmware versions |
When upgrading firmware via OTA, always use the firmware version without the bootloader.
Model Firmware link: link
3. How to do OTA update
3.1 Required Components
To perform an OTA firmware upgrade for the target device, an LA66 USB LoRaWAN Adapter is required. Before using it for the OTA upgrade, the LA66 must first be updated with the OTA_DONGLE firmware. This is a necessary preparation step for the subsequent OTA upgrade of the target device.
- Mobile Phone: Refer to 3.2.1 for instructions on how to flash the OTA_DONGLE firmware onto the LA66 using an Android phone.
- PC: Refer to Section 3.3.1 for instructions on flashing the bootloader and OTA_DONGLE firmware onto the LA66 using a PC.
- Software: OTA_Tool. Please select the mobile version of the OTA Tool (only applicable to Android phones) and the PC version of the OTA Tool according to your needs.


3.2 OTA Update Firmware via Mobile Phone + LA66
3.2.1 LA66 upgrade
The LA66 USB connects to the phone via the USB-Type C adapter.

After the connection is successful, the phone will pop up a prompt box, check it, and click to "OK".
Some mobile phone models need to manually enable the OTG function to properly identify external devices.

Then, the Device Tool will automatically jump to the main interface of the tool.
In order to ensure that the LA66 USB works properly, make sure that there is a corresponding bootloader before updating the firmware.
On the main interface, tap the menu and select Simulation Sensor Uplink by LA66.

Check the log output on the page:

If no log output is displayed (the page is blank): The LoRa_OTA_Bootloader is not installed, so you must first flash it using the PC version of the upgrade tool. Refer to 3.3.1 for detailed instructions.
If log output is displayed (the page is not blank): The LA66 already has the LoRa_OTA_Bootloader installed. Return to the main interface and proceed with the following steps.
In the upper left corner of the main interface of the software, click "Upgrade Device" and select the "LaA66" type.

Follow the steps in order:
① Click "SELECT UPGRADE FILE" to choose the firmware to upgrade. Before using LA66 as a firmware flashing tool for LB series devices, you must first flash the OTA_DONGLE firmware onto LA66. Click here to get OTA_DONGLE V1.1.

② After clicking Start, wait for the LA66 to burn in

When the upgrade is complete, it will prompt:"update successfully".

After successfully flashing the OTA firmware onto the LA66, unplug it from the mobile phone and reconnect it before proceeding with the following steps.
3.2.2 LB series
- Upgrade of external tools: LA66 USB


The LA66 USB connects to the phone via the USB-Type c adapter.

After the connection is successful, the phone will pop up a prompt box, check it and click to confirm.
Note: Some models of cell phones require the OTG function of the cell phone system to be enabled manually in order to recognize the external device correctly.**

Then, the Device Tool will automatically jump to the main interface of the tool.
In the upper left corner of the main interface of the software, click "Upgrade Device" and select the LB type.

Follow the steps in order:
① Enter the DUIEI,.
② Enter the PIN (The PIN is the last 8 bytes of the APPSKEY, totaling 16 hexadecimal characters. For details, refer to FAQ 4.2.).
③ Select the LoRa frequency to match the original frequency of the node.
④ Choose the upgrade file. (The OTA upgrade file must be a .bin file without the bootloader.)
⑤ Click "Start". When "search..." appears in the center of the screen, press the button on the device to be upgraded to restart it.
- If you are unable to access the upgrade for an extended period of time, you can repeat the device reset step.
- If you do not want to open the device cover, press and hold the ACT button for 5 seconds until the device's green LED starts blinking. This is equivalent to pressing the reset button.

When the upgrade is complete, it will prompt:"update successfully".

3.3 OTA Update Firmware via PC + LA66
Make sure that the USB-to-Serial driver for the LA66 USB LoRaWAN Adapter is properly installed on your PC. Without the required driver, the corresponding COM port will not be available for selection on your PC.
3.3.1 LA66 Upgrade
1. Check Whether the Bootloader Is Installed
Connect the LA66 USB LoRaWAN Adapter to your PC and open a serial port tool. Press the RST button on the LA66 V1.1 USB LoRaWAN Adapter to restart it (resetting the LA66 V1.2 is not required). Check the serial port output to determine whether the LoRa_OTA_Bootloader is installed.
If the bootloader is installed, the serial port output will not be blank, as shown below.

Dragino ships the LA66 USB LoRaWAN Adapter with a bootloader pre-installed. The latest bootloader version is V1.4.
Regardless of whether the bootloader is already installed, you must proceed with the firmware burning procedure below to install the OTA_DONGLE application firmware.
- If the bootloader is already installed: You can proceed directly to flashing the
OTA_DONGLEapplication firmware. - If the bootloader is not installed: Flash the bootloader first, then flash the
OTA_DONGLEapplication firmware. - If you need to upgrade the existing bootloader: Flash the new bootloader first, then flash the
OTA_DONGLEapplication firmware.
2. Enter Firmware Burning Mode
The procedure depends on the LA66 hardware version.
For LA66 V1.1:
Use the yellow jumper cap to short the BOOT and RX pins, then press the RESET button. If you do not have a jumper cap, you can use a wire to short the BOOT and RX pins instead.

For LA66 V1.2:
The LA66 USB LoRaWAN Adapter V1.2 does not have a RESET button. Use a DuPont wire to connect the BOOT pin to the RX pin, then connect the LA66 to a USB hub or a USB port on your computer to enter firmware burning mode.

- After successfully burning the firmware, unplug the LA66 V1.2 and reconnect it to the computer to exit firmware burning mode.
- If firmware burning via a USB hub is unsuccessful, try connecting the LA66 directly to the PC.
3. Flash the Firmware Using Tremo Programmer
The Bootloader and OTA_DONGLE application firmware use the same burning procedure. The only differences are the firmware file and the flash address.
You can download Bootloader firmware and OTA_DONGLE firmware from this link.

Step 1: Download and Open Tremo Programmer
Download the Tremo Programmer software and open it on your PC.
Step 2: Select the COM Port
Select the COM port corresponding to the LA66 USB LoRaWAN Adapter.
Step 3: Select the Firmware File and Flash Address
Select the appropriate .bin firmware file and configure the corresponding flash address according to the firmware being burned.
- Bootloader firmware: Use the bootloader
.binfile and set the flash address to0x08000000. - OTA_DONGLE firmware: Use the
OTA_DONGLE.binfile and set the flash address to0x0800D000.
The first line uses the default address 0x08000000. To use a custom flash address, modify the second line, check only the second line, and select the appropriate firmware file to burn.


Step 4: Start Firmware Burning
Click the start/download button to begin burning the firmware.

Step 5: Check the Burning Process
Wait for the firmware burning process to complete.
The following screenshot shows a successful firmware burning result.
3.3.2 End Device Upgrade
Video Instruction: -- OTA Upgrade Firmware (via LoRa) of LoRaWAN Sensors : https://youtu.be/SSvOqvBrwGg
Before starting the OTA upgrade, download and install the Dragino Sensor Manager Utility. Refer to Section 3.1 for the download link.
Step1: Plug LA66 USB to PC and run OTA_Tool.

Step2: Set up OTA Tool
-
DevEUI: Input DevEUI of your sensor
-
Password: Password of your sensor (The Password is the last 8 bytes of the APPSKEY, totaling 16 hexadecimal characters. For details, refer to FAQ 4.2.)
-
Port: Com port of LA66 USB
-
LoRa_Freq: Choose the shipped frequency band of your sensor.
-
Upload_File: The firmware to be upload to the sensor. make sure the firmware is with surfix _without_bootloader. For example: LHT65N_EU868_v1.5_without_bootloader.
-
DEUI_File: If customer has lots of sensors. He can also import the Dev EUI files and use droplist to choose the sensor to update. (If you did not ask us for a uniform update file, then you do not need to use this field, please ignore it.) Format is as below:

Step3: Click "Start" in the OTA tool.
Sometimes it takes a while after clicking "Start" for LA66 to start and broadcast the update process using the Dev EUI and password.
Step4: Press reset button on the end node, or re-activate the end node.
When the OTA Tool displays “LA66 is scanning for sensor Dev EUI ‘DevEUI’. Please reset the sensor for connection and update”, press and hold the ACT button on the terminal node for 5 seconds to perform a terminal node reset so that the OTA Tool can connect successfully.

In every reboot/ reactivate, the end node will check if there is update request. If end node gets the update request from LA66. End node will check if the Dev EUI and Password match. If match, End node will establish connection with LA66 USB for OTA update.
Step5: Check result.
Below shows the update successul result.

4. FAQ
4.1 OTA_Tool supports two upgrade methods for -LB products.
Note: The premise of using OTA_Tool is that all your devices have bootloaders. 1. Only devices with bootloader can perform OTA upgrades(OTA upgrade method). 2. This is because the boot loader's address is 0x08000000, the general functional firmware's address is 0x0800D000, and burning the firmware through OTA_Tool will only write content to the address 0x0800D000. So whether you use the OTA_Tool's OTA upgrade method or the UART upgrade method, you can only use it to download firmware without a bootloader, otherwise you will incorrectly place the bootloader at address 0x08000000.
- For OTA_Tool, you can choose to use the OTA upgrade method, refer to the above upgrade steps in this user manual.

- Of course, if you have a USB-TTL adapter, you can also choose to use the UART upgrade method via OTA_Tool.

4.2 Where to find OTA Password?
Each device has a shipped label with OTA Password which is 16 chars. like below. If user don't find this, please send us a photo for the device with Dev EUI to support@dragino.com . and we will search the password for you.

4.3 How about if i upgrade a crashed firmware via OTA update?
OTA update is done via Bootloader and only change the firmware partition. So update a crash firmware via OTA update won't destroy bootloader and user can use OTA method to update again.
Here are notice:
-
OTA update frequency depend on the firmware frequency. If there is no frequency in the firmware. Bootloader will use EU868 as default frequency.
-
OTA update require a reset or reactivate action. If the crash firmware doesn't have them work, user need to manuall push the physic reset button on the PCB or power off/on device.
4.4 Will OTA update effect the Local LoRaWAN Network.
User can configure the OTA_Frequency.txt file to change the Update frequency point so it won't conflict with the general LoRa Frequency. See below for the file as reference and explain. The OTA update also use a none-use SF (SF=5) which won't conflict with the current use SF.
#Define the OTA frequency use for OTA.
#End Node has FRE1 and SF=5. So don't change FRE1 settings
#FRE2 include several frequencies point.
#PC first use FRE1 to create connection to end node, then use one of FRE2 frequencies to process downlink.
#Format:
#Frequency Band;FRE1;FRE2
EU868;869.0;868.7,868.9
IN865;866.9;865.1,865.3
KZ865;866.5;866.1,866.3
KR920;921.7;921.3,921.5
MA869;870.5;870.7,870.9
US915;923.1;923.7,924.1
CN470;505.5;605.7,505.9
AU915;923.7;924.7,925.5
AS923;923.5;923.3,923.7
AS923-2;921.2;921.8,922.0
AS923-3;916.4;917.0,917.2
AS923-4;917.1;917.6,917.8
EU433;434.5;433.9,434.1
RU864;869.3;869.5,869.7
4.5 The old version LA66 is different from the new version LA66. Can OTA_Tool be used for both versions?
The most obvious hardware difference between LA66 V1 and LA66v2 when burning is the presence of a "RESET "button, and the RESET operation is only for LA66 without a boot loader, you can refer to this link to learn how to upgrade LA66 without a boot loader:LA66 USB LoRaWAN Adapter User Manual - DRAGINO

In summary, as long as your LA66 has a boot loader, either LA66 V1 or LA66 V2 can use OTA_Tool.
4.6 Why can't LA66 burn its own working firmware after it is used for OTA upgrade of -LB products?
We are sorry for the inadequacy of LA66 for OTA updates in the past.
- In the past, the download address of LA66 OTA DONGLE V1.0 was 0x08000000, and the address of the bootloader that existed by default when the LA66 was shipped was also 0x08000000.
Therefore, when you burn OTA_Firmwar v1.0 (LA66 OTA DONGLE v1.0) for the LA66 in order to use the LA66‘s ability to perform OTA upgrades for -LB products, the LA66’s bootloader is overridden.
So if you need to switch back to the LA66's working firmware, you'll need to refer to this link for instructions to burn firmware with a bootloader for the LA66.

- For the new version of LA66 OTA DONGLE V1.1, we have changed the supported download address to 0x0800D000 the same as other working firmware addresses, so you can simply use OTA_Tool to burn LA66 OTA DONGLE V1.1 and LA66 working firmware for LA66.
4.7 Why I see bootloader has different frequency vs the firmware frequency band
Below is a booting process which shows bootloader has a different band(EU868) vs the firmware frequency band(AU915)

Since Bootloader bands is only for private LoRa OTA, it will not effect the actually deployment which use firmware frequency band.
The reason for this mismatch is due to the logic of how boot-loader set frequency band:
- The firmware writes the frequency band to a register (frequency register).
- When the device starts up, the bootloader reads this register and uses the value as the bootloader’s OTA frequency band.
- If the firmware is upgraded or
AT+FDRis executed to clear the configuration, the frequency-band register is erased. After reboot, In this case, the bootloader cannot read a valid value, it uses EU868 as the OTA frequency band. On the next boot, the device will use the same frequency band as the firmware.
5. OTA Tool Known Bug:
- If user click "Start" but there is issue during update. User may need to close and open the tool again.