ExploreEmbedded / Hornbill-Examples

89 stars 171 forks source link

sending large payload truncates the string - TX buffer size? #28

Closed intelligentandgoodlooking closed 3 years ago

intelligentandgoodlooking commented 3 years ago

Trying to send a payload larger than 512 bytes, but the last characters are missing. I have changed the butter size in aws_iot_config.h
#define AWS_IOT_MQTT_TX_BUF_LEN 512 but it does not appear to change the output. I thought it might be in AWS_IOT.cpp char cPayload[512]; ...but sadly ...no dice

intelligentandgoodlooking commented 3 years ago

Found it. It was my own buffer size that I had passed in. This constant in aws_iot_config.h does need to be changed to allow bigger payloads #define AWS_IOT_MQTT_TX_BUF_LEN 512 But it seems
cPayload[512] can be left as is: