Log analysisLink to Log analysis

Packets forwardingLink to Packets forwarding

To identify the paquets in the logs, here are some examples of how they are logged:

Uplink packet forwarded:

JSON up: {"rxpk":[{"tmst":3842996084,"chan":2,"rfch":1,"freq":868.500000,"stat":1,"modu":"LORA","datr":"SF12BW125","codr":"4/5","lsnr":9.5,"rssi":-4,"size":28,"data":"gMsjASaAF+YBAxPTxQ0IIePC3Loi1RikdEA9DA=="}]}

Downlink packet forwarded:

JSON down: {"txpk":{"imme":false,"tmst":3844996084,"freq":869.525,"rfch":0,"powe":27,"modu":"LORA","datr":"SF9BW125","codr":"4/5","ipol":true,"size":17,"ncrc":true,"data":"YMsjASalalkDVf8AAeeRmP4="}}

Stats report (every 30 seconds) with 3 packets :

### [UPSTREAM] ###
# RF packets received by concentrator: 3
# CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
 # RF packets forwarded: 3 (84 bytes)
# PUSH_DATA datagrams sent: 4 (757 bytes)
# PUSH_DATA acknowledged: 100.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (100.00% acknowledged)
# PULL_RESP(onse) datagrams received: 3 (576 bytes)
# RF packets sent to concentrator: 3 (51 bytes)
# TX errors: 0

Network Server connectivityLink to Network Server connectivity

Checking fist connectionLink to Checking fist connection

When you start the forwarder, it will try to connect directely to the server and pull some data from the server.

If it succeeds, you will see the following message:

[down] PULL_ACK received in XX ms

This means the forwarder could contact the server.

forwarder *** UDP Packet Forwarder v5.1.0 ***
forwarder *** UDP Packet Forwarder v5.1.0 ***
forwarder *** Lora concentrator HAL library, Version: 5.0.1; ***
forwarder *** Lora concentrator HAL library, Version: 5.0.1; ***
forwarder INFO: Little endian host
forwarder INFO: looking for hardware configuration file at '/etc/opt/udp-packet-forwarder/hardware/hardware_conf.json'
forwarder INFO: found hardware configuration file /etc/opt/udp-packet-forwarder/hardware/hardware_conf.json
forwarder INFO: Checking signature with 2 public keys
forwarder TRACE: [verify] Checking RSA signature
forwarder INFO: [verify] Signature is NOT valid
forwarder TRACE: [verify] Checking RSA signature
forwarder INFO: [verify] Signature is valid
forwarder INFO: hardware configuration file signature is valid, parsing configuration /etc/opt/udp-packet-forwarder/hardware/hardware_conf.json
forwarder INFO: /etc/opt/udp-packet-forwarder/hardware/hardware_conf.json does contain a JSON object named hardware_conf, parsing SX1301 parameters
forwarder INFO: no configuration for LBT
forwarder INFO: antenna_gain 0 dBi
forwarder INFO: radio 0 enabled (type SX1257), center frequency 0 (may be overriden), RSSI offset -164.000000, tx enabled 1
forwarder INFO: radio 1 enabled (type SX1257), center frequency 0 (may be overriden), RSSI offset -164.000000, tx enabled 0
forwarder INFO: found channels configuration file /etc/opt/udp-packet-forwarder/channels/channels_conf.json, parsing it
forwarder INFO: /etc/opt/udp-packet-forwarder/channels/channels_conf.json does contain a JSON object named radio, parsing SX1301 parameters
forwarder INFO: radio 0 frequency override : 867500000 Hz
forwarder INFO: radio 1 frequency override : 868500000 Hz
forwarder INFO: /etc/opt/udp-packet-forwarder/channels/channels_conf.json does contain a JSON object named channels_conf, parsing SX1301 parameters
forwarder INFO: Lora multi-SF channel 0> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora multi-SF channel 1> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora multi-SF channel 2> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora multi-SF channel 3> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora multi-SF channel 4> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora multi-SF channel 5> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora multi-SF channel 6> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora multi-SF channel 7> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
forwarder INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
forwarder INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
forwarder INFO: found global configuration file /etc/opt/udp-packet-forwarder/gateway/generic/gateway_global_conf.json, parsing it
forwarder INFO: /etc/opt/udp-packet-forwarder/gateway/generic/gateway_global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
forwarder INFO: the forwarder is lorawan_public
forwarder INFO: server hostname or IP address is configured to "eu1.cloud.thethings.network"
forwarder INFO: upstream port is configured to "1700"
forwarder INFO: downstream port is configured to "1700"
forwarder INFO: downstream keep-alive interval is configured to 10 seconds
forwarder INFO: statistics display interval is configured to 30 seconds
forwarder INFO: upstream PUSH_DATA time-out is configured to 100 ms
forwarder INFO: packets received with a valid CRC will be forwarded
forwarder INFO: packets received with a CRC error will NOT be forwarded
forwarder INFO: packets received with no CRC will NOT be forwarded
forwarder INFO: Auto-quit after 3 non-acknowledged PULL_DATA
forwarder INFO: found local configuration file /etc/opt/udp-packet-forwarder/gateway/generic/gateway_local_conf.json, parsing it
forwarder INFO: redefined parameters will overwrite global parameters
forwarder INFO: /etc/opt/udp-packet-forwarder/gateway/generic/gateway_local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
forwarder INFO: gateway MAC address is configured to FCC23DFFFE0A8C39
forwarder INFO: the forwarder is lorawan_public
forwarder INFO: packets received with a valid CRC will be forwarded
forwarder INFO: packets received with a CRC error will NOT be forwarded
forwarder INFO: packets received with no CRC will NOT be forwarded
forwarder INFO: Reference latitude is configured to -1.000000 deg
forwarder INFO: Reference longitude is configured to -1.000000 deg
forwarder INFO: Reference altitude is configured to -1 meters
forwarder INFO: Using real GPS if available.
forwarder INFO: lorawan_public 1, clksrc 1
forwarder INFO: LBT is disabled
forwarder INFO: Configuring TX LUT with 16 indexes
forwarder INFO: Configuring RF chains
forwarder INFO: [main] SPI device has been set to /dev/spidev0.0
forwarder INFO: [main] concentrator started, packet can now be received
forwarder INFO: Disabling GPS mode for concentrator's counter...
forwarder INFO: host/sx1301 time offset=(1625056482s:990704µs) - drift=-228025744µs
forwarder INFO: Enabling GPS mode for concentrator's counter.
forwarder INFO: [down] PULL_ACK received in 24 ms

How the UDP Packet Forwarder handles re-connectionLink to How the UDP Packet Forwarder handles re-connection

The packet forwarder is connected to the server through UDP. This means that the forwarder itself does not know whether it's connected or not. When using an unstable connection, if the used network configuration changes (e.g. VPN) or during Network Server maintenance, it may happen that the connection is lost.  In that case, restarting the forwarder will make it reconnect. To ensure that the forwarder reconnect automatically (without a manual restart), the autoquit_threshold=3 option is set by default. This option makes the forwarder autoquit if a number of consecutive datagrams (3) have not been acknowledged by the server. 

Check connectivity qualityLink to Check connectivity quality

When the packet forwarder sends or requests some data, it is acknowledged by the server. The number of acknowledgment are visible in the stats log. A stats log is shown every 30 seconds and show the statistics for the last 30 seconds.

The log looks like this :

### [UPSTREAM] ###
# RF packets received by concentrator: 3
# CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
 # RF packets forwarded: 3 (84 bytes)
# PUSH_DATA datagrams sent: 4 (757 bytes)
# PUSH_DATA acknowledged: 100.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (100.00% acknowledged)
# PULL_RESP(onse) datagrams received: 3 (576 bytes)
# RF packets sent to concentrator: 3 (51 bytes)
# TX errors: 0

In this log, we can see that 4 datagrams have been sent:

# PUSH_DATA datagrams sent: 4 (757 bytes)

And all of them have been received by the server:

# PUSH_DATA acknowledged: 100.00%

Also we see that 3 data requests have been made to the server and all of them have been received :

# PULL_DATA sent: 3 (100.00% acknowledged)

If the acknowledgment are not at 100%, this means you have a problem with the server connectivity. This could typically occur on unstable connections (typically bad LTE).

One datagram may contain 0 or more packets. If you are interested about packets, you'd rather check the "packets" lines.

Packets CRC statusLink to Packets CRC status

When packets are sent by the end node, a control sum is added to verify the integrity of the data that is sent. If the LoRa base station does not receive exactly what has been sent by the end node, the comparison of the received CRC and the computed CRC of the data does not correspond. We say that the CRC is bad (actually, it's often the data that is bad) or that the CRC check failed. Packets with a bad CRC are generally not usable and should be dropped.

There can be multiple reasons why packets with a bad CRC are received:

  • The end node sends a bad CRC because it's faulty
  • Part of the data is not demodulated correctly because of a bad reception quality, e.g. the end node is too far from the base station or there is too much attenuation
  • Part of the signal is jammed by another emitter, e.g. another end node or a GSM-R antenna nearby

Whether receiving packets with bad CRC or not is a problem depends on your use case and environment.

First, keep in mind that the LoRa base station receives packets from any end node, not just yours. Your end nodes are generally in good range of your LoRa network, but the others nodes may not. Most often, bad CRC packets come from other end nodes. If you operate a LoRa base station in a populated area where there are many end nodes, you will always receive some bad CRC packets. Having a bad CRC rate of 30% can be common in such environment.

If the base station is in a controlled environment and you have many bad CRC from your own end nodes that should be covered, you may check the signal/noise ratio (SNR) and signal strength (RSSI) of the valid packets to identify which end node has a bad "link" and may have bad CRC packets. There is no absolute values to define a good reception, but generally speaking the RSSI should be above -120dB and the SNR above -10.

Common issuesLink to Common issues

Failed to start the concentratorLink to Failed to start the concentrator

Symptom: It may happen that you get the following message when starting the forwarder:

ERROR: [main] failed to start the concentrator

Cause: This typically happens after a improper shutdown/restart of the forwarder, this can also happen when you stop the forwarder just after starting it (even from the GUI).

Diagnostic: the LoRa concentrator is in a bad state.

Solution: reset the concentrator

There is no possibility at this time to reset the concentrator from the GUI. As a workaround, you can restart the gateway from the Manager UI top-right menu.

sudo rc-service lora-concentrator restart
CODE

Was this page helpful for you?

Yes
No
Fix it