Seeed-Studio / WioLTE_Cat_NB1_Arduino_Library

LTE Cat NB1 dev board using ublox SARA-R4 02B and STM32F405RGT6
MIT License
33 stars 13 forks source link

MQTT publish size is limited to less than 50Bytes. #7

Closed g-berthiaume closed 1 month ago

g-berthiaume commented 5 years ago

In the ublox_sara_r4_mqtt.cpp file you can find the following code:

bool MQTT::publish(const char *topic, const char *msg, uint8_t qos, uint8_t retain)
{
    bool retVal = false;
    char txBuf[64] = {'\0'};
    sprintf(txBuf, "AT+UMQTTC=2,%d,%d,\"%s\",\"%s\""CRLF, qos, retain, topic, msg);
    retVal = check_with_cmd(txBuf, "+UMQTTC: 2,1", CMD);        
    return retVal;
}

Why do you limit the publish AT command size to 64? (therefore limiting the mqtt topic + message to 50 characters) Is there any SARAR4 limitation that could explain this buffer size? Thanks.