Events

:

:

Elektronik | Funk | Software

Der Technik-Blog

  • Social Media

    YouTube

    Werbung:


    New Posts


    Events

    • Keine zukünftigen Events vorhanden

    The Tech-Blog

    LoRaWAN Packet Recorder Setup

    Packet Recorder - Compile on Linux

    Alex @ AEQ-WEB

    For the LoRaWAN Network Server (Simple LNS) project, a database connection will be required in the future. As an intermediate step, there is another project called Packet Recorder, which records all LoRaWAN messages and assigns them to a network operator. This makes it possible to identify who operates a network in the area and how many devices are connected to it. The following article describes the compilation process on Linux and the creation of a static library from the MariaDB/MySQL Connector.


    Note: The MariaDB Connector is used as it is also compatible with MySQL database servers. Version 3.1.26 is used because it still allows unencrypted connections to the localhost.


    To edit and compile the source code in Visual Studio Code, the appropriate compiler must be available. It is recommended to start with the tutorial C++ Compiling and complete all steps before editing and compiling the code provided here. Visual Studio Code is also available for Linux, and the necessary support for CMake can be installed as a package on Linux. First, the source code of the MariaDB C Connector must be downloaded and extracted, for example, to C:/mariadb-connector-c.

    Werbung:

    Using a terminal, navigate to the extracted directory of the MariaDB C Connector, create a new folder named "Build," and then switch to this folder:

    The following command is used to generate a static library for Linux from the source code:

    cmake . -DWITH_SSL=OFF -DWITH_STATIC_LIB=ON -DWITH_DYNAMIC_LIB=OFF

    Werbung:

    If all files were successfully generated, you can proceed with the following command: make

    If this step was also successfully completed, you can proceed with the following command: make install

    By default, the previous command "make install" copies the MariaDB Connector files to the directory "/usr/local/". The project can be opened in Visual Studio Code. In the CMakeLists.txt file, the correct paths must be specified:

    Werbung:

    Compilation Process

    The project can now be compiled. On Linux a ./packetrecorder file should be located in the Build folder of the opened project directory. For the Packet Recorder to work correctly, the config file containing the credentials for the MariaDB/MySQL database must be in the same directory. Further information can be found in this article:


    Info: This page was automatically translated and may contain errors
    122X122

    About the Author

    Alex, the founder of AEQ-WEB. He works for more of 10 years with different computers, microcontroller and semiconductors. In addition to hardware projects, he also develops websites, apps and software for computers.

    Top articles in this category:

    Vaisala RS41 Radiosonde Firmware Flash

    Radiosonde RS41 Firmware Flash

    • Video
    • DE/EN

    Every day hundreds of meteorological radiosondes fall from the sky. In this article we convert a radiosonde into a GPS tracker for APRS, RTTY & CW

    read more
    C++ IP Address View

    C++ example code to display IP addresses

    • Video
    • DE/EN

    This example code in C++, compiled with CMake, displays the current IP addresses of the network interface on both Windows and Linux.

    read more

    Social Media

    YouTube

    Werbung:


    New Posts


    Events

    • Keine zukünftigen Events vorhanden