Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The architecture of an end-to-end LoRaWAN solution include entities such as Devices, Gateways, Network Server, Custom application/integrations. Hence, with some many entities involved, at times, it becomes important to have simultaneous end-to-end chain of logs to know what might be causing an issue. For example, a downlink failure can occur at Network Server level or at physical Gateway etc. So, to pinpoint the issue, logs at each level would be very helpful.

Collecting Debug logs from a Physical Device:

The process varies based on device model. Please refer to device guide/manuals or contact manufacturer.

Collecting Packet Forwarder logs from a Physical Gateway:

The process varies based on gateway model. Please refer to gateway guide/manuals or contact manufacturer.

Collecting Events from The Things Stack (Network Server):

The Things Stack generates lots of events that allow you to get insight in what is going on when you face an issue. You can subscribe to the relevant application, gateway, and end device events as and when necessary using any of the two methods mentioned below based on the scenario.

Method 1: From TTS Console

Step 1: Navigate to Device &/ Gateway Live data tab in TTS Console

Step 2: Enable Verbose Stream

Step 3: Perform the tests or Reproduce the scenario/issue

Step 4: Once your tests are completed, you can simply click on the Export as JSON button.

Note:
1. Follow the same process for collecting Device & Gateway event logs.
2. If you want to run tests for a longer span and require logs of the whole test duration, this method might not be suitable. You can use Method 2 for this purpose, which is collecting logs using CLI.

Method 2: Using CLI

Prerequisites:

  1. Install CLI. Ref: https://www.thethingsindustries.com/docs/getting-started/cli/

  2. Create a User API Key:

...

Note: Make sure you are in the right directory that has the docker-compose.yml to restart the stack.

AWS AMI Deployment:

  1. SSH into the EC2 instance. Please see How can I SSH into my machine reference for information to SSH into the EC2 instance.

  2. Add the following lines to the file /tti/lorawan-stack/config.yml.

...

Code Block
$ sudo journalctl -f -u lorawan-stack.service

AWS ECS Deployment:

  1. Go to the 4-2a-configuration CloudFormation stack.

  2. Navigate to the Resources section and find GlobalConfiguration

  3. Go to its Physical ID and edit the configuration

  4. Add the below lines to the configuration file.

    Code Block
    log:
      level: debug
  5. Restart the ECS tasks to apply the configuration.

  6. Check the CloudWatch log events for DEBUG logs.

...