MQTT-SN event: Retransmission retries limit has been reached

Hi,

I am using an pca10059 as a SED together with a border router in my thread network. The SED shall publish every 5 min sensor data. That works fine. But after some time (randomly after 40 min or 6h) I get this error message via logger and I cant publish the sensor data anymore:

<info> app: MQTT-SN event: Retransmission retries limit has been reached.

<info> app: MQTT-SN event: Timed-out message: 5. Message ID: 0.

While testing where the problem lies, I added a pca10056 (SED) and got the same error at the same time for both devices.

These are my parameters for the SED devices (standard):

#define DEFAULT_CHILD_TIMEOUT    40                                         /**< Thread child timeout [s]. */
#define DEFAULT_POLL_PERIOD      1000                                       /**< Thread Sleepy End Device polling period when MQTT-SN Asleep. [ms] */
#define SHORT_POLL_PERIOD        100                                        /**< Thread Sleepy End Device polling period when MQTT-SN Awake. [ms] */
#define SEARCH_GATEWAY_TIMEOUT 5  

#define SCHED_QUEUE_SIZE      32                              /**< Maximum number of events in the scheduler queue. */
#define SCHED_EVENT_DATA_SIZE APP_TIMER_SCHED_EVENT_DATA_SIZE /**< Maximum app_scheduler event size. */

Do I have to change some timeout parameter for the gateway? Or does the thread network need at least one FTD next to the border router?

Ps: I use Linux, SDK17, VS-Code, pca10056/59

  • Hi Maboo

    I do not think this is a property of the Thread network. The Border Router/Gateway should act as a FTD, and would in this case be the Thread Leader.

    It is possibly a bug in the Gateway/Border Router.
    Do you have access to debug logs from your Gateway?

    In the meantime, I will also try to replicate the problem.

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    thanks for your reply. I tried to find a way to debug the gateway. The standard Paho-mqtt-sn-gateway seems to have a LogMonitor. But i couldn't find one within the nrf gateway (nrf border router image). Is there any LogMonitor available?

    Thats my paho-mqtt-sn-gateway.conf:

    #**************************************************************************
    # Copyright (c) 2016-2019, Tomoaki Yamaguchi
    #
    # All rights reserved. This program and the accompanying materials
    # are made available under the terms of the Eclipse Public License v1.0
    # and Eclipse Distribution License v1.0 which accompany this distribution.
    #
    # The Eclipse Public License is available at
    #    http://www.eclipse.org/legal/epl-v10.html
    # and the Eclipse Distribution License is available at
    #   http://www.eclipse.org/org/documents/edl-v10.php.
    #***************************************************************************
    #
    # config file of MQTT-SN Gateway
    #
    
    # IPv4 Address of iot.eclipse.org
    BrokerName=137.135.83.217
    BrokerPortNo=1883
    BrokerSecurePortNo=8883
    
    #
    # When AggregatingGateway=YES or ClientAuthentication=YES,
    # All clients must be specified by the ClientList File
    #
    
    ClientAuthentication=NO
    AggregatingGateway=NO
    QoS-1=NO
    Forwarder=NO
    
    #ClientsList=/path/to/your_clients.conf
    
    PredefinedTopic=NO
    #PredefinedTopicList=/path/to/your_predefinedTopic.conf
    
    #RootCAfile=/etc/ssl/certs/ca-certificates.crt
    #RootCApath=/etc/ssl/certs/
    #CertsFile=/path/to/certKey.pem
    #PrivateKey=/path/to/privateKey.pem
    
    GatewayID=1
    GatewayName=PahoGateway-01
    KeepAlive=900
    #LoginID=your_ID
    #Password=your_Password
    
    # UDP
    GatewayPortNo=10000
    MulticastIP=225.1.1.1
    MulticastPortNo=1883
    
    # GatewayUDP6Broadcast address is set to all Thread devices address
    # in order to enable Thread Sleepy Devices to receive multicast messages
    # sent from the gateway.
    # UDP6
    GatewayUDP6Port = 47193
    GatewayUDP6Broadcast = ff33:40:fdde:ad00:beef:0:0:1
    GatewayUDP6If = wpan0
    
    # XBee
    Baudrate=38400
    SerialDevice=/dev/ttyUSB0
    ApiMode=2
    
    # LOG
    ShearedMemory=YES;
    
    

    Regards Maboo

  • Hi

    I do not know now how to read the log from the nRF Border Router.

    However, there is this version of a Openthread Border Router with MQTT-SN support which is an alternative to using the nRF Border Router as a gateway.

    In this OTBR, you can see the logs when you run the "docker run [...]" command.

    If you are able to try this, it would be interesting to see both:
    1. Is the error still happening with another version of the Gateway?
    2. The error logs from this version.

    If this is not possible for you to test, let me know, and I will try to dig for the logs in the nRF Border Router.

    Regards,
    Sigurd Hellesvik

  • Hi,

    unfortunately I do have some problems to get the OTBR running. I won't give up yet, but it would be very helpful, if you could ask around how the logs on the nRF BR work.

    Thanks!

    Maboo

  • Hi

    I will set up a nRF5 Thread router and see if I am able to find MQTT-SN logs.
    I hope to be done with this by Wednesday.

    Regards,
    Sigurd Hellesvik

Related