LoRaWAN Operations

Operations offers two different features on one page: FOTA (Firmware Upgrade Over the Air) or Multicast Messaging.

The device offers the option for a Firmware Upgrade Over the Air (FOTA) using your LoRaWAN network. To use this feature, you must properly configure your LoRa network and end-devices (must be joined to the network). You may set a countdown for an immediate update or schedule the upgrade for a specific time. You can also update multiple devices on your LoRa network.

The device also offers the option of Multicast Messaging over the LoRaWAN network.

To perform FOTA:

  1. Go to LoRaWAN > Operations.
  2. Under Operations Settings, select FOTA in the Operation Type drop-down.
  3. Click Browse and select your firmware upgrade file (.bin).
  4. You have the option to specify a Setup Time In by clicking Change.Setup time specifies how long from the time scheduled before the Multicast Setup Process begins. Under Setup Time Input from the drop-down, select either:

    a.  Countdown to Setup from Now:  Enter Number of Days plus hours, minutes and seconds in HH:MM:SS (default: 30 seconds) OR
    b.  Specify Future Date and Time: Select your desired Date and Time.

  5. Otherwise, click Hide to hide Setup Time Input details. Click Change to show and modify.
  6. You have the option to specify a Launch Time In. Launch time specifies how long the Multicast Process runs before starting firmware transmission. Under Launch Time Input from drop-down, select either:

    a.  Countdown to Launch from Setup:  Enter Number of Days plus hours, minutes and seconds in HH:MM:SS (default: 90 seconds) OR
    b.  Specify Future Date and Time: Select your desired Date and Time.

  7. Choose the desired Target End-Devices to receive the upgrade. Select either a previously-saved End-Device Group or Individual Devices from the drop-down on the right. Check the box near your desired device or group to designate it for upgrade. You can also check Select/Deselect All box to select or deselect all groups in the list.
  8. Click the Settings tab, if you wish to change the defaults for the following FOTA parameters
    1. Delete Successful Logs (default: checked)
    2. Number of Parity Fragments per Session (default: 100)
    3. Sleep Delay between Setup Messages (default: 1000 microseconds)
    4. Sleep Delay between Data Fragments (default: 1500 microseconds)
    5. Sleep Delay between Parity Fragments (default: 3000 microseconds)
  9. After configuring FOTA, click Schedule to finalize your FOTA update
  10. Once the scheduled upgrade is submitted, you can track its progress through the Progress tab. A progress bar appears at the top of the page. The progress bar shows the transfer

    of the file from the PC to the device. Once completed, the page switches to the Progress tab. The job displays in either Scheduled, Active, or Completed Jobs lists depending

    on the job phase and timing.

To perform the Multicast Messaging:

  1. Go to LoRaWAN > Operations.
  2. Under Operations Settings, select Message in the Operation Type drop-down.
  3. Select from either Textbox or File under Payload Source.
  4. Select from either Hexadecimal or Base64 under Payload Format.
  5. Enter the message contents under Payload.
  6. Enter the Port from a range of 1-220 (default: 1).
  7. Under Transmission Setup, you have the option to specify a Setup Time In by clicking Change.Setup time specifies how long from the time scheduled before the Multicast Setup Process begins. Under Setup Time Input from the drop-down, select either:
      1.  Countdown to Setup from Now:  Enter Number of Days plus hours, minutes and seconds in HH:MM:SS (default: 30 seconds) OR
      2.  Specify Future Date and Time: Select your desired Date and Time.
  8. Otherwise, click Hide to hide Setup Time Input details. Click Change to show and modify.
  9. You have the option to specify a Launch Time In.Launch time specifies how long the Multicast Process runs before starting message transmission. Under Launch Time Input from drop-down, select either:

    a.  Countdown to Launch from Setup:  Enter Number of Days plus hours, minutes and seconds in HH:MM:SS (default: 90 seconds) OR
    b.  Specify Future Date and Time: Select your desired Date and Time.

  10. Choose the desired Target End-Devices to receive the message. Select either a previously-saved End-Device Group or Individual Devices from the drop-down on the right.  Check the box near your desired
    device or group to designate it to receive the message. You can also check Select/Deselect All box to select or deselect all groups in the list.
  11. Click the Settings tab, if you wish to change the defaults for the following message parameters
    1. Delete Successful Logs (default: checked)
    2. Sleep Delay between Setup Messages (default: 1000 microseconds)
    3. Sleep Delay between Data Fragments (default: 1500 microseconds)

    These parameters are constants for multicast messaging and cannot be modified:

    • Number of Parity Fragments per Session (value: 100)
    • Sleep Delay between Parity Fragments (value: 3000 microseconds)
  12. After configuring Mulitcast Messaging, click Schedule to schedule your message.
  13. Once the scheduled message is submitted, you can track its progress through the Progress tab. A progress bar appears at the top of the page. The progress bar shows the transfer of the message from the PC to the device. Once completed, the page switches to the Progress tab. The job displays in either Scheduled, Active, or Completed Jobs lists depending on the job phase and timing.


Troubleshooting FOTA

Here are some troubleshooting tips when using FOTA  (setup: a Conduit using a LoRa accessory card paired with at least one mDot end device).

Troubleshooting FOTA on the Conduit

Problem: FOTA Session not starting.

Troubleshooting:

  • Verify that there is not a current FOTA session. If there is no current FOTA session and a FOTA session will not start, reboot the Conduit.
  • If the Conduit does not receive at least one response from an mDot, the FOTA session will not start. The process will go from SETUP (10%) to TEARDOWN (90%). Check the log (/var/log/log_fota*) to make sure the Conduit is receiving the setup answers.

Problem: FOTA Session not successful.

Troubleshooting:

  • For a FOTA Session to be successful, the mDot has to be able to reconstruct the file. If the mDot misses too many packets, the FOTA session will not be successful and the mDot will not send a CRC to the Conduit.
  • If the Conduit receives a CRC from an mDot check the FOTA log (/var/log/log_fota*) to make sure the CRC matches the Conduit and the CRC correct answer is sent back to the mDot. Check the mDot debug log to verify if the device received the CRC answer.

Problem: Stop FOTA Session / FOTA Session won’t start (FOTA in progress) / Stop Multicast Session

Troubleshooting:

  • To end a FOTA session that is in progress, send ‘ps -A | grep fota’. Find the PID associated with lora-fota (not lora-fota-demo). Then send ‘kill (pid of lora-fota)’.
  • Also send ‘rm -r -f ~/.fota/’. Devices may be in Class C or Class A depending on the FOTA session status before it ended. Make sure to change the devices back to their appropriate class. Make sure the FOTA daemon is running by ‘/etc/init.d/fotad restart’.
  • To end a Multicast session that is in progress, use ‘ps -A | grep mcm’. Find the PID associated with lora-mcm. Then use ‘kill (pid of lora-mcm)’. Also send ‘rm -r -f ~/.fota/’.
  • Wiping out the .fota directory removes any future FOTA/multicast sessions scheduled that have not setup.

Troubleshooting FOTA on the mDot

Problem: mDot does not receive any file fragments.

Troubleshooting:

  • The mDot must receive two setup messages for the FOTA session to work, fragmentation setup request and multicast setup request.
    • Verify if the mDot received the fragmentation setup request. This comes down on port 201. When the mDot receives this request, it sends an answer. Check the mDot debug log for Sending Fragmentation Response.
    • After sending the fragmentation response, the mDot receives a multicast setup request. Check for this message on port 201. The mDot responds with a multicast setup answer. Check the mDot debug log for Sending Multicast Response.
  • Make sure the mDot is in Class C at the start of the FOTA session (AT+DC). The mDot must also be awake and will not wake up to start the FOTA/Multicast session. The command AT+FOTA=3 displays the time before a FOTA session starts.
  • Make sure the Conduit is sending the fragments by checking the Conduit logs in /var/log/log_fota*.

Problem: mDot cannot complete the FOTA session.

Troubleshooting:

  • If the mDot misses too many packets, the FOTA session cannot be completed.
  • If the mDot was able to reconstruct the file using parity fragments, it sends a CRC check to the Conduit. Check the mDot debug log for Sending CRC. If the mDot does not receive a response or the Conduit responds with CRC not correct, the mDot discards the file.

Problem: mDot fails to process parity fragments.

Troubleshooting:

  • If the Conduit sends parity fragments faster than the mDot can process them, the mDot starts failing to properly receive the fragments. This results in failed MIC checks or wrong address, which is noted in the mDot debug log.
  • To correct this, increase the delay between parity fragments on the Conduit.

Problem: mDot is unexpected state.

Troubleshooting:

  • If the mDot is in a bad or unknown state, use ATZ to reset the mDot and clear the multicast and FOTA states. AT+FOTA=2 also resets FOTA and Multicast states.