Serial LTE Modem, Subscribe MQTT, how to receive packet with unlimited size

Hello,

We are using the serial LTE modem on the nrf connect sdk v1.9.1. We are trying to receive a big message on a topic we have subscribe to, but the serial LTE modem crash with error code  EBUSY if we receive a packet with a size superior at about 500 bytes. Is it possible to use something like a data mode to receive bigger packet and redirect them directly in UART ? According to the documentation of the data mode, it should be possible, as it says that in data mode:


It considers all the data streamed from a remote service as arbitrary data to be sent to the MCU over the UART bus.

So, is it possible to enable data mode to the reception on a topic in MQTT ? If not for MQTT, is-it possible to enable data mode for reception in another protocol ?

Kind Regards

Parents Reply Children
  • Hello,

    Thank you for your reply.

    We are only using the sample serial LTE modem and we send it commands AT with the PC terminal in UART. Here is the prj.conf file: /cfs-file/__key/communityserver-discussions-components-files/4/2500.prj.conf


    Here are the AT commands we used:

    # Tell the modem to connect 
    AT+CFUN=1
    
    # Check if we are connected
    AT+CEREG?
    
    # Connect to our broker in MQTTS
    AT#XMQTTCON=1,"my-id","","","our_broker_url",1883,24
    
    # Check if we are connected to our broker
    AT#XMQTTCON?
    
    # Subscribe to the topic topic_test
    AT#XMQTTSUB="topic_test",2
    
    
    
    # With our PC, we publish data on the topic topic_test:
    mosquitto_pub -h our_broker_url -p 1883 -t topic_test --capath /etc/ssl/certs/ -m "Hello"


    But once we publish a message with a size > 576 (which I believe is linked to the variable SLM_SOCKET_RX_MAX),
    we got these error code:

    #XMQTTEVT: 2,-122

    #XMQTTEVT: 1,-113

    And we lose the connection with our MQTT server.

    We use our own server MQTT which is not on AWS. I still tried to increase the size of CONFIG_AWS_IOT_MQTT_PAYLOAD_BUFFER_LEN to no effect.

    Kind Regards

  • Hello,

    Any update on this ?

    I guess my question can be resumed as:
    When we subscribed to a topic with the serial LTE Modem, is it possible to received a message > SLM_SOCKET_RX_MAX ?

    Kind Regards

Related