Syslog backend over LTE-M for nrf9160

How to properly activate zephyr logs with network syslog backend to work over LTE-M for nrf9160 custom device?

Parents
  • Are you saying this is what you're seeing too? Where are you outputting this syslog exactly on your end?

    Best regards,

    Simon

  • I meant that the example project I showed you is compiling and I can see the logs in the shell terminal. However, I do not see logs of the Syslog type (RFC 5424) on the server specified in the configuration (169.46.82.174:25736). In the example, I use a server that is provided by service https://papertrailapp.com. However, in reality there should be a full-fledged Syslog server.

  • Is there any good news?

  • Sorry for the delay, I had many issues with setting everything up.

    For the last few days I have been trying to both integrate LTE into the syslog sample and try to integrate syslog into Asset Tracker v2 unsuccessfully.

    But I finally have good news!

    I have finally managed to SUCCESSFULLY send the logs to the papertrail server with the syslog sample on NCS 2.8.0.

    My configuration right now is quite suboptimal and chaotic, but this is how I have managed to do it, so please test it as well, just change the papertrail address to your own.

    prj.conf:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    # nRF modem library
    CONFIG_NRF_MODEM_LIB=y
    # CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC=y
    # LTE link control
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_NETWORK_MODE_LTE_M=y
    CONFIG_NETWORKING=y
    CONFIG_NET_UDP=y
    # CONFIG_ENTROPY_GENERATOR=y
    # CONFIG_TEST_RANDOM_GENERATOR=y
    CONFIG_INIT_STACKS=y
    CONFIG_NET_PKT_RX_COUNT=32
    CONFIG_NET_PKT_TX_COUNT=32
    CONFIG_NET_BUF_RX_COUNT=32
    CONFIG_NET_BUF_TX_COUNT=32
    CONFIG_NET_SOCKETS=y
    # CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    And in main.c I just added the following at the start of the main{} function:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    int main(void)
    {
    LOG_DBG("Modem config and start");
    int err;
    err = nrf_modem_lib_init();
    err = lte_lc_connect();
    if (err) {
    LOG_DBG("Failed to connect to LTE network, error: %d\n", err);
    return -1;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    And if it still won't work for you, then please send me the log.

    Best regards,

    Michal

  • Thanks for your solution. For NCS 2.8.0 everything really works. But unfortunately I am tied to version NCS 2.0.2 due to a large fleet of devices and it doesn't work for me. By the way, I tried all SDK versions up to NCS 2.6.0 and this solution doesn't work for them either.

  • I understand. I will try to make it work on 2.0.2 as well. It may take me until sometime next week though.

  • Is there any good news?

Reply Children
No Data