LoRaWAN Troubleshooting FAQ

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

In this article, you will find answers and support for problems that may appear during the installation and configuration of LoRaWAN.

LoRaWan at Thomas-Krenn

Error notification: exec: "python": executable file not found in $PATH Error compiling for board Heltec WiFi LoRa 32(V2)

Reason for the error notification: Arduino looks for another Python version that is not available in the path variable. Here, it is helpful to set an individual softlink.

Solution:

sudo ln -s /usr/bin/python3 /usr/bin/python


Error notification: ModuleNotFoundError: No module named 'serial' exit status 1 Error compiling for board Heltec WiFi LoRa 32(V2)

Reason of the error notification: If the pyserial module is not installed or an old version is installed, it must be updated.

Solution:

sudo apt install curl
sudo curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python get-pip.py
sudo pip uninstall serial; pip install pyserial

Access rights incorrect

If error messages such as those listed below appear, there is a rights problem.

File "/home/tk/.local/lib/python3.8/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'

Solution:

Either temporary / change the permissions:

sudo chmod 777 /dev/ttyUSB0

Or assign the current user to the tty group and then restart the system:

sudo usermod -a -G tty $USER


LoRamodul transmits, but no packets are arriving in The Things Stack/TTS

Mistake 1: The radio frequency is still set to US 915 MHz; please change it to EU 868 MHz.

Verification of the file: lmic_project_config.h (see above section "Integrating and configuring the MCCI library")

Mistake 2: The Framecounter causes problems.

Short information: The Framecounter is a safety feature to prevent, for example, Replay Attacks, as the AppSessKey/NWSessKey/DeviceID is always the same at ABP. It is counted, how much packages arrive at the LoRa NWServer from LoRa node. If the counter is not correct anymore, the NetworkServer rejects the packets for security reasons. The Framecounter can be reset in the device overview in the TTS. Afterwards, the packages will arrive again.

Set settings:

select device -> General Settings -> Network Layer -> Expand -> Advanced Settings -> reset FrameCounters -> set on Enabled

Mistake 3: There is no TTS gateway nearby that could catch the LoRa frames.

Solution: Look up with TTNMapper, if there is a gateway nearby.

The module can not be found

If the module can not be found, verify with lsusb, if it was recognized correctly.

lsusb


Author: Wilfried Seifert

Wilfried Seifert, working in the Systems Engineering department at Thomas-Krenn, is responsible for system/prototype development in his work area. LPIC 3 certified, deals with construction / programming of embedded / GPIO systems; in his spare time he likes to repair old home computers, attends Linux conferences or is on the road with his bike (MTB) for sporting compensation.


Translator: Alina Ranzinger

Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.


Related articles

Read out Thomas-Krenn serial number under Windows and Linux
SUSE Linux Enterprise Server (SLES) Version Information
Vim file management of remote hosts with netrw