MQTT-based file delivery from the thing to AWS Core IOT

0

I'm developing a system based on AWS Core IOT FreeRTOS that is using MQTT and Shadow library to communicate both ways. Is there a way to send a file in the upstream direction, that is from the thing to AWS Core IOT? I see that there is an option to MQTT-based file delivery but I need the other way around.

EyalG
preguntada hace un año382 visualizaciones
2 Respuestas
1
Respuesta aceptada

Hi EyalG. There's no equivalent or similar upstream mechanism for MQTT. To do it over MQTT, you would have to break your file into parts of not more than 128KB (current MQTT payload limit) for transport and re-constitute it in the cloud.

One alternative you may consider is to upload to S3 using HTTP: https://aws.amazon.com/blogs/iot/securely-ingesting-large-sized-payloads-from-iot-devices-to-the-aws-cloud/. You can find a similar demo implementation here: https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/demos/http/http_demo_s3_upload/http_demo_s3_upload.c

profile pictureAWS
EXPERTO
Greg_B
respondido hace un año
profile picture
EXPERTO
revisado hace un mes
0

Thank you for the answer. In my case the requested file length is much less then 128K but the only way I know to communicate with the Core is by updating the shadow topic with publish call (MQTTAgent_Publish). How can I send a file with that MQTT interface if its size is less then 128K? Thanks

EyalG
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas